Commit Graph

59 Commits

Author SHA1 Message Date
dcarney@chromium.org
8b2c26d736 remove most uses of raw handle constructors
R=svenpanne@chromium.org
BUG=

Review URL: https://codereview.chromium.org/15817014

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15107 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-13 09:27:09 +00:00
dslomov@chromium.org
9278a4b7b1 Change ArrayBuffer API and implementation to use embedder-provided allocator.
R=svenpanne@chromium.org

Review URL: https://codereview.chromium.org/15855012

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15056 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-11 10:41:14 +00:00
olivf@chromium.org
946ea53264 use compare nil ic only for non-strict equality. strict-equality only has one check and cannot deopt. should therefore not be part of the stub.
BUG=
R=rossberg@chromium.org

Review URL: https://codereview.chromium.org/16732002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15045 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-10 15:47:23 +00:00
olivf@chromium.org
3a26dda780 revert accidental dcommit
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15044 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-10 15:43:40 +00:00
olivf@chromium.org
23691cf023 also remove the constant
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15043 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-10 15:30:17 +00:00
yangguo@chromium.org
7f8a3d803c Make assertion scopes thread safe.
R=svenpanne@chromium.org
BUG=

Review URL: https://chromiumcodereview.appspot.com/15691017

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14919 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-03 15:32:22 +00:00
dcarney@chromium.org
cf5ff5a14c first step to remove unsafe handles
R=svenpanne@chromium.org
BUG=

Review URL: https://codereview.chromium.org/12729023

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14530 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-02 20:18:42 +00:00
loislo@chromium.org
ea0817c7d4 Split profile-generator
CPU profile code and Heap Snapshot code are completely unrelated to each other.
So we can extract heap snapshot part into separate file.
No functional changes.

BUG=none
TEST=none

