Commit Graph

756 Commits

Author SHA1 Message Date
marja@chromium.org
ee6b885d25 Revert "New Compilation API, part 1"
This reverts revision 19881.

Reason: WebKit build failure (will commit a fixed version shortly).

BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19882 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-03-13 09:14:16 +00:00
marja@chromium.org
52c0098f0d New Compilation API, part 1
- Distinguish between context bound scripts (Script) and context unbound scripts
(UnboundScript).
- Add ScriptCompiler (which will later contain functions for async compilation).

This is a breaking change, in particular, Script::New no longer exists (it is
replaced by ScriptCompiler::CompileUnbound). Script::Compile remains as a
backwards-compatible shorthand for ScriptCompiler::Compile.

Passing CompilerOptions with produce_data_to_cache = true doesn't do anything
yet; the only way to generate the data to cache is the old preparsing API. (To
be fixed in the next version.)

BUG=
R=dcarney@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19881 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-03-13 08:54:11 +00:00
dcarney@chromium.org
75ad285860 Implement PersistentValueMap, a map that stores UniquePersistent values.
This is preparatory work to get rid of UnsafePersistent in blink.

The previous version had to be reverted due to timeouts in win32/Debug: https://codereview.chromium.org/197173002/

The timeouts happened because the STL version on that platform contains sanity checking code which opens a 'debug window' in the GUI, patiently waiting for the user to click ok/cancel/somethirdoption. It turns out, the cause for that debug window was totally valid and the test had a use-after-free issue.

The 1st patch set is the code as before. The 2nd patch set contains the fix.

Related blink changes are here: https://codereview.chromium.org/180363004/

This patch is largely based on https://codereview.chromium.org/175503003/, with some methods added to support the blink change mentioned above.

BUG=
R=dcarney@chromium.org

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

Patch from Daniel Vogelheim <vogelheim@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19873 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-03-13 07:10:59 +00:00
dslomov@chromium.org
79e817aac4 Revert "Implement PersistentValueMap, a map that stores UniquePersistent values."
and "Win64 fix for r19833."

This reverts commits r19833 and r19837 for breaking Windows tests
(test-api/PersistentValueMap).

TBR=vogelheim@chromium.org,dcarney@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19839 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-03-12 11:40:40 +00:00
dcarney@chromium.org
25468478e3 Implement PersistentValueMap, a map that stores UniquePersistent values.
This is preparatory work to get rid of UnsafePersistent in blink.

Related blink changes are here: https://codereview.chromium.org/180363004/

This patch is largely based on https://codereview.chromium.org/175503003/, with some methods added to support the blink change mentioned above.

BUG=
R=dcarney@chromium.org, svenpanne@chromium.org

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

Patch from Daniel Vogelheim <vogelheim@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19833 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-03-12 09:11:25 +00:00
rossberg@chromium.org
94b5180db0 API support for promises
R=svenpanne@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19811 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-03-11 16:17:20 +00:00
yangguo@chromium.org
d3a16a2e2a Add support for allowing an embedder to get the V8 profile timer event logs.
Contributed by fmeawad@chromium.org

R=yangguo@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19745 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-03-10 08:56:48 +00:00
dcarney@chromium.org
2c74163f59 initialize v8::Private with v8::String
R=rossberg@chromium.org

BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19741 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-03-10 08:20:56 +00:00
dcarney@chromium.org
7d8cda6ea0 Allow Object::InternalFieldCount and Object::GetAlignedPointerFromInternalField to be called from Persistent classes
R=svenpanne@chromium.org

BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19740 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-03-10 08:18:57 +00:00
mvstanton@chromium.org
1d3652ebe6 Symbols for type cells. We can make more efficient code to check against type cells in the future if we use symbols, guaranteed not to conflict with user code. Currently, the "symbols" are the hole and undefined. Undefined may come in from the outside.
BUG=
R=verwaest@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19706 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-03-07 09:10:18 +00:00
marja@chromium.org
bd1fb97d5c Remove Script::SetData and the script_data parameter from Script::(Compile|New).
This feature makes it possible to associate data with a script and get it back
when the script is compiled or when an event is handled. It was historically
used by Chromium Dev Tools, but not any more. It is not used by node.js.

