platform/upstream/v8.git
9 years agox87: Use signaling NaN for holes in fixed double arrays.
Weiliang Lin [Thu, 5 Feb 2015 02:54:13 +0000 (10:54 +0800)]
x87: Use signaling NaN for holes in fixed double arrays.

Port 9eace97bbaab72962c0fda62e5f9011a10604d0d

BUG=
R=chunyang.dai@intel.com

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

Cr-Commit-Position: refs/heads/master@{#26445}

9 years agoRevert "MIPS:[turbofan] Improve unordered comparisons for boolean materialization."
paul.lind [Wed, 4 Feb 2015 21:28:43 +0000 (13:28 -0800)]
Revert "MIPS:[turbofan] Improve unordered comparisons for boolean materialization."

Reason for revert:
Fails mjsunit/asm/embenchen/box2d

BUG=

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

Cr-Commit-Position: refs/heads/master@{#26444}

9 years agoMIPS: Calls to the CallIC miss handler looked up the receiver incorrectly.
paul.lind [Wed, 4 Feb 2015 21:27:34 +0000 (13:27 -0800)]
MIPS: Calls to the CallIC miss handler looked up the receiver incorrectly.

Port 13b97b6214d8448c568d2e547e4a04c5fb468f5d

Original commit message:
On platforms that don't push the return address on the stack at time of call, there was an error.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#26443}

9 years agotemplates: Don't check IsLineTerminator() if character is negative
caitpotter88 [Wed, 4 Feb 2015 21:05:33 +0000 (13:05 -0800)]
templates: Don't check IsLineTerminator() if character is negative

BUG=455212
LOG=N
R=arv@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#26442}

9 years agoFix issue with multiple properties and emit store.
arv [Wed, 4 Feb 2015 20:44:01 +0000 (12:44 -0800)]
Fix issue with multiple properties and emit store.

We used to have a parse error for conflicting property keys. This check
was removed to match ES6 (SpiderMonkey & Chakra already made this change).
Since this check was removed we ended up with a few new cases when
generating code. For example, accessors always generated code even if
those should have been shadowed by a data property.

BUG=v8:3856
LOG=Y
R=adamk, dslomov@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#26441}

9 years agoAdd macro for getting a PropertyAttributes for the runtime functions
arv [Wed, 4 Feb 2015 18:22:23 +0000 (10:22 -0800)]
Add macro for getting a PropertyAttributes for the runtime functions

Motivation: Cleanup

BUG=None
R=adamk
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#26440}

9 years agoCalls to the CallIC miss handler looked up the receiver incorrectly.
mvstanton [Wed, 4 Feb 2015 17:45:53 +0000 (09:45 -0800)]
Calls to the CallIC miss handler looked up the receiver incorrectly.

On platforms that don't push the return address on the stack at time of call, there was an error.

R=ulan@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#26439}

9 years agoMIPS: Fix assertion in full codegen for holed 'this'.
balazs.kilvady [Wed, 4 Feb 2015 17:35:04 +0000 (09:35 -0800)]
MIPS: Fix assertion in full codegen for holed 'this'.

Port 275e088abec213aa0be3eef748926e4be2c5c79f

BUG=chromium:455141
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#26438}

9 years agoClass methods should be non enumerable
arv [Wed, 4 Feb 2015 17:23:07 +0000 (09:23 -0800)]
Class methods should be non enumerable

Class methods and accessors (both prototype and static) should be
non enumerable.

BUG=v8:3330
LOG=Y
R=dslomov@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#26437}

9 years agoMake functions contexts in optimized code weak.
ulan [Wed, 4 Feb 2015 17:13:47 +0000 (09:13 -0800)]
Make functions contexts in optimized code weak.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#26436}

9 years agoRevert of Externalize deoptimization reasons. (patchset #6 id:100001 of https://coder...
loislo [Wed, 4 Feb 2015 16:48:23 +0000 (08:48 -0800)]
Revert of Externalize deoptimization reasons. (patchset #6 id:100001 of https://codereview.chromium.org/874323003/)

Reason for revert:
it broke the build

Original issue's description:
> Externalize deoptimization reasons.
>
> 1) The hardcoded strings were converted into DeoptReason enum.
>
> 2) Deopt comment were converted into a pair location and deopt reason entries so
> the deopt reason tracking mode would less affect the size of the RelocInfo table and heap.
>
> 3) DeoptReason entry in RelocInfo reuses kCommentTag value and generates short entry in RelocInfo table.
>
> BUG=452067
> LOG=n
>
> Committed: https://crrev.com/c49820e45b57f128a98690940875c049f612dde6
> Cr-Commit-Position: refs/heads/master@{#26434}

TBR=alph@chromium.org,mstarzinger@chromium.org,svenpanne@chromium.org,yurys@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=452067

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

Cr-Commit-Position: refs/heads/master@{#26435}

9 years agoExternalize deoptimization reasons.
loislo [Wed, 4 Feb 2015 16:35:17 +0000 (08:35 -0800)]
Externalize deoptimization reasons.

1) The hardcoded strings were converted into DeoptReason enum.

2) Deopt comment were converted into a pair location and deopt reason entries so
the deopt reason tracking mode would less affect the size of the RelocInfo table and heap.

3) DeoptReason entry in RelocInfo reuses kCommentTag value and generates short entry in RelocInfo table.

