Benedikt Meurer
9dff8185dd
Revert "[turbofan] Make Factory::NewNumber() always return the minus_zero_value."
...
This reverts commit f578d35ba8
because
(immutable) heap numbers are surprisingly mutable in V8. Someone else
might want to cleanup the mess, otherwise we'll just keep it this way.
TBR=jkummerow@chromium.org
BUG=chromium:454894
LOG=y
Review URL: https://codereview.chromium.org/898973003
Cr-Commit-Position: refs/heads/master@{#26447}
2015-02-05 04:58:49 +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
marja
c7851da4ae
Introduce LanguageMode, drop StrictMode.
...
This enables adding more language modes in the future.
For maximum flexibility, LanguageMode is a bitmask, so we're not restricted to
use a sequence of language modes which are progressively stricter, but we can
express the language mode as combination of features.
For now, LanguageMode can only be "sloppy" or "strict", and there are
STATIC_ASSERTS in places which need to change when more modes are added.
LanguageMode is a bit like the old LanguageMode when "extended" mode was still
around (see https://codereview.chromium.org/8417035 and
https://codereview.chromium.org/181543002 ) except that it's transmitted through
all the layers (there's no StrictModeFlag).
BUG=
Review URL: https://codereview.chromium.org/894683003
Cr-Commit-Position: refs/heads/master@{#26419}
2015-02-04 09:34:26 +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
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
ishell
33994b4a22
Massive renaming of PropertyType values and other implied stuff.
...
PropertyKind:
DATA -> kData
ACCESSOR -> kAccessor
PropertyType:
FIELD -> DATA
CONSTANT -> DATA_CONSTANT
ACCESSOR_FIELD -> ACCESSOR
CALLBACKS -> ACCESSOR_CONSTANT
PropertyLocation:
IN_OBJECT -> kField
IN_DESCRIPTOR -> kDescriptor
StoreMode:
FORCE_IN_OBJECT -> FORCE_FIELD
FieldDescriptor -> DataDescriptor
ConstantDescriptor -> DataConstantDescriptor
CallbacksDescriptor -> AccessorConstantDescriptor
Review URL: https://codereview.chromium.org/856503002
Cr-Commit-Position: refs/heads/master@{#26146}
2015-01-19 17:49:22 +00:00
mstarzinger
0ef9ce4ad8
Remove exorbitant duplication of DebuggerHasBreakpoints.
...
R=yangguo@chromium.org
Review URL: https://codereview.chromium.org/804713006
Cr-Commit-Position: refs/heads/master@{#26145}
2015-01-19 16:51:52 +00:00
bmeurer
f578d35ba8
[turbofan] Make Factory::NewNumber() always return the minus_zero_value.
...
TEST=unittests
Review URL: https://codereview.chromium.org/857783002
Cr-Commit-Position: refs/heads/master@{#26124}
2015-01-19 08:07:37 +00:00
mstarzinger
459c45db0a
Allow --always-opt to go further into the pipeline (1).
...
R=rossberg@chromium.org
Review URL: https://codereview.chromium.org/841213003
Cr-Commit-Position: refs/heads/master@{#26112}
2015-01-16 22:20:09 +00:00
bmeurer
a9d0d23405
Revert of [turbofan] Make Factory::NewNumber() always return the minus_zero_value. (patchset #1 id:1 of https://codereview.chromium.org/838263006/ )
...
Reason for revert:
Breaks the tree
Original issue's description:
> [turbofan] Make Factory::NewNumber() always return the minus_zero_value.
>
> TEST=unittests
> R=mstarzinger@chromium.org , dcarney@chromium.org
>
> Committed: https://crrev.com/55b3e268b2895e2c09230d39669a75b6ab4e7e4d
> Cr-Commit-Position: refs/heads/master@{#26080}
TBR=dcarney@chromium.org ,mstarzinger@chromium.org
NOTREECHECKS=true
NOTRY=true
Review URL: https://codereview.chromium.org/853683009
Cr-Commit-Position: refs/heads/master@{#26081}
2015-01-15 15:29:42 +00:00
Benedikt Meurer
55b3e268b2
[turbofan] Make Factory::NewNumber() always return the minus_zero_value.
...
TEST=unittests
R=mstarzinger@chromium.org , dcarney@chromium.org
Review URL: https://codereview.chromium.org/838263006
Cr-Commit-Position: refs/heads/master@{#26080}
2015-01-15 15:10:05 +00:00
yangguo
22e6958d63
Fix remaining issues in the custom snapshot.
...
Math functions:
Some Math functions require typed arrays for their implementation. The embedded
script may call those Math functions. The serializer needs to deal with this.
Added assertion to make sure no other typed array is created when snapshotting.
Number-string cache:
We assume that the initial snapshot does not expand the number-string cache.
This is no longer true for custom heap snapshots.
Bound functions:
Bound functions store the bound arguments in a COW fixed array, including the
bindee function. COW arrays are serialized into the startup snapshot and
referenced in the partial snapshot via partial snapshot cache. However, the
bindee function is context-dependent and must not be part of the startup
snapshot. There is no need for bound functions to use a COW array though.
R=jochen@chromium.org
Review URL: https://codereview.chromium.org/851073002
Cr-Commit-Position: refs/heads/master@{#26072}
2015-01-15 11:22:17 +00:00
yangguo
fe82e03bb6
Correctly reference global proxy in the partial snapshot.
...
R=verwaest@chromium.org
Review URL: https://codereview.chromium.org/853493003
Cr-Commit-Position: refs/heads/master@{#26061}
2015-01-14 16:42:30 +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
hpayer
377de64246
Make sure backing store pointer in handles get cleared after use in factory.
...
BUG=442710
LOG=n
Review URL: https://codereview.chromium.org/813023002
Cr-Commit-Position: refs/heads/master@{#25881}
2014-12-18 12:50:14 +00:00
svenpanne
bb65d40dbf
Fixed -fsanitize=float-cast-overflow problems.
...
BUG=v8:3773
LOG=y
Review URL: https://codereview.chromium.org/809293003
Cr-Commit-Position: refs/heads/master@{#25880}
2014-12-18 11:13:04 +00:00
ishell
08146dc023
Introduced PropertyType ACCESSOR_FIELD.
...
Review URL: https://codereview.chromium.org/805453002
Cr-Commit-Position: refs/heads/master@{#25842}
2014-12-16 13:22:31 +00:00
jkummerow
60dafcaab2
Add infrastructure to keep track of references to prototypes.
...
There are no users of this infrastructure yet, so it's behind an off-by-default flag.
Review URL: https://codereview.chromium.org/768633002
Cr-Commit-Position: refs/heads/master@{#25829}
2014-12-15 19:57:54 +00:00
adamk
8877f15664
Create optimized inline versions of Map and Set initialization
...
Review URL: https://codereview.chromium.org/779173010
Cr-Commit-Position: refs/heads/master@{#25758}
2014-12-10 18:47:36 +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
ulan
2ac522ab15
Reland parts of 'Use weak cells in map checks in polymorphic ICs'
...
This relands macroassembler instructions and weak cell caching and
does not include parts that caused "Linux ASan LSan" test failures.
BUG=v8:3663
LOG=N
Review URL: https://codereview.chromium.org/764003003
Cr-Commit-Position: refs/heads/master@{#25615}
2014-12-02 14:25:26 +00:00
machenbach
d9c83f6bd0
Revert of Use weak cells in map checks in polymorphic ICs. (patchset #8 id:140001 of https://codereview.chromium.org/753993003/ )
...
Reason for revert:
[Sheriff] Speculative revert for breaking chromium asan (roll blocker):
http://build.chromium.org/p/client.v8/builders/Linux%20ASan%20LSan%20Tests%20%281%29/builds/1683
Original issue's description:
> Use weak cells in map checks in polymorphic ICs.
>
> BUG=v8:3663
> LOG=N
TBR=mvstanton@chromium.org ,akos.palfi@imgtec.com,weiliang.lin@intel.com,ulan@chromium.org
NOTREECHECKS=true
NOTRY=true
BUG=v8:3663
Review URL: https://codereview.chromium.org/771033003
Cr-Commit-Position: refs/heads/master@{#25597}
2014-12-02 08:17:05 +00:00
ulan
45a36948e1
Use weak cells in map checks in polymorphic ICs.
...
BUG=v8:3663
LOG=N
Review URL: https://codereview.chromium.org/753993003
Cr-Commit-Position: refs/heads/master@{#25581}
2014-12-01 10:41:14 +00:00
Michael Stanton
c142994f74
Flesh out vector ic state query and set mechanisms.
...
The IC system now fully integrates the vector concept and can
handle loads and keyed loads vector-based.
BUG=
R=jkummerow@chromium.org
Review URL: https://codereview.chromium.org/754303003
Cr-Commit-Position: refs/heads/master@{#25552}
2014-11-27 16:36:40 +00:00
yangguo
33853f73a7
Partially revert "Optimize function across closures."
...
BUG=chromium:434447
Review URL: https://codereview.chromium.org/755173002
Cr-Commit-Position: refs/heads/master@{#25500}
2014-11-25 13:22:04 +00:00
yangguo
6714365a30
Reland "Optimize function across closures." (again).
...
Review URL: https://codereview.chromium.org/707463002
Cr-Commit-Position: refs/heads/master@{#25367}
2014-11-17 08:43:00 +00:00
Toon Verwaest
c8e5a1add7
Install the constructor property on custom prototype before optimizing it as a prototype
...
BUG=
R=ishell@chromium.org
Review URL: https://codereview.chromium.org/725593002
Cr-Commit-Position: refs/heads/master@{#25328}
2014-11-13 14:13:11 +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
ishell@chromium.org
18cf6c9ac9
MapCache simplification. It is now a FixedArray that maps number of properties to a WeakCell with a Map.
...
R=verwaest@chromium.org
Review URL: https://codereview.chromium.org/712943002
Cr-Commit-Position: refs/heads/master@{#25253}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@25253 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-11-10 18:04:17 +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
jkummerow@chromium.org
e2e9e1d3f6
Add FLAG_trace_maps
...
R=verwaest@chromium.org
Review URL: https://codereview.chromium.org/694533003
Cr-Commit-Position: refs/heads/master@{#25219}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@25219 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-11-07 16:03:44 +00:00
yangguo@chromium.org
6de28b2be1
Revert "Reland "Optimize function across closures.""
...
This reverts commit r25142.
TBR=ishell@chromium.org
Review URL: https://codereview.chromium.org/702853002
Cr-Commit-Position: refs/heads/master@{#25145}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@25145 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-11-05 11:37:42 +00:00
yangguo@chromium.org
1cdf4e9308
Reland "Optimize function across closures."
...
R=mvstanton@chromium.org
Review URL: https://codereview.chromium.org/703603003
Cr-Commit-Position: refs/heads/master@{#25142}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@25142 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-11-05 11:12:41 +00:00
yangguo@chromium.org
c66a3f95ae
Revert "Optimize function across closures."
...
This reverts r25102.
TBR=mvstanton@chromium.org
Review URL: https://codereview.chromium.org/699143002
Cr-Commit-Position: refs/heads/master@{#25104}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@25104 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-11-04 11:40:45 +00:00
yangguo@chromium.org
1d66934565
Optimize function across closures.
...
R=mvstanton@chromium.org
Review URL: https://codereview.chromium.org/699633002
Cr-Commit-Position: refs/heads/master@{#25102}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@25102 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-11-04 11:06:44 +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
mvstanton@chromium.org
c688ebd858
vector-based ICs did not update type feedback counts correctly.
...
BUG=v8:3605
LOG=N
R=jkummerow@chromium.org , ulan@chromium.org
Review URL: https://codereview.chromium.org/650073002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24732 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-20 11:42:56 +00:00
dslomov@chromium.org
7cf9d1c807
Share code between Factory::NewJSTypedArray and API
...
R=bmeurer@chromium.org
Review URL: https://codereview.chromium.org/641343005
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24681 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-17 09:04:58 +00:00
erikcorry@chromium.org
3727a10d20
Use WeakCell to handle the script wrapper cache
...
The script wrapper cache used the API weak handles to provide a weak link from Script to ScriptWrapper. We want to change the way API weakness works, and in this context it's best to get rid of users of the API that don't need to be users.
R=ulan@chromium.org
BUG=
Review URL: https://codereview.chromium.org/659513003
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24622 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-15 10:11: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
bmeurer@chromium.org
cb37b6c54e
[turbofan] Fix typed lowering of typed array loads/stores.
...
R=jarin@chromium.org
Review URL: https://codereview.chromium.org/646483003
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24514 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-10 08:10:29 +00:00
bmeurer@chromium.org
e3294b1f09
[turbofan] Fix lowering of typed loads/stores.
...
Only JSLoadProperty/JSStoreProperty nodes with external typed arrays can
be lowered to LoadElement/StoreElement, because lowering of non-external
typed arrays would require a map check.
TEST=cctest,unittests,mjsunit
R=svenpanne@chromium.org
Review URL: https://codereview.chromium.org/631093003
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24426 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-07 07:36:21 +00:00
jarin@chromium.org
f40d582cf1
Revert "[turbofan] Fix lowering of typed loads/stores."
...
This reverts commit r24386 for tanking asm.js benchmarks.
BUG=
R=bmeurer@chromium.org
Review URL: https://codereview.chromium.org/634473002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24406 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-06 08:54:24 +00:00
bmeurer@chromium.org
5899cc8ca7
[turbofan] Fix lowering of typed loads/stores.
...
We can only access to external typed arrays; lowering of internal
typed arrays would require a map check plus eager deoptimization.
Also embed the array buffer reference directly instead of embedding
the typed array.
TEST=cctest,mjsunit,unittests
R=mstarzinger@chromium.org
Review URL: https://codereview.chromium.org/621863002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24386 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-02 08:38:37 +00:00
jkummerow@chromium.org
1903e560b0
Non-JSArrays must always have holey elements.
...
Drive-by cleanup: remove unused elements_kind_ field in CallNew.
BUG=chromium:416558
LOG=n
R=mvstanton@chromium.org
Review URL: https://codereview.chromium.org/595333002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24211 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-09-25 08:25:25 +00:00
verwaest@chromium.org
40bbeef0ee
Make Map::Create always use the Object function, and remove the unused inobject properties
...
BUG=
R=jkummerow@chromium.org
Review URL: https://codereview.chromium.org/584943002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24094 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-09-19 14:59:14 +00:00
verwaest@chromium.org
e2cc4baaf3
Use the initial map of the Object function for empty object literals
...
BUG=
R=jkummerow@chromium.org
Review URL: https://codereview.chromium.org/586673002
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24088 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-09-19 13:40:38 +00:00