Commit Graph

20993 Commits

Author SHA1 Message Date
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
marja
0e3b5386ae Scanner / Unicode decoding: use size_t instead of unsigned.
size_t is the correct data type for this purpose. Our APIs (in particular
ExternalSourceStream::GetMoreData) are already using it, and there were some
static_casts to convert between them.

This CL doesn't intend to fix all of V8, just the minimal sense-making part
around scanner character streams.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#26449}
2015-02-05 07:54:34 +00:00
loislo
ec42e002da 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}

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

Cr-Commit-Position: refs/heads/master@{#26448}
2015-02-05 06:25:18 +00:00
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
v8-autoroll
dbc026eecf Update V8 DEPS.
Rolling v8/buildtools to da0df3fdac6036e862addb1155a2d6c11b6c18d5

TBR=machenbach@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#26446}
2015-02-05 04:24:00 +00:00
Weiliang Lin
c397d2951f x87: Use signaling NaN for holes in fixed double arrays.
Port 9eace97bba

BUG=
R=chunyang.dai@intel.com

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

Cr-Commit-Position: refs/heads/master@{#26445}
2015-02-05 02:53:57 +00:00
paul.lind
a18dee6bba 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}
2015-02-04 21:28:55 +00:00
paul.lind
fdce3e6f2f MIPS: Calls to the CallIC miss handler looked up the receiver incorrectly.
Port 13b97b6214

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}
2015-02-04 21:27:46 +00:00
caitpotter88
49ef549807 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}
2015-02-04 21:05:48 +00:00
arv
cd661fdc27 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}
2015-02-04 20:44:12 +00:00
arv
59525f07df 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}
2015-02-04 18:22:36 +00:00
mvstanton
13b97b6214 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}
2015-02-04 17:46:06 +00:00
balazs.kilvady
8c3a408e41 MIPS: Fix assertion in full codegen for holed 'this'.
Port 275e088abe

BUG=chromium:455141
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#26438}
2015-02-04 17:35:16 +00:00
arv
176b68d11a 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}
2015-02-04 17:23:17 +00:00
ulan
f0511a8d80 Make functions contexts in optimized code weak.
BUG=

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

Cr-Commit-Position: refs/heads/master@{#26436}
2015-02-04 17:13:56 +00:00
loislo
bfc5d83bd0 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}
2015-02-04 16:48:34 +00:00
loislo
c49820e45b 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}
2015-02-04 16:35:30 +00:00
marja
39010859f8 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}
2015-02-04 16:31:47 +00:00
balazs.kilvady
3b400fcb9b MIPS: Retry "Use a WeakCell in the CallIC type vector."
Port 6fc97a1965

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}
2015-02-04 16:05:16 +00:00
balazs.kilvady
ff0c70380a MIPS: Introduce LanguageMode, drop StrictMode.
Port c7851da4ae

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}
2015-02-04 15:14:54 +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
yurys
e225675ea6 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}
2015-02-04 15:11:38 +00:00
mstarzinger
a90d7a871d 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}
2015-02-04 13:37:02 +00:00
dcarney
b235f0b1e1 try to fix windows after r26424
BUG=

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

Cr-Commit-Position: refs/heads/master@{#26427}
2015-02-04 13:15:46 +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
dcarney
4116900d8f [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}
2015-02-04 12:39:07 +00:00
dslomov
275e088abe 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}
2015-02-04 12:14:33 +00:00
Dusan Milosavljevic
8f9a62d312 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}
2015-02-04 10:52:27 +00:00
titzer
d923864c79 [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}
2015-02-04 09:59:55 +00:00
mvstanton
6fc97a1965 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}
2015-02-04 09:46:22 +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
akos.palfi
f37047cdbe MIPS64: Super Constructor Calls need to use a vector slot, not an ic slot.
Port 64f81870ee

BUG=

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

Cr-Commit-Position: refs/heads/master@{#26418}
2015-02-04 01:58:04 +00:00
akos.palfi
6b30ef8e3e MIPS: new classes: special construct stub for derived classs and TDZ for this.
Port 6f97a4948f

BUG=

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

Cr-Commit-Position: refs/heads/master@{#26417}
2015-02-04 01:52:12 +00:00
caitpotter88
600474ad44 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}
2015-02-03 22:18:21 +00:00
caitpotter88
b5c43674f9 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}
2015-02-03 21:05:25 +00:00
mvstanton
64f81870ee 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}
2015-02-03 19:16:47 +00:00
jarin
4f786befb7 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}
2015-02-03 17:48:35 +00:00
ulan
cd203cd629 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}
2015-02-03 17:46:31 +00:00
caitpotter88
858b9b6a7e 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}
2015-02-03 17:45:20 +00:00
ishell
a6d0e6a78f 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}
2015-02-03 17:44:12 +00:00
dslomov
6f97a4948f 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}
2015-02-03 17:43:03 +00:00
Daniel Vogelheim
8c652127f7 Whitespace change to trigger bots.
BUG=

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

Cr-Commit-Position: refs/heads/master@{#26408}
2015-02-03 17:24:53 +00:00
Daniel Vogelheim
8bb468c454 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}
2015-02-03 17:04:05 +00:00
mstarzinger
9d6f55b08a 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}
2015-02-03 15:22:55 +00:00
verwaest
fea7ddb640 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}
2015-02-03 15:03:01 +00:00
Benedikt Meurer
d8cfbc633d [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}
2015-02-03 14:51:08 +00:00
bmeurer
1feee1c6fc [turbofan] Parameter nodes are not idempotent.
R=mstarzinger@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#26403}
2015-02-03 14:45:39 +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