Commit Graph

839 Commits

Author SHA1 Message Date
Dan Carney
1fcedda668 convert object::* to return maybe values
BUG=v8:3929
LOG=y
R=svenpanne@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#26940}
2015-03-02 13:13:31 +00:00
Sven Panne
602d0dab93 Removed funky Maybe constructor and made fields private.
BUG=v8:3929
LOG=y
R=dcarney@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#26937}
2015-03-02 12:22:37 +00:00
Sven Panne
30637108dd Polish Maybe API a bit, removing useless creativity and fixing some signatures.
BUG=v8:3929
LOG=y
R=dcarney@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#26936}
2015-03-02 11:27:05 +00:00
dcarney
8d839ead04 convert Value::*Value() function to return Maybe results
BUG=v8:3929
LOG=Y

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

Cr-Commit-Position: refs/heads/master@{#26914}
2015-02-27 13:04:49 +00:00
dcarney
2fc51d9cfa Convert v8::Value::To* to use MaybeLocal
BUG=v8:3929
LOG=y

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

Cr-Commit-Position: refs/heads/master@{#26912}
2015-02-27 10:39:41 +00:00
machenbach
9dac60ad2d Add public version macros.
Side note: tools/v8-info.sh seems to have been broken ever
since the move to git.  At least it's not more broken now.

BUG=v8:3075
LOG=y

TEST=./script_test.py

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

Cr-Commit-Position: refs/heads/master@{#26873}
2015-02-26 08:59:23 +00:00
ben
726eb0582b Add v8::Object::GetRealNamedPropertyAttributes()
Add v8::Object::GetRealNamedPropertyAttributes() and
v8::Object::GetRealNamedPropertyAttributesInPrototypeChain().

See https://github.com/iojs/io.js/issues/864 for background.

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

Cr-Commit-Position: refs/heads/master@{#26855}
2015-02-25 15:09:20 +00:00
rossberg
c094da9233 [strong] Make functions and generators non-extensible non-constructors
R=dslomov@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#26854}
2015-02-25 14:52:51 +00:00
yangguo
4b5ff0c5e2 Attach snapshot data blob to the isolate.
R=vogelheim@chromium.org
BUG=chromium:461259
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#26845}
2015-02-25 11:14:56 +00:00
jochen
58deea0ad0 Make it possible to define arguments for CompileFunctionInContext
Also make sure that the function body really produces only one function literal.

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

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

Cr-Commit-Position: refs/heads/master@{#26617}
2015-02-12 14:39:03 +00:00
ulan
b79b985988 Use weak cells in dependent code.
BUG=

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

Cr-Commit-Position: refs/heads/master@{#26614}
2015-02-12 13:21:13 +00:00
yangguo
8aae1b3096 Throw on range error when creating a string via API.
R=jkummerow@chromium.org
BUG=v8:3853
LOG=Y

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

Cr-Commit-Position: refs/heads/master@{#26574}
2015-02-11 10:21:25 +00:00
dcarney
79417664b2 remove undetectable strings
BUG=

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

Cr-Commit-Position: refs/heads/master@{#26571}
2015-02-11 09:28:12 +00:00
jochen
30674bdeb4 Introduce a compile method that takes context extensions
BUG=chromium:456192
R=yangguo@chromium.org
LOG=y

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

Cr-Commit-Position: refs/heads/master@{#26530}
2015-02-09 15:16:33 +00:00
dcarney
313b24dbc2 add support for all can read interceptors
R=verwaest@chromium.org

BUG=

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

Cr-Commit-Position: refs/heads/master@{#26522}
2015-02-09 11:33:50 +00:00
adamk
70079dab13 Add basic compilation support for modules
This adds an "experimental" API hook (v8::ScriptCompiler::CompileModule)
allowing compilation of modules. The code gen is incredibly basic: the
module body is represented by a Block in the AST. But this at least gets
more of the pipeline working, and opens the door to writing mjsunit tests
(once d8 is modified to support module compilation).

BUG=v8:1569
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#26496}
2015-02-06 17:52:38 +00:00
yurys
a559367956 Add NativeWeakMap to v8.h
A new map wich references its keys weakly is added to v8.h. Internally it uses the same storage as JSWeakMap but doesn't depend on the JavaScript part of WeakMap implementation in weak-collection.js, hence it can be instantiated without entering any context.

BUG=chromium:437416
LOG=Y

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

Cr-Commit-Position: refs/heads/master@{#26451}
2015-02-05 09:40:27 +00:00
ulan
b7d27ea583 Add a flag to track detached contexts.
When embedder detaches the global objects, its context must be garbage
collected eventually.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#26450}
2015-02-05 09:35:59 +00:00
yurys
1f7e3b3483 Revert of Add WeakKeyMap to v8.h (patchset #2 id:20001 of https://codereview.chromium.org/891473005/)
Reason for revert:
Revert this patch due to shared win build compilation failure

http://build.chromium.org/p/client.v8/builders/V8%20Win32%20-%20nosnap%20-%20shared/builds/5030/steps/compile/logs/stdio

Original issue's description:
> Add WeakKeyMap to v8.h
>
> A new map wich references its keys weakly is added to v8.h. Internally it uses the same storage as JSWeakMap but doesn't depend on the JavaScript part of WeakMap implementation in weak-collection.js, hence it can be instantiated without entering any context.
>
> BUG=chromium:437416
> LOG=Y
>
> Committed: https://crrev.com/ee7ed39ac8327124e74dd7ad5f1de0dede988cb7
> Cr-Commit-Position: refs/heads/master@{#26425}

TBR=jochen@chromium.org,mstarzinger@chromium.org,rossberg@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=chromium:437416

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

Cr-Commit-Position: refs/heads/master@{#26430}
2015-02-04 15:12:52 +00:00
dcarney
8064582626 Move the contents of api-natives.js to c++
R=verwaest@chromium.org

BUG=

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

Cr-Commit-Position: refs/heads/master@{#26426}
2015-02-04 13:01:44 +00:00
yurys
ee7ed39ac8 Add WeakKeyMap to v8.h
A new map wich references its keys weakly is added to v8.h. Internally it uses the same storage as JSWeakMap but doesn't depend on the JavaScript part of WeakMap implementation in weak-collection.js, hence it can be instantiated without entering any context.

BUG=chromium:437416
LOG=Y

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

Cr-Commit-Position: refs/heads/master@{#26425}
2015-02-04 12:53:05 +00:00
yurys
aeec653f49 Revert of Add WeakMap to v8.h (patchset #3 id:40001 of https://codereview.chromium.org/886473005/)
Reason for revert:
Broke compilation on component build http://build.chromium.org/p/client.v8/builders/V8%20Win32%20-%20nosnap%20-%20shared/builds/5007/steps/compile/logs/stdio

Original issue's description:
> Add WeakMap to v8.h
>
> A new map wich references its keys weakly is added to v8.h. Internally it uses the same storage as JSWeakMap but doesn't depend on the JavaScript part of WeakMap implementation in weak-collection.js, hence it can be instantiated without entering any context.
>
> BUG=chromium:437416
> LOG=Y
>
> Committed: https://crrev.com/37d4c57630636f21e3add8d3d1c7c978ff5fc8e0
> Cr-Commit-Position: refs/heads/master@{#26401}

TBR=jochen@chromium.org,mstarzinger@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=chromium:437416

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

Cr-Commit-Position: refs/heads/master@{#26402}
2015-02-03 14:42:49 +00:00
yurys
37d4c57630 Add WeakMap to v8.h
A new map wich references its keys weakly is added to v8.h. Internally it uses the same storage as JSWeakMap but doesn't depend on the JavaScript part of WeakMap implementation in weak-collection.js, hence it can be instantiated without entering any context.

BUG=chromium:437416
LOG=Y

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

Cr-Commit-Position: refs/heads/master@{#26401}
2015-02-03 14:28:20 +00:00
mvstanton
16843e239d Megamorphic KeyedLoadIC needs special handling for vector ics.
When --vector-ics is true, we still tail-call to the hand-written
megamorphic KeyedLoadIC (formerly "generic"). Now that this code uses
the megamorphic cache, it needs to deal properly with the vector and
slot registers. Achieve this with a sentinel vectors/slot combo.

R=dcarney@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#26381}
2015-02-02 13:55:21 +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
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
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