Review URL: https://chromiumcodereview.appspot.com/12314027

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13706 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-02-21 12:10:40 +00:00
sanjoy@chromium.org
98db16d94f Progress towards making Zones independent of Isolates and Threads.
This CL changes some parts of the code to explicitly pass around a
Zone.  Not passing in a zone is okay too (in fact most of v8 still
doesn't), but that may incur a TLS lookup.

BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com/10443114

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11709 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-06-04 14:42:58 +00:00
fschneider@chromium.org
1f7d42efc9 Landing for pliard@chromium.org: Remove static initializers in v8.
This change includes two CLs by pliard@chromium.org:

1. http://codereview.chromium.org/9447052/ (Add CallOnce() and simple LazyInstance implementation):

Note that this implementation of LazyInstance does not handle global destructors (i.e. the lazy instances are never deleted).

This CL was initially reviewed on codereview.appspot.com:
http://codereview.appspot.com/5687064/



2.  http://codereview.chromium.org/9455088/ (Remove static initializers in v8):
This CL depends on CL 9447052 (adding CallOnce and LazyInstance).
It is based on a patch sent by Digit.

With this patch applied, we have only one static initializer left (in atomicops_internals_x86_gcc.cc). This static initializer populates a structure used by x86 atomic operations. It seems that we can hardly remove it. If possible, it will be removed in a next CL. 

This CL also modifies the presubmit script to check the number of static initializers.


BUG=v8:1859
Review URL: https://chromiumcodereview.appspot.com/9666052

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11010 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-03-12 13:56:56 +00:00
vegorov@chromium.org
c112fdc398 Adds a new API where the host can supply a callback function. The callback function can resolve the location of a return address on stack to the location where a return-address rewriting profiler stashed the original return address.
Review URL: https://chromiumcodereview.appspot.com/9401019
Patch from Sigurður Ásgeirsson <siggi@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10845 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-02-27 15:15:53 +00:00
erik.corry@gmail.com
b3e0761e38 Cosmetic changes ("set up" is a verb, "setup" is a noun).
Review URL: http://codereview.chromium.org/9139051

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10399 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-13 13:09:52 +00:00
yangguo@chromium.org
d9f7cf819c Implement callback when script finishes running in V8 API.
TEST=test-api/LeaveScriptCallback

Review URL: http://codereview.chromium.org/8937003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10323 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-04 08:48:35 +00:00
ulan@chromium.org
8dc728126e Start incremental marking on idle notification.
BUG=v8:1458
TEST=cctest/test-api/IdleNotification*

Review URL: http://codereview.chromium.org/8519002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10093 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-30 11:13:36 +00:00
lrn@chromium.org
7ab6e55f78 Moved random generator state to global context.
Change Random to take global context, not isolate.

BUG=v8:864

Review URL: http://codereview.chromium.org/8162014

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9753 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-24 12:12:21 +00:00
kmillikin@chromium.org
ceee9d535a Remove #include "isolate-inl.h" from v8.h.
Include it only in the .cc files where it's needed.

R=fschneider@chromium.org
BUG=
TEST=

Review URL: http://codereview.chromium.org/8117001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9506 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-03 11:13:20 +00:00
vegorov@chromium.org
ac36cb4504 Merge experimental/gc branch to the bleeding_edge.
Review URL: http://codereview.chromium.org/7945009

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9328 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-19 18:36:47 +00:00
svenpanne@chromium.org
cf63503cad Unify the handling of comparinsons against null and undefined.
Although this patch is not small, most parts of it are rather mechanical:

 * First of all, the concept of a 'nil-like' value is introduced, which can be
   null or undefined. They are treated symmetrically regarding comparisons, so
   it makes sense to handle them in a uniform manner. It is a mystery why
   JavaScript defines two of those beasts, when even *one* is a design wart...

 * Extended and renamed a few things which now handle undefined in addition to
   null.

 * Made the parts of the full code generator and the hydrogen generation which
   deal with comparisons a bit more similar regarding their handling of special
   cases.

 * Refactored the syntactical detection of special cases for comparisons,
   hopefully making them a bit more readable and less copy-n-paste-oriented.
   Things like this should really be a one-liner in any sane programming
   language... :-P

 * Cut down the length of the argument lists of a few functions to something
   less insane, making them more easily understandable locally. This involves
   minor code duplication, but this was a good tradeoff and can be remedied
   later if necessary.

 * Replaced some boolean arguments with more readable enums.

 * Fixed a TODO: Values which are definitely a Smi or unboxed can never be equal
   to null or undefined.
Review URL: http://codereview.chromium.org/7918012

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9323 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-19 14:50:33 +00:00
ager@chromium.org
78f173c47b Introduce a random entropy source which can optionally be provided at initialization.
BUG=89462

Review URL: http://codereview.chromium.org/7395012
Patch from Chris Neckar <cdn@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8666 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-07-17 09:16:28 +00:00
karlklose@chromium.org
cc19d1e278 Revert "Merge arguments branch to bleeding merge."
This reverts commit ceb31498b9d69edca3260820fb4047045891ce6d.

TBR=kmillikin@chromium.org

Review URL: http://codereview.chromium.org/7172030

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8308 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-16 06:37:49 +00:00
karlklose@chromium.org
6cfeb2d400 Merge arguments branch to bleeding merge.
Review URL: http://codereview.chromium.org/7167006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8300 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-15 15:09:28 +00:00
ager@chromium.org
ef7b56bf3e Remove unused methods.
Do not force set DEBUG.

R=kasperl@chromium.org
BUG=
TEST=

Review URL: http://codereview.chromium.org/7171014

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8287 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-15 06:51:22 +00:00
vegorov@chromium.org
08e7b94924 Fix compilation with debuggersupport=off.
Review URL: http://codereview.chromium.org/6901026

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7681 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-04-26 13:53:19 +00:00
vitalyr@chromium.org
179aef2b8f VM initialization refactoring.
This patch introduces global once per-process initialization and moves
the OS and CPU setup there. This makes CPU features isolate-independent.

Review URL: http://codereview.chromium.org/6670119

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7462 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-03-31 16:17:37 +00:00
vitalyr@chromium.org
d89c753152 Only pass isolate parameter to C helper functions that need it.
Review URL: http://codereview.chromium.org/6778018

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7450 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-03-30 18:05:16 +00:00
vitalyr@chromium.org
7976ca2cbc Merge isolates to bleeding_edge.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7271 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-03-18 20:35:07 +00:00
vitalyr@chromium.org
76e226f832 Revert r7268: it borked the history.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7269 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-03-18 19:41:05 +00:00
vitalyr@chromium.org
6ff7fdebd3 Merge isolates to bleeding_edge.
Review URL: http://codereview.chromium.org/6685088

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7268 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-03-18 18:49:56 +00:00
kasperl@chromium.org
90b3370374 Update V8 to version 3.0 (re-land r5920).
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5922 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-07 11:31:57 +00:00
kasperl@chromium.org
51b494d096 Revert r5920. Will re-land shortly.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5921 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-07 11:01:02 +00:00
kasperl@chromium.org
e5860bd6a8 Update V8 to version 3.0.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5920 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-07 09:11:56 +00:00
lrn@chromium.org
0c60c88c2c Working stand-alone preparser.
BUG=
TEST=

Review URL: http://codereview.chromium.org/5302003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5885 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-11-24 09:57:06 +00:00
ager@chromium.org
48066af7e0 Landing for Justing Schuh.
Split out the random number state between JavaScript and private API

I've added v8::RandomPrivate() for internaly used random numbers, and pass the state in as a parameter to a random_base function.

I still need to implement strong seeding. I already know how and will be landing that in another patch.

BUG=http://code.google.com/p/v8/issues/detail?id=936
TEST=None.

Codereview URL: http://codereview.chromium.org/5143004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5845 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-11-18 08:23:49 +00:00
lrn@chromium.org
af7b6fecfe Split globals.h into two parts, where only one depends on V8.
Made allocation.{h,cc} independent of V8, allowing utils.h to allocate
vectors and collectors.

Review URL: http://codereview.chromium.org/5005001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5826 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-11-15 13:23:30 +00:00
lrn@chromium.org
8f8039574a Split utils.h into utils.h and v8utils.h where the former is independent of V8.
The code in utils.h can be reused outside of v8 propert, as long as the
propert ASSERT macros are defined.

Review URL: http://codereview.chromium.org/4485001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5772 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-11-05 08:18:53 +00:00
whesse@chromium.org
937a9d466e Improve header file inclusions. Drop some unneeded includes, and add some needed ones.
Review URL: http://codereview.chromium.org/3253001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5366 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-08-30 07:10:40 +00:00
antonm@chromium.org
791fa08ab7 Add information about memory allocator's size and capacity and heap snapshot into heap stats.
That might help us debug OOM crashes in V8.

Review URL: http://codereview.chromium.org/3046049

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5181 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-08-05 14:12:50 +00:00
mikhail.naganov@gmail.com
c520e28dcb Make VM state tracking to be independent of logging and profiling.
Also pull out VMState into its own set of source files.

Review URL: http://codereview.chromium.org/1519027

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4361 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-08 13:37:39 +00:00
whesse@chromium.org
c33886c9b7 Change Math.random() to return 32 bits of random goodness, instead of 30 random bits. Math.random now allocates a HeapNumber inline, and calls a C funciton directly to put the random bits into it.
Review URL: http://codereview.chromium.org/1599019

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4354 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-07 08:18:51 +00:00
mikhail.naganov@gmail.com
889f6cce74 C++ profiles processor: wire up to VM.
If 'shell' is compiled with 'cppprofilesprocessor=on' and run
with '--prof' flag, top-down and bottom-up call trees are printed
on shell exit.

Review URL: http://codereview.chromium.org/1582004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4343 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-06 10:36:38 +00:00
kmillikin@chromium.org
3817a7ba6e Small simplification of #include dependencies.
Remove messages.h from v8.h and include it explicitly in only the few places
it is needed.  Many files relied on getting handles-inl.h implicitly from
messages.h through v8.h, so include handles-inl.h explicitly in v8.h
instead.

Remove zone-inl.h from header files where it is not needed, can be replaced
by a forward declaration, or can be replaced by zone.h (specifically,
factory.h and heap.h).  Include zone.h or zone-inl.h in header files where
it was implicitly included via heap.h or factory.h.  Prefer zone.h over
zone-inl.h in header files where possible by including zone-inl.h in .cc
files.

Review URL: http://codereview.chromium.org/668248

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4058 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-09 06:38:33 +00:00
erik.corry@gmail.com
64941f1cf9 * Remove old snapshot implementation
Review URL: http://codereview.chromium.org/394007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3307 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-16 12:08:40 +00:00
erik.corry@gmail.com
fb2317b63b New snapshot framework. Doesn't work on ARM yet (code targets
are different).  Is able to deserialize the whole heap and run
some stuff.  Not available as the primary snapshot system yet.
Review URL: http://codereview.chromium.org/335009

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3142 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-27 11:54:01 +00:00
mike@belshe.com
5191c81dff Remove the high-priority flag from IdleNotification() since
it is a strange API and unused anyway.

