Commit Graph

7039 Commits

Author SHA1 Message Date
Benedikt Meurer
5934656921 [turbofan] Smartify the GraphReducer.
Don't use the generic algorithm, but instead start going into the
direction of ControlReducer, using a stack plus a revisit queue to
not miss any more possibilities for reductions anymore.

TEST=cctest,unittests
R=dcarney@chromium.org

Committed: f047507370

Committed: 6e148989a4

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

Cr-Commit-Position: refs/heads/master@{#25377}
2014-11-17 12:12:35 +00:00
Daniel Clifford
f173937cdf Generalize ScaledWithOffsetMatcher to support 64 bits
Preparation for supporting more addressing modes in instruction selection.

R=bmeurer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#25373}
2014-11-17 10:53:30 +00:00
Michael Starzinger
e9a3d153ed Remove left-over generated runtime test from mjsunit.
R=jkummerow@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#25372}
2014-11-17 10:50:57 +00:00
Jakob Kummerow
bf22724e0d Fix one more missing c0_ < 0 check in scanner
BUG=chromium:433766
LOG=n
R=jarin@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#25371}
2014-11-17 09:43:31 +00:00
Jaroslav Sevcik
c3af691e72 [turbofan] Remove int32 narrowing during typed lowering.
With Int32Add we lose the int/uint distinction, so later, in simplified lowering we can make a wrong decision. E.g., see the attached test case, where we lower NumberAdd -> Int32Add because inputs are Uint32, but during simplified lowering we change the inputs to Int32, so we get a wrong result.

Simplified lowering will lower the NumberAdd operations anyway, so we should lose performance.

BUG=
R=bmeurer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#25368}
2014-11-17 09:04:52 +00:00
arv
ef41de10db Classes: Add support for stepping through default constructors
If a class extends another class and it doesn't provide a constructor,
one is created for them. We therefore need to ensure that stepping into
the constructor steps into the super class constructor.

BUG=v8:3674
LOG=Y
R=dslomov@chromium.org, aandrey , yurys

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

Cr-Commit-Position: refs/heads/master@{#25366}
2014-11-15 19:48:39 +00:00
adamk
4a4158f363 Throw as per spec when modifying an Array with builtin methods
BUG=v8:3684
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#25364}
2014-11-14 19:42:15 +00:00
adamk
b17eaaa575 Fix desugaring of let bindings in for loops to handle continue properly
This requires putting the original loop's body inside an inner for loop (with
the same labels as the original loop) and re-binding the temp variables in its
"next" expression. A second flag is added to the desugared code to ensure the
loop body executes at most once per loop.

BUG=v8:3683
LOG=y

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

Cr-Commit-Position: refs/heads/master@{#25363}
2014-11-14 19:33:23 +00:00
caitpotter88
353b696467 Implement ES6 Template Literals
BUG=v8:3230

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

Cr-Commit-Position: refs/heads/master@{#25362}
2014-11-14 18:53:52 +00:00
dcarney
c97a7acf65 [turbofan] refactor pipeline to use hydrogen like Run calls
BUG=

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

Cr-Commit-Position: refs/heads/master@{#25361}
2014-11-14 16:44:45 +00:00
arv
f3d5b13e04 Classes: Implement correct name binding
Named class declarations and class expression have a const binding for
the name that is in TDZ for the extends expression.

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

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

Cr-Commit-Position: refs/heads/master@{#25360}
2014-11-14 15:05:20 +00:00
Michael Starzinger
a210f36846 Extend typed lowering to cover JSStrictEqual on differing types.
R=rossberg@chromium.org, titzer@chromium.org
TEST=unittests/JSTypedLoweringTest.JSStrictEqualWithTheHole

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

Cr-Commit-Position: refs/heads/master@{#25359}
2014-11-14 14:25:19 +00:00
Dmitry Lomov
7e69b2f996 Implement 'setVariableValue' for debugger block scopes.
R=aandrey@chromium.org, rossberg@chromium.org, yurys@chromium.org
BUG=v8:3690
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#25358}
2014-11-14 13:39:20 +00:00
Andy Wingo
4faa0ae88a Remove AstConstructionVisitor/AstNullVisitor
R=svenpanne@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#25357}
2014-11-14 13:13:33 +00:00
Benedikt Meurer
27cc3c685c Revert "[turbofan] Smartify the GraphReducer."
This reverts commit 6e148989a4 for
breaking Massive/Embenchen.

TBR=machenbach@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#25356}
2014-11-14 11:48:50 +00:00
Ben L. Titzer
cf85209035 Do not do field type tracking with GC stress.
R=verwaest@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#25355}
2014-11-14 11:36:44 +00:00
Ben L. Titzer
3bcea483a7 Remove arguments arity check in mjsunit because it vastly slows down the tests.
R=mstarzinger@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#25353}
2014-11-14 10:30:25 +00:00
Andy Wingo
1503d0e78c Move feedback slot allocation to post-pass
R=mvstanton@chromium.org, svenpanne@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#25348}
2014-11-14 08:21:33 +00:00
Benedikt Meurer
45ff9d53c5 [turbofan] Optimize remainder of integer division by unknown power of two.
Drive-by-Fix: minint % 0 was broken on ARM, but we didn't notice because
there was no test covering that case...

TEST=msjunit
R=svenpanne@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#25347}
2014-11-14 08:21:18 +00:00
Benedikt Meurer
6e148989a4 [turbofan] Smartify the GraphReducer.
Don't use the generic algorithm, but instead start going into the
direction of ControlReducer, using a stack plus a revisit queue to
not miss any more possibilities for reductions anymore.

TEST=cctest,unittests
R=dcarney@chromium.org

Committed: f047507370

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

Cr-Commit-Position: refs/heads/master@{#25345}
2014-11-14 08:00:36 +00:00
Daniel Vogelheim
f83f10973e Revert "Soft fail for invalid cache data."
This reverts commit eafce666f4.

Original commit failed some tests w/ memory leaks.

TBR=yangguo@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#25336}
2014-11-13 16:47:05 +00:00
Yang Guo
eafce666f4 Soft fail for invalid cache data.
API=ScriptCompiler::CachedData::rejected
LOG=Y
R=vogelheim@google.com, vogelheim@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#25335}
2014-11-13 15:42:47 +00:00
ishell@chromium.org
2e38f33911 Revert "TransitionArray now uses <is_data_property, name, attributes> tuple as a key, which allows to have several entries for the same property name."
Revert "Fix for an assertion failure in Map::FindTransitionToField(...). Appeared after r25136."

This revert is made in order to revert r25099 which potentially causes renderer hangs.

R=verwaest@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#25332}
2014-11-13 15:31:04 +00:00
Michael Starzinger
78332973e2 Revert "[turbofan] Smartify the GraphReducer."
This reverts commit f047507370 due to mjsunit/numops-fuzz-part2 hitting an
assertion in the ARM assembler.

TBR=bmeurer@chromium.org
TEST=mjsunit/numops-fuzz-part2

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

Cr-Commit-Position: refs/heads/master@{#25327}
2014-11-13 14:07:04 +00:00
Benedikt Meurer
f047507370 [turbofan] Smartify the GraphReducer.
Don't use the generic algorithm, but instead start going into the
direction of ControlReducer, using a stack plus a revisit queue to
not miss any more possibilities for reductions anymore.

TEST=cctest,unittests
R=dcarney@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#25326}
2014-11-13 11:34:15 +00:00
Adrian Perez
ddcd08b1d1 Implement .of() on typed arrays
BUG=v8:3578
LOG=Y
R=dslomov@chromium.org, wingo@igalia.com

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

Patch from Adrian Perez <aperez@igalia.com>.

Cr-Commit-Position: refs/heads/master@{#25325}
2014-11-13 11:20:13 +00:00
ishell@chromium.org
bc8c41c08d Avoid fast short-cut in Map::GeneralizeRepresentation() for literals with non-simple transitions.
It started showing after r25253.

BUG=v8:3687
LOG=N
R=verwaest@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#25324}
2014-11-13 10:56:31 +00:00
Michael Starzinger
d7169a7311 Enable breakpoint tests that now pass in TurboFan.
R=jarin@chromium.org
TEST=cctest/test-debug

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

Cr-Commit-Position: refs/heads/master@{#25323}
2014-11-13 10:54:53 +00:00
Michael Starzinger
2f09dcbd20 Enable harmony tests for TurboFan that now pass.
R=jarin@chromium.org
TEST=mjsunit/harmony

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

Cr-Commit-Position: refs/heads/master@{#25320}
2014-11-13 09:44:00 +00:00
Dan Carney
0042363714 [turbofan] add some registerallocator unittests
BUG=
R=bmeurer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#25319}
2014-11-13 09:42:09 +00:00
Jaroslav Sevcik
2d075e2298 Reland "[turbofan] Weakening of types must weaken ranges inside unions."
This relands commit 4c1f4b796d.

R=rossberg@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#25317}
2014-11-13 09:02:14 +00:00
Yang Guo
b96309b776 Move public symbols to the root set.
This allows serializing public symbols that are embedded in code.

BUG=v8:3689
LOG=N
R=rossberg@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#25315}
2014-11-13 08:48:08 +00:00
Benedikt Meurer
7205f6ee9b [turbofan] Avoid useless bit masking in typed lowering.
There's no need to apply the 0x1f mask to right hand sides of shifts if
the input is already in range [0,31].

TEST=cctest,unittests
R=jarin@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#25313}
2014-11-13 07:40:56 +00:00
Jaroslav Sevcik
c513297f9f Revert "[turbofan] Weakening of types must weaken ranges inside unions."
This reverts commit 4c1f4b796d.

TBR=rossberg@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#25312}
2014-11-13 06:10:42 +00:00
Jaroslav Sevcik
4c1f4b796d [turbofan] Weakening of types must weaken ranges inside unions.
BUG=
R=rossberg@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#25311}
2014-11-13 05:31:47 +00:00
dslomov@chromium.org
8970ade1cf Fix Context::declaration_context to account for script contexts.
R=rossberg@chromium.org
BUG=v8:3690
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#25303}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@25303 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-11-12 16:46:24 +00:00
jkummerow@chromium.org
fd9a4df561 Skip regress-crbug-137689.js when running with GC stress
It depends on maps not disappearing prematurely.

R=verwaest@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#25302}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@25302 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-11-12 16:06:24 +00:00
dcarney@chromium.org
fdab306aa2 [turbofan] add gap move verifier
R=jarin@chromium.org

BUG=

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

Cr-Commit-Position: refs/heads/master@{#25300}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@25300 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-11-12 14:53:51 +00:00
wingo@igalia.com
757f400246 Leaving a generator via an exception causes it to close
R=rossberg@chromium.org
BUG=v8:3096
LOG=Y

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

Cr-Commit-Position: refs/heads/master@{#25297}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@25297 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-11-12 14:29:22 +00:00
yangguo@chromium.org
e201eb9a9e Temporarily disable test due to not being compatible with the serializer.
TBR=dslomov@chromium.org
BUG=v8:3689
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#25296}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@25296 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-11-12 14:27:08 +00:00
bmeurer@chromium.org
24d288cb8a Fix copyright headers.
R=machenbach@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#25295}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@25295 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-11-12 13:29:57 +00:00
dslomov@chromium.org
0e2f7e3c35 Re-enable serialization under harmony-scoping.
R=yangguo@chromium.org
BUG=v8:3689
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#25294}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@25294 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-11-12 13:12:50 +00:00
dslomov@chromium.org
eacdfa0b7a Various clean-ups after top-level lexical declarations are done.
1. Global{Context,Scope}=>Script{Context,Scope}
2. Enable fixed tests
3. Update comments

R=rossberg@chromium.org
BUG=v8:2198
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#25291}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@25291 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-11-12 11:35:18 +00:00
yangguo@chromium.org
1dbd6369b1 Correctly compute line numbers in functions from the function constructor.
R=aandrey@chromium.org
BUG=chromium:109362
LOG=Y

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

Cr-Commit-Position: refs/heads/master@{#25289}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@25289 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-11-12 10:06:47 +00:00
baptiste.afsa@arm.com
ad815be7d5 [turbofan] Use cbz/cbnz when possible on arm64.
R=bmeurer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#25288}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@25288 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-11-12 10:06:46 +00:00
ishell@chromium.org
f0cde2f925 Double unboxing tests fixed.
R=verwaest@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#25286}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@25286 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-11-12 09:47:47 +00:00
mstarzinger@chromium.org
5712592331 Fix bug in graph copy while inlining loops.
R=titzer@chromium.org
TEST=cctest/test-run-inlining/InlineLoop

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

Cr-Commit-Position: refs/heads/master@{#25285}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@25285 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-11-12 09:47:17 +00:00
mstarzinger@chromium.org
434f2ebb5b Fix scheduler for floating non-naked non-empty loops.
R=jarin@chromium.org
TEST=cctest/test-scheduler/NestedFloatingDiamondWithLoop

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

Cr-Commit-Position: refs/heads/master@{#25283}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@25283 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-11-12 09:39:13 +00:00
mstarzinger@chromium.org
e1c9e732d3 Scheduler checks that end block doesn't have successors.
R=jarin@chromium.org
TEST=cctest/test-scheduler/RPOLoop

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

Cr-Commit-Position: refs/heads/master@{#25281}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@25281 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-11-12 09:20:22 +00:00
yangguo@chromium.org
4fd9ba9042 Reland "Fix stepping in for-loops."
BUG=v8:3634
LOG=N
R=ulan@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#25279}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@25279 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-11-12 08:26:42 +00:00
aandrey@chromium.org
dc416ef328 Rename v8::Exception::GetMessage to CreateMessage.
This is to avoid renaming to GetMessageW/GetMessageA on Windows.

API=v8::Exception::CreateMessage
R=yangguo@chromium.org, loislo
LOG=Y

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

Cr-Commit-Position: refs/heads/master@{#25273}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@25273 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-11-11 21:45:30 +00:00
arv@chromium.org
aa6815c79a Classes: Add support for arguments in default constructor
This is currently done by generating a default constructor that looks
like this:

  constructor() {
    %DefaultConstructorSuperCall();
  }

The a runtime function implements the logic which is pretty similar to
Runtime_Apply except that it uses the [[Prototype]] of the current
function.

This is the second try. The first failed because the test was using a
array that was too large for Function.prototype.apply.

Revert "Revert "Classes: Add support for arguments in default constructor""

This reverts commit 43aa7e541df56a132608b8b4217e9da84575e4f8.

BUG=v8:3672
LOG=Y
TBR=dslomov@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#25272}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@25272 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-11-11 21:36:16 +00:00
arv@chromium.org
84741e76a3 ES6: Add support for super in object literals
This only available under --harmony-classes

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

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

Cr-Commit-Position: refs/heads/master@{#25271}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@25271 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-11-11 19:54:56 +00:00
adamk@chromium.org
1386257c55 Correctly handle Array unshift/splices that move elements past the max length of an Array
BUG=v8:2615
LOG=n
R=verwaest@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#25270}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@25270 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-11-11 19:08:14 +00:00
arv@chromium.org
6a5cd94676 Revert "Classes: Add support for arguments in default constructor"
This reverts commit 3f4ea6c91a962a04407c79f08e5c86ce9ff2911a.

Broke tests on Mac64

http://build.chromium.org/p/client.v8/builders/V8%20Mac64/builds/923/steps/Check/logs/classes

BUG=v8:3672
TBR=dslomov@chromium.org
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#25269}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@25269 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-11-11 16:22:47 +00:00
arv@chromium.org
3a91adaec8 Classes: Add support for arguments in default constructor
This is currently done by generating a default constructor that looks
like this:

  constructor() {
    %DefaultConstructorSuperCall();
  }

The a runtime function implements the logic which is pretty similar to
Runtime_Apply except that it uses the [[Prototype]] of the current
function.

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

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

Cr-Commit-Position: refs/heads/master@{#25268}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@25268 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-11-11 15:55:30 +00:00
jkummerow@chromium.org
3b3929fdc7 Reland "Avoid some unnecessary fast-properties map creations."
This relands commit ea74f0f85a.

The revert was due to failures in cctest/test-heap/ReleaseOverReservedPages,
caused by apparent changes to memory layout and fragmentation of the
first page. Eliminating a situation in messages.js where this CL has had
an effect on map transitions seems to solve the issue.

R=verwaest@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#25266}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@25266 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-11-11 15:41:30 +00:00
mstarzinger@chromium.org
1d17f826b3 Simplify scheduler API by removing zone scopes.
R=dcarney@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#25265}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@25265 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-11-11 15:29:42 +00:00
dslomov@chromium.org
480fbfeb2a harmony-scoping: Implement StoreIC handler for stores to global contexts.
R=ishell@chromium.org, adamk@chromium.org, rossberg@chromium.org, verwaest@chromium.org
BUG=v8:2198
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#25264}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@25264 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-11-11 15:16:20 +00:00
titzer@chromium.org
21cf5bb249 Remove PhiReducer.
R=mstarzinger@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#25262}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@25262 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-11-11 12:03:12 +00:00
dslomov@chromium.org
e4d1839612 harmony-scoping: Implement LoadIC handler for loads from global contexts.
R=ishell@chromium.org, adamk@chromium.org, rossberg@chromium.org, verwaest@chromium.org
BUG=v8:2198
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#25259}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@25259 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-11-11 11:16:43 +00:00
ishell@chromium.org
c5a492961f Reland "In-object double fields unboxing (for 64-bit only)."
R=verwaest@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#25258}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@25258 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-11-11 10:25:46 +00:00
aandrey@chromium.org
4984224af2 Add optional max elements limit for Map/Set mirror iterator preview.
R=yangguo@chromium.org
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#25257}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@25257 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-11-11 09:47:19 +00:00
ishell@chromium.org
18cf6c9ac9 MapCache simplification. It is now a FixedArray that maps number of properties to a WeakCell with a Map.
R=verwaest@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#25253}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@25253 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-11-10 18:04:17 +00:00
verwaest@chromium.org
2d9079ca1d Revert "In-object double fields unboxing (for 64-bit only)."
Revert "Fixes for Windows and Mac builds after r25250."
TBR=ishell@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#25252}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@25252 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-11-10 17:44:51 +00:00
ishell@chromium.org
f133ac501b In-object double fields unboxing (for 64-bit only).
This CL introduces LayoutDescriptor which is responsible for tracking which in-object fields are tagged and which are not.
LayoutDescriptor field added to Map. Currently unboxing is disabled.

R=hpayer@chromium.org, verwaest@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#25250}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@25250 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-11-10 16:35:22 +00:00
jkummerow@chromium.org
d3b68cf370 Fix has_constant_parameter_count() confusion in LReturn
BUG=chromium:431602
LOG=y
R=jarin@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#25249}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@25249 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-11-10 15:25:50 +00:00
titzer@chromium.org
b9886ae9ff Fix bugs in simplified lowering relating to int32/uint32 signs.
Lowering of NumberToUint32 and NumberToInt32 was not correctly accounting for the sign of the input and the sign of the output, emitting the wrong representation changes.

Along the way, I've found cases where MachineOperatorBuilder would break if fed a machine type for loads or stores that was not cached, requiring MachineOperatorBuilder to take zone to allocate operators for these cases.

R=bmeurer@chromium.org, jarin@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#25247}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@25247 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-11-10 14:28:42 +00:00
bmeurer@chromium.org
4446e8fe50 Reland "[turbofan] Fix select lowering" with fix.
Select lowering must not merge Select nodes that depend on each other,
because the resulting graph is not schedulable.

TEST=unittests
R=jarin@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#25245}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@25245 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-11-10 11:55:47 +00:00
rossberg@chromium.org
5ec10fc997 More tests for toplevel lexical scope
R=dslomov@chromium.org
BUG=v8:2198
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#25240}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@25240 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-11-10 10:47:10 +00:00
bmeurer@chromium.org
9ac7ee2d22 Revert "[turbofan] Fix select lowering."
This reverts commit cf08e8d70f for
breaking Embenchen bullet.

TBR=jarin@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#25238}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@25238 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-11-10 10:43:41 +00:00
bmeurer@chromium.org
cf08e8d70f [turbofan] Fix select lowering.
Select lowering must not merge Select nodes that depend on each other,
because the resulting graph is not schedulable.

TEST=unittests
R=jarin@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#25236}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@25236 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-11-10 10:30:17 +00:00
yangguo@chromium.org
4a6d092fdf Revert "Fix stepping in for-loops."
TBR=mvstanton@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#25233}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@25233 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-11-10 09:36:16 +00:00
yangguo@chromium.org
3bed0a171a Fix stepping in for-loops.
R=ulan@chromium.org
BUG=v8:3634
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#25231}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@25231 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-11-10 09:08:11 +00:00
bmeurer@chromium.org
8977e3d5e4 [arm] Recognize SXTB, SXTH, UXTB and UXTH.
TEST=cctest,msjunit/asm,unittests
R=jarin@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#25228}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@25228 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-11-10 05:49:17 +00:00
arv@chromium.org
c24ebcd387 Revert "Avoid some unnecessary fast-properties map creations."
This reverts commit e1f23eab4255d63344011dfb885b8e8962cb60e2.

Broke cctest/test-heap/ReleaseOverReservedPages on a bunch of builders

http://build.chromium.org/p/client.v8/builders/V8%20Linux%20-%20debug/builds/928/steps/Check/logs/ReleaseOverReservedPa..

BUG=None
LOG=N
TBR=jkummerow@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#25224}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@25224 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-11-07 18:49:45 +00:00
danno@chromium.org
9a58807030 [turbofan] Optimize add operations to use 'leal' instruction on x64
Add MemoryOperandMatcher that recognizes node clusters in the form
[%r1 + %r2*SCALE + OFFSET] and explicit support in the x64 Int32Add
selector to use it to translate complex adds to 'leal' instructions.

R=titzer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#25223}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@25223 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-11-07 16:47:45 +00:00
arv@chromium.org
b86c30a2b3 Classes: Partial fix for constructor not calling super
Introduce two new function kind, one for default constructor and one
for default constructor call super. Then when we are about to pares
these we just generate the correct AST in source.

BUG=v8:3661, v8:3672
LOG=Y
R=dslomov@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#25222}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@25222 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-11-07 16:39:27 +00:00
jkummerow@chromium.org
ea74f0f85a Avoid some unnecessary fast-properties map creations.
(1) When we have just normalized and re-fastified a map, we don't need to copy it again to set the is_prototype bit.
(2) When defining accessors causes a non-prototype object to go slow, don't force re-fastification.

BUG=v8:3267
LOG=n
R=verwaest@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#25221}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@25221 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-11-07 16:33:47 +00:00
dslomov@chromium.org
1a64b02dcf harmony_scoping: Implement lexical bindings at top level
This implements correct semantics for "extensible" top level lexical scope.
The entire lexical scope is represented at runtime by GlobalContextTable, reachable from native context and accumulating global contexts from every script loaded into the context.

When the new script starts executing, it does the following validation:
- checks the GlobalContextTable and global object (non-configurable own) properties against the set of declarations it introduces and reports potential conflicts.
- invalidates the conflicting PropertyCells on global object, so that any code depending on them will miss/deopt causing any contextual lookups to be reexecuted under the new bindings
- adds the lexical bindings it introduces to the GlobalContextTable

Loads and stores for contextual lookups are modified so that they check the GlobalContextTable before looking up properties on global object, thus implementing the shadowing of global object properties by lexical declarations.

R=adamk@chromium.org, rossberg@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#25220}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@25220 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-11-07 16:29:45 +00:00
mstarzinger@chromium.org
9e555db8fb Make scheduler handle floating non-naked loops.
R=jarin@chromium.org
TEST=cctest/test-scheduler/NestedFloatingDiamondWithLoop

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

Cr-Commit-Position: refs/heads/master@{#25217}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@25217 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-11-07 16:01:49 +00:00
marja@chromium.org
2b026851ac Scanner: disallow unicode escapes in regexp flags.
The spec explicitly forbids them. V8 never handled them properly either, just
the Scanner accepted them (it had code to add them literally to the
LiteralBuffer) and later on, Regexp constructor disallowed them.

According to the spec, unicode escapes in regexp flags should be an early error
("It is a Syntax Error if IdentifierPart contains a Unicode escape sequence.").

Note that Scanner is still more relaxed about regexp flags than the
spec. Especially, it accepts any identifier parts (not just a small set of
letters) and doesn't check for duplicates.

R=rossberg@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#25215}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@25215 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-11-07 14:32:19 +00:00
jarin@chromium.org
364cec0034 [turbofan] Fix deoptimization of uint8, uint16 inputs.
BUG=
R=mstarzinger@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#25214}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@25214 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-11-07 14:07:45 +00:00
hpayer@chromium.org
19c3296988 Remove heap size filter for context disposal garbage collection.
BUG=
R=ulan@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#25213}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@25213 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-11-07 13:07:47 +00:00
baptiste.afsa@arm.com
57ae54203c [turbofan][arm64] Optimize shifts combined with truncations or extensions.
R=bmeurer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#25210}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@25210 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-11-07 09:56:17 +00:00
hpayer@chromium.org
c0ac2ab9d0 Perform context disposal garbage collections only if contexts disposals happen at a high rate.
BUG=
R=ulan@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#25208}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@25208 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-11-07 09:37:11 +00:00
mstarzinger@chromium.org
47ee0b0294 Enable inlining tests that pass with new scheduler.
R=titzer@chromium.org
TEST=test-run-inlining/InlineTwiceDependentDiamond

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

Cr-Commit-Position: refs/heads/master@{#25205}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@25205 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-11-06 18:56:43 +00:00
mstarzinger@chromium.org
9734f236a3 Revert "Remove workaround for successors on end block from scheduler."
TBR=titzer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#25194}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@25194 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-11-06 13:12:16 +00:00
titzer@chromium.org
b309f3d208 [turbofan] (reland) Compute tighter ranges for modulus in Typer.
R=jarin@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#25193}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@25193 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-11-06 13:10:49 +00:00
dcarney@chromium.org
a350f0d608 [turbofan] phis cannot take registers as inputs
BUG=
R=bmeurer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#25191}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@25191 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-11-06 12:56:44 +00:00
verwaest@chromium.org
f26d93e6f0 Allow JSArray fast moving elements even if the array's proto isn't Array.prototype in original state
Otherwise array builtins don't work on internal arrays.

BUG=v8:3681
LOG=n
R=machenbach@chromium.org, mvstanton@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#25190}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@25190 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-11-06 12:56:12 +00:00
bmeurer@chromium.org
35cc4af769 [turbofan] Push TruncateFloat64ToInt32 into phis.
TEST=unittests
R=dcarney@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#25189}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@25189 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-11-06 12:38:47 +00:00
mstarzinger@chromium.org
f9575cef57 Remove workaround for successors on end block from scheduler.
R=titzer@chromium.org
TEST=cctest/test-scheduler/RPOLoop

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

Cr-Commit-Position: refs/heads/master@{#25188}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@25188 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-11-06 12:31:52 +00:00
machenbach@chromium.org
d04038bde5 Skip json2 on 64 bits debug.
BUG=3681
LOG=n
TBR=mvstanton@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#25186}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@25186 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-11-06 11:53:13 +00:00
ishell@chromium.org
e1f93a82f2 Fix for an assertion failure in Map::FindTransitionToField(...). Appeared after r25136.
BUG=chromium:430846
LOG=N
R=verwaest@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#25185}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@25185 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-11-06 11:50:33 +00:00
ishell@chromium.org
89617f06d1 Skip tests that timeout on arm64
TBR=machenbach@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#25183}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@25183 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-11-06 10:24:49 +00:00
svenpanne@chromium.org
d56a21ebff The idea behind of this solution is to use the existing "relocation info" instead of consumption the CodeLinePosition events emitted by the V8 compilers.
During generation code and relocation info are generated simultaneously.
When code generation is done you each code object has associated "relocation info".
Relocation information lets V8 to mark interesting places in the generated code: the pointers that might need to be relocated (after garbage collection),
correspondences between the machine program counter and source locations for stack walking.

This patch:
1. Add more source positions info in reloc info to make it suitable for source level mapping.
The amount of data should not be increased dramatically because (1) V8 already marks interesting places in the generated code and
(2) V8 does not write redundant information (it writes a pair (pc_offset, pos) only if pos is changed and skips other).
I measured it on Octane benchmark - for unoptimized code the number of source positions may achieve 2x ('lin_solve' from NavierStokes benchmark).

2. When a sample happens, CPU profiler finds a code object by pc, then use its reloc info to match the sample to a source line.
If a source line is found that hit counter is increased by one for this line.

3. Add a new public V8 API to get the hit source lines by CDT CPU profiler.
Note that it's expected a minor patch in Blink to pack the source level info in JSON to be shown.

4.Add a test that checks how the samples are distributed through source lines.
It tests two cases: (1) relocation info created during code generation and (2) relocation info associated with precompiled function's version.

Patch from Denis Pravdin <denis.pravdin@intel.com>;

R=svenpanne@chromium.org, yurys@chromium.org

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

Patch from Weiliang <weiliang.lin@intel.com>.

Cr-Commit-Position: refs/heads/master@{#25182}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@25182 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-11-06 09:17:14 +00:00
mstarzinger@chromium.org
361d7b0f0e Avoid redundant work in scheduler loop header/depth calculation.
R=jarin@chromium.org

TEST=cctest/test-scheduler/LoopedFloatingDiamond2

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

Cr-Commit-Position: refs/heads/master@{#25181}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@25181 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-11-06 09:15:42 +00:00
bmeurer@chromium.org
8798c410e1 [turbofan] Turn various diamonds into selects.
TEST=cctest/test-changes-lowering,mjsunit/asm,unittests
R=jarin@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#25180}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@25180 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-11-06 09:10:32 +00:00
dcarney@chromium.org
57b42dc51f [turbofan] extend register allocator testing with control flow
R=bmeurer@chromium.org, jarin@chromium.org

BUG=

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

Cr-Commit-Position: refs/heads/master@{#25178}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@25178 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-11-06 08:28:45 +00:00