Commit Graph

7554 Commits

Author SHA1 Message Date
verwaest
a1f7b01ccf Remove prototype key from the prototype transitions since its also embedded in the target map.
BUG=

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

Cr-Commit-Position: refs/heads/master@{#26662}
2015-02-16 13:10:06 +00:00
jarin
0b8063cec8 [turbofan] Avoid ToNumber conversions if they could deoptimize.
BUG=chromium:454158
LOG=n
R=bmeurer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#26661}
2015-02-16 12:59:20 +00:00
ishell
6834d3abdf ifdefs around LayoutDescriptor::IsConsistenWithMap() removed.
This avoids potential mess with different compilation modes.

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

Cr-Commit-Position: refs/heads/master@{#26656}
2015-02-16 11:29:49 +00:00
yangguo
e66d39a6be Revert "Fix JSArrayBufferView visitor template to fix ARM build."
and "Just visit young array buffers during scavenge. Additionally keep the views in new space in a separate global list and move them to the corresponding array buffers when they get promoted."

This reverts commit 295ab27830
and commit bd61a85faf.

TBR=hpayer@chromium.org
NOTRY=true

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

Cr-Commit-Position: refs/heads/master@{#26653}
2015-02-16 09:21:02 +00:00
chunyang.dai
a10ed727bc X87: Assembler support for internal references.
port 5c119485b4 (r26478).

original commit message:

  Assembler support for internal references.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#26648}
2015-02-15 06:50:11 +00:00
caitpotter88
8bb2e39774 Implement ES6 rest parameters
LOG=Y
BUG=v8:2159
R=dslomov@chromium.org, arv@chromium.org, marja@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#26645}
2015-02-14 00:15:12 +00:00
arv
765e002a4f Fix lazy parsing for functions that use super.
The preparser needs to log the usage of super properties and then update
the scope when we create the function later.

BUG=v8:3888
LOG=N
R=dslomov@chromium.org, marja

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

Cr-Commit-Position: refs/heads/master@{#26642}
2015-02-13 18:35:09 +00:00
arv
d273636e01 TF: Add support for [[HomeObject]]
BUG=None
LOG=N
R=mstarzinger@chromium.org, dslomov@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#26641}
2015-02-13 18:34:00 +00:00
loislo
2cfebcf92e Fix compilation for the case dcheck_always_on=1.
It is a default option for some try bots.

otherwise compilation fails on
DCHECK(layout_descriptor->IsConsistentWithMap(*map));

BUG=none
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#26636}
2015-02-13 10:29:30 +00:00
Erik Arvidsson
1dcce1c8ef Make super() a syntax error in base class constructor
BUG=v8:3330
LOG=N
R=dslomov@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#26633}
2015-02-12 23:04:54 +00:00
Erik Arvidsson
fd5a0de2af Fix location of super syntax errors
BUG=v8:3885
LOG=N
R=adamk@chromium.org, dslomov@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#26632}
2015-02-12 20:53:17 +00:00
Dmitry Lomov
7866f00508 Remove --experimental-classes flag and related dead code.
R=arv@chromium.org
BUG=v8:3834
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#26631}
2015-02-12 20:07:15 +00:00
loislo
d23ab23b05 CPUProfiler: Push deopt reason further to ProfileNode.
1) create beefy RelocInfo table when cpu profiler is active, so if a function
was optimized when profiler was active RelocInfo would get separate DeoptInfo
for the each deopt case.

2) push DeoptInfo from CodeEntry to ProfileNode.
When deopt happens we put the info collected on #1 into CodeEntry and record stack sample.
On the sampling thread we grab the deopt data and append it to the corresponding ProfileNode deopts list.

Sample profile dump.
[Top down]:
    0  (root) 0 #1
    1     29 #2
    1      test 29 #3
    2        opt_function 29 #4
    2          opt_function 29 #5
                   deopted at 118 with reason 'not a heap number'
                   deopted at 137 with reason 'division by zero'

BUG=452067
LOG=n

Committed: https://crrev.com/ce8701b247d3c6604f24f17a90c02d17b4417f54
Cr-Commit-Position: refs/heads/master@{#26615}

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

Cr-Commit-Position: refs/heads/master@{#26630}
2015-02-12 19:51:37 +00:00
Dmitry Lomov
2707d4c9f4 new classes: no longer experimental.
This CL fixes tests that no longer valid and also fixes two issues:
1. 'super()' in non derived constructors.
2. Failure to step into derived constructors.

R=arv@chromium.org, yurys@chromium.org
BUG=v8:3834
LOG=Y

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

Cr-Commit-Position: refs/heads/master@{#26628}
2015-02-12 18:06:52 +00:00
mstarzinger
d202d79a6a Add missing FrameState to JSTypedLoweringTester::Binop.
R=titzer@chromium.org
TEST=cctest/test-js-typed-lowering

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

Cr-Commit-Position: refs/heads/master@{#26626}
2015-02-12 17:08:53 +00:00
rossberg
eecde44f82 Properly thread language mode to compilation cache
Fixes the TSAN issue.

R=mstarzinger@chromium.org
NOTRY=true
BUG=

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

Cr-Commit-Position: refs/heads/master@{#26623}
2015-02-12 16:29:54 +00:00
jarin
8bd0bd522e [turbofan] Make the representation type component independent of the semantic component.
R=rossberg@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#26621}
2015-02-12 15:21:33 +00:00
rossberg
dff690ec07 [strong] no sloppy equality
R=marja@chromium.org
BUG=

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

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

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

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

Cr-Commit-Position: refs/heads/master@{#26617}
2015-02-12 14:39:03 +00:00
loislo
cb6ea146dc Revert of CPUProfiler: Push deopt reason further to ProfileNode. (patchset #1 id:1 of https://codereview.chromium.org/919953002/)
Reason for revert:
static initializers broke the build

Original issue's description:
> CPUProfiler: Push deopt reason further to ProfileNode.
>
> 1) create beefy RelocInfo table when cpu profiler is active, so if a function
> was optimized when profiler was active RelocInfo would get separate DeoptInfo
> for the each deopt case.
>
> 2) push DeoptInfo from CodeEntry to ProfileNode.
> When deopt happens we put the info collected on #1 into CodeEntry and record stack sample.
> On the sampling thread we grab the deopt data and append it to the corresponding ProfileNode deopts list.
>
> Sample profile dump.
> [Top down]:
>     0  (root) 0 #1
>     1     29 #2
>     5      test 29 #3
>     3        opt_function 29 #4
>                  deopted at 52 with reason 'not a heap number'
>                  deopted at 71 with reason 'division by zero'
>
> BUG=452067
> LOG=n
>
> Committed: https://crrev.com/ce8701b247d3c6604f24f17a90c02d17b4417f54
> Cr-Commit-Position: refs/heads/master@{#26615}

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

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

Cr-Commit-Position: refs/heads/master@{#26616}
2015-02-12 14:36:37 +00:00
loislo
ce8701b247 CPUProfiler: Push deopt reason further to ProfileNode.
1) create beefy RelocInfo table when cpu profiler is active, so if a function
was optimized when profiler was active RelocInfo would get separate DeoptInfo
for the each deopt case.

2) push DeoptInfo from CodeEntry to ProfileNode.
When deopt happens we put the info collected on #1 into CodeEntry and record stack sample.
On the sampling thread we grab the deopt data and append it to the corresponding ProfileNode deopts list.

Sample profile dump.
[Top down]:
    0  (root) 0 #1
    1     29 #2
    5      test 29 #3
    3        opt_function 29 #4
                 deopted at 52 with reason 'not a heap number'
                 deopted at 71 with reason 'division by zero'

BUG=452067
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#26615}
2015-02-12 13:25:17 +00:00
ulan
b79b985988 Use weak cells in dependent code.
BUG=

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

Cr-Commit-Position: refs/heads/master@{#26614}
2015-02-12 13:21:13 +00:00
marja
df0cb9999f Parsing: Make Parser not know about Isolate during background parsing.
Parser must be able to operate independent of Isolate and the V8 heap during
parsing. After the heap-independent phase, there is a heap dependent phase,
during which we internalize strings, handle errors, etc.

This makes Isolate (also via CompilationInfo) unaccessible during parsing, and
thus decreases the probability of accidental code changes which would add
heap-dependent operations into the heap-independent phase.

Since Isolate is also accessible via CompilationInfo, now CompilationInfo is
only passed to the entry points of parsing, and not stored in Parser.

R=rossberg@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#26612}
2015-02-12 13:02:44 +00:00
svenpanne
222001ace4 Removed one bogus CompilationInfo constructor.
Use a fake code stub instead, basically following the null object pattern.

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

Cr-Commit-Position: refs/heads/master@{#26610}
2015-02-12 12:57:19 +00:00
bmeurer
4465836c8a Fix invalid use of int in Zone.
Review URL: https://codereview.chromium.org/924453002

Cr-Commit-Position: refs/heads/master@{#26609}
2015-02-12 12:47:18 +00:00
danno
e87c0bac35 Remove redundant source position information in RelocInfo
Previously, emitting two more more unique source positions at the same pc would
generate two or more RelocInfo entries. Now, only the last emitted source
position for any pc is added to the RelocInfo.

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

Cr-Commit-Position: refs/heads/master@{#26608}
2015-02-12 12:15:31 +00:00
Ben L. Titzer
d9790bc7ed Inline the ParseInfo structure as parameters to the Parser constructor.
R=mstarzinger@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#26606}
2015-02-12 11:57:11 +00:00
hpayer
bd61a85faf Just visit young array buffers during scavenge. Additionally keep the views in new space in a separate global list and move them to the corresponding array buffers when they get promoted.
This reduces young generation garbage collections when many array buffers are allocated.
BUG=

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

Cr-Commit-Position: refs/heads/master@{#26605}
2015-02-12 10:00:44 +00:00
dcarney
01d7be28a6 fix typo in mjsunit expectations
TBR=machenbach@chromium.org

BUG=

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

Cr-Commit-Position: refs/heads/master@{#26600}
2015-02-11 21:29:35 +00:00
dslomov
fdcf3e59ba new classes: implement correct check for uninitialized this in 'super()'
R=arv@chromium.org
BUG=v8:3834
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#26599}
2015-02-11 20:47:32 +00:00
dslomov
9b158fa79a new classes: implement default constructors.
R=arv@chromium.org,rossberg@chromium.org
BUG=v8:3834
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#26594}
2015-02-11 17:23:00 +00:00
arv
b5e235661f Fix issue with super and computed property names
We did not set up the [[HomeObject]] for properties created for
computed property names.

BUG=v8:3879
LOG=N
R=dslomov@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#26586}
2015-02-11 15:13:12 +00:00
mstarzinger
ec4305e48b Mark some common operator with Property::kNoThrow.
R=bmeurer@chromium.org
TEST=unittests/CommonOperatorTest

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

Cr-Commit-Position: refs/heads/master@{#26584}
2015-02-11 15:02:41 +00:00
dcarney
81544f2859 skip failing test on arm64
LOG=N
BUG=v8:3884

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

Cr-Commit-Position: refs/heads/master@{#26582}
2015-02-11 14:36:06 +00:00
svenpanne
d1b5aa0716 Removed most of the bogus CompilationInfo constructor calls.
A CompilationInfo constructed from just an Isolate* and a Zone* is in
weird an inconsistent state (calling e.g. flags() on it will crash),
so we need to avoid them. This CL removes almost all of them, the
remaining 2 call sites in (for testing only) will be handled in a
separate CL. Things which have been changed:

  * Linkage is basically a decorator for CallDescriptor now.

  * ChangeLowering doesn't need Linkage at all.

  * JSGenericLowering doesn't need a full CompilationInfo*, just a
    single flag.

  * JSContextSpecializer doesn't need the full CompilationInfo, just a
    Context.

  * Removed unused CompilationInfo from SimplifiedLoweringTester.

This nicely decouples things already a bit more, but there's still
work to do...

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

Cr-Commit-Position: refs/heads/master@{#26580}
2015-02-11 14:12:15 +00:00
hpayer
c889fb4c1d Use just one to-space page for the promotion queue.
BUG=454725
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#26577}
2015-02-11 13:39:40 +00:00
titzer
31637fb396 [turbofan] Use heavy-handed graph duplication to do loop peeling for OSR.
BUG=

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

Cr-Commit-Position: refs/heads/master@{#26576}
2015-02-11 13:26:45 +00:00
yangguo
12e1b959d2 Fix NewStringRangeError failure due to failing malloc.
R=jkummerow@chromium.org

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

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

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

Cr-Commit-Position: refs/heads/master@{#26574}
2015-02-11 10:21:25 +00:00
dslomov
bf49be39f3 new classes: implement new.target passing to superclass constructor.
R=arv@chromium.org,rossberg@chromium.org
BUG=v8:3834
LOG=N

Committed: https://crrev.com/8aed43e82c6d2742fe5988603cb8841324cc942b
Cr-Commit-Position: refs/heads/master@{#26560}

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

Cr-Commit-Position: refs/heads/master@{#26572}
2015-02-11 09:47:51 +00:00
dcarney
79417664b2 remove undetectable strings
BUG=

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

Cr-Commit-Position: refs/heads/master@{#26571}
2015-02-11 09:28:12 +00:00
dcarney
307d2bdd81 add transitions for global properties in ics
R=verwaest@chromium.org

BUG=

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

Cr-Commit-Position: refs/heads/master@{#26569}
2015-02-11 09:15:33 +00:00
svenpanne
41e74ad4e8 Relaxed parameter types a bit.
Somehow these changes didn't make it into https://codereview.chromium.org/915583002 ... :-/

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

Cr-Commit-Position: refs/heads/master@{#26567}
2015-02-11 08:52:38 +00:00
loislo
754cc1a9e4 Remove obsolete method ProfileTree::AddPathFromStart and the corresponding test.
BUG=
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#26565}
2015-02-11 07:27:09 +00:00
dslomov
8e4ec9dd13 Revert of new classes: implement new.target passing to superclass constructor. (patchset #9 id:150001 of https://codereview.chromium.org/908883002/)
Reason for revert:
Breaks Linux64 release

Original issue's description:
> new classes: implement new.target passing to superclass constructor.
>
> R=arv@chromium.org,rossberg@chromium.org
> BUG=v8:3834
> LOG=N
>
> Committed: https://crrev.com/8aed43e82c6d2742fe5988603cb8841324cc942b
> Cr-Commit-Position: refs/heads/master@{#26560}

TBR=arv@chromium.org,rossberg@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=v8:3834

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

Cr-Commit-Position: refs/heads/master@{#26561}
2015-02-11 01:36:32 +00:00
dslomov
8aed43e82c new classes: implement new.target passing to superclass constructor.
R=arv@chromium.org,rossberg@chromium.org
BUG=v8:3834
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#26560}
2015-02-11 01:23:11 +00:00
arv
68e4897586 Remove Function.prototype.toMethod
Function.prototype.toMethod was removed from ES6.

This removes the function and updates the tests to either
use %ToMethod or a dedicated syntax (using concise method
or a class).

BUG=v8:3330
LOG=N
R=dslomov@chromium.org, adamk

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

Cr-Commit-Position: refs/heads/master@{#26559}
2015-02-10 22:13:43 +00:00
Erik Arvidsson
eaad793c2f Fix usage of super in js perf test
BUG=none
LOG=N
R=adamk@chromium.org, adamk, dslomov@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#26558}
2015-02-10 21:15:56 +00:00
arv
9acfd4fe08 super is only allowed in methods, accessors and constructor
super() is only allowed in a class constructor.
super.p is allowed in methods, accessors and constructors.

The parser now checks the FunctionState to see what kind of function
we are currently inside.

BUG=v8:3330
LOG=N
R=dslomov@chromium.org, marja@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#26557}
2015-02-10 19:51:39 +00:00
adamk
a18b797fd9 Enable compiling mjsunit tests as ES6 modules
Adding the line "// MODULE" to an mjsunit file will now cause
run-tests.py to prefix the test case with "--module" in the
d8 commandline.

d8 has itself been updated to treat files preceded with "--module" as
modules (that is, it compiles them with ScriptCompiler::CompileModule,
and turns on --harmony-modules).

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

Cr-Commit-Position: refs/heads/master@{#26555}
2015-02-10 19:11:55 +00:00