Note: this has nothing to do with the preparse data, despite the confusing name.
The preparse data is passed as ScriptData*.

Note 2: This is the same as r19616 ( https://codereview.chromium.org/184403002/ )
with a unused variable fix in bootstrapper.cc.

R=svenpanne@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19702 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-03-07 08:43:54 +00:00
verwaest@chromium.org
1aeaeb2b90 Allow objects with "" properties to stay fast.
R=danno@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19648 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-03-04 12:43:05 +00:00
marja@chromium.org
40ffba58a4 Revert "Remove Script::SetData and the script_data parameter from Script::(Compile|New)."
This reverts revision 19616.

BUG=
TBR=marja@chromium.org,svenpanne@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19618 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-02-28 14:09:52 +00:00
marja@chromium.org
55750b1c62 Remove Script::SetData and the script_data parameter from Script::(Compile|New).
This feature makes it possible to associate data with a script and get it back
when the script is compiled or when an event is handled. It was historically
used by Chromium Dev Tools, but not any more. It is not used by node.js.

Note: this has nothing to do with the preparse data, despite the confusing name.
The preparse data is passed as ScriptData*.

R=svenpanne@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19616 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-02-28 13:54:14 +00:00
alph@chromium.org
1bace575f0 Allow self_size to be larger than 2GB in heap snapshots.
LOG=N
R=dslomov@chromium.org, yurys@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19445 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-02-18 13:22:07 +00:00
yangguo@chromium.org
7f6dc1ff9b Do not visit smis in the root list during GC.
R=mstarzinger@chromium.org
BUG=328804
LOG=N

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19400 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-02-17 10:41:25 +00:00
rafaelw@chromium.org
6b5a4cdef2 V8 Microtask Queue & API
This patch generalizes Object.observe callbacks and promise resolution into a FIFO queue called a "microtask queue".

It also exposes new V8 API which exposes the microtask queue to the embedder. In particular, it allows the embedder to

-schedule a microtask (EnqueueExternalMicrotask)
-run the microtask queue (RunMicrotasks)
-control whether the microtask queue is run automatically within V8 when the last script exits (SetAutorunMicrotasks).

R=dcarney@chromium.org, rossberg@chromium.org, dcarney, rossberg, svenpanne
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19344 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-02-12 22:04:19 +00:00
hpayer@chromium.org
3f86546bb4 The allocation sites scratchpad becomes a heap data structure.
BUG=
R=mstarzinger@chromium.org, mvstanton@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19189 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-02-07 09:54:52 +00:00
jarin@chromium.org
99ce5a2484 The current
version is passing all the existing test + a bunch of new tests
(packaged in the change list, too).

The patch extends the SlotRef object to describe captured and duplicated
objects. Since the SlotRefs are not independent of each other anymore,
there is a new SlotRefValueBuilder class that stores the SlotRefs and
later materializes the objects from the SlotRefs.

Note that unlike the previous implementation of SlotRefs, we now build
the SlotRef entries for the entire frame, not just the particular
function.  This is because duplicate objects might refer to previous
captured objects (that might live inside other inlined function's part
of the frame).

We also need to store the materialized objects between other potential
invocations of the same arguments object so that we materialize each
captured object at most once.  The materialized objects of frames live
in the new MaterielizedObjectStore object (contained in Isolate),
indexed by the frame's FP address.  Each argument materialization (and
deoptimization) tries to lookup its captured objects in the store before
building new ones.  Deoptimization also removes the materialized objects
from the store. We also schedule a lazy deopt to be sure that we always
get rid of the materialized objects and that the optmized function
adopts the materialized objects (instead of happily computing with its
captured representations).

Concerns:

