Commit Graph

1203 Commits

Author SHA1 Message Date
Benedikt Meurer
883852293a Revert "Make GCC happy again." and "Initial switch to Chromium-style CHECK_* and DCHECK_* macros.".
This reverts commit 6a4c0a3bae and commit
0deaa4b629 for breaking GCC bots.

TBR=svenpanne@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#26342}
2015-01-30 07:19:57 +00:00
bmeurer
0deaa4b629 Initial switch to Chromium-style CHECK_* and DCHECK_* macros.
R=svenpanne@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#26340}
2015-01-30 06:25:36 +00:00
kozyatinskiy
eaae397c42 [V8] Added Script::is_debugger_script flag for embedders
In DevTools we need one more flag for script origin - is debugger script. We already have "is shared origin" flag. The new flag added by analogy with the old but new has accessor in script object.

R=yurys@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#26324}
2015-01-29 14:01:33 +00:00
hpayer
a18fdd61dc Always adjust amount of external memory when change is reported.
BUG=

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

Cr-Commit-Position: refs/heads/master@{#26247}
2015-01-23 11:37:49 +00:00
erikcorry
8c58ed1a0c Support old and new weak handle API
R=dcarney@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#26246}
2015-01-23 11:28:54 +00:00
dcarney
0aef24e2cf CHECK that FunctionTemplates are not modified after first instantiation
BUG=

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

Cr-Commit-Position: refs/heads/master@{#26237}
2015-01-23 09:07:19 +00:00
verwaest
e99faf93ff Remove ForceDelete
This method circumvented JS semantics, and should not be used.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#26157}
2015-01-20 13:41:31 +00:00
dcarney
c15c737362 remove SignatureInfo class
BUG=

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

Cr-Commit-Position: refs/heads/master@{#26129}
2015-01-19 12:17:23 +00:00
dcarney
6950ead0b0 split api call stubs into accessor and function call stubs
BUG=

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

Cr-Commit-Position: refs/heads/master@{#26097}
2015-01-16 10:59:16 +00:00
jochen
c65799e7c5 Remove support for signatures with arguments
Support for it is slow and difficult to implement, and it's not used in
Blink. An embedder that uses this feature will have to check the
argument types itself.

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

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

Cr-Commit-Position: refs/heads/master@{#26058}
2015-01-14 14:44:10 +00:00
yangguo
39cd762c6c Embed custom script into the snapshot.
R=vogelheim@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#26029}
2015-01-12 15:26:31 +00:00
erikcorry
7db1759b65 Unify phantom and internal fields weak handle callbacks
R=dcarney@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#26022}
2015-01-12 12:12:10 +00:00
dcarney
a5aa01beec remove declarative accessors
R=jochen@chromium.org

BUG=

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

Cr-Commit-Position: refs/heads/master@{#25981}
2015-01-07 16:37:43 +00:00
jochen
18b1e6d353 Enable the embedder to specify what kind of context was disposed
This API is used by Blink to inform V8 about HTML frames being disposed.
Using the optional parameter, Blink can tell V8 whether the disposed
frame was a main frame. In that case, we might want to reset GC
parameters

BUG=none
R=hpayer@chromium.org
LOG=y

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

Cr-Commit-Position: refs/heads/master@{#25926}
2014-12-22 14:27:37 +00:00
hpayer
c37e09d7ea Keep AllocationSpace and ObjectSpace enums in sync.
BUG=

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

Cr-Commit-Position: refs/heads/master@{#25917}
2014-12-22 08:52:22 +00:00
alph
87e4bba31e Support multiple interrupt requests in v8 API.
There might be a number of clients that would like to
setup an interrupt request on the Isolate.

The patch also deprecates ClearInterrupt API. As long as
the interrupt handler is called outside of locks there's no way
to guarantee that the handler will not be called after
ClearInterrupt was invoked as it might have already started execution.

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

Cr-Commit-Position: refs/heads/master@{#25910}
2014-12-20 07:54:19 +00:00
erikcorry
3ff951943f Phantom references support internal fields
BUG=

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

Cr-Commit-Position: refs/heads/master@{#25889}
2014-12-18 16:10:15 +00:00
yangguo
d28b2a194d Extract non-IO part of mksnapshot into an API method.
R=vogelheim@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#25747}
2014-12-10 14:20:26 +00:00
dcarney
5ce364d817 new api for adding indexed interceptors
R=svenpanne@chromium.org

BUG=

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

Cr-Commit-Position: refs/heads/master@{#25688}
2014-12-05 15:21:27 +00:00
yurys
f434123a16 Add GetIdentityHash to v8::Name object API
v8::Object already has GetIdentityHash on it. This change adds its counterpart to v8::Name.

BUG=chromium:437416
LOG=Y

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

Cr-Commit-Position: refs/heads/master@{#25598}
2014-12-02 09:13:30 +00:00
thakis
643c24eb95 Set V8_CC_GNU or V8_CC_MSVC for clang in gcc / cl mode.
Also, remove V8_CC_CLANG since it's not read anywhere (and ideally shouldn't
be).

Clang tries to be compatible with gcc in clang mode, and with msvc in clang-cl
mode. It wants to go down the same code paths that these compilers want to go
down in most cases.

For example, V8PRIxPTR was set incorrectly on Windows 64-bit before this change
since macros.h assumed that checking for V8_CC_MSVC is enough to find LLP64
systems, but V8_CC_MSVC wasn't set for clang.  Most other existing checks for
V8_CC_MSVC should be taken for clang-cl too (and for the remaining ones,
clang-cl is happy with either code path).

Likewise, V8_IMMEDIATE_CRASH is currently set to a suboptimal value with clang
since __builtin_trap() is only used if V8_CC_GNU is set.

Including clang in the gcc and cl macros is also what chromium does.

BUG=chromium:82385
LOG=y

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

Cr-Commit-Position: refs/heads/master@{#25592}
2014-12-02 05:23:21 +00:00
hpayer
297935b34f Use deadline in IdleNotification.
BUG=417668
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#25560}
2014-11-28 10:59:24 +00:00
dcarney
50ef0690b2 Add interceptor support for symbols
a revival of https://codereview.chromium.org/467013003

R=rossberg@chromium.org

BUG=

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

Cr-Commit-Position: refs/heads/master@{#25537}
2014-11-27 10:21:39 +00:00
jochen
30b43a8aac Document that Isolate::GetCurrent() must not be called before initialization
Also, add a check for debug mode.

BUG=none
R=dcarney@chromium.org
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#25507}
2014-11-26 05:15:30 +00:00
yangguo
1a2a18b66c Remove v8::StartupData::compressed_size.
R=jochen@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#25487}
2014-11-24 16:14:34 +00:00
yangguo
9b8d40594a Rip out bzip compression for native sources.
R=vogelheim@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#25464}
2014-11-21 12:45:20 +00:00
Benedikt Meurer
21580e7b79 Revert "Forward declaration for Isolate / Platform in libplatform.h." and "Fixes d8 on windows following.".
This reverts commit 0f57ce8f1a.
and 3245b8cb83 for breaking Chromium
compile.

TBR=machenbach@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#25411}
2014-11-19 07:28:07 +00:00
bulach
0f57ce8f1a Forward declaration for Isolate / Platform in libplatform.h.
Reduces dependencies on #include files, making it easier for other
build systems to include this library.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#25408}
2014-11-18 20:29:37 +00:00
yangguo
7e2ebd4c00 Reland "Soft fail for invalid cache data."
Review URL: https://codereview.chromium.org/733023003

Cr-Commit-Position: refs/heads/master@{#25378}
2014-11-17 12:16:40 +00:00
Daniel Vogelheim
4f6c75f83a Add a version tag for cached data.
BUG=399580,431699
LOG=N
R=dcarney@chromium.org, marja@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#25339}
2014-11-13 17:17:36 +00:00
Daniel Vogelheim
f83f10973e Revert "Soft fail for invalid cache data."
This reverts commit eafce666f4.

Original commit failed some tests w/ memory leaks.

TBR=yangguo@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#25336}
2014-11-13 16:47:05 +00:00
Yang Guo
eafce666f4 Soft fail for invalid cache data.
API=ScriptCompiler::CachedData::rejected
LOG=Y
R=vogelheim@google.com, vogelheim@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#25335}
2014-11-13 15:42:47 +00:00
Adam Klein
c93c8969d1 Re-add dot_result_string to heap.h after 5f7b24f7b4
Failed to notice it was still being used in a DCHECK, so removing
it broke the debug build.

TBR=marja@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#25309}
2014-11-12 18:33:47 +00:00
Adam Klein
5f7b24f7b4 Remove unused dot_for and dot_result strings from heap.h
These appear to have simply been missed in r21972

R=marja@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#25308}
2014-11-12 18:18:16 +00:00
dslomov@chromium.org
eacdfa0b7a Various clean-ups after top-level lexical declarations are done.
1. Global{Context,Scope}=>Script{Context,Scope}
2. Enable fixed tests
3. Update comments

R=rossberg@chromium.org
BUG=v8:2198
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#25291}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@25291 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-11-12 11:35:18 +00:00
aandrey@chromium.org
dc416ef328 Rename v8::Exception::GetMessage to CreateMessage.
This is to avoid renaming to GetMessageW/GetMessageA on Windows.

API=v8::Exception::CreateMessage
R=yangguo@chromium.org, loislo
LOG=Y

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

Cr-Commit-Position: refs/heads/master@{#25273}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@25273 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-11-11 21:45:30 +00:00
dslomov@chromium.org
1a64b02dcf harmony_scoping: Implement lexical bindings at top level
This implements correct semantics for "extensible" top level lexical scope.
The entire lexical scope is represented at runtime by GlobalContextTable, reachable from native context and accumulating global contexts from every script loaded into the context.

When the new script starts executing, it does the following validation:
- checks the GlobalContextTable and global object (non-configurable own) properties against the set of declarations it introduces and reports potential conflicts.
- invalidates the conflicting PropertyCells on global object, so that any code depending on them will miss/deopt causing any contextual lookups to be reexecuted under the new bindings
- adds the lexical bindings it introduces to the GlobalContextTable

Loads and stores for contextual lookups are modified so that they check the GlobalContextTable before looking up properties on global object, thus implementing the shadowing of global object properties by lexical declarations.

R=adamk@chromium.org, rossberg@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#25220}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@25220 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-11-07 16:29:45 +00:00
svenpanne@chromium.org
d56a21ebff The idea behind of this solution is to use the existing "relocation info" instead of consumption the CodeLinePosition events emitted by the V8 compilers.
During generation code and relocation info are generated simultaneously.
When code generation is done you each code object has associated "relocation info".
Relocation information lets V8 to mark interesting places in the generated code: the pointers that might need to be relocated (after garbage collection),
correspondences between the machine program counter and source locations for stack walking.

This patch:
1. Add more source positions info in reloc info to make it suitable for source level mapping.
The amount of data should not be increased dramatically because (1) V8 already marks interesting places in the generated code and
(2) V8 does not write redundant information (it writes a pair (pc_offset, pos) only if pos is changed and skips other).
I measured it on Octane benchmark - for unoptimized code the number of source positions may achieve 2x ('lin_solve' from NavierStokes benchmark).

2. When a sample happens, CPU profiler finds a code object by pc, then use its reloc info to match the sample to a source line.
If a source line is found that hit counter is increased by one for this line.

3. Add a new public V8 API to get the hit source lines by CDT CPU profiler.
Note that it's expected a minor patch in Blink to pack the source level info in JSON to be shown.

4.Add a test that checks how the samples are distributed through source lines.
It tests two cases: (1) relocation info created during code generation and (2) relocation info associated with precompiled function's version.

Patch from Denis Pravdin <denis.pravdin@intel.com>;

R=svenpanne@chromium.org, yurys@chromium.org

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

Patch from Weiliang <weiliang.lin@intel.com>.

Cr-Commit-Position: refs/heads/master@{#25182}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@25182 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-11-06 09:17:14 +00:00
aandrey@chromium.org
35eaced208 Add debug mirror support for ES6 Map/Set iterators.
This is to show values preview of an iterator in DevTools console.

API=v8::Value::IsMapIterator, v8::Value::IsSetIterator
BUG=chromium:427868
R=arv@chromium.org, yangguo@chromium.org, adamk@chromium.org
LOG=Y

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

Cr-Commit-Position: refs/heads/master@{#25100}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@25100 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-11-04 10:02:43 +00:00
erikcorry@chromium.org
3d62e24c5f Introduce phantom weak handles in the API and use them internally for debug info
R=ulan@chromium.org, jochen@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#25083}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@25083 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-11-03 17:24:22 +00:00
aandrey@chromium.org
aeb7ba5259 Introduce v8::Exception::GetMessage to find location of an error object.
API=v8::Exception::GetMessage
BUG=chromium:427954
R=yangguo@chromium.org
LOG=Y

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

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

Cr-Commit-Position: refs/heads/master@{#25021}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@25021 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-30 14:51:46 +00:00
machenbach@chromium.org
7c27d234f3 Reverting r25015 and r25016 for broken build.
TBR=yangguo@chromium.org, machenbach@chromium.org
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#25017}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@25017 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-30 13:57:47 +00:00
aandrey@chromium.org
ad4515fd1f Introduce v8::Exception::GetMessage to find location of an error object.
API=v8::Exception::GetMessage
BUG=chromium:427954
R=yangguo@chromium.org
LOG=Y

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

Cr-Commit-Position: refs/heads/master@{#25015}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@25015 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-30 13:18:16 +00:00
dcarney@chromium.org
e589ae22e4 remove a bunch of isolate::current in api.cc
R=svenpanne@chromium.org

BUG=

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

Cr-Commit-Position: refs/heads/master@{#25011}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@25011 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-30 09:55:10 +00:00
dcarney@chromium.org
d24cd63fff allow disabling of ArrayBuffer neutering
BUG=
R=dslomov@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#24973}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24973 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-29 10:37:12 +00:00
dcarney@chromium.org
f118921e3b move functions in v8::V8 that should be on v8::Isolate
R=marja@chromium.org, svenpanne@chromium.org

BUG=

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

Cr-Commit-Position: refs/heads/master@{#24921}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24921 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-28 08:43:39 +00:00
erikcorry@chromium.org
716648065a Revert 'Introduce phantom weak handles in the API and use them internally for debug info'
Revert of https://codereview.chromium.org/649563006/ due to layout test
failures.
BUG=
R=mstarzinger@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#24901}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24901 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-27 12:03:39 +00:00
erikcorry@chromium.org
891e289d0f Introduce phantom weak handles in the API and use them internally for debug info
R=jochen@chromium.org, ulan@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#24899}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24899 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-27 11:05:11 +00:00
dcarney@chromium.org
b714772c07 pass isolate to Value::To* functions
BUG=
R=svenpanne@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#24893}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24893 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-27 09:03:16 +00:00
bmeurer@chromium.org
8214cc0e56 Use getauxval() if available.
This fixes the problem of not being able to detect ARM features on
ChromeOS because sandbox cannot access /proc/self/auxv and
/proc/cpuinfo there.

Drive-by-cleanup to libc detection in two other places.

R=svenpanne@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24789 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-22 06:42:17 +00:00
dslomov@chromium.org
37bd114925 Update ObjectToString to Harmony-draft algorithm
Updates Object.prototype.toString() to use algorithm described in harmony drafts.

Currently, the behaviour is essentially the same as ES262's version, however this changes when internal structures
such as Promise make use of symbolToStringTag (as they are supposed to, see v8:3241), and changes further once
Symbol.toStringTag is exposed publicly.

BUG=v8:3241, v8:3502
LOG=N
R=dslomov@chromium.org

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

Patch from Caitlin Potter <caitpotter88@gmail.com>.

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24783 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-21 17:21:32 +00:00
verwaest@chromium.org
37b7dde54d Remove unused IsDirty
BUG=
R=dcarney@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24767 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-21 11:21:54 +00:00
svenpanne@chromium.org
3de17c6950 Remove v8stdint.h, it doesn't serve a purpose anymore.
Basically a follow-up to https://codereview.chromium.org/667573005/.

LOG=y
R=bmeurer@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24755 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-21 08:25:14 +00:00
bmeurer@chromium.org
78f4212ed4 Visual Studio provides stdint.h these days.
R=svenpanne@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24751 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-21 04:55:49 +00:00
yangguo@chromium.org
299ed092ad Remove deprecated Ascii-related identifiers from include/v8.h
R=dcarney@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24744 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-20 15:07:27 +00:00
bmeurer@chromium.org
010f089971 Remove (untested) code for unsupported compilers.
R=svenpanne@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24735 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-20 12:04:22 +00:00
haraken@chromium.org
f3bfd04bcf Pass an Isolate to v8::VisitHandlesWithClassIds
The Isolate version of v8::VisitHandlesWithClassIds is needed
for https://codereview.chromium.org/651713002/

R=dcarney@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24671 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-17 00:46:18 +00:00
aandrey@chromium.org
b96b570628 Introduce v8::Exception::GetStackTrace API method.
This will be needed to get a stack trace from a DOMException.

API=v8::Exception::GetStackTrace
R=yangguo@chromium.org
LOG=Y

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24655 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-16 10:42:08 +00:00
ulan@chromium.org
dd49272c00 Weak Cells
Introduce an object that holds a weak reference.
Design document: http://goo.gl/9dSvvy.

BUG=
R=erik.corry@gmail.com

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24606 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-14 14:43:45 +00:00
rmcilroy@chromium.org
61b68155c3 Remove default NOP implementation of MonotonicallyIncreasingTime.
BUG=417668
LOG=N
R=jochen@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24489 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-09 10:44:30 +00:00
mstarzinger@chromium.org
f99fd3867b Remove premordial math functions from native context.
R=rossberg@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24471 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-08 14:42:31 +00:00
jochen@chromium.org
73733bb3eb Fix data races and leaks related to v8::Lockers
BUG=v8:3618
R=ishell@chromium.org, svenpanne@chromium.org
LOG=n

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24453 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-08 08:17:04 +00:00
jochen@chromium.org
304d91d2a7 Remove PersistentBase::ClearAndLeak
Embedders that used this method to be able to store a Persistent in a
container should use one of the containers in v8-util.h instead.

Other uses are no longer supported.

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

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24436 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-07 12:37:27 +00:00
yangguo@chromium.org
ec871585fc Add stack trace to the promise reject callback.
R=aandrey@chromium.org
BUG=chromium:393913
LOG=N

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24432 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-07 12:03:55 +00:00
erikcorry@chromium.org
d0dc7fc4da Reland: Add a use counter for Intl.v8BreakIterator
This relands https://codereview.chromium.org/619913002/
The test has been fixed to do a GC so it does not appear to leak in
ASAN.  In addition the test has been fixed to work in the no-i18n
build, by incorporating the change from https://codereview.chromium.org/631743002/
R=ishell@chromium.org
BUG=

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24423 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-06 15:50:40 +00:00
rmcilroy@chromium.org
7cbe1ef9ca Add MonotonicallyIncreasingTime to V8 Platform.
Adds a MonotonicallyIncreasingTime() function to the Platform API to enable the
embedder to provide a time API to V8 which will be used for IdleNotification deadlines.

BUG=417668
LOG=Y
R=jochen@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24411 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-06 12:22:25 +00:00
erikcorry@chromium.org
33da50f2ea Revert Add a use counter for Intl.v8BreakIterator https://codereview.chromium.org/619913002/
This is due to breakage on the ASAN memory leak bot, possibly due to
pre-existing leaks in v8BreakIterator().

R=ishell@chromium.org
BUG=

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24409 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-06 11:14:50 +00:00
erikcorry@chromium.org
43257b61ae Add a use counter for Intl.v8BreakIterator
R=marja@chromium.org
BUG=

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24400 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-03 10:29:12 +00:00
yurys@chromium.org
08c40baa1f Revert of Extend CPU profiler with mapping ticks to source lines (patchset #3 id:40001 of https://codereview.chromium.org/616963005/)
Reason for revert:
It broke layout test fast/events/window-onerror-02.html, error column reported by window.onerror is now wrong (I believe it is because of the change in full-codegen):

http://build.chromium.org/p/client.v8/builders/V8-Blink%20Linux%2064%20%28dbg%29/builds/652

Original issue's description:
> Extend CPU profiler with mapping ticks to source lines
>
> The idea behind of this solution is to use the existing "relocation info" instead of consumption the CodeLinePosition events emitted by the V8 compilers.
> During generation code and relocation info are generated simultaneously.
> When code generation is done you each code object has associated "relocation info".
> Relocation information lets V8 to mark interesting places in the generated code: the pointers that might need to be relocated (after garbage collection),
> correspondences between the machine program counter and source locations for stack walking.
>
> This patch:
> 1. Add more source positions info in reloc info to make it suitable for source level mapping.
> The amount of data should not be increased dramatically because (1) V8 already marks interesting places in the generated code and
> (2) V8 does not write redundant information (it writes a pair (pc_offset, pos) only if pos is changed and skips other).
> I measured it on Octane benchmark - for unoptimized code the number of source positions may achieve 2x ('lin_solve' from NavierStokes benchmark).
>
> 2. When a sample happens, CPU profiler finds a code object by pc, then use its reloc info to match the sample to a source line.
> If a source line is found that hit counter is increased by one for this line.
>
> 3. Add a new public V8 API to get the hit source lines by CDT CPU profiler.
> Note that it's expected a minor patch in Blink to pack the source level info in JSON to be shown.
>
> 4.Add a test that checks how the samples are distributed through source lines.
> It tests two cases: (1) relocation info created during code generation and (2) relocation info associated with precompiled function's version.
>
> Patch from Denis Pravdin <denis.pravdin@intel.com>
> BUG=None
> LOG=Y
> R=svenpanne@chromium.org
>
> Committed: https://code.google.com/p/v8/source/detail?r=24389

TBR=svenpanne@chromium.org,danno@chromium.org,alph@chromium.org,denis.pravdin@intel.com,weiliang.lin@intel.com
BUG=None
LOG=N

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24394 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-02 11:58:21 +00:00
yangguo@chromium.org
a2099f5292 Serialize all external strings except for native source code strings.
R=mvstanton@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24391 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-02 09:39:13 +00:00
yurys@chromium.org
6482fb3ee4 Extend CPU profiler with mapping ticks to source lines
The idea behind of this solution is to use the existing "relocation info" instead of consumption the CodeLinePosition events emitted by the V8 compilers.
During generation code and relocation info are generated simultaneously.
When code generation is done you each code object has associated "relocation info".
Relocation information lets V8 to mark interesting places in the generated code: the pointers that might need to be relocated (after garbage collection),
correspondences between the machine program counter and source locations for stack walking.

This patch:
1. Add more source positions info in reloc info to make it suitable for source level mapping.
The amount of data should not be increased dramatically because (1) V8 already marks interesting places in the generated code and
(2) V8 does not write redundant information (it writes a pair (pc_offset, pos) only if pos is changed and skips other).
I measured it on Octane benchmark - for unoptimized code the number of source positions may achieve 2x ('lin_solve' from NavierStokes benchmark).

2. When a sample happens, CPU profiler finds a code object by pc, then use its reloc info to match the sample to a source line.
If a source line is found that hit counter is increased by one for this line.

3. Add a new public V8 API to get the hit source lines by CDT CPU profiler.
Note that it's expected a minor patch in Blink to pack the source level info in JSON to be shown.

4.Add a test that checks how the samples are distributed through source lines.
It tests two cases: (1) relocation info created during code generation and (2) relocation info associated with precompiled function's version.

Patch from Denis Pravdin <denis.pravdin@intel.com>
BUG=None
LOG=Y
R=svenpanne@chromium.org

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

Patch from Denis Pravdin <denis.pravdin@intel.com>.

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24389 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-02 09:20:37 +00:00
jochen@chromium.org
906d16a750 Update the documentation of Isolate::GetCodeRange
On Win64, the first page is reserved for the embedder.

BUG=v8:3597
R=svenpanne@chromium.org
LOG=n

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24383 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-02 08:28:04 +00:00
yangguo@chromium.org
321dad9b8e Introduce v8::Object::GetIsolate().
API=v8::Object::GetIsolate()
LOG=Y
R=svenpanne@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24376 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-02 06:52:39 +00:00
yangguo@chromium.org
983205d5fd Reland "Use symbols instead of hidden properties for i18n markers."
R=dslomov@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24362 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-01 11:53:29 +00:00
yangguo@chromium.org
63851465f2 Revert "Use symbols instead of hidden properties for i18n markers."
This reverts r24345.

TBR=bmeurer@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24346 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-01 07:33:53 +00:00
yangguo@chromium.org
153ec0329e Use symbols instead of hidden properties for i18n markers.
Also refactor symbols in the root list.

R=dslomov@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24345 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-01 07:08:39 +00:00
yangguo@chromium.org
e68e62c891 Introduce PromiseRejectCallback.
R=aandrey@chromium.org, yurys@chromium.org, rossberg@chromium.org
API=v8::Isolate::SetPromiseRejectCallback, v8::Promise::HasHandler
LOG=Y
BUG=v8:3093

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24335 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-09-30 15:29:08 +00:00
alph@chromium.org
24d1ef4868 Initial implementation of GetStackSample sampling profiler API.
The patch is based on https://codereview.chromium.org/578163002/#ps20001
made by gholap@chromium.org

LOG=N
BUG=v8:3490
R=bmeurer@chromium.org, yurys@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24285 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-09-29 12:59:54 +00:00
jochen@chromium.org
9b32bb22c1 Add a getter for the address and size of the code range to the pulic API
Since the x64 backend currently doesn't emit ABI compliant code, it is
not possible to unwind the stack. During Win64 SEH this will cause the
exception handling to abort, and not even call the unhandled exception
handler. Embedders are advised to install a custom unwind callback using
RtlInstallFunctionTableCallback for the entire code range to catch
unwind attempts for exception handling.

BUG=v8:3598
R=svenpanne@chromium.org
LOG=y

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24283 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-09-29 12:17:31 +00:00
aandrey@chromium.org
4b072d16f2 Add IsGeneratorFunction and IsGeneratorObject checks to v8::Value.
R=ulan@chromium.org, yangguo@chromium.org, wingo, yangguo

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24278 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-09-29 10:22:56 +00:00
jochen@chromium.org
4bdd165fcc Remove a couple of deprecated APIs that moved to Isolate
Embedders should either pass the information to via
Isolate::CreateParams or use Isolate::SetStackLimit where appropriate

BUG=none
R=svenpanne@chromium.org
LOG=y

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24080 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-09-19 11:27:54 +00:00
jochen@chromium.org
6a14d7d50f Reland 24052 - Require V8 to be explicitly initialized before an Isolate is created
> We also initialize the Isolate on creation.
>
> This should allow for getting rid of the last remaining default isolate
> traces. Also, it'll speed up several isolate related operations that no
> longer require locks.
>
> Embedders that relied on v8::Isolate to return an uninitialized Isolate
> (so they can set ResourceConstraints for example, or set flags that
> modify the way the isolate is created) should either do the setup before
> creating the isolate, or use the recently added CreateParams to pass e.g.
> ResourceConstraints.
>
> BUG=none
> LOG=y
> R=svenpanne@chromium.org
>
> Review URL: https://codereview.chromium.org/469783002

BUG=none
LOG=y
TBR=svenpanne@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24067 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-09-19 08:01:35 +00:00
jochen@chromium.org
525ed1130e Revert "Require V8 to be explicitly initialized before an Isolate is created"
LOG=n
TBR=svenpanne@chromium.org
BUG=none

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24055 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-09-18 21:57:10 +00:00
jochen@chromium.org
27f3cc1b9c Require V8 to be explicitly initialized before an Isolate is created
We also initialize the Isolate on creation.

This should allow for getting rid of the last remaining default isolate
traces. Also, it'll speed up several isolate related operations that no
longer require locks.

Embedders that relied on v8::Isolate to return an uninitialized Isolate
(so they can set ResourceConstraints for example, or set flags that
modify the way the isolate is created) should either do the setup before
creating the isolate, or use the recently added CreateParams to pass e.g.
ResourceConstraints.

BUG=none
LOG=y
R=svenpanne@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24052 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-09-18 21:07:50 +00:00
jochen@chromium.org
069a9c75ad Move configuration of ResourceConstraints to Isolate construction
We can only set resource constraints before the isolate is initialized.
Since in the future, we want to initialize isolates at construction
time, we need to set constraints there.

It's possible to later modify the stack limit, so introduce an
Isolate::SetStackLimit method for that.

The SetResourceConstraints method will be deprecated. Users should pass
ResourceConstraints to Isolate::New, and use Isolate::SetStackLimit to
later modify the stack limit.

BUG=none
R=svenpanne@chromium.org
LOG=y

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23964 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-09-16 09:15:02 +00:00
jochen@chromium.org
65a1857824 Currently, a new isolate is created in an uninitialized state, and
several API methods will automatically initialize it. During this
uninitialized state, code event handlers and function entry handlers can
be attached to the isolate.

This CL deprecates SetFunctionEntryHook and moves the configuration of
those handlers to the Isolate factory method.

This will allow for initializing the Isolate at creation time in the
future.

Users of V8::SetFunctionEntryHook should pass the entry hook to
Isolate::New instead. V8::SetJitCodeEventHandler should either be passed
to Isolate::New as well, or (if startup events are not required) invoked
via the Isolate.

BUG=none
LOG=y
R=svenpanne@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23940 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-09-15 11:17:00 +00:00
marja@chromium.org
eb19fc013a Add script streaming API.
Blink will use this API to stream script data into V8 as the scripts
load. During loading, V8 can already parse the scripts. They will be then
compiled and executed when the loading is complete.

This is a reincarnation of https://codereview.chromium.org/366153002/
with fixes.

BUG=
R=jochen@chromium.org, rossberg@chromium.org, svenpanne@chromium.org, yangguo@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23904 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-09-12 09:12:08 +00:00
marja@chromium.org
90af365ae3 Revert "Add script streaming API."
This reverts r23865

Revert "Fix compilation after r23865."

This reverts r23867

Reason: the test contains characters too special for Windows's taste.

TBR=ulan@chromium.org

BUG=

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23868 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-09-11 11:29:28 +00:00
marja@chromium.org
96716c060d Fix compilation after r23865.
TBR=ulan@chromium.org
BUG=

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23867 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-09-11 11:13:40 +00:00
marja@chromium.org
61c9683d71 Add script streaming API.
Blink will use this API to stream script data into V8 as the scripts
load. During loading, V8 can already parse the scripts. They will be then
compiled and executed when the loading is complete.

BUG=
R=jochen@chromium.org, rossberg@chromium.org, svenpanne@chromium.org, yangguo@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23865 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-09-11 11:06:26 +00:00
yangguo@chromium.org
4e670fd05e Rename ascii to one-byte where applicable.
R=dcarney@chromium.org, marja@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23840 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-09-10 12:38:12 +00:00
bmeurer@chromium.org
bbd96b97e4 [turbofan] Add support for overflow add/sub to the MachineOperatorReducer.
TEST=base-unittests,compiler-unittests,cctest
R=svenpanne@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23809 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-09-09 14:18:17 +00:00
svenpanne@chromium.org
51d11d4e19 Fixed some undefined behavior in our external header.
R=bmeurer@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23788 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-09-09 08:52:36 +00:00
bmeurer@chromium.org
30f18f0f7d Use Chrome compatible naming for compiler specifics.
Less useless creativity is best creativity!

R=svenpanne@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23579 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-09-02 07:07:52 +00:00
bmeurer@chromium.org
40da0e5ee6 Use the "enum hack" to fix the SmiTagging constants.
The "enum hack" (see Item 2 of "Effective C++") is the only known
portable way to define constant integral values within template
classes. Fixes the weird work-arounds required for certain GCC
versions.

R=jarin@chromium.org, rossberg@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23550 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-09-01 10:24:04 +00:00
mvstanton@chromium.org
983aa69aa1 Introduce two new symbols for vector based ICs.
Vector based load ics need a premonomorphic and generic symbol.

R=verwaest@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23365 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-08-25 15:17:06 +00:00
aandrey@chromium.org
6190ac0882 Expose Value::IsMap, IsSet, IsWeakMap, IsWeakSet in V8 API.
These checks will be needed for DevTools.

R=yangguo@chromium.org, svenpanne@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23338 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-08-25 08:56:31 +00:00
dslomov@chromium.org
22d5ceb1f2 Implement Function.prototype.toMethod.
R=arv@chromium.org, verwaest@chromium.org
BUG=v8:3330
LOG=N

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23274 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-08-21 12:39:33 +00:00
wingo@igalia.com
e929f5fe43 Support symbol-named properties in API
Add new "Name" type to API that is a supertype of Symbol and String.

Object::SetDeclaredAccessor, Object::SetAccessorProperty, Template::Set,
Template::SetAccessorProperty, and Template::SetDeclaredAccessor now
take a Name as the property name instead of a String.

Add Object::SetAccessor, Template::SetNativeDataProperty, and
ObjectTemplate::SetAccessor overloads that can define accessors for
symbol-named properties.

R=dcarney@chromium.org, rossberg@chromium.org
BUG=v8:3394
TEST=cctest/test-api/TestSymbolProperties
LOG=Y

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23247 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-08-20 15:25:13 +00:00
bmeurer@chromium.org
b15a082d56 Fix implementation of bit count functions.
The bit counting functions provided by CompilerIntrinsics were undefined
for zero, which was easily overlooked and unsafe in general. Also their
implementation was kinda hacky and mostly untested. Fixed the
implementation and moved the functions to base/bits.h.

TEST=base-unittests,cctest,compiler-unittests,mjsunit
R=hpayer@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23229 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-08-20 12:10:41 +00:00
yangguo@chromium.org
5832ab8501 Expose function CheckDebugBreak in the debugger api
API=v8::Debug::CheckDebugBreak
LOG=Y
R=aandrey@chromium.org, vsevik@chromium.org, yurys@chromium.org

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

Patch from Sergei Vasilinetc <sergeyv@chromium.org>.

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23227 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-08-20 11:04:05 +00:00
rossberg@chromium.org
8394975ec7 Expose well-known Symbols to C++ API.
BUG=341423
LOG=Y
R=arv@chromium.org, dcarney@chromium.org, rossberg@chromium.org

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

Patch from Yutaka Hirano <yhirano@chromium.org>.

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23196 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-08-19 12:08:46 +00:00
yangguo@chromium.org
84edfa3d0c Purge unused internalized string accessors.
R=marja@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23141 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-08-18 07:54:19 +00:00
aandrey@chromium.org
3a3d6bd4f6 Expose Value::IsArgumentsObject in V8 API.
R=yangguo@chromium.org, svenpanne@chromium.org, yangguo

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23105 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-08-13 13:06:30 +00:00
mstarzinger@chromium.org
159cc8ddf2 v8::TryCatch should cancel the scheduled exception on Reset.
v8::TryCatch cancels the scheduled exception on destruction if |Rethrow|
was never called.
It is reasonable to do the same in |Reset|.

BUG=362388, 359386
LOG=
R=mstarzinger@chromium.org

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

Patch from Yutaka Hirano <yhirano@chromium.org>.

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22963 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-08-07 08:55:49 +00:00
verwaest@chromium.org
fb7da07a13 Removed GetConstructor from the API.
Instead either get the "constructor" property stored in the prototype, or keep a side-table.

LOG=y
R=jochen@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22861 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-08-05 11:27:44 +00:00
danno@chromium.org
a1383e2250 Land the Fan (disabled)
R=mstarzinger@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22709 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-07-30 13:54:45 +00:00
jochen@chromium.org
a56c917009 Drop deprecated memory related notification API
Embedders should use the non-static methods on Isolate with the same
name.

BUG=397026
R=hpayer@chromium.org
LOG=y

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22703 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-07-30 11:41:48 +00:00
verwaest@chromium.org
b337649d14 Only generate a single normal IC per kind per slow-mode map.
BUG=
R=jkummerow@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22680 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-07-29 17:02:52 +00:00
verwaest@chromium.org
4a956ab1c2 Change Has* and Get*Attributes to return Maybe<*>, indicating possible exceptions.
BUG=
R=ishell@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22624 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-07-25 18:32:11 +00:00
jochen@chromium.org
cb8105e223 Move gc notifications from V8 to Isolate and make idle hint mandatory
Embedders should use e.g. isolate->IdleNotification(1000) instead
of v8::V8::IdleNotification()

BUG=397026
R=hpayer@chromium.org, ernstm@chromium.org
LOG=y

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22584 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-07-24 08:28:02 +00:00
vogelheim@chromium.org
a42612b4a7 Change ScriptCompiler::CompileOptions to allow for two 'cache' modes
(parser or code) and to be explicit about cache consumption or production
(rather than making presence of cached_data imply one or the other.)

Also add a --cache flag to d8, to allow testing the functionality.

-----------------------------
API change

Reason: Currently, V8 supports a 'parser cache' for repeatedly executing the same script. We'd like to add a 2nd mode that would cache code, and would like to let the embedder decide which mode they chose (if any).

Note: Previously, the 'use cached data' property was implied by the presence of the cached data itself. (That is, kNoCompileOptions and source->cached_data != NULL.) That is no longer sufficient, since the presence of data is no longer sufficient to determine /which kind/ of data is present.

Changes from old behaviour:

- If you previously didn't use caching, nothing changes.
Example:
  v8::CompileUnbound(isolate, source, kNoCompileOptions);

- If you previously used caching, it worked like this:

  - 1st run:
  v8::CompileUnbound(isolate, source, kProduceToCache);
  Then, source->cached_data would contain the
  data-to-be cached. This remains the same, except you
  need to tell V8 which type of data you want.
  v8::CompileUnbound(isolate, source, kProduceParserCache);

  - 2nd run:
  v8::CompileUnbound(isolate, source, kNoCompileOptions);
  with source->cached_data set to the data you received in
  the first run. This will now ignore the cached data, and
  you need to explicitly tell V8 to use it:
  v8::CompileUnbound(isolate, source, kConsumeParserCache);
-----------------------------

BUG=
R=marja@chromium.org, yangguo@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22431 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-07-16 12:18:33 +00:00
danno@chromium.org
319e5226e9 fix the vtune support bug.
During https://code.google.com/p/v8/source/detail?r=19925 checkin context bound scripts (Script)
and context unbound scripts (UnboundScript) are Distinguished.

And then Sven Panne helped to fix the vtune support compilation
error in https://code.google.com/p/v8/source/detail?r=20955.

The problem is that there is runtime error for vtune
support.
In our original implementation, we encapsulated and passed v8::internal::Script
to V8 API. It will leads to type check error for current V8::Script definition.

So I changed the Handle<Script> definition in JitCodeEvent
to Handle<UnboundScript>
 and add the corresponding change in log.cc.

If you do NOT prefer to change in include/v8.h. I think I can change the definition of
CodeEventLogger::LogRecordedBuffer(...) so that the we can pass the correct
type (JSFunction) as V8::Script to V8 API.

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

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

Patch from Chunyang Dai <chunyang.dai@intel.com>.

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22393 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-07-15 08:13:42 +00:00
verwaest@chromium.org
6466ff39fb Remove PropertyAttributes from SetProperty
BUG=
R=ishell@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22383 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-07-14 14:52:24 +00:00
yangguo@chromium.org
339bc81390 Refactor ScriptData class for cached compile data.
R=marja@chromium.org, vogelheim@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22314 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-07-10 10:28:05 +00:00
jochen@chromium.org
c1f6a0306e Remove deprecate counter/histogram methods
Callers should use the methods with the same name on Isolate instead.

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

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22304 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-07-09 14:03:05 +00:00
yurys@chromium.org
6302fc6771 Add ScriptID field into ScriptOrigin class.
Anonymous script has empty resource name. To identify this script we need its id.

R=ulan@chromium.org, yangguo@chromium.org

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

Patch from Alexey Kozyatinskiy <kozyatinskiy@google.com>.

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22248 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-07-07 14:03:20 +00:00
jochen@chromium.org
6d5d4b44b5 Remove a bunch of Isolate::UncheckedCurrent calls
The callbacks are per isolate, so we shouldn't get the isolate implicitly
from TLS. Also, we shouldn't allow calls to these methods prior to
initializing the respective isolate (and silently ignore them).

Esp. add a per-isolate API to set the stats counter callbacks and
make it possible to set the stats counter callback after the isolate
was touched.

Embedders should use e.g. isolate->SetCounterFunction(callback) instead
of v8::V8::SetCounterFunction(callback).

BUG=none
R=svenpanne@chromium.org
LOG=y

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22223 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-07-07 07:19:46 +00:00
aandrey@chromium.org
952a986dd1 Introduce debug events for Microtask queue.
R=yangguo@chromium.org, adamk@chromium.org, rafaelw@chromium.org, rossberg@chromium.org
BUG=chromium:272416
LOG=Y

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22204 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-07-03 15:56:01 +00:00
dcarney@chromium.org
1859b04071 add GetOwnPropertyDescriptor to api
R=verwaest@chromium.org

BUG=

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22190 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-07-03 10:04:57 +00:00
jochen@chromium.org
c1231d426f Add an API to pump the message loop to libplatform
BUG=none
LOG=n
R=marja@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22187 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-07-03 09:33:36 +00:00
jochen@chromium.org
7b94143287 Don't even include v8.h from libbase or libplatform
BUG=none
R=yangguo@chromium.org
LOG=n

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22182 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-07-03 08:50:52 +00:00
jochen@chromium.org
abb0ff205c Buildfix for windows after r22180
TBR=yangguo@chromium.org
LOG=n
BUG=none

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22181 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-07-03 07:57:29 +00:00
jochen@chromium.org
ca16bb7ae2 Split out libplatform into a separate libary
Also remove the "use default platform" compile flag. Instead, the embedder
has to provide the platform.

Change all binaries to use the default platfrom from libplatform.

Unless --job-based-sweeping is passed, nothing uses the platform yet, so
nothing will break for embedders (yet).

BUG=none
R=jkummerow@chromium.org
LOG=y

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22180 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-07-03 07:37:27 +00:00
yangguo@chromium.org
44d6ef37ab Reland "Fix stack trace accessor behavior."
BUG=v8:3404
LOG=N
R=verwaest@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22166 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-07-02 14:18:10 +00:00
yangguo@chromium.org
1f24d32b00 Remove deprecated v8::Context::HasOutOfMemoryException.
LOG=Y
R=ulan@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22151 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-07-02 10:34:13 +00:00
marja@chromium.org
7717f2366f Handle "//# sourceURL" comments in the Parser instead of the JS.
BUG=v8:2948
LOG=N
R=svenpanne@chromium.org, yurys@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22137 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-07-02 07:01:31 +00:00
ishell@chromium.org
2c94151e6e Reland r22082 "Replace HeapNumber as doublebox with an explicit MutableHeapNumber."
R=verwaest@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22129 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-07-01 15:02:31 +00:00
marja@chromium.org
570a0bf8f5 Parser: add usage counters for "use asm".
R=jochen@chromium.org
BUG=

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22093 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-06-30 13:35:16 +00:00
yangguo@chromium.org
5d408ee73d Revert "Fix stack trace accessor behavior."
This reverts r22089.

TBR=verwaest@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22091 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-06-30 13:16:42 +00:00
yangguo@chromium.org
e1d80e2858 Fix stack trace accessor behavior.
R=verwaest@chromium.org
BUG=v8:3404
LOG=N

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22089 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-06-30 11:48:20 +00:00
yangguo@chromium.org
f6c4178aa7 Introduce debug events for promises.
R=aandrey@chromium.org, rossberg@chromium.org
BUG=v8:3093
LOG=Y

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22086 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-06-30 11:12:42 +00:00
ishell@chromium.org
d1190c503d Revert "Replace HeapNumber as doublebox with an explicit MutableHeapNumber."
This reverts commit r22082 for breaking arm64 build.

TBR=verwaest@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22083 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-06-30 10:19:31 +00:00
ishell@chromium.org
cea1824f58 Replace HeapNumber as doublebox with an explicit MutableHeapNumber.
R=verwaest@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22082 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-06-30 09:44:43 +00:00
yangguo@chromium.org
0133d96be3 Remove script collected debug event.
R=yurys@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22063 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-06-27 12:10:43 +00:00
yurys@chromium.org
0339d069d9 Add OnCompileError handler and v8::CompileError debug event.
This event is generated when the parser can not generate code.

R=vsevik@chromium.org, yangguo@chromium.org, yurys@chromium.org

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

Patch from Alexey Kozyatinskiy <kozyatinskiy@google.com>.

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22043 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-06-26 16:03:52 +00:00
marja@chromium.org
62ffc7de20 New try: Parser: Delay internalizing strings and values
This is a reincarnation of r21841.

The previous try was https://codereview.chromium.org/314603004/ but it regressed
JSBench and morejs.

BUG=
R=rossberg@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21972 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-06-24 14:03:24 +00:00
svenpanne@chromium.org
52fa41c3df Make Object::IsFoo const.
Removed a few useless const_casts on the way.

R=mstarzinger@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21961 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-06-24 09:47:25 +00:00
vogelheim@chromium.org
7b7bb25a24 Support external startup data in V8.
[Re-retry of r21696 and r21739]

If the embedder chooses, the 'natives' (library sources) and the
precompiled startup blob can be written to files during the build
process and handed over to V8 at startup. The main purpose would be
to reduce the size of the compiled binary for space constrained
platforms.

The build-time option is off by default. Nothing should change if
it's not enabled.

BUG=
R=jochen@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21941 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-06-23 13:52:17 +00:00
jochen@chromium.org
ce02221828 Add a use counter API
This lets embedders track certain features of v8 and the number of times
they are used

BUG=none
R=svenpanne@chromium.org, marja@chromium.org
LOG=y

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21925 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-06-23 09:46:58 +00:00
plind44@gmail.com
b6b57605ed MIPS: Fix big-endian after r21774/r21803.
Fix big-endian ordering of InstanceType and BitField by always loading
the pair as a 16-bit value, even in the API accessor. Clean up some
assertions.

R=danno@chromium.org, mtbrandy@gmail.com

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21906 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-06-20 23:02:36 +00:00
yurys@chromium.org
a862f7819b Added Message::GetScripOrigin.
Replaced Message::GetResourceName with GetScriptOrigin().ResourceName().

Now, GetScriptOrigin().ResourceName() function returns the resource name or sourceURL (from //# sourceURL=) for the script from where the function causing the error originates.

Method GetScriptResourceName() deprecated. Use GetScriptOrigin()->ResourceName() instead.

Function used in Blink: https://codereview.chromium.org/260513004/

R=yangguo@chromium.org, yurys@chromium.org

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

Patch from Alexey Kozyatinskiy <kozyatinskiy@google.com>.

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21893 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-06-20 07:44:05 +00:00
svenpanne@chromium.org
48e1ae334f Make the internal parts of our external API a bit more const-correct.
R=mstarzinger@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21891 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-06-20 07:20:44 +00:00
marja@chromium.org
9ad39a8043 Revert "Parser: Delay internalizing strings and values." (r21841)
Plus the fixes on top.

Reason: regresses benchmarks (JSBench) and perf (morejs).

TBR=rossberg@chromium.org
BUG=385404
LOG=N

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21882 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-06-18 07:30:56 +00:00
marja@chromium.org
a290cf8cda Parser: Delay internalizing strings and values.
This is needed so that we can run Parser on a non-main thread (independent
of the Isolate and the V8 heap).

BUG=
R=rossberg@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21841 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-06-13 13:31:56 +00:00
jkummerow@chromium.org
6e29768eb6 Have one, long-lived map for bound functions.
This avoids creating a new map for every bound function. Bonus: some cleanup in Runtime_FunctionBindArguments.

R=verwaest@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21839 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-06-13 12:19:04 +00:00
svenpanne@chromium.org
510ea9e529 Reland "Rename kIs64BitArch with kRequiresCodeRange."
R=svenpanne@chromium.org

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

Patch from Weiliang Lin <weiliang.lin@intel.com>.

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21837 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-06-13 11:06:42 +00:00
wingo@igalia.com
dfb1c7dc9e For-of calls [Symbol.iterator]() on RHS to get iterator
R=rossberg@chromium.org
BUG=http://code.google.com/p/v8/issues/detail?id=2735
LOG=N

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21820 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-06-12 17:31:54 +00:00
rossberg@chromium.org
d757f378d3 Add v8::Promise::Then.
Blink needs v8::Promise::Then to implement ScriptPromise::then.
Blink-side CL: https://codereview.chromium.org/316453002

BUG=371288
LOG=Y
R=rossberg@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21805 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-06-12 11:33:30 +00:00
svenpanne@chromium.org
f67f8fc4c5 Removed dead API entries.
R=ulan@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21763 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-06-11 09:12:35 +00:00
machenbach@chromium.org
6ccf6f8bf8 Revert "Support external startup data in V8."
This reverts commit r21696 for breaking chromium windows compilation in the chromium cq.

Conflicts:
	src/d8.cc

BUG=
R=mstarzinger@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21740 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-06-10 10:51:33 +00:00
svenpanne@chromium.org
e02158e8c1 Make presubmit script happy again.
No clue why this seems to be an issue only for me, though...

R=bmeurer@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21735 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-06-10 09:24:00 +00:00
vogelheim@chromium.org
ba9f391bc0 Support external startup data in V8.
[Retry of crrev.com/293993021, which caused problems with 'ninja all' in Chromium. First patch set if a clean apply
of crrev.com/293993021. Subsequent sets are the actual fix
for that issue.]

If the embedder chooses, the 'natives' (library sources) and the
precompiled startup blob can be written to files during the build
process and handed over to V8 at startup. The main purpose would be
to reduce the size of the compiled binary for space constrained
platforms.

The build-time option is off by default. Nothing should change if
it's not enabled.

BUG=
R=jochen@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21696 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-06-05 13:06:21 +00:00
marja@chromium.org
16be5bb377 Compilation API: next step of deprecations.
Remove deprecated functions and deprecated Script::GetId (which was supposed to
be deprecated, but Chrome was using it).

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

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21695 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-06-05 13:02:18 +00:00
jochen@chromium.org
a83b1b9cb3 Move most of the implementation of AdjustAmountOfExternalMemory to v8.h
This reduces the overhead of reporting allocations to v8 to an
acceptable level.

BUG=none
LOG=n
R=dcarney@chromium.org, hpayer@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21688 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-06-05 08:44:42 +00:00
mvstanton@chromium.org
e039477000 Revert "Support external startup data in V8."
This reverts commit r21646, as it blocks pushing to chromium.

TBR=vogelheim@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21666 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-06-04 08:35:42 +00:00
adamk@chromium.org
13d2f365cc Add API support for passing a C++ function as a microtask callback
This allows embedders to enqueue microtasks without having any v8::Context
handy, as happens in Blink in some cases (such as DOM mutations due to editing
triggering MutationObservers).

LOG=Y
R=dcarney@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21658 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-06-03 20:12:19 +00:00
vogelheim@chromium.org
61509aaea5 Support external startup data in V8.
If the embedder chooses, the 'natives' (library sources) and the
precompiled startup blob can be written to files during the build
process and handed over to V8 at startup. The main purpose would be
to reduce the size of the compiled binary for space constrained
platforms.

The build-time option is off by default. Nothing should change if
it's not enabled.

BUG=
R=bmeurer@chromium.org, jochen@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21646 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-06-03 14:38:35 +00:00
verwaest@chromium.org
60a71d8a8c Remove PROHIBITS_OVERWRITING as it is subsumed by non-configurable properties.
v8::DontDelete is set for Unforgeable properties, so just not setting PROHIBITS_OVERWRITING should be enough.

The secondary "feature" of not allowing accessors to be installed in extending objects is incorrect and confusing, given that it only applies to accessors but not to regular properties:
Object.defineProperty({__proto__:window}, "location", { value: 10 })
works where
Object.defineProperty({__proto__:window}, "location", { get: function() {} })
doesn't work.

LOG=y
R=dcarney@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21596 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-06-02 11:02:06 +00:00
yangguo@chromium.org
50cba82cb9 Remove unused debug API.
R=yurys@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21590 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-06-02 06:22:09 +00:00
adamk@chromium.org
20eeff9ae4 Allow microtasks to throw exceptions and handle them gracefully
If the embedder calls V8::TerminateExecution while we're running microtasks, bail out
and clear any pending microtasks.

All other exceptions are simply swallowed. No current Blink or V8 microtasks throw, this
just ensures something sane happens if another embedder decides to pass a throwing
microtask (or if ours unexpectedly throw due to, e.g., stack exhaustion).

BUG=371566
LOG=Y
R=mstarzinger@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21574 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-05-28 18:40:04 +00:00
vogelheim@chromium.org
06086a90e0 Fix the "PersistentValueMap" memory leak reported here:
http://build.chromium.org/p/client.v8/builders/V8%20Linux64%20ASAN

The bug:
The code assumed that a weak Persistent whose weak callback is being
called would still be weak. That isn't true since the persistent is
un-weakened by the garbage collector before calling the weak callback. [1]

Specifically, PersistentValueMap would funnel all 'remove' actions
through its Release method, which uses PersistentBase::ClearWeak to
obtain the callback data. [2] For 'removes' caused by the weak callback,
ClearWeak always returns a NULL-pointer since by that time the weak
persistent was already un-weakend. The result was a memory leak in
the test, since the code to delete the weak callback data would
delete NULL.

The fix:
I explicity call Traits::DisposeCallbackData from the weak callback
with the data obtained from the v8::WeakCallbackData. To avoid invalid
calls to DisposeCallbackData, I also check whether this instance is
(still) weak before calling it. (That check could easily be elided
if it's expensive, for the price of having two 'remove' code paths.)

Severety:
Probably low. At least in Chromium, noone uses the API in a way to
trigger this; only the test does.

[1] https://code.google.com/p/chromium/codesearch#chromium/src/v8/src/global-handles.cc&q=global-handles.cc&sq=package:chromium&type=cs&l=231
[2] https://code.google.com/p/chromium/codesearch#chromium/src/v8/include/v8-util.h&sq=package:chromium&l=332-345

R=dcarney@chromium.org, dcarney

BUG=

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21514 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-05-27 09:31:06 +00:00
jochen@chromium.org
f0527ae685 Always fully qualify the namespace to use in v8.h
Also, remove some unused methods.

BUG=none
R=dcarney@chromium.org
LOG=n

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21487 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-05-26 09:36:13 +00:00
rossberg@chromium.org
06f746a576 Consistently say 'own' property
R=yangguo@chromium.org
BUG=

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21441 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-05-22 15:27:57 +00:00
yurys@chromium.org
8751323701 Add support for ES6 Symbol in heap profiler
Heap profiler will create a node with name Symbol and type kSymbol.

BUG=chromium:376194
LOG=Y
R=loislo@chromium.org, yangguo@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21433 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-05-22 11:26:48 +00:00
ishell@chromium.org
2a62cce170 Reland "v8::TryCatch now works correctly with ASAN's UseAfterReturn mode enabled."
BUG=chromium:369962
LOG=N
R=jkummerow@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21382 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-05-20 10:13:46 +00:00
dcarney@chromium.org
1b70812e7d filter out .caller from other worlds
R=verwaest@chromium.org

BUG=

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21366 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-05-19 13:45:45 +00:00
yangguo@chromium.org
33fba3bfa1 Remove DebuggerAgent.
R=svenpanne@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21315 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-05-14 16:28:46 +00:00
rossberg@chromium.org
98849dd1ce Drop thenable coercion cache
R=dslomov@chromium.org
BUG=372788
LOG=Y

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21301 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-05-14 10:44:34 +00:00
svenpanne@chromium.org
72fcd0dd05 Revert PropertyCallbackInfo::This() signature change from r21022.
This exposed an internal implementation detail, which could be handled
differently.

BUG=v8:3274
LOG=y
R=yangguo@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21297 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-05-14 08:34:05 +00:00
yangguo@chromium.org
20a627183f Rename debug API methods.
R=yurys@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21295 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-05-14 08:07:21 +00:00
ishell@chromium.org
b94d02888a Revert "v8::TryCatch now works correctly with ASAN's UseAfterReturn mode enabled."
This reverts commit r21273.

TBR=danno@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21275 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-05-12 20:10:47 +00:00
ishell@chromium.org
631b66190b v8::TryCatch now works correctly with ASAN's UseAfterReturn mode enabled.
BUG=chromium:369962
LOG=N
R=jkummerow@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21273 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-05-12 19:32:12 +00:00
jochen@chromium.org
cf8327994d Drop unused static microtask API
BUG=none
LOG=y
R=svenpanne@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21251 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-05-12 07:41:06 +00:00
jochen@chromium.org
988ea995c4 Introduce an api to query the microtask autorun state of an isolate
BUG=none
R=adamk@chromium.org, svenpanne@chromium.org
LOG=y

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21250 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-05-12 06:27:38 +00:00
verwaest@chromium.org
03905e4753 Directly create API functions with readonly prototypes rather than converting. Remove FunctionSetReadOnlyPrototype.
BUG=
R=ishell@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21243 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-05-09 17:59:15 +00:00
vogelheim@chromium.org
623f2371eb Prevent calls to ReturnValue::Set with pointer-valued types.
[2nd try, after the previous version broke the build]

Currently, this code will compile:
SomePointer* p = ...;
ReturnValue r = ...;
r.Set(p);

What happens is that ReturnValue::Set has no pointer-ish overloads, but
a bool one, and hence C++ will convert the pointer to a bool and use
the Set(bool) overload. In other words, the example above is equivalent
to: r.Set(p ? true : false); Which probably isn't what the author had
in mind. This change adds a Set(void*) overload whose body forces a
compile error, to prevent this from happening inadvertently. The only
use of this indeed turned out to be an error.

(Said error was fixed/removed in crrev.com/267393002.)

Why was crrev.com/240013004 reverted?
The orginal version compiled fine on gcc (+ MSVC), but not on clang.
There's no clang try-bots, but the ASAN-based buildbots used clang
and hence the build broke. I'm slightly unsure on why, but clang -
unlike those other compilers - eagerly compiled the non-compilable
setter, which predictably broke. Now, the non-compilable setter uses
the same template logic that all other, comparable cases use. I've
tried 'make qc' with both gcc and clang versions.

BUG=
R=dcarney@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21228 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-05-09 15:36:51 +00:00
ishell@chromium.org
ff2d004f85 Presubmit checks recover:
1) runtime/references checks temporarily disabled (56 items left)
2) other errors fixed

R=jkummerow@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21222 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-05-09 12:59:24 +00:00
vogelheim@chromium.org
2c3ba95841 Revert of Prevent calls to ReturnValue::Set with pointer-valued types. (https://codereview.chromium.org/240013004/)
Reason for revert:
Looks like this broke the "V8 Linux64 ASAN" build.

Original issue's description:
> Prevent calls to ReturnValue::Set with pointer-valued types.
>
> Currently, this code will compile:
>   SomePointer* p = ...;
>   ReturnValue r = ...;
>   r.Set(p);
>
> What happens is that ReturnValue::Set has no pointer-ish overloads, but
> a bool one, and hence C++ will convert the pointer to a bool and use
> the Set(bool) overload. In other words, the example above is equivalent
> to: r.Set(p ? true : false); Which probably isn't what the author had
> in mind. This change adds a Set(void*) overload whose body forces a
> compile error, to prevent this from happening inadvertently. The only
> use of this indeed turned out to be an error.
>
> (Said error was fixed/removed in crrev.com/267393002.)
>
> BUG=
> R=dcarney@chromium.org
>
> Committed: https://code.google.com/p/v8/source/detail?r=21217

R=ishell@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21219 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-05-09 12:33:29 +00:00
vogelheim@chromium.org
6b1f74260a Prevent calls to ReturnValue::Set with pointer-valued types.
Currently, this code will compile:
  SomePointer* p = ...;
  ReturnValue r = ...;
  r.Set(p);

What happens is that ReturnValue::Set has no pointer-ish overloads, but
a bool one, and hence C++ will convert the pointer to a bool and use
the Set(bool) overload. In other words, the example above is equivalent
to: r.Set(p ? true : false); Which probably isn't what the author had
in mind. This change adds a Set(void*) overload whose body forces a
compile error, to prevent this from happening inadvertently. The only
use of this indeed turned out to be an error.

(Wait for issue 364025 before submitting.)

BUG=
R=dcarney@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21217 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-05-09 12:07:38 +00:00
yangguo@chromium.org
f56701f30c Clean up Debugger::NotifyMessageHandler.
R=ulan@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21210 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-05-09 09:24:32 +00:00
hpayer@chromium.org
de21c8a245 Simplify ConfigureHeap and change --max_new_space_size to --max_semi_space_size.
BUG=
R=mstarzinger@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21204 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-05-09 08:38:27 +00:00
yurys@chromium.org
c165fbd298 Remove Message::GetScriptData declaration
This is a left-over after r20683

BUG=None
LOG=N
R=svenpanne@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@21136 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-05-05 07:43:29 +00:00
jochen@chromium.org
4dd8b11171 Introduce a microtask suppression scope and move microtask methods to isolate
BUG=369503
R=adamk@chromium.org
LOG=y
TEST=cctest/test-api/SetAutorunMicrotasks

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@21128 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-05-02 19:30:54 +00:00
yangguo@chromium.org
7e367ae0ed Reland "Trigger exception debug event for promises at the throw site."
R=rossberg@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@21097 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-04-30 15:17:51 +00:00
yangguo@chromium.org
792af58115 Revert "Trigger exception debug event for promises at the throw site."
This reverts r21092.

R=ishell@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@21094 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-04-30 14:51:41 +00:00
yangguo@chromium.org
eed0e7e7a3 Trigger exception debug event for promises at the throw site.
R=rossberg@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@21092 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-04-30 14:17:40 +00:00
yangguo@chromium.org
3a92c26e36 Rename debug event enum to be consistent.
R=aandrey@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@21054 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-04-29 14:03:06 +00:00
bmeurer@chromium.org
d4b533d41b Bulk update of Google copyright headers in source files.
R=svenpanne@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@21035 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-04-29 06:42:26 +00:00
yangguo@chromium.org
ee0cd292d7 Tighten OpenHandle's extra checks.
R=jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@21022 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-04-28 13:42:03 +00:00
alph@chromium.org
a9655b7d37 Add timestamps to CPU profile samples.
BUG=363976
LOG=Y
R=bmeurer@chromium.org, yurys@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20993 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-04-25 18:53:06 +00:00
jochen@chromium.org
c27da0c9b2 Remove static CallCompletedCallback handlers
BUG=none
R=svenpanne@chromium.org
LOG=y

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20985 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-04-25 13:49:22 +00:00
yangguo@chromium.org
28f5cf398e Trigger debug event on not yet caught exception in promises.
R=aandrey@chromium.org, rossberg@chromium.org, yurys@chromium.org
BUG=v8:3093
LOG=Y

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20956 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-04-25 07:03:05 +00:00
dslomov@chromium.org
b0f91095bd Cache maps for externalized typed array objects.
After this, the maps do not garbage-collect, and typed array
constructors do not deopt.

R=ulan@chromium.org
BUG=363855
LOG=N

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20887 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-04-22 12:24:28 +00:00
yangguo@chromium.org
2c394ad00d Introduce exception object and remove some uses of MaybeObject::IsFailure().
R=bmeurer@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20871 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-04-22 07:33:20 +00:00
alph@chromium.org
b97a2a2585 Switch CPU profile start/stop markers to monotonic time.
LOG=N
BUG=363976
R=bmeurer@chromium.org, yurys@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20866 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-04-19 14:33:18 +00:00
hpayer@chromium.org
39b5090f8e Grow old generation slower on low-memory devices.
BUG=
R=mstarzinger@chromium.org, rmcilroy@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20837 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-04-17 11:27:45 +00:00
svenpanne@chromium.org
cd89f90bd1 Removed GetDefaultIsolate{Debugger,ForLocking,StackGuard}.
Some first steps towards removing the default Isolate. Fixed argument
order on the way, incl. temporary helpers.

BUG=359977
LOG=y
R=bmeurer@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20747 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-04-15 07:47:33 +00:00
yangguo@chromium.org
22f7451e6c Export [Dis]allowJavascriptExecutionScope
R=yangguo@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20737 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-04-14 19:34:32 +00:00
jochen@chromium.org
9843789de0 Remove ConfigureDefaults version that does not take the amount of virtual mem
R=dcarney@chromium.org
LOG=n
BUG=none

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20702 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-04-14 06:55:42 +00:00
marja@chromium.org
069d783a91 Remove the PreCompile API and ScriptData.
The new compilation API (ScriptCompiler::Compile) can produce the same data, so
the separate precompilation phase is not needed. ScriptData is replaced by
ScriptCompiler::CachedData.

R=svenpanne@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20683 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-04-11 11:44:49 +00:00
vogelheim@chromium.org
5633dfa6f5 Remove V8_ALLOW_ACCESS_TO_RAW_HANDLE_CONSTRUCTOR.
The usage of this define has been obsoleted by removal of UnsafePersistent
from Chromium.

Depends on https://codereview.chromium.org/230613005

R=dcarney@chromium.org
BUG=276323
LOG=N

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20656 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-04-10 13:51:30 +00:00
jochen@chromium.org
dc4ba08d17 Allow the embedder to pass the virtual memory limit to v8
The getrlimit() call might be sandboxed, so it's not safe to use it.

BUG=none
R=mstarzinger@chromium.org
LOG=y

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20615 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-04-09 12:45:56 +00:00
adamk@chromium.org
902ad4a17a Use OrderedHashTables as the backing store of JSSet and JSMap
This also deletes ObjectHashSet as it's no longer used.

BUG=v8:1793
LOG=N
R=mstarzinger@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20585 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-04-08 20:06:35 +00:00
yangguo@chromium.org
8601ddc73b Deprecate Context::HasOutOfMemoryException.
R=dcarney@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20539 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-04-07 11:11:25 +00:00
bmeurer@chromium.org
448486ed48 Use distinct maps for oddballs with special handling in the type system.
R=rossberg@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20531 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-04-07 09:41:13 +00:00
jochen@chromium.org
82279ba022 Add API for adding and removing CallCompletedCallbacks to Isolate
The API currently just forwards to the global methods. A follow-up
change will move the callback handling to the Isolate and deprecate the
global versions.

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20463 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-04-03 07:51:27 +00:00
vogelheim@chromium.org
ebe0c79594 Remove V8_INLINE from v8-util.h.
(These have been causing compilation problems on some
platforms. For VS, V8_INLINE turns into 'force inline',
which will then cause a problem when the compiler won't
actually inline. Search for "C4714 warning" for details.)

BUG=
R=jochen@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20432 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-04-02 12:07:10 +00:00
jochen@chromium.org
5838d03291 Remove V8_INLINE to prevent C4714 warning under Win64.
BUG=
R=jochen@chromium.org

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20412 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-04-01 18:04:06 +00:00
yangguo@chromium.org
997ce1cac7 Remove remnants of internalized cons strings.
R=svenpanne@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20397 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-04-01 12:34:08 +00:00
yurys@chromium.org
681c15eb4e Remove debugger_auto_break flag
The flag was introduced to support console debugger in Chrome. That debugger was replaced by DevTools long time ago and the flag is always true now.

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20393 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-04-01 11:23:23 +00:00
rossberg@chromium.org
d486f52cf4 Finalisation disclaimer
R=svenpanne@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20355 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-03-31 13:35:12 +00:00
dcarney@chromium.org
8b304a6832 Implement PersistentValueVector, analogous to PersistentValueMap.
BUG=
R=dcarney@chromium.org

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20341 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-03-31 10:03:20 +00:00
marja@chromium.org
6730ec8433 Amend PersistentValueMap:
- Use the surrounding map (instead of Traits::Impl) for weak callback.
- Provide for a fast reference to a mapped value.
- Restructure Traits to accomondate for the first point above.

[Why?] As discussed, I proceeded to replace Impl with the map.
The problem I encountered with that version is that now the
Traits class depends on itself: The weak-related methods require the
map type in their signature. But the map type includes the Traits class
and hence the Traits class method signatures depend on the specific Traits class. That
makes them practically un-derivable: While you can derive a Traits class
from another one, since the compiler now expects methods with a different
signature. To accommodate, I pulled the dispose traits into the weak traits
class. I also removed the Impl*/MapType* parameter from the Dispose call,
since no implementation seems to need it.

R=dcarney@chromium.org
BUG=

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20326 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-03-28 09:35:50 +00:00
yurys@chromium.org
f7b437d086 Deprecate Start/StopCpuProfiling methods
BUG=v8:3213
LOG=Y
R=alph@chromium.org, svenpanne@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20325 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-03-28 09:24:49 +00:00
svenpanne@chromium.org
085dddc69d Removed 'executable' bits from header.
R=jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20298 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-03-27 12:15:14 +00:00
dslomov@chromium.org
76b8f25edb This implements allocating small typed arrays in heap.
R=mvstanton@chromium.org, verwaest@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20279 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-03-26 12:50:13 +00:00
dslomov@chromium.org
cdc9812756 Revert "This implements allocating small typed arrays in heap."
This reverts commit r20244 for breaking Win64 build and webkit tests.

TBR=svenpanne@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20250 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-03-25 14:12:58 +00:00
dslomov@chromium.org
654b6a27d1 This implements allocating small typed arrays in heap.
R=mvstanton@chromium.org, verwaest@chromium.org

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20244 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-03-25 13:21:58 +00:00
dslomov@chromium.org
727bc2153e Revert "This implements allocating small typed arrays in heap."
This reverts commit r20240 for breaking Windows build.

TBR=svenpanne@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20242 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-03-25 12:58:22 +00:00
dslomov@chromium.org
322a474bf2 This implements allocating small typed arrays in heap.
R=mvstanton@chromium.org, verwaest@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20240 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-03-25 12:51:49 +00:00
jochen@chromium.org
04eefb86f4 Roll ICU 239289:258359 and add support for external ICU data tables
The only binary that supports ICU data tables is d8. The location of the
data table file has to be passed via a command line switch:

  $ out/x64.optdebug/d8 --icu-data-file=out/x64.optdebug/icudtl.dat

BUG=72633,v8:3142
R=danno@chromium.org
LOG=y

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20239 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-03-25 12:05:33 +00:00
dcarney@chromium.org
5664936497 fix FunctionCallbackInfo ambiguity
- when compiling tools that embed v8 with g++ FunctionCallbackInfo is currently ambigous
- more info: https://github.com/joyent/node/issues/7337
- original patch is here: https://codereview.appspot.com/78770045/

TBR=svenpanne@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20217 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-03-24 19:36:59 +00:00
rossberg@chromium.org
ff1186c834 Add support for per-isolate private symbols
R=mstarzinger@chromium.org
BUG=
LOG=Y

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20209 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-03-24 16:34:06 +00:00
marja@chromium.org
e5f5cc951a Fix component build some more.
Not V8_EXPORTing ScriptCompiler::Source got rid of the last errors. This fixes
the new ones created by it. V8_INLINEing these funcs makes sense anyway.

In addition, added declared-private-and-unimplemented assignment operators
which were accidentally omitted.

R=dcarney@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20188 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-03-24 12:13:58 +00:00
yangguo@chromium.org
8b8fb30e7f Reland "Remove Failure::OutOfMemory propagation and V8::IgnoreOutOfMemoryException."
R=dcarney@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20184 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-03-24 10:07:15 +00:00
yangguo@chromium.org
03866841aa Revert "Remove Failure::OutOfMemory propagation and V8::IgnoreOutOfMemoryException."
This reverts r20179.

TBR=svenpanne@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20183 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-03-24 09:17:18 +00:00
yangguo@chromium.org
62f65d8697 Remove Failure::OutOfMemory propagation and V8::IgnoreOutOfMemoryException.
R=dcarney@chromium.org
BUG=v8:3060
LOG=Y

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20179 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-03-24 08:47:45 +00:00
dcarney@chromium.org
3ab0622b96 add setaccessorproperty to object
R=svenpanne@chromium.org

LOG=N
BUG=v8:2964

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20178 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-03-24 08:41:59 +00:00
marja@chromium.org
be4c4953b7 Tentative Windows dll build fix: Don't V8_EXPORT ScriptCompiler::Source.
For more information, see the bug. Compare to ScriptOrigin
which is not exported either.

BUG=v8:3228
LOG=Y
R=dcarney@chromium.org, jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20170 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-03-21 15:24:36 +00:00
rossberg@chromium.org
b3b6987b27 Reland "Implement ES6 symbol registry and predefined symbols"
Only change relative to original CL is the updated assertion condition at objects-inl.h:2119

R=mstarzinger@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20136 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-03-20 16:13:09 +00:00
rossberg@chromium.org
1088fbd1e7 Revert "Implement ES6 symbol registry and predefined symbols"
TBR=yangguo@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20121 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-03-20 12:56:41 +00:00
rossberg@chromium.org
0f71f61799 Implement ES6 symbol registry and predefined symbols
R=mstarzinger@chromium.org, arv@chromium.org
BUG=
LOG=Y

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20118 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-03-20 12:26:27 +00:00
yangguo@chromium.org
9cd1057c3e Remove unnecessary 'explicit' attribute.
R=marja@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20104 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-03-20 09:29:48 +00:00
dcarney@chromium.org
99b115b120 Provide default traits for PersistentValueMap
Re-try of issue 201643003. This caused linker errors on Win64, since the
linker insists on seeing the StrongMapTrait method implementations even
though they are never used. This will provide default implementations
for them.

R=dcarney@chromium.org

BUG=

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20084 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-03-19 15:35:02 +00:00
marja@chromium.org
932a29a66a New compilation API, part 2.
This CL makes the Parser produce the data PreParser used to produce. This
enables us to get rid of the unnecessary preparsing phase.

The first part is here: https://codereview.chromium.org/199063003/

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20075 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-03-19 13:24:13 +00:00
yangguo@chromium.org
d8c3c5ef0a Introduce API to trigger exception on JS execution.
R=jochen@chromium.org, pmarch@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20070 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-03-19 13:06:53 +00:00
yangguo@chromium.org
0bc684a794 Introduce per-isolate assert scopes and API to guard JS execution.
R=jochen@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20062 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-03-19 11:31:43 +00:00
yangguo@chromium.org
0dd31685f0 Revert "First attempt at providing default traits for PersistentValueMap."
This reverts r20038.

TBR=vogelheim@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20042 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-03-18 16:32:39 +00:00
dcarney@chromium.org
6deb7b0db4 First attempt at providing default traits for PersistentValueMap.
BUG=
R=dcarney@chromium.org

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20038 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-03-18 15:01:12 +00:00
hpayer@chromium.org
4c20e76b4b heap: allow allocation in gc prologue/epilogue
BUG=
R=hpayer@chromium.org, danno@chromium.org

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

Patch from Fedor Indutny <fedor.indutny@gmail.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19978 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-03-17 10:38:45 +00:00
rossberg@chromium.org
0a2f4c86bd Split Promise API into Promise/Resolver
R=svenpanne@chromium.org
BUG=
LOG=Y

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19972 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-03-17 09:57:25 +00:00
yurys@chromium.org
386063bf9e Fix compile error after r19955
BUG=None
TBR=svenpanne@chromium.org
LOG=N

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19956 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-03-17 07:09:49 +00:00
yurys@chromium.org
587b54482f Move profiler callback interfaces from v8.h to v8-profiler.h
OutputStream and ActivityControl are used only by heap profiler so I moved their definition in v8-profiler.h to not clutter v8.h

Drive-by: removed OutputStream::GetOutputEncoding which is unused.

BUG=None
LOG=Y
R=alph@chromium.org, svenpanne@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19955 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-03-17 07:02:39 +00:00
dcarney@chromium.org
45ffad09d8 Move PersitentValueMap into seperate header, to avoid excessive polution
of v8.h.

R=dcarney@chromium.org
BUG=

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19936 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-03-14 14:57:04 +00:00
marja@chromium.org
6923d84785 New Compilation API, part 1, try 2
- 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.)

This is a fixed version of https://codereview.chromium.org/186723005/

BUG=
R=dcarney@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19925 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-03-14 10:20:33 +00:00
yurys@chromium.org
0a61b7c996 StopCpuProfiling should return non-const CpuProfile
StopCpuProfiling is replaced with StopProfiling which returns non-const CpuProfile which allows to call CpuProfile::Delete on it without const_cast. Also replaced StartCpuProfiling with StartProfiling to have symmetric names for start/stop actions.

BUG=v8:3213
LOG=Y
R=alph@chromium.org, svenpanne@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19918 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-03-14 09:26:31 +00:00
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