When we roll this to Chrome, we'll need a small chrome patch
to fix Chrome's usage of the API.

Review URL: http://codereview.chromium.org/257035

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3019 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-06 00:06:17 +00:00
sgjesse@chromium.org
3dd74076d1 Control profiling/debugger support from build script.
The SCons build now has the options profilingsupport and debuggersupport for controlling the setting of the defines ENABLE_LOGGIGN_AND_PROFILING and ENABLE_DEBUGGER_SUPPORT. By default both are set to true.

The changes to the XCode project have not been tested.
Review URL: http://codereview.chromium.org/195061

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2875 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-11 12:26:15 +00:00
mike@belshe.com
6f3c50460a Update the Idle collector to do a full GC
after being idle for some time.

Remove the default argument from CollectAllGarbage.

Review URL: http://codereview.chromium.org/174302

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2748 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-25 02:54:39 +00:00
bak@chromium.org
7f18bef0d2 Added idle notification to the API.
The implementation is still empty.

Review URL: http://codereview.chromium.org/165445

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2674 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-13 09:35:51 +00:00
antonm@chromium.org
ecfd1f1017 Attempt to reduce performance penalty for logging and profiling
Review URL: http://codereview.chromium.org/125141

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2263 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-24 13:09:34 +00:00
kasperl@chromium.org
ce7cdbd799 Change the implementation of Math.random to use George
Marsaglia's multiply-with-carry instead of mixing the
bits obtained from calling the system random() twice.

This seems to be a bit faster and gives a better 
distribution than the system random() in particular on 
Windows. 
Review URL: http://codereview.chromium.org/126113

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2159 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-06-15 08:04:47 +00:00
davemoore@chromium.org
62caa393b0 Changed the flags that indicate the status of running vs dead
This allows us to optimized the EnsureInitialized() function
so it doesn't require a function call when we're running

Review URL: http://codereview.chromium.org/113121

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2048 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-05-25 19:39:52 +00:00