BUG=452067
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#26434}

9 years agotest-parsing.cc: Test fix.
marja [Wed, 4 Feb 2015 16:31:36 +0000 (08:31 -0800)]
test-parsing.cc: Test fix.

The syntax of this test snippet was so wrong ("function function") that it
wasn't testing what it was supposed to test.

R=rossberg@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#26433}

9 years agoMIPS: Retry "Use a WeakCell in the CallIC type vector."
balazs.kilvady [Wed, 4 Feb 2015 16:05:11 +0000 (08:05 -0800)]
MIPS: Retry "Use a WeakCell in the CallIC type vector."

Port 6fc97a19653e03a891d3cd397069d5a10b9ab325

Original commit message:
The first try failed because I needed to make a better distinction
between clearing ICs according to policy at GC time or unconditional
clearing (say, via %ClearFunctionTypeFeedback).

It was also blocked by an issue in super constructor calls.
This fix (https://codereview.chromium.org/892113002/) needs to land
before checking in this CL.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#26432}

9 years agoMIPS: Introduce LanguageMode, drop StrictMode.
balazs.kilvady [Wed, 4 Feb 2015 15:14:35 +0000 (07:14 -0800)]
MIPS: Introduce LanguageMode, drop StrictMode.

Port c7851da4aefb644ab198ead1fa284932fd424797

Original commit message:
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/890413003

Cr-Commit-Position: refs/heads/master@{#26431}

9 years agoRevert of Add WeakKeyMap to v8.h (patchset #2 id:20001 of https://codereview.chromium...
yurys [Wed, 4 Feb 2015 15:12:37 +0000 (07:12 -0800)]
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}

9 years agoRevert of Simplify WeakMap and WeakSet tests slightly. (patchset #1 id:1 of https...
yurys [Wed, 4 Feb 2015 15:11:28 +0000 (07:11 -0800)]
Revert of Simplify WeakMap and WeakSet tests slightly. (patchset #1 id:1 of https://codereview.chromium.org/903463002/)

Reason for revert:
Revert this patch as the original CL has to be reverted to due to shared win build 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:
> Simplify WeakMap and WeakSet tests slightly.
>
> R=rossberg@chromium.org
> TEST=cctest/test-weakmaps,cctest/test-weaksets
>
> Committed: https://crrev.com/a90d7a871da19d33e93c8779186408c8d1615cac
> Cr-Commit-Position: refs/heads/master@{#26428}

TBR=rossberg@chromium.org,mstarzinger@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

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

Cr-Commit-Position: refs/heads/master@{#26429}

9 years agoSimplify WeakMap and WeakSet tests slightly.
mstarzinger [Wed, 4 Feb 2015 13:36:50 +0000 (05:36 -0800)]
Simplify WeakMap and WeakSet tests slightly.

R=rossberg@chromium.org
TEST=cctest/test-weakmaps,cctest/test-weaksets

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

Cr-Commit-Position: refs/heads/master@{#26428}

9 years agotry to fix windows after r26424
dcarney [Wed, 4 Feb 2015 13:15:39 +0000 (05:15 -0800)]
try to fix windows after r26424

BUG=

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

Cr-Commit-Position: refs/heads/master@{#26427}

9 years agoMove the contents of api-natives.js to c++
dcarney [Wed, 4 Feb 2015 13:01:34 +0000 (05:01 -0800)]
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}

9 years agoAdd WeakKeyMap to v8.h
yurys [Wed, 4 Feb 2015 12:52:53 +0000 (04:52 -0800)]
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}

9 years ago[turbofan] Don't allocate UnallocatedOperands in Zone memory during instruction selection
dcarney [Wed, 4 Feb 2015 12:38:47 +0000 (04:38 -0800)]
[turbofan] Don't allocate UnallocatedOperands in Zone memory during instruction selection

R=bmeurer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#26424}

9 years agoFix assertion in full codegen for holed 'this'.
dslomov [Wed, 4 Feb 2015 12:14:21 +0000 (04:14 -0800)]
Fix assertion in full codegen for holed 'this'.

R=rossberg@chromium.org
BUG=chromium:455141
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#26423}

9 years agoMIPS:[turbofan] Improve unordered comparisons for boolean materialization.
Dusan Milosavljevic [Wed, 4 Feb 2015 10:52:16 +0000 (11:52 +0100)]
MIPS:[turbofan] Improve unordered comparisons for boolean materialization.

TEST=
BUG=
R=paul.lind@imgtec.com

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

Cr-Commit-Position: refs/heads/master@{#26422}

9 years ago[turbofan] Make ContextScope a proper encapsulation of the current context.
titzer [Wed, 4 Feb 2015 09:59:48 +0000 (01:59 -0800)]
[turbofan] Make ContextScope a proper encapsulation of the current context.

R=mstarzinger@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#26421}

9 years agoRetry "Use a WeakCell in the CallIC type vector."
mvstanton [Wed, 4 Feb 2015 09:46:05 +0000 (01:46 -0800)]
Retry "Use a WeakCell in the CallIC type vector."

The first try failed because I needed to make a better distinction
between clearing ICs according to policy at GC time or unconditional
clearing (say, via %ClearFunctionTypeFeedback).

It was also blocked by an issue in super constructor calls.
This fix (https://codereview.chromium.org/892113002/) needs to land
before checking in this CL.

R=ulan@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#26420}

9 years agoIntroduce LanguageMode, drop StrictMode.
marja [Wed, 4 Feb 2015 09:34:05 +0000 (01:34 -0800)]
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}

9 years agoMIPS64: Super Constructor Calls need to use a vector slot, not an ic slot.
akos.palfi [Wed, 4 Feb 2015 01:57:52 +0000 (17:57 -0800)]
MIPS64: Super Constructor Calls need to use a vector slot, not an ic slot.

Port 64f81870ee0bc51a32620be8face35e7cbd0da92

BUG=

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

Cr-Commit-Position: refs/heads/master@{#26418}

9 years agoMIPS: new classes: special construct stub for derived classs and TDZ for `this`.
akos.palfi [Wed, 4 Feb 2015 01:51:56 +0000 (17:51 -0800)]
MIPS: new classes: special construct stub for derived classs and TDZ for `this`.

Port 6f97a4948f1495a9b9d60b7f495d0e0efeaa1006

BUG=

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

Cr-Commit-Position: refs/heads/master@{#26417}

9 years agoFix test-api/ObjectProtoToStringES6
caitpotter88 [Tue, 3 Feb 2015 22:18:06 +0000 (14:18 -0800)]
Fix test-api/ObjectProtoToStringES6

Fixes tree closure caused by r26415

BUG=v8:3502
R=arv@chromium.org
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#26416}

9 years agoUpdate harmony ObjectProtoToString() to 2/2/2015 spec
caitpotter88 [Tue, 3 Feb 2015 21:05:04 +0000 (13:05 -0800)]
Update harmony ObjectProtoToString() to 2/2/2015 spec

Applies to API implementation of O.p.toString

- Removes special handling of non-string @@toStringTag values (use builtinTag)
- Removes special handling of @@toStringTags which match [[Class]] names (remove ~ prefix)
- Add tests for non-string @@toStringTag values in test-api.cc

BUG=v8:3502
R=arv@chromium.org
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#26415}

9 years agoSuper Constructor Calls need to use a vector slot, not an ic slot.
mvstanton [Tue, 3 Feb 2015 19:16:07 +0000 (11:16 -0800)]
Super Constructor Calls need to use a vector slot, not an ic slot.

The Ast Call node is accustomed to using a vector IC slot for the
cases when it uses a CallIC. The super constructor work alters this
somewhat by using a CallConstructStub instead, however the
CallConstructStub expects a vector slot and not a vector ic slot.
This distinction needs to be maintained because slots and ic slots
have different clearing strategies and are handled differently.

R=dslomov@chromium.org
BUG=
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#26414}

9 years agoInfer HConstant::NotInNewSpace only if the supplied handle is null.
jarin [Tue, 3 Feb 2015 17:47:24 +0000 (09:47 -0800)]
Infer HConstant::NotInNewSpace only if the supplied handle is null.

BUG=chromium:449291
LOG=n
R=jkummerow@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#26413}

9 years agoVerify that code stubs and full code do not have pointers that can retain
ulan [Tue, 3 Feb 2015 17:46:15 +0000 (09:46 -0800)]
Verify that code stubs and full code do not have pointers that can retain
context.

BUG=v8:3629
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#26412}

9 years agoUpdate harmony Object.prototype.toString to 2/2/2015 spec
caitpotter88 [Tue, 3 Feb 2015 17:45:06 +0000 (09:45 -0800)]
Update harmony Object.prototype.toString to 2/2/2015 spec

- Removes special handling of non-string @@toStringTag values (use builtinTag)
- Removes special handling of @@toStringTags which match [[Class]] names (remove ~ prefix)

BUG=v8:3502
R=arv@chromium.org
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#26411}

9 years agoCheck the slots being adding to the SlotsBuffer.
ishell [Tue, 3 Feb 2015 17:43:56 +0000 (09:43 -0800)]
Check the slots being adding to the SlotsBuffer.
Related to crbug/454297.

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

Cr-Commit-Position: refs/heads/master@{#26410}

9 years agonew classes: special construct stub for derived classs and TDZ for `this`.
dslomov [Tue, 3 Feb 2015 17:42:41 +0000 (09:42 -0800)]
new classes: special construct stub for derived classs and TDZ for `this`.

R=arv@chromium.org,rossberg@chromium.org
BUG=v8:3834
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#26409}

9 years agoWhitespace change to trigger bots.
Daniel Vogelheim [Tue, 3 Feb 2015 17:24:38 +0000 (18:24 +0100)]
Whitespace change to trigger bots.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#26408}

9 years agoPartial revert of crrev.com/900553003, to unbreak arm64 build.
Daniel Vogelheim [Tue, 3 Feb 2015 17:03:40 +0000 (18:03 +0100)]
Partial revert of crrev.com/900553003, to unbreak arm64 build.

R=verwaest@chromium.org
BUG=454625
NOTREECHECKS=true

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

Cr-Commit-Position: refs/heads/master@{#26407}

9 years agoTurn throws into basic block terminators.
mstarzinger [Tue, 3 Feb 2015 15:22:41 +0000 (07:22 -0800)]
Turn throws into basic block terminators.

R=bmeurer@chromium.org
TEST=cctest/test-run-jsexceptions/Throw

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

Cr-Commit-Position: refs/heads/master@{#26406}

9 years agoReset inlining limits due to overly long compilation times in Speedometer, Dart2JS
verwaest [Tue, 3 Feb 2015 15:02:43 +0000 (07:02 -0800)]
Reset inlining limits due to overly long compilation times in Speedometer, Dart2JS

BUG=454625
LOG=y

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

Cr-Commit-Position: refs/heads/master@{#26405}

9 years ago[turbofan] Split pure nodes in the scheduler if beneficial.
Benedikt Meurer [Tue, 3 Feb 2015 14:50:40 +0000 (15:50 +0100)]
[turbofan] Split pure nodes in the scheduler if beneficial.

If a (pure) node has two or more uses, but there exists a path from the
common dominator of these uses to end, which does not contain a use,
then we split the node such that no unnecessary computation takes place.
Note however, that this only applies if the node cannot be hoisted out
of a loop.

BUG=v8:3864
LOG=n
R=jarin@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#26404}

9 years ago[turbofan] Parameter nodes are not idempotent.
bmeurer [Tue, 3 Feb 2015 14:45:28 +0000 (06:45 -0800)]
[turbofan] Parameter nodes are not idempotent.

R=mstarzinger@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#26403}

9 years agoRevert of Add WeakMap to v8.h (patchset #3 id:40001 of https://codereview.chromium...
yurys [Tue, 3 Feb 2015 14:42:34 +0000 (06:42 -0800)]
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}

9 years agoAdd WeakMap to v8.h
yurys [Tue, 3 Feb 2015 14:28:02 +0000 (06:28 -0800)]
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}

9 years agoMove nested classes of AstGraphBuilder into cc file.
mstarzinger [Tue, 3 Feb 2015 14:22:11 +0000 (06:22 -0800)]
Move nested classes of AstGraphBuilder into cc file.

R=titzer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#26400}

9 years ago[turbofan]: Small visualizer cleanup and fix for string handling
danno [Tue, 3 Feb 2015 13:10:52 +0000 (05:10 -0800)]
[turbofan]: Small visualizer cleanup and fix for string handling

R=mstarzinger@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#26399}

9 years agoFirst stab at try-catch and try-finally in TurboFan.
mstarzinger [Tue, 3 Feb 2015 13:09:40 +0000 (05:09 -0800)]
First stab at try-catch and try-finally in TurboFan.

R=titzer@chromium.org,jarin@chromium.org
TEST=cctest/test-run-jsexceptions

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

Cr-Commit-Position: refs/heads/master@{#26398}

9 years agoWhitespace change to test goma.
Michael Achenbach [Tue, 3 Feb 2015 13:00:16 +0000 (14:00 +0100)]
Whitespace change to test goma.

Cr-Commit-Position: refs/heads/master@{#26397}

9 years agoUse weak cell to embed property cell in StoreGlobal.
ulan [Tue, 3 Feb 2015 11:26:52 +0000 (03:26 -0800)]
Use weak cell to embed property cell in StoreGlobal.

BUG=v8:3629
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#26396}

9 years agofollow up named interceptor miss with api callback getter
dcarney [Tue, 3 Feb 2015 10:56:11 +0000 (02:56 -0800)]
follow up named interceptor miss with api callback getter

BUG=

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

Cr-Commit-Position: refs/heads/master@{#26395}

9 years agoAvoid issuing write barriers for unboxed double fields in Heap::CopyJSObject().
ishell [Tue, 3 Feb 2015 10:28:18 +0000 (02:28 -0800)]
Avoid issuing write barriers for unboxed double fields in Heap::CopyJSObject().

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

Cr-Commit-Position: refs/heads/master@{#26394}

9 years ago[V8] Added line, column and script symbols for SyntaxError
kozyatinskiy [Tue, 3 Feb 2015 08:57:18 +0000 (00:57 -0800)]
[V8] Added line, column and script symbols for SyntaxError

For exception in promise we generate v8::Message API object from exception object. And in cases of Syntax or Reference Error we don't have enough information in exception object - we can't restore Error location from top stack frame.
In this patch three aditional private fields introduced for exception object. In case of Syntax Error we store line, column and script on Exception object and receive this information when restoring message.

BUG=443140
LOG=Y
R=yurys@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#26393}

9 years agoMIPS: Skip mozilla/js1_5/extensions/regress-355497 in simulator.
balazs.kilvady [Tue, 3 Feb 2015 06:31:39 +0000 (22:31 -0800)]
MIPS: Skip mozilla/js1_5/extensions/regress-355497 in simulator.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#26392}

9 years agoCompute the same hash for all NaN values.
bmeurer [Tue, 3 Feb 2015 06:28:59 +0000 (22:28 -0800)]
Compute the same hash for all NaN values.

Both SameValue and SameValueZero consider different NaNs equal, so we
better assign the same hash value to all NaNs.

BUG=v8:3859
LOG=y
R=verwaest@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#26391}

9 years agoClear pending exception on stack overflow in the parser
verwaest [Tue, 3 Feb 2015 06:22:23 +0000 (22:22 -0800)]
Clear pending exception on stack overflow in the parser

BUG=450960
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#26390}

9 years agotools: fix postmortem generator
fedor [Mon, 2 Feb 2015 21:21:29 +0000 (13:21 -0800)]
tools: fix postmortem generator

BUG=
R=danno

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

Cr-Commit-Position: refs/heads/master@{#26389}

9 years agoMIPS: Use weak cell to embed known map in CompareIC
balazs.kilvady [Mon, 2 Feb 2015 19:44:58 +0000 (11:44 -0800)]
MIPS: Use weak cell to embed known map in CompareIC

Port 246a749a6f7e7e3a025bb032bc0c643656c9b08f

BUG=v8:3663
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#26388}

9 years ago[turbofan] Put StructuredGraphBuilder out of its misery and merge its remnants back...
titzer [Mon, 2 Feb 2015 19:09:48 +0000 (11:09 -0800)]
[turbofan] Put StructuredGraphBuilder out of its misery and merge its remnants back into the AstGraphBuilder.

R=mstarzinger@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#26387}

9 years agoUse weak cell to embed known map in CompareIC
ulan [Mon, 2 Feb 2015 17:57:39 +0000 (09:57 -0800)]
Use weak cell to embed known map in CompareIC

BUG=v8:3663
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#26386}

9 years agoFetch global object from jsproxy prototype instead of embedding it in StoreGlobal.
ulan [Mon, 2 Feb 2015 17:56:29 +0000 (09:56 -0800)]
Fetch global object from jsproxy prototype instead of embedding it in StoreGlobal.

BUG=v8:3629
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#26385}

9 years agoMIPS64: Megamorphic KeyedLoadIC needs special handling for vector ics.
balazs.kilvady [Mon, 2 Feb 2015 17:50:10 +0000 (09:50 -0800)]
MIPS64: Megamorphic KeyedLoadIC needs special handling for vector ics.

Port 16843e239d95f5e8eaaa06d2a0a6e371298fe11f

Original commit message:
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.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#26384}

9 years agoWhitespace change to test goma activation.
Michael Achenbach [Mon, 2 Feb 2015 15:57:45 +0000 (16:57 +0100)]
Whitespace change to test goma activation.

Cr-Commit-Position: refs/heads/master@{#26383}

9 years agoInitialize CompilationInfo::osr_expr_stack_height correctly.
titzer [Mon, 2 Feb 2015 14:29:56 +0000 (06:29 -0800)]
Initialize CompilationInfo::osr_expr_stack_height correctly.

R=mstarzinger@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#26382}

9 years agoMegamorphic KeyedLoadIC needs special handling for vector ics.
mvstanton [Mon, 2 Feb 2015 13:55:00 +0000 (05:55 -0800)]
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}

9 years agoCheck global object behind global proxy for extensibility
verwaest [Mon, 2 Feb 2015 12:49:00 +0000 (04:49 -0800)]
Check global object behind global proxy for extensibility

BUG=454091
LOG=Y

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

Cr-Commit-Position: refs/heads/master@{#26380}

9 years agoUse weak cells in CheckPropertyCell.
ulan [Mon, 2 Feb 2015 12:47:51 +0000 (04:47 -0800)]
Use weak cells in CheckPropertyCell.

BUG=v8:3629
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#26379}

9 years agoSpeed up tests for OSR of for-in and for-of loops.
titzer [Mon, 2 Feb 2015 11:51:55 +0000 (03:51 -0800)]
Speed up tests for OSR of for-in and for-of loops.

R=marja@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#26378}

9 years ago[turbofan] push virtual register field down to InstructionOperand
dcarney [Mon, 2 Feb 2015 11:38:29 +0000 (03:38 -0800)]
[turbofan] push virtual register field down to InstructionOperand

BUG=

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

Cr-Commit-Position: refs/heads/master@{#26377}

9 years ago[turbofan] Fix OSR into functions where the expression stack is not empty.
titzer [Mon, 2 Feb 2015 10:19:52 +0000 (02:19 -0800)]
[turbofan] Fix OSR into functions where the expression stack is not empty.

R=mstarzinger@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#26376}

9 years agoshell.cc race condition
cwhan.tunz [Mon, 2 Feb 2015 08:08:16 +0000 (00:08 -0800)]
shell.cc race condition

BUG=v8:3850
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#26375}

9 years agoMIPS64: Fix bugs after hole-nan value change.
paul.lind [Mon, 2 Feb 2015 00:00:01 +0000 (16:00 -0800)]
MIPS64: Fix bugs after hole-nan value change.

TEST=mjsunit/regress/regress-undefined-nan{2,3}, mjsunit/elements-transition, mjsunit/elide-double-hole-check-*
BUG=

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

Cr-Commit-Position: refs/heads/master@{#26374}

9 years agoWhitespace change to trigger bots.
Michael Achenbach [Sun, 1 Feb 2015 10:30:32 +0000 (11:30 +0100)]
Whitespace change to trigger bots.

Cr-Commit-Position: refs/heads/master@{#26373}

9 years agoRevert of Fix --max_old_space_size=4096 integer overflow. (patchset #1 id:1 of https...
Yang Guo [Sun, 1 Feb 2015 08:08:33 +0000 (09:08 +0100)]
Revert of Fix --max_old_space_size=4096 integer overflow. (patchset #1 id:1 of https://codereview.chromium.org/890563003/)

Reason for revert:
Win64 compile failure.

Original issue's description:
> Fix --max_old_space_size=4096 integer overflow.
>
> R=yangguo@chromium.org
>
> Committed: https://crrev.com/6253aa8908c55535473ddbe1db8e5a6f5e559b73
> Cr-Commit-Position: refs/heads/master@{#26371}

TBR=svenpanne@chromium.org,ben@strongloop.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

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

Cr-Commit-Position: refs/heads/master@{#26372}

9 years agoFix --max_old_space_size=4096 integer overflow.
Yang Guo [Sat, 31 Jan 2015 20:45:28 +0000 (21:45 +0100)]
Fix --max_old_space_size=4096 integer overflow.

R=yangguo@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#26371}

9 years agoadd maps and sets to zone containers
dcarney [Sat, 31 Jan 2015 14:34:51 +0000 (06:34 -0800)]
add maps and sets to zone containers

R=bmeurer@chromium.org

BUG=

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

Cr-Commit-Position: refs/heads/master@{#26370}

9 years agoUpdate V8 DEPS.
v8-autoroll [Sat, 31 Jan 2015 14:33:41 +0000 (06:33 -0800)]
Update V8 DEPS.

Rolling v8/build/gyp to 4d7c139b1820c5fcb993868c61f170a02cda8a40

TBR=machenbach@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#26369}

9 years agoMIPS: Remove unnecessary printf lines from assembler tests.
balazs.kilvady [Fri, 30 Jan 2015 19:43:32 +0000 (11:43 -0800)]
MIPS: Remove unnecessary printf lines from assembler tests.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#26368}

9 years agoMIPS: Reland "Initial switch to Chromium-style CHECK_* and DCHECK_* macros.".
balazs.kilvady [Fri, 30 Jan 2015 19:13:22 +0000 (11:13 -0800)]
MIPS: Reland "Initial switch to Chromium-style CHECK_* and DCHECK_* macros.".

Port c65ae4f10c7273956e88db433f626b26a1377caf

BUG=

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

Cr-Commit-Position: refs/heads/master@{#26367}

9 years agoAdd param_after_rest error message after r26362
caitpotter88 [Fri, 30 Jan 2015 17:18:39 +0000 (09:18 -0800)]
Add param_after_rest error message after r26362

BUG=v8:2159
LOG=N
R=marja@chromium.org, arv@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#26366}

9 years agoMIPS: Fix bug in elements transition code for smi to double transitions.
Dusan Milosavljevic [Fri, 30 Jan 2015 16:47:44 +0000 (17:47 +0100)]
MIPS: Fix bug in elements transition code for smi to double transitions.

This fixes intermittent sin-cos test failures when corrupted values are returned
for referent sin and cos functions in test which require factorial value
to be calculated.

TEST=mjsunit/sin-cos
BUG=
R=balazs.kilvady@imgtec.com

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

Cr-Commit-Position: refs/heads/master@{#26365}

9 years agoAdd new script to create release branches.
machenbach [Fri, 30 Jan 2015 16:46:41 +0000 (08:46 -0800)]
Add new script to create release branches.

BUG=chromium:451975
TBR=tandrii@chromium.org
NOTRY=true
LOG=n

TEST=./script_test.py
TEST=tools/release/create_release.py -r machenbach@chromium.org -a machenbach@chromium.org --dry-run

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

Cr-Commit-Position: refs/heads/master@{#26364}

9 years agoDo not embed interceptor in handler.
ulan [Fri, 30 Jan 2015 16:34:40 +0000 (08:34 -0800)]
Do not embed interceptor in handler.

BUG=v8:3629
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#26363}

9 years agoImplement parsing of ES6 Rest Parameters
caitpotter88 [Fri, 30 Jan 2015 15:21:41 +0000 (07:21 -0800)]
Implement parsing of ES6 Rest Parameters

BUG=v8:2159
LOG=N
R=marja@chromium.org, arv@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#26362}

9 years agoCallIC used an invalid mechanism to detect if it was in optimized code.
mvstanton [Fri, 30 Jan 2015 15:07:02 +0000 (07:07 -0800)]
CallIC used an invalid mechanism to detect if it was in optimized code.

BUG=453481
LOG=N
R=jarin@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#26361}

9 years agoDo not embedd store callback in handler.
ulan [Fri, 30 Jan 2015 14:54:43 +0000 (06:54 -0800)]
Do not embedd store callback in handler.

BUG=v8:3629
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#26360}

9 years agoAlways emit bailout id for inlining property access (even for keyed access).
jarin [Fri, 30 Jan 2015 14:35:27 +0000 (06:35 -0800)]
Always emit bailout id for inlining property access (even for keyed access).

R=ulan@chromium.org
BUG=chromium:453805
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#26359}

9 years agoLoad callback data from weak cell instead of embedding it in handler.
ulan [Fri, 30 Jan 2015 14:31:15 +0000 (06:31 -0800)]
Load callback data from weak cell instead of embedding it in handler.

BUG=v8:3629
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#26358}

9 years agoDo not inline array push for arrays with dictionary mode elements.
jarin [Fri, 30 Jan 2015 13:51:32 +0000 (05:51 -0800)]
Do not inline array push for arrays with dictionary mode elements.

BUG=chromium:452878
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#26357}

9 years agoFix the test-code-stubs tests.
bmeurer [Fri, 30 Jan 2015 13:35:58 +0000 (05:35 -0800)]
Fix the test-code-stubs tests.

R=svenpanne@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#26356}

9 years ago[turbofan] Fix usage of ThisFunction parameter in OSR.
titzer [Fri, 30 Jan 2015 13:09:32 +0000 (05:09 -0800)]
[turbofan] Fix usage of ThisFunction parameter in OSR.

R=mstarzinger@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#26355}

9 years agoLayout descriptor sharing issue fixed.
ishell [Fri, 30 Jan 2015 12:55:15 +0000 (04:55 -0800)]
Layout descriptor sharing issue fixed.

BUG=chromium:437713, v8:3832
LOG=Y

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

Cr-Commit-Position: refs/heads/master@{#26354}

9 years agoMIPS: Add MEGAMORPHIC state support for KeyedLoadIC.
balazs.kilvady [Fri, 30 Jan 2015 12:45:10 +0000 (04:45 -0800)]
MIPS: Add MEGAMORPHIC state support for KeyedLoadIC.

Port 491eb81780873aafd4d7f6638d20f26839383c68

BUG=

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

Cr-Commit-Position: refs/heads/master@{#26353}

9 years agoupdate vector ics to handle megamorphic keyed loads
dcarney [Fri, 30 Jan 2015 12:40:57 +0000 (04:40 -0800)]
update vector ics to handle megamorphic keyed loads

R=mvstanton@chromium.org

BUG=

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

Cr-Commit-Position: refs/heads/master@{#26352}

9 years agoVisit code objects in native contexts only during full GCs.
hpayer [Fri, 30 Jan 2015 11:26:28 +0000 (03:26 -0800)]
Visit code objects in native contexts only during full GCs.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#26351}

9 years ago[turbofan] cleanup MoveOptimizer a little
dcarney [Fri, 30 Jan 2015 10:58:22 +0000 (02:58 -0800)]
[turbofan] cleanup MoveOptimizer a little

BUG=

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

Cr-Commit-Position: refs/heads/master@{#26350}

9 years agofix gcc after r26345
Dan Carney [Fri, 30 Jan 2015 10:11:56 +0000 (11:11 +0100)]
fix gcc after r26345

BUG=
R=bmeurer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#26349}

9 years agoAvoid using ProcessArguments for static calls.
mstarzinger [Fri, 30 Jan 2015 09:56:10 +0000 (01:56 -0800)]
Avoid using ProcessArguments for static calls.

R=titzer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#26348}

9 years agoMake GCC happy with test-cpu-profiler.
Benedikt Meurer [Fri, 30 Jan 2015 09:48:50 +0000 (10:48 +0100)]
Make GCC happy with test-cpu-profiler.

TBR=svenpanne@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#26347}

9 years agoReland "Initial switch to Chromium-style CHECK_* and DCHECK_* macros.".
bmeurer [Fri, 30 Jan 2015 09:29:25 +0000 (01:29 -0800)]
Reland "Initial switch to Chromium-style CHECK_* and DCHECK_* macros.".

R=svenpanne@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#26346}