adamk
4fa7ae1c07
Optimize Object.seal and Object.preventExtensions
...
They both now run fast (due to utilizing transitions instead of always
creating new maps) and sealed or non-extensible objects can stay in
fast mode after transitioning.
This almost entirely reuses the code for transitioning objects
frozen by Object.freeze(), with the added benefit of freeing
up a bit on the map (we no longer keep track of frozen-ness,
as that bit wasn't used for anything interesting).
BUG=v8:3662,chromium:115960
LOG=y
Review URL: https://codereview.chromium.org/776143005
Cr-Commit-Position: refs/heads/master@{#25759}
2014-12-10 20:02:59 +00:00
Adam Klein
986e7cefe1
Ensure class prototype objects have the right Map::constructor field
...
The null constructor they had previously could be observed as crashes in
the V8 API's Object::CreationContext() method and in Object.observe.
BUG=v8:3750
LOG=n
R=arv@chromium.org , dslomov@chromium.org
Review URL: https://codereview.chromium.org/787763005
Cr-Commit-Position: refs/heads/master@{#25757}
2014-12-10 18:25:55 +00:00
ishell
7d13ca278a
Reland of "TransitionArray now uses <is_data_property, name, attributes> tuple as a key, which allows to have several entries for the same property name."
...
Review URL: https://codereview.chromium.org/793453004
Cr-Commit-Position: refs/heads/master@{#25750}
2014-12-10 15:18:52 +00:00
titzer
9a823cf612
Reland "[turbofan] Fix control reducer bug with NTLs."
...
R=mstarzinger@chromium.org
BUG=
Review URL: https://codereview.chromium.org/789083004
Cr-Commit-Position: refs/heads/master@{#25740}
2014-12-10 11:45:35 +00:00
d
4161b54d58
Add Array.prototype.includes
...
Requires adding a SameValueZero implementation.
LOG=Y
BUG=v8:3575
R=dslomov@chromium.org , arv@chromium.org
TEST=added to test262
Review URL: https://codereview.chromium.org/771863002
Cr-Commit-Position: refs/heads/master@{#25735}
2014-12-10 08:58:15 +00:00
dslomov
008405f0b9
Pass --noharmony-scoping to tests validating that we throw on 'const' in strict mode.
...
R=marja@chromium.org
BUG=v8:2198
LOG=N
Review URL: https://codereview.chromium.org/784323002
Cr-Commit-Position: refs/heads/master@{#25733}
2014-12-10 08:55:53 +00:00
Benedikt Meurer
19418d76df
[x64] Fix optimization for certain checked load/stores.
...
BUG=chromium:439743
LOG=y
TEST=mjsunit
R=svenpanne@chromium.org
Review URL: https://codereview.chromium.org/733893008
Cr-Commit-Position: refs/heads/master@{#25731}
2014-12-10 07:49:12 +00:00
Ben L. Titzer
a068503b45
Revert "[turbofan] Fix control reducer bug with NTLs."
...
This reverts commit aeda76c5cf
.
Reason: exposed other TurboFan bugs.
R=mstarzinger@chromium.org
BUG=
Review URL: https://codereview.chromium.org/785233003
Cr-Commit-Position: refs/heads/master@{#25730}
2014-12-09 16:28:20 +00:00
titzer
aeda76c5cf
[turbofan] Fix control reducer bug with NTLs.
...
R=bmeurer@chromium.org
BUG=
Review URL: https://codereview.chromium.org/789773002
Cr-Commit-Position: refs/heads/master@{#25725}
2014-12-09 15:09:59 +00:00
Benedikt Meurer
48a6766e78
[x86] Disable invalid checked load/store optimization.
...
TEST=mjsunit/compiler/regress-lena
R=svenpanne@chromium.org
Review URL: https://codereview.chromium.org/784153006
Cr-Commit-Position: refs/heads/master@{#25722}
2014-12-09 14:16:34 +00:00
dslomov
1954ad8bc1
Do not reflect uninitialized 'let' and 'const' in scope mirrors.
...
R=yangguo@chromium.org ,aandrey@chromium.org
BUG=v8:3743
LOG=N
Review URL: https://codereview.chromium.org/758603004
Cr-Commit-Position: refs/heads/master@{#25712}
2014-12-08 14:59:28 +00:00
jochen
97c1f4b15c
Turn on DCHECKs and other debugging code if dcheck_always_on is 1
...
When compiling with the macro DCHECK_ALWAYS_ON defined, DCHECKs and
supporting code gets compiled and enabled.
This increases test coverage for chromium release buildbots
BUG=v8:3731
R=jkummerow@chromium.org
LOG=y
Review URL: https://codereview.chromium.org/760213005
Cr-Commit-Position: refs/heads/master@{#25701}
2014-12-08 09:26:16 +00:00
dslomov
293f898a6f
Make sure that individual shipping features can be disabled.
...
R=rossberg@chromium.org
Review URL: https://codereview.chromium.org/779203005
Cr-Commit-Position: refs/heads/master@{#25690}
2014-12-05 15:35:37 +00:00
dslomov
bd04e6cdad
Fix the order of context binding/simulate insertion for BlockContexts.
...
R=jarin@chromium.org
BUG=v8:3741
LOG=N
Review URL: https://codereview.chromium.org/762393008
Cr-Commit-Position: refs/heads/master@{#25684}
2014-12-05 13:06:50 +00:00
arv
edf3dab466
ES6 template literals: Fix issue with template after rbrace
...
If we hade }` the right brace was always treated as part of the
template literal. We should only treat the right brace as part of
the literal when we continue to parse the template literal after a
placeholder.
BUG=v8:3734
LOG=Y
Review URL: https://codereview.chromium.org/778813003
Cr-Commit-Position: refs/heads/master@{#25661}
2014-12-04 14:50:17 +00:00
arv
d67e573dbe
Simplify template literal raw string creation
...
BUG=v8:3710
LOG=Y
R=dslomov@chromium.org , marja@chromium.org
Review URL: https://codereview.chromium.org/768203002
Cr-Commit-Position: refs/heads/master@{#25640}
2014-12-03 14:17:23 +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
svenpanne
c16b8f6cbb
Fixed environment handling for LFlooringDivI on ARM.
...
Beautiful code... :-}
BUG=chromium:437765
LOG=y
Review URL: https://codereview.chromium.org/775613002
Cr-Commit-Position: refs/heads/master@{#25613}
2014-12-02 13:47:19 +00:00
marja
0a0e6c8c81
ES6 unicode extensions, part 1.
...
Allows \u{xxxxx} in variable names and string literals (not yet in regexps).
Everything's behind the --harmony-unicode flag.
BUG=
Review URL: https://codereview.chromium.org/716423002
Cr-Commit-Position: refs/heads/master@{#25603}
2014-12-02 10:58:19 +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
dslomov
573401a422
harmony-classes: Fix some issues with syntactic restriction on super(...).
...
R=arv@chromium.org
BUG=v8:3330
LOG=N
Review URL: https://codereview.chromium.org/770843002
Cr-Commit-Position: refs/heads/master@{#25589}
2014-12-01 20:13:54 +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
dslomov
9e02e98771
Introduce a kill-switch for shipping features.
...
R=rossberg@chromium.org
TBR=hpayer@chromium.org
Committed: d628562086
Review URL: https://codereview.chromium.org/763273002
Cr-Commit-Position: refs/heads/master@{#25577}
2014-11-28 20:07:18 +00:00
dslomov
557bf53b79
Revert of Introduce a kill-switch for shipping features. (patchset #2 id:20001 of https://codereview.chromium.org/763273002/ )
...
Reason for revert:
Reverted for breaking nosnap: http://chromegw.corp.google.com/i/client.v8/builders/V8%20Linux%20-%20nosnap/builds/1003/steps/Check/logs/Threading3
Original issue's description:
> Introduce a kill-switch for shipping features.
>
> R=rossberg@chromium.org
>
> Committed: d628562086
TBR=rossberg@chromium.org
NOTREECHECKS=true
NOTRY=true
Review URL: https://codereview.chromium.org/763353002
Cr-Commit-Position: refs/heads/master@{#25574}
2014-11-28 18:27:55 +00:00
aandrey
cec0acad38
Expose generator object internal properties via mirrors.
...
BUG=v8:3292
R=yangguo@chromium.org , wingo@igalia.com
LOG=N
Review URL: https://codereview.chromium.org/760303002
Cr-Commit-Position: refs/heads/master@{#25571}
2014-11-28 14:49:08 +00:00
Dmitry Lomov
d628562086
Introduce a kill-switch for shipping features.
...
R=rossberg@chromium.org
Review URL: https://codereview.chromium.org/763273002
Cr-Commit-Position: refs/heads/master@{#25570}
2014-11-28 14:32:17 +00:00
dslomov
65aa17b9c3
harmony-classes: Implement 'super(...)' call syntactic restriction.
...
R=rossberg@chromium.org ,arv@chromium.org
BUG=v8:3330
LOG=N
Review URL: https://codereview.chromium.org/766663003
Cr-Commit-Position: refs/heads/master@{#25555}
2014-11-28 04:08:58 +00:00
dslomov
34702e9d59
Set @@toStringTag on GeneratorFunction prototype.
...
R=caitpotter88@gmail.com
BUG=v8:3502
LOG=N
Review URL: https://codereview.chromium.org/764823002
Cr-Commit-Position: refs/heads/master@{#25550}
2014-11-27 16:09:43 +00:00
ishell
1a2e4b265a
Map::CopyGeneralizeAllRepresentations() left incorrect layout descriptor in a new map.
...
BUG=chromium:436820
LOG=N
Review URL: https://codereview.chromium.org/759823004
Cr-Commit-Position: refs/heads/master@{#25530}
2014-11-26 17:37:05 +00:00
caitpotter88
0ea30611f3
Fix raw TemplateLiteral spans with non-ascii characters
...
BUG=v8:3710
Review URL: https://codereview.chromium.org/745233002
Cr-Commit-Position: refs/heads/master@{#25529}
2014-11-26 17:15:54 +00:00
titzer
9da4998204
Abort optimization in corner case.
...
The %OptimizeFunctionOnNextCall sledgehammer can cause a function to be
marked for optimization before it's ever been compiled by fullcode.
This can lead to the situation where a function doesn't have optimization
disabled until we try to compile it optimized.
Basically, the assert should just handle this case more gracefully.
R=yangguo@chromium.org
BUG=436893
LOG=Y
Review URL: https://codereview.chromium.org/760063002
Cr-Commit-Position: refs/heads/master@{#25528}
2014-11-26 16:57:52 +00:00
jarin
97cab985b8
Do not try to inline if the function has an illegal redeclaration.
...
R=mvstanton@chromium.org
BUG=chromium:436896
LOG=n
Review URL: https://codereview.chromium.org/755333003
Cr-Commit-Position: refs/heads/master@{#25527}
2014-11-26 16:32:46 +00:00
dslomov
626f110f0b
Introduce legacy const slots in correct context.
...
R=rossberg@chromium.org
BUG=chromium:410030
LOG=Y
Review URL: https://codereview.chromium.org/756293004
Cr-Commit-Position: refs/heads/master@{#25519}
2014-11-26 12:16:30 +00:00
rodolph.perfetta
55614cfe69
[turbofan] Recognize rotate right.
...
Extended the rotate left detection code.
BUG=
Review URL: https://codereview.chromium.org/760523004
Cr-Commit-Position: refs/heads/master@{#25517}
2014-11-26 11:49:43 +00:00
dslomov
6ac4de87a8
harmony-scoping: make assignment to 'const' a late error.
...
Per TC39 Nov 2014 decision.
This patch also changes behavior for "legacy const": assignments to sloppy const in strict mode is now also a type error. This fixes v8:2243 and also brings us in compliance with other engines re assignment to function names (see updated webkit test), but might have bigger implications.
That change can easily be reverted by changing Variable::IsSignallingAssignmentToConst.
BUG=v8:3713,v8:2243
LOG=N
Review URL: https://codereview.chromium.org/749633002
Cr-Commit-Position: refs/heads/master@{#25516}
2014-11-26 11:21:23 +00:00
Benedikt Meurer
560b0c4534
[arm] Fix recognition of VNEG.
...
TEST=mjsunit,unittests
R=svenpanne@chromium.org
Committed: 2aed882fe7
Review URL: https://codereview.chromium.org/762493006
Cr-Commit-Position: refs/heads/master@{#25515}
2014-11-26 11:18:58 +00:00
machenbach
86f6123ade
Revert of [arm] Fix recognition of VNEG. (patchset #3 id:40001 of https://codereview.chromium.org/762493006/ )
...
Reason for revert:
Breaks arm compilation.
Original issue's description:
> [arm] Fix recognition of VNEG.
>
> TEST=mjsunit,unittests
> R=svenpanne@chromium.org
>
> Committed: 2aed882fe7
TBR=svenpanne@chromium.org ,bmeurer@chromium.org
NOTREECHECKS=true
NOTRY=true
Review URL: https://codereview.chromium.org/751653004
Cr-Commit-Position: refs/heads/master@{#25514}
2014-11-26 11:07:23 +00:00
Benedikt Meurer
2aed882fe7
[arm] Fix recognition of VNEG.
...
TEST=mjsunit,unittests
R=svenpanne@chromium.org
Review URL: https://codereview.chromium.org/762493006
Cr-Commit-Position: refs/heads/master@{#25513}
2014-11-26 10:46:37 +00:00
machenbach
38a111c4b2
Mark slow tests as slow.
...
TBR=svenpanne@chromium.org
Review URL: https://codereview.chromium.org/755283004
Cr-Commit-Position: refs/heads/master@{#25511}
2014-11-26 08:51:48 +00:00
dslomov
f1d8668e38
harmony-scoping: Catch variable should be VAR, not LET
...
R=rossberg@chromium.org
BUG=v8:2858
LOG=N
Review URL: https://codereview.chromium.org/748113003
Cr-Commit-Position: refs/heads/master@{#25503}
2014-11-25 14:48:39 +00:00
jarin
322bb23e82
[turbofan] Insert appropriate conversions for typed array stores.
...
BUG=
Review URL: https://codereview.chromium.org/758643003
Cr-Commit-Position: refs/heads/master@{#25496}
2014-11-25 08:40:29 +00:00
jarin
d9cabb9b22
[turbofan] Fix matching of the lea instruction.
...
Resets the scaled exponent to 0 when the scaling match fails.
BUG=
Review URL: https://codereview.chromium.org/756643002
Cr-Commit-Position: refs/heads/master@{#25491}
2014-11-24 17:45:33 +00:00
Yang Guo
fc22bf2e8d
Disable regress-3717 for gc-stress.
...
TBR=ulan@chromium.org
BUG=v8:3723
LOG=N
Review URL: https://codereview.chromium.org/749283002
Cr-Commit-Position: refs/heads/master@{#25489}
2014-11-24 16:29:23 +00:00
yangguo
270dccf6db
Correctly find shared function info for debugging when compiling eagerly.
...
R=ulan@chromium.org
BUG=v8:3717
LOG=N
Review URL: https://codereview.chromium.org/758523004
Cr-Commit-Position: refs/heads/master@{#25486}
2014-11-24 15:43:35 +00:00
yangguo
14a3b9188d
Fix RegExp.source for uncompiled regexp.
...
R=jkummerow@chromium.org
BUG=435825
LOG=N
Review URL: https://codereview.chromium.org/753983002
Cr-Commit-Position: refs/heads/master@{#25476}
2014-11-24 11:21:52 +00:00
svenpanne
be0fcaa2bc
Added test cases for truncating stores.
...
Review URL: https://codereview.chromium.org/741643003
Cr-Commit-Position: refs/heads/master@{#25474}
2014-11-24 10:42:26 +00:00
yangguo
5414c39974
Slightly improve tests that rely on lazy compilation.
...
R=rossberg@chromium.org
BUG=v8:3712
LOG=N
Review URL: https://codereview.chromium.org/743843003
Cr-Commit-Position: refs/heads/master@{#25463}
2014-11-21 12:41:06 +00:00
yangguo
61bee5c898
Correctly escape RegExp source.
...
R=ulan@chromium.org
BUG=v8:3229
LOG=N
Review URL: https://codereview.chromium.org/736003002
Cr-Commit-Position: refs/heads/master@{#25457}
2014-11-21 10:50:24 +00:00
Michael Stanton
cf572694fe
Assert to protect against polymorphic string loads fires on valid stores.
...
BUG=435477
LOG=N
R=jarin@chromium.org
Review URL: https://codereview.chromium.org/751513002
Cr-Commit-Position: refs/heads/master@{#25456}
2014-11-21 10:29:08 +00:00
Michael Stanton
3d58b82add
Fix for 435073: CHECK failure in CHECK(p->IsSmi()) failed.
...
The bug was an error when copying arrays in crankshaft. If it's a holey smi
array, the copy must be done as FAST_HOLEY_ELEMENTS to prevent representation
changes from being inserted that deopt on encountering the hole.
Also, prevent inlining array pop() and shift() if the length is read-only.
BUG=435073
LOG=N
R=verwaest@chromium.org
Review URL: https://codereview.chromium.org/737383002
Cr-Commit-Position: refs/heads/master@{#25455}
2014-11-21 10:14:19 +00:00