- Is the FP address the right key for a frame? (Note that deoptimizer's
representation of frame is different from the argument object
materializer's one - it is not easy to find common ground.)

- Performance is suboptimal in several places, but a quick local run of
benchmarks does not seem to show a perf hit. Examples of possible
improvements: smarter generation of SlotRefs (build other functions'
SlotRefs only for captured objects and only if necessary), smarter
lookup of stored materialized objects.

- Ideally, we would like to share the code for argument materialization
with deoptimizer's materializer.  However, the supporting data structures
(mainly the frame descriptor) are quite different in each case, so it
looks more like a separate project.

Thanks for any feedback.

R=danno@chromium.org, mstarzinger@chromium.org
LOG=N
BUG=

Committed: https://code.google.com/p/v8/source/detail?r=18918

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18936 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-01-30 10:33:53 +00:00
jarin@chromium.org
ec51f26b9e Revert "Captured arguments object materialization"
R=jarin@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18923 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-01-29 15:49:48 +00:00
jarin@chromium.org
868ad01ecb This is a preview of the captured arguments object materialization,
mostly to make sure that it is going in the right direction. The current
version is passing all the existing test + a bunch of new tests
(packaged in the change list, too).

The patch extends the SlotRef object to describe captured and duplicated
objects. Since the SlotRefs are not independent of each other anymore,
there is a new SlotRefValueBuilder class that stores the SlotRefs and
later materializes the objects from the SlotRefs.

Note that unlike the previous implementation of SlotRefs, we now build
the SlotRef entries for the entire frame, not just the particular
function.  This is because duplicate objects might refer to previous
captured objects (that might live inside other inlined function's part
of the frame).

We also need to store the materialized objects between other potential
invocations of the same arguments object so that we materialize each
captured object at most once.  The materialized objects of frames live
in the new MaterielizedObjectStore object (contained in Isolate),
indexed by the frame's FP address.  Each argument materialization (and
deoptimization) tries to lookup its captured objects in the store before
building new ones.  Deoptimization also removes the materialized objects
from the store. We also schedule a lazy deopt to be sure that we always
get rid of the materialized objects and that the optmized function
adopts the materialized objects (instead of happily computing with its
captured representations).

Concerns:

- Is there a simpler/more correct way to store the already-materialized
objects? (At the moment there is a custom root reference to JSArray
containing frames' FixedArrays with their captured objects.)

- Is the FP address the right key for a frame? (Note that deoptimizer's
representation of frame is different from the argument object
materializer's one - it is not easy to find common ground.)

- Performance is suboptimal in several places, but a quick local run of
benchmarks does not seem to show a perf hit. Examples of possible
improvements: smarter generation of SlotRefs (build other functions'
SlotRefs only for captured objects and only if necessary), smarter
lookup of stored materialized objects.

- Ideally, we would like to share the code for argument materialization
with deoptimizer's materializer.  However, the supporting data structures
(mainly the frame descriptor) are quite different in each case, so it
looks more like a separate project.

Thanks for any feedback.

R=mstarzinger@chromium.org, danno@chromium.org
LOG=N
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18918 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-01-29 15:14:15 +00:00
bmeurer@chromium.org
215da5eca3 v8config.h: introduce V8_LIBC_MSVCRT
Use this for detecting MSVCRT library features instead of
V8_CC_MSVC.

One use case for this is when compiling with Clang together with the
MSVC library. In that case, V8_CC_MSVC will be false, but V8_LIBC_MSVCRT
will be true.

BUG=82385
LOG=n
R=bmeurer@chromium.org

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

Patch from Hans Wennborg <hans@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18888 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-01-28 19:11:13 +00:00
dslomov@chromium.org
1a67b7f86a External Array renaming and boilerplate scrapping
Replaced symbolic names with correct JS name (byte -> int8, unsigned int -> uint32 etc).
Using macros to scrap the boilerplate
BUG=
R=svenpanne@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18835 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-01-24 16:01:15 +00:00
dcarney@chromium.org
f93f8ded96 String:WriteUtf8: Add REPLACE_INVALID_UTF8 option
This patch makes String::WriteUtf8 replace invalid code points (i.e. unmatched
surrogates) with the unicode replacement character when REPLACE_INVALID_UTF8 is
set.  This is done to avoid creating invalid UTF-8 output which can lead to
compatibility issues with software requiring valid UTF-8 inputs (e.g. the
WebSocket protocol requires valid UTF-8 and terminates connections when invalid
UTF-8 is encountered).

R=dcarney@chromium.org

BUG=

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

Patch from Felix Geisendörfer <haimuiba@gmail.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18683 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-01-20 09:52:54 +00:00
svenpanne@chromium.org
e8f935a630 Various extension-related cleanup and simplifications.
Removes the embarrassing "static"s, shuffles some code around, doing various cleanups on the way.

R=dcarney@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18659 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-01-17 10:52:00 +00:00
dslomov@chromium.org
5da41be7b8 Implement in-heap backing store for typed arrays.
This adds a fixed array sub-type that will represent a backing store for
typed arrays allocated with TypedArray(length) construtor.

R=mvstanton@chromium.org, verwaest@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18651 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-01-16 17:08:45 +00:00
dslomov@chromium.org
34eeeb8953 Revert "Implement in-heap backing store for typed arrays."
This reverts commit r18649 for breaking Linux/nosnap and Win64 tests.

TBR=jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18650 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-01-16 16:00:36 +00:00
dslomov@chromium.org
97040ce67b Implement in-heap backing store for typed arrays.
This adds a fixed array sub-type that will represent a backing store for
typed arrays allocated with TypedArray(length) construtor.

R=mvstanton@chromium.org, verwaest@chromium.org

Committed: https://code.google.com/p/v8/source/detail?r=18646

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18649 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-01-16 15:01:27 +00:00
dslomov@chromium.org
95f572389e Revert "Implement in-heap backing store for typed arrays."
This reverts commit r18646 for breaking Win32 build.

TBR=jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18647 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-01-16 14:26:15 +00:00
dslomov@chromium.org
0c960c2e96 Implement in-heap backing store for typed arrays.
This adds a fixed array sub-type that will represent a backing store for
typed arrays allocated with TypedArray(length) construtor.

R=mvstanton@chromium.org, verwaest@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18646 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-01-16 14:18:37 +00:00
svenpanne@chromium.org
b25bb230cd Removed apiutils.h and related cleanup.
ExtensionConfiguration is just a simple container for extension names
(in a perfect world we would use vector<string> and range-based for
loops), and HandleScopeData was in the totally wrong place. Some
additional cleanup on the way, e.g. using the null pattern behind our
external API.

R=dcarney@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18632 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-01-16 08:17:40 +00:00
ulan@chromium.org
2638dca48f Make cells pointing to JSObjects weak in optimized code.
This is done similar to weak embedded objects in optimized code (r17102). The
reference from optimized code to a cell is treated weakly in marking visitors
if the cell points to a JSObject. After marking we iterate over all cells
embedded in optimized code. If a cell is not marked but its value is marked,
then we revive the cell by marking it. Otherwise, the cell value is dead, so
we mark the code for deoptimization.

BUG=v8:2073
TEST=cctest/test-heap/CellsInOptimizedCodeAreWeak
LOG=Y
R=hpayer@chromium.org, mstarzinger@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18616 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-01-15 11:42:19 +00:00
jochen@chromium.org
38cde85729 Introduce an API mirroring the gc extension
BUG=none
R=mstarzinger@chromium.org, svenpanne@chromium.org
LOG=y

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18563 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-01-13 12:03:31 +00:00
vegorov@chromium.org
1d4c0532d7 Introduce kGCCallbackForced flag.
This flag will be passed to GC prologue/epilogue callbacks if GC was forced through GC extension.

BUG=
R=dcarney@chromium.org, mstarzinger@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18558 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-01-13 10:57:49 +00:00
marja@chromium.org
21f1ca5850 Remove ScriptData::PreCompile which takes const char*.
The version taking a Handle should be used instead.

It's not used by Chromium and complicates the ongoing lexer work.

R=svenpanne@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18556 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-01-13 10:51:40 +00:00
svenpanne@chromium.org
8f7720aa25 Add Isolate parameter to HandleScope::NumberOfHandles.
LOG=y
BUG=324225
R=mstarzinger@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18510 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-01-09 10:37:15 +00:00
svenpanne@chromium.org
c2514db458 Removed v8::AssertNoGCScope.
Everything was private, so no object could ever be constructed, which
implies that nobody uses it. Furthermore, it contained a TODO and was
overly complicated, an #ifdef-less simple pimpl idiom would have been
enough.

LOG=y
R=bmeurer@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18493 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-01-08 12:22:42 +00:00
svenpanne@chromium.org
80c2c4080d Make -Wshadow happy.
LOG=y
BUG=v8:3073
R=bmeurer@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18463 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-01-07 13:28:33 +00:00
ulan@chromium.org
343813c59e Revert r18451 "Revert r18449 "Reland r18383: More API cleanup." and r18450 "Unbreak build."" since necessary WebKit changes are rolled in Chromium.
TBR=svenpanne@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18452 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-01-03 14:31:17 +00:00
ulan@chromium.org
163386c700 Revert r18449 "Reland r18383: More API cleanup." and r18450 "Unbreak build."
because of broken WebKit bots.

TBR=svenpanne@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18451 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-01-03 14:13:21 +00:00
svenpanne@chromium.org
1143ab132e Reland r18383: More API cleanup.
* Removed String::Empty, Number::New, Integer::New, Integer::NewFromUnsigned, FunctionTemplate::New and Object::New without Isolate* parameter.

* Removed Integer::New and Integer::NewUnsigned with weird argument order.

Chrome CLs matching this change have been landed.

TBR=dcarney@chromium.org
LOG=y
BUG=324225

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18449 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-01-03 11:56:33 +00:00
bmeurer@chromium.org
0899da3697 Add support for the QNX operating system.
This patch contains contributions from the following members of the
BlackBerry Web Technologies team:

Eli Fidler <efidler@blackberry.com>
Konrad Piascik <kpiascik@blackberry.com>
Jeff Rogers <jrogers@blackberry.com>
Cosmin Truta <ctruta@blackberry.com>
Peter Wang <peter.wang@torchmobile.com.cn>
Xiaobo Wang <xiaobwang@blackberry.com>
Ming Xie <mxie@blackberry.com>
Leo Yang <leoyang@blackberry.com>

R=bmeurer@chromium.org, jkummerow@chromium.org

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

Patch from Cosmin Truta <ctruta@blackberry.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18430 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-01-02 07:04:05 +00:00
rmcilroy@chromium.org
78ab4379d3 Out-of-line constant pool on Arm: Stage 3 - Set Constant Pool Pointer on Function Entry
Third stage of implementing an out-of-line constant pool for Arm.  This CL adds
a ConstantPool field to Code objects and initializes the pp register on
function entry, and saves the pp register on the stack frame. The ConstantPool
object is always empty and is unused currently.

R=ulan@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18425 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-12-30 11:23:59 +00:00
yurys@chromium.org
18e865d4fa Delete v8::HeapGraphNode::GetHeapValue
BUG=chromium:324769
LOG=N
R=hpayer@chromium.org, mstarzinger@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18404 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-12-23 09:33:16 +00:00
yurys@chromium.org
61c1692c9b This adds functionality for getting original functions from bound functions.
It's of much use when information about function calls is shown on the Events timeline in DevTools: instead of referencing to v8natives.js where bound functions are created, we'll be able to show real function data (name, resource, script line and column numbers) retrieved from original functions.

BUG=None
LOG=Y
R=yangguo@chromium.org, yurys@chromium.org

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

Patch from Alexandra Mikhaylova <amikhaylova@google.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18401 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-12-23 08:04:54 +00:00
svenpanne@chromium.org
e595dc0368 Revert "More API cleanup."
This reverts r18383. The CL in itself is OK, we just have to wait until Chrome's commit queue lands the final corresponding change and re-land this CL. :-/

TBR=hpayer@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18384 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-12-20 11:35:53 +00:00
svenpanne@chromium.org
d54a4e6d40 More API cleanup.
* Removed String::Empty, Number::New, Integer::New, Integer::NewFromUnsigned, FunctionTemplate::New and Object::New without Isolate* parameter.

* Removed Integer::New and Integer::NewUnsigned with weird argument order.

Chrome CLs matching this change are prepared, BTW.

LOG=y
BUG=324225
R=dcarney@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18383 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-12-20 10:49:27 +00:00
vegorov@chromium.org
bc77d4d60a Reland r18363.
Introduce API to temporarily interrupt long running JavaScript code.

It is different from termination API as interrupted JavaScript will continue to execute normally when registered InterruptCallback returns.

  /**
   * Request V8 to interrupt long running JavaScript code and invoke
   * the given |callback| passing the given |data| to it. After |callback|
   * returns control will be returned to the JavaScript code.
   * At any given moment V8 can remember only a single callback for the very
   * last interrupt request.
   * Can be called from another thread without acquiring a |Locker|.
   * Registered |callback| must not reenter interrupted Isolate.
   */
  void RequestInterrupt(InterruptCallback callback, void* data);

  /**
   * Clear interrupt request created by |RequestInterrupt|.
   * Can be called from another thread without acquiring a |Locker|.
   */
  void ClearInterrupt();

Fix Hydrogen SCE pass to avoid eliminating stack guards too aggressively. Only normal JavaScript functions are guaranteed to have stack guard in the prologue. If function is a builtin or has a custom call IC it will lack one.

Changes from r18363:

- includes r18364 to fix compilation errors: removes debugging only code;

- makes interrupiton related tests not threaded, because they rely on having exclusive access to the V8 instance and the fact that they can only interrupt themselves, if they are interrupted from the outside they break;

- changes HasStackCheck predicate used during SCE pass to avoid handles dereference to make SCE compatible with parallel recompilation.

R=dcarney@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18375 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-12-19 16:45:58 +00:00
vegorov@chromium.org
dd8a793962 Revert "Introduce API to temporarily interrupt long running JavaScript code."
This reverts commit r18363.

Revert "Fix compilation error introduced by r18363."

This reverts commit r18364.

Changes in SCE pass are incompatible with parallel compilation

TBR=dcarney@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18365 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-12-18 19:21:27 +00:00
vegorov@chromium.org
64d2dfa232 Introduce API to temporarily interrupt long running JavaScript code.
It is different from termination API as interrupted JavaScript will continue to execute normally when registered InterruptCallback returns.

  /**
   * Request V8 to interrupt long running JavaScript code and invoke
   * the given |callback| passing the given |data| to it. After |callback|
   * returns control will be returned to the JavaScript code.
   * At any given moment V8 can remember only a single callback for the very
   * last interrupt request.
   * Can be called from another thread without acquiring a |Locker|.
   * Registered |callback| must not reenter interrupted Isolate.
   */
  void RequestInterrupt(InterruptCallback callback, void* data);

  /**
   * Clear interrupt request created by |RequestInterrupt|.
   * Can be called from another thread without acquiring a |Locker|.
   */
  void ClearInterrupt();

Fix Hydrogen SCE pass to avoid eliminating stack guards too aggressively. Only normal JavaScript functions are guaranteed to have stack guard in the prologue. If function is a builtin or has a custom call IC it will lack one.

BUG=
R=danno@chromium.org, dcarney@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18363 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-12-18 18:38:35 +00:00