platform/upstream/v8.git
9 years agoVectorICs: megamorphic keyed loads in crankshaft don't need a vector.
mvstanton [Mon, 13 Apr 2015 13:50:31 +0000 (06:50 -0700)]
VectorICs: megamorphic keyed loads in crankshaft don't need a vector.

They are content with a dummy vector, as MISSES won't result in
changing the real vector/slot at all.

BUG=

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

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

9 years ago[turbofan] remove register operand cache
dcarney [Mon, 13 Apr 2015 13:48:13 +0000 (06:48 -0700)]
[turbofan] remove register operand cache

BUG=

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

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

9 years agocollect phantom handle data before it gets overwritten
dcarney [Mon, 13 Apr 2015 13:15:20 +0000 (06:15 -0700)]
collect phantom handle data before it gets overwritten

R=jochen@chromium.org, hpayer@chromium.org, erikcorry@chromium.org

BUG=

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

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

9 years ago[turbofan] cleanup PointerMap
dcarney [Mon, 13 Apr 2015 12:45:56 +0000 (05:45 -0700)]
[turbofan] cleanup PointerMap

rename to ReferenceMap
use ZoneVector for storage
drop dead code

BUG=

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

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

9 years agoWrap typed array implementations in functions.
yangguo [Mon, 13 Apr 2015 12:22:04 +0000 (05:22 -0700)]
Wrap typed array implementations in functions.

R=mvstanton@chromium.org

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

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

9 years agoRemove kForInStatementIsNotFastCase bailout reason
verwaest [Mon, 13 Apr 2015 11:37:14 +0000 (04:37 -0700)]
Remove kForInStatementIsNotFastCase bailout reason

BUG=

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

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

9 years agoExpose ArrayBufferView::HasBuffer
jochen [Mon, 13 Apr 2015 11:28:02 +0000 (04:28 -0700)]
Expose ArrayBufferView::HasBuffer

This allows the embedder to decide whether it's worthwhile to copy the
contents to avoid materializing a buffer.

BUG=v8:3996
R=dslomov@chromium.org,kbr@chromium.org
LOG=y

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

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

9 years agoTreat HArgumentsObject as a safe use during Uint32 analysis phase.
vegorov [Mon, 13 Apr 2015 10:47:19 +0000 (03:47 -0700)]
Treat HArgumentsObject as a safe use during Uint32 analysis phase.

Deoptimization infrastructure already handles it correctly.

This change fixes repetitive deoptimizations in the code like this:

    var u32 = new Uint32Array(1);
    u32[0] = -1;

    function tr(x) { return x|0; }
    function ld() { return tr(u32[0]); }

    while (true) ld();

Currently inlined tr will contain HArgumentsObject that is considered uint32-unsafe use and prevents u32[0] from becoming uint32 load - instead a speculative int32 load is generated which just deopts.

BUG=

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

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

9 years agoRefactor formal parameter error locations into a class
wingo [Mon, 13 Apr 2015 10:39:38 +0000 (03:39 -0700)]
Refactor formal parameter error locations into a class

This is a follow-up to https://codereview.chromium.org/1078093002.

R=rossberg@chromium.org
BUG=

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

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

9 years agoDo not inline store if field map was cleared.
ulan [Mon, 13 Apr 2015 09:43:55 +0000 (02:43 -0700)]
Do not inline store if field map was cleared.

BUG=v8:4023
LOG=NO

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

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

9 years agoX87: Reland "Merge cellspace into old pointer space".
chunyang.dai [Mon, 13 Apr 2015 09:35:59 +0000 (02:35 -0700)]
X87: Reland "Merge cellspace into old pointer space".

port 4bd9bdbb28c0f4004b113534bf6082ec4d3385b9 (r27751)

original commit message:

BUG=

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

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

9 years agoX87: [es6] implement spread calls
chunyang.dai [Mon, 13 Apr 2015 09:32:58 +0000 (02:32 -0700)]
X87: [es6] implement spread calls

port 74c381221c93253bbee513aa2539d93269303b8b (r27714)

original commit message:

  [es6] implement spread calls

BUG=

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

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

9 years agoBlacklist more debugger tests (fail with --always-opt).
yangguo [Mon, 13 Apr 2015 09:09:40 +0000 (02:09 -0700)]
Blacklist more debugger tests (fail with --always-opt).

TBR=mstarzinger@chromium.org
NOTRY=true

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

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

9 years agoMake compilers agree on source position of thrown errors.
mstarzinger [Mon, 13 Apr 2015 09:02:51 +0000 (02:02 -0700)]
Make compilers agree on source position of thrown errors.

This makes the compilers agree on the source position of a message
generated by "throw new Error()", it points to the beginning of the
throw directive.

R=titzer@chromium.org
TEST=message/regress/regress-3995
BUG=v8:3995
LOG=N

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

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

9 years ago[x86] Allow (v)divsd->(v)mulsd to execute in parallel.
bmeurer [Mon, 13 Apr 2015 08:25:27 +0000 (01:25 -0700)]
[x86] Allow (v)divsd->(v)mulsd to execute in parallel.

This tweak was already present in CrankShaft for the non-AVX case. As it
turns out, it's also relevant even with AVX. Now the same optimization
is applied in case of TurboFan as well.

R=dcarney@chromium.org

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

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

9 years agoFactor formal argument parsing into ParserBase
wingo [Mon, 13 Apr 2015 08:07:05 +0000 (01:07 -0700)]
Factor formal argument parsing into ParserBase

This commit is a precursor to making lazy arrow function parsing use
similar logic to function(){} argument parsing.

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

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

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

9 years agoUpdate V8 DEPS.
v8-autoroll [Mon, 13 Apr 2015 03:23:33 +0000 (20:23 -0700)]
Update V8 DEPS.

Rolling v8/tools/clang to 76fad2f3eb2d3d649bcca82e5ece02d09969e528

TBR=machenbach@chromium.org

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

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

9 years agoUse correct property descriptor in generators test
ben [Sun, 12 Apr 2015 21:18:29 +0000 (14:18 -0700)]
Use correct property descriptor in generators test

BUG=

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

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

9 years agoCorrect property descriptors on GeneratorPrototype
mike [Sat, 11 Apr 2015 21:14:19 +0000 (14:14 -0700)]
Correct property descriptors on GeneratorPrototype

The ES6 specification does not explicitly state the attributes for the
'next' and 'throw' property descriptors, so their values are defined by
Section 17 [1]:

> Every other data property described in clauses 18 through 26 and in
> Annex B.2 has the attributes
> { [[Writable]]: true, [[Enumerable]]: false, [[Configurable]]: true }
> unless otherwise specified.

[1]
https://people.mozilla.org/~jorendorff/es6-draft.html#sec-ecmascript-standard-built-in-objects

BUG=v8:3986
LOG=N
R=wingo,arv

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

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

9 years agoRevert "MIPS: Vector-ICs - speed towards the monomorphic exit as quickly as possible."
paul.lind [Sat, 11 Apr 2015 15:23:23 +0000 (08:23 -0700)]
Revert "MIPS: Vector-ICs - speed towards the monomorphic exit as quickly as possible."

Reason for revert:
Test failures in string-index and regress-1187524.

This reverts commit b45a664f7bc8155d226df7efebd23fb59e5c6162.

BUG=

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

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

9 years ago[x86] Introduce vandps/vandpd/vxorps/vxorpd.
Weiliang Lin [Sat, 11 Apr 2015 01:02:22 +0000 (09:02 +0800)]
[x86] Introduce vandps/vandpd/vxorps/vxorpd.

R=bmeurer@chromium.org

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

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

9 years ago[es6] ship @@toStringTag
caitpotter88 [Sat, 11 Apr 2015 00:51:06 +0000 (17:51 -0700)]
[es6] ship @@toStringTag

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

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

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

9 years agoapi: introduce SealHandleScope
fedor [Fri, 10 Apr 2015 23:17:09 +0000 (16:17 -0700)]
api: introduce SealHandleScope

When debugging Handle leaks in io.js we found it very convenient to be
able to Seal some specific (root in our case) scope to prevent Handle
allocations in it, and easily find leakage.

R=yangguo
BUG=

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

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

9 years agoCorrectly name memory stat for context snapshot size.
yangguo [Fri, 10 Apr 2015 22:36:04 +0000 (15:36 -0700)]
Correctly name memory stat for context snapshot size.

TBR=machenbach@chromium.org

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

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

9 years agoPPC: Always update raw pointers when handling interrupts inside RegExp code.
michael_dawson [Fri, 10 Apr 2015 21:54:41 +0000 (14:54 -0700)]
PPC: Always update raw pointers when handling interrupts inside RegExp code.

Fix c67cb287a901ddf03d4ae4dafcf431d09fd3e22c

Cannot access kStartIndex and kDirectCall parameters as ints on 64-bit BE platforms.

R=yangguo@chromium.org, mbrandy@us.ibm.com
BUG=

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

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

9 years agoPPC: [es6] implement spread calls
michael_dawson [Fri, 10 Apr 2015 21:16:02 +0000 (14:16 -0700)]
PPC: [es6] implement spread calls

Port 74c381221c93253bbee513aa2539d93269303b8b

R=mbrandy@us.ibm.com

BUG=

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

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

9 years agoPPC: [turbofan] Materialize JSFunction from frame if possible.
michael_dawson [Fri, 10 Apr 2015 20:59:48 +0000 (13:59 -0700)]
PPC: [turbofan] Materialize JSFunction from frame if possible.

Port 725cdc533cb4e31c042d32ce1979012b5bd99ced

Original commit message:
This reduces the overhead of recursive calls when context specialization
is enabled. Based on this it might be possible to further reduce the
overhead by also specializing the call itself.

As a drive-by-fix, port the fast context materialization optimization to
arm and arm64, that was previously only supported on x64 and ia32.

R=mbrandy@us.ibm.com

BUG=

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

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

9 years agoPPC: Merge cellspace into old pointer space
michael_dawson [Fri, 10 Apr 2015 20:58:40 +0000 (13:58 -0700)]
PPC: Merge cellspace into old pointer space

Port 4e7163ce05f135918205c7855ae60a48e5d46cc5

R=mbrandy@us.ibm.com

BUG=

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

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

9 years agoUse array literals instead of array constructor in native javascript.
yangguo [Fri, 10 Apr 2015 20:51:33 +0000 (13:51 -0700)]
Use array literals instead of array constructor in native javascript.

R=jkummerow@chromium.org

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

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

9 years ago[cleanup] delete dead code leftover from 48eff34
caitpotter88 [Fri, 10 Apr 2015 18:36:02 +0000 (11:36 -0700)]
[cleanup] delete dead code leftover from 48eff34

Few pieces leftover which are now effectively dead code and can be safely
deleted.

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

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

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

9 years ago[cleanup] fix SpreadCalls perf-test names in JSTests.json
caitpotter88 [Fri, 10 Apr 2015 18:29:22 +0000 (11:29 -0700)]
[cleanup] fix SpreadCalls perf-test names in JSTests.json

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

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

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

9 years agoMIPS: Vector-ICs - speed towards the monomorphic exit as quickly as possible.
balazs.kilvady [Fri, 10 Apr 2015 18:28:12 +0000 (11:28 -0700)]
MIPS: Vector-ICs - speed towards the monomorphic exit as quickly as possible.

Port 35a67b745d862c5b1f584c2786ebf1369dc4f1ff

Original commit message:
Thanks to some careful assumptions, we can examine the object found at
vector[slot] and trust it's a heap object where the second field is
either a map if it's a WeakCell, or definitely not a map if it's a
Symbol, String or FixedArray. Use this to save a memory read.

BUG=

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

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

9 years ago[strong] Implement static restrictions on binding 'undefined' in arrow functions
conradw [Fri, 10 Apr 2015 18:27:05 +0000 (11:27 -0700)]
[strong] Implement static restrictions on binding 'undefined' in arrow functions

Implements the strong mode proposal's static restrictions on the use of the
identifier 'undefined', for arrow functions. Assumes these restrictions are
intended to be identical to the restrictions on the use of 'eval and 'arguments'
in strict mode. In addition, Location variables inconsistantly named (e.g.
dupe_error_loc vs dupe_loc) are now consistently named the shorter way.

Baseline: https://codereview.chromium.org/1070633002

BUG=v8:3956
LOG=N

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

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

9 years agoRevert of Make full GC reduce memory footprint an explicit event in the idle notifica...
machenbach [Fri, 10 Apr 2015 18:21:45 +0000 (11:21 -0700)]
Revert of Make full GC reduce memory footprint an explicit event in the idle notification handler. (patchset #2 id:20001 of https://codereview.chromium.org/1072363002/)

Reason for revert:
[Sheriff] breaks nosnap with timeouts:
http://build.chromium.org/p/client.v8/builders/V8%20Linux%20-%20nosnap/builds/2513
http://build.chromium.org/p/client.v8/builders/V8%20Win32%20-%20nosnap%20-%20shared/builds/6220

Original issue's description:
> Make full GC reduce memory footprint an explicit event in the idle notification handler.
>
> BUG=
>
> Committed: https://crrev.com/845705aa99b6bfa8d264cfda1c3b5f1229802ab5
> Cr-Commit-Position: refs/heads/master@{#27753}

TBR=ulan@chromium.org,rmcilroy@chromium.org,hpayer@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=

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

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

9 years agoUse cctest to track memory stats for isolate and context.
yangguo [Fri, 10 Apr 2015 14:13:17 +0000 (07:13 -0700)]
Use cctest to track memory stats for isolate and context.

R=machenbach@chromium.org

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

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

9 years agoMake full GC reduce memory footprint an explicit event in the idle notification handler.
hpayer [Fri, 10 Apr 2015 14:06:39 +0000 (07:06 -0700)]
Make full GC reduce memory footprint an explicit event in the idle notification handler.

BUG=

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

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

9 years agoFix some -Werror=sign-compare errors
wingo [Fri, 10 Apr 2015 13:59:39 +0000 (06:59 -0700)]
Fix some -Werror=sign-compare errors

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

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

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

9 years agoReland "Merge cellspace into old pointer space"
verwaest [Fri, 10 Apr 2015 13:54:09 +0000 (06:54 -0700)]
Reland "Merge cellspace into old pointer space"

This fixes the arm(64) and mips(64) write barriers

BUG=

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

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

9 years agosimplify GlobalValueMap calls to DisposeWeak
dcarney [Fri, 10 Apr 2015 13:40:06 +0000 (06:40 -0700)]
simplify GlobalValueMap calls to DisposeWeak

BUG=

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

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

9 years agoRemove Type::Array bit and replace with Type::GlobalObject
titzer [Fri, 10 Apr 2015 13:29:37 +0000 (06:29 -0700)]
Remove Type::Array bit and replace with Type::GlobalObject

R=rossberg@chromium.org
BUG=

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

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

9 years agoAdd basic crankshaft support for slow-mode for-in to avoid disabling optimizations
verwaest [Fri, 10 Apr 2015 13:15:32 +0000 (06:15 -0700)]
Add basic crankshaft support for slow-mode for-in to avoid disabling optimizations

BUG=

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

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

9 years agoAdd more exhaustive tests for Math.min and Math.max.
titzer [Fri, 10 Apr 2015 12:35:12 +0000 (05:35 -0700)]
Add more exhaustive tests for Math.min and Math.max.

R=mstarzinger@chromium.org
BUG=

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

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

9 years agoWrap proxy.js in a function.
yangguo [Fri, 10 Apr 2015 12:32:20 +0000 (05:32 -0700)]
Wrap proxy.js in a function.

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

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

9 years agoHandlify Map::SetPrototype()
jkummerow [Fri, 10 Apr 2015 12:13:18 +0000 (05:13 -0700)]
Handlify Map::SetPrototype()

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

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

9 years ago[strong] Implement static restrictions on binding/assignment to 'undefined'
conradw [Fri, 10 Apr 2015 12:04:51 +0000 (05:04 -0700)]
[strong] Implement static restrictions on binding/assignment to 'undefined'
identifier. Delete unused (and now incorrect) function IsValidStrictVariable.

Implements the strong mode proposal's static restrictions on the use of the
identifier 'undefined'. Assumes these restrictions are intended to be identical
to the restrictions on the use of 'eval' and 'arguments' in strict mode. The
AllowEvalOrArgumentsAsIdentifier enum has been renamed to
AllowRestrictedIdentifiers as logic involving it is now also used for this case.

BUG=v8:3956

LOG=N

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

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

9 years ago[test-runner] Make perf runner robust for missing executable.
machenbach [Fri, 10 Apr 2015 12:01:20 +0000 (05:01 -0700)]
[test-runner] Make perf runner robust for missing executable.

TBR=yangguo@chromium.org
NOTRY=true
NOTREECHECKS=true
NOPRESUBMIT=true

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

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

9 years agoSpeculative fix for stack overflow in CollectEvacuationCandidates
jkummerow [Fri, 10 Apr 2015 11:24:25 +0000 (04:24 -0700)]
Speculative fix for stack overflow in CollectEvacuationCandidates

I don't have a repro, but it seems that when we are close to the stack limit,
CollectEvacuationCandidates' local variables can blow the limit. To avoid
this, instead of always allocating a 2000-pointer-sizes array on the stack,
use a std::vector (which stores its elements on the heap), and while we're
at it, only allocate as many elements as we actually need.

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

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

9 years ago[turbofan] JSUnaryNot and JSToBoolean have exactly 2 inputs, no need to trim.
bmeurer [Fri, 10 Apr 2015 11:08:47 +0000 (04:08 -0700)]
[turbofan] JSUnaryNot and JSToBoolean have exactly 2 inputs, no need to trim.

R=dcarney@chromium.org

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

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

9 years agoMIPS64: [es6] implement spread calls
akos.palfi [Fri, 10 Apr 2015 10:48:26 +0000 (03:48 -0700)]
MIPS64: [es6] implement spread calls

Port 74c381221c93253bbee513aa2539d93269303b8b

Patch from Paul Lind <paul.lind@imgtec.com>.

BUG=

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

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

9 years ago[turbofan] Optimize silent hole checks on legacy const context slots.
bmeurer [Fri, 10 Apr 2015 10:28:06 +0000 (03:28 -0700)]
[turbofan] Optimize silent hole checks on legacy const context slots.

Currently we always generate a diamond in the graph builder for every
legacy const context slot, which we cannot get rid of until late control
reduction, even if we know after context specialization that the slot is
already initialized.

Now we generate a select instead, which the CommonOperatorReducer
happily removes during typed lowering. This greatly speeds up asm.js
code generated by Emscripten with the new POINTER_MASKING mode.

R=mstarzinger@chromium.org

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

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

9 years agoAdd perf test configuration to track memory use of context and isolate.
yangguo [Fri, 10 Apr 2015 09:48:54 +0000 (02:48 -0700)]
Add perf test configuration to track memory use of context and isolate.

R=machenbach@chromium.org

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

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

9 years agoSplit cctest/test-types.cc into heap and zone versions for more parallelism.
titzer [Fri, 10 Apr 2015 09:25:56 +0000 (02:25 -0700)]
Split cctest/test-types.cc into heap and zone versions for more parallelism.

R=bmeurer@chromium.org
BUG=

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

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

9 years agoSpecial case the "empty string" root so it doesn't constantly jump around
jochen [Fri, 10 Apr 2015 09:23:44 +0000 (02:23 -0700)]
Special case the "empty string" root so it doesn't constantly jump around

BUG=none
R=hpayer@chromium.org
LOG=n

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

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

9 years agoMake mksnapshot stats unambiguous for easier parsing.
Yang Guo [Fri, 10 Apr 2015 08:47:49 +0000 (10:47 +0200)]
Make mksnapshot stats unambiguous for easier parsing.

R=machenbach@chromium.org

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

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

9 years agoAdd CHECKs that the array buffers list is always sorted new to old
jochen [Fri, 10 Apr 2015 08:40:02 +0000 (01:40 -0700)]
Add CHECKs that the array buffers list is always sorted new to old

BUG=none
R=hpayer@chromium.org
LOG=n

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

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

9 years ago[crankshaft] Fix interceptor shadowing constant global property.
mstarzinger [Fri, 10 Apr 2015 08:30:41 +0000 (01:30 -0700)]
[crankshaft] Fix interceptor shadowing constant global property.

This makes sure Crankshaft respects interceptors in the global object
even when they shadow a constant global property.

R=verwaest@chromium.org
TEST=cctest/test-api-interceptors/PrePropertyHandler

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

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

9 years agoMIPS port for implement spread calls
mvstanton [Fri, 10 Apr 2015 07:47:01 +0000 (00:47 -0700)]
MIPS port for implement spread calls

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

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

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

9 years ago[x86] Support immediate indices for StoreWriteBarrier.
bmeurer [Fri, 10 Apr 2015 06:16:23 +0000 (23:16 -0700)]
[x86] Support immediate indices for StoreWriteBarrier.

Ideally we would not need the StoreWriteBarrier instructions at all,
but represent the RecordWrite functionality as machine subgraph, but
that'll take some time to get there. In the mean time we can have a
shorter instruction sequence on Intel platforms by recognizing immediate
indices here.

R=svenpanne@chromium.org

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

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

9 years agoUpdate V8 DEPS.
v8-autoroll [Fri, 10 Apr 2015 03:32:59 +0000 (20:32 -0700)]
Update V8 DEPS.

Rolling v8/tools/clang to 48782e07265a7680f544494a0fd1ad12ca826624

TBR=machenbach@chromium.org

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

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

9 years ago[es6] do not add caller/arguments to ES6 function definitions
caitpotter88 [Thu, 9 Apr 2015 22:40:16 +0000 (15:40 -0700)]
[es6] do not add caller/arguments to ES6 function definitions

BUG=v8:3946, v8:3982
CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:linux_chromium_rel_ng;tryserver.blink:linux_blink_rel
LOG=N
R=arv@chromium.org, rossberg@chromium.org

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

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

9 years agoPPC: Vector-ICs - speed towards the monomorphic exit as quickly as possible.
michael_dawson [Thu, 9 Apr 2015 22:32:11 +0000 (15:32 -0700)]
PPC: Vector-ICs - speed towards the monomorphic exit as quickly as possible.

Port 35a67b745d862c5b1f584c2786ebf1369dc4f1ff

Original commit message:
Thanks to some careful assumptions, we can examine the object found at
vector[slot] and trust it's a heap object where the second field is
either a map if it's a WeakCell, or definitely not a map if it's a
Symbol, String or FixedArray. Use this to save a memory read.

R=mbrandy@us.ibm.com

BUG=

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

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

9 years agoPPC: [turbofan] Add new Float32Abs and Float64Abs operators.
michael_dawson [Thu, 9 Apr 2015 22:29:25 +0000 (15:29 -0700)]
PPC: [turbofan] Add new Float32Abs and Float64Abs operators.

Port 9af9f1d0262e2dab66c62331a03f6a76504f3866

Original commit message:
These operators compute the absolute floating point value of some
arbitrary input, and are implemented without any branches (i.e. using
vabs on arm, and andps/andpd on x86).

R=mbrandy@us.ibm.com

BUG=

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

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

9 years agoPPC: Make --always-opt also optimize top-level code.
michael_dawson [Thu, 9 Apr 2015 22:14:23 +0000 (15:14 -0700)]
PPC: Make --always-opt also optimize top-level code.

Port 2d281e71ac49058ef5696f4255ff1fa30796bc5e

Original commit message:
This enables eager optimization of top-level code with TurboFan and
extends test coverage by triggering it with the --always-opt flag.
Script contexts are now also properly allocated in TurboFan.

R=titzer@chromium.org, mstarzinger@chromium.org,mbrandy@us.ibm.com
BUG=

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

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

9 years agoPPC: Code cleanup in GenerateRecordCallTarget.
michael_dawson [Thu, 9 Apr 2015 22:13:16 +0000 (15:13 -0700)]
PPC: Code cleanup in GenerateRecordCallTarget.

Port 6a222b8ff033eb523149794d37c0d0f29bc8fc40

R=mbrandy@us.ibm.com

BUG=

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

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

9 years agoCollect list of requested modules in ModuleDescriptor while parsing
adamk [Thu, 9 Apr 2015 22:09:44 +0000 (15:09 -0700)]
Collect list of requested modules in ModuleDescriptor while parsing

BUG=v8:1569
LOG=n

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

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

9 years agoPPC: Reland "Merge old data and pointer space."
michael_dawson [Thu, 9 Apr 2015 21:45:42 +0000 (14:45 -0700)]
PPC: Reland "Merge old data and pointer space."

Port 59be4ba7f4f70dedcaac60914adaa2885a3da5d0

Original commit message:
This reverts commit cbfcee557503514bef20abdfc78ceb262c9c4d64.

R=mbrandy@us.ibm.com

BUG=

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

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

9 years ago[release-tools] Make chromium roll more robust after failing rolls.
machenbach [Thu, 9 Apr 2015 21:37:33 +0000 (14:37 -0700)]
[release-tools] Make chromium roll more robust after failing rolls.

Always use the same branch name (the old version leaked
branches). Always try to delete a possibly existing branch
on start-up and also clean up in the end.

NOTRY=true
TBR=tandrii@chromium.org

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

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

9 years agoFix C++ violation.
thakis [Thu, 9 Apr 2015 21:22:46 +0000 (14:22 -0700)]
Fix C++ violation.

gcc rejects the following snippet, clang rejects it in -std=c++11 mode:
  namespace A { template<class T> class C {}; }
  namespace B { template class A::C<int>; }

Indeed, the C++ standard says in 14.7.2p2 "An explicit instantiation shall
appear in an enclosing namespace of its template", so cl.exe is incorrect to
allow this.

Just move the instantiation out of the v8 namespace to fix.  No intended
behavior change.  Fixes building with clang-cl on Windows.

BUG=chromium:475643
LOG=N
TBR=svenpanne@chromium.org

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

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

9 years ago[es6] don't "replace" Object.prototype.toString for --harmony-tostring
caitpotter88 [Thu, 9 Apr 2015 20:53:46 +0000 (13:53 -0700)]
[es6] don't "replace" Object.prototype.toString for --harmony-tostring

When ObjectToString is installed on Object.prototype twice (once in v8natives.js, and once in harmony-tostring.js), this pollutes old code spaces on some devices. To prevent this, the function is only installed once, preventing test failures when the --harmony-tostring flag is flipped on by default.

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

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

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

9 years agoPPC: JSEntryTrampoline: check for stack space before pushing arguments
michael_dawson [Thu, 9 Apr 2015 20:52:38 +0000 (13:52 -0700)]
PPC: JSEntryTrampoline: check for stack space before pushing arguments

Port 146598f44a1efd0f942745abfd6c08a073972c01

Original commit message:
Optimistically pushing a lot of arguments can run into the stack limit of the process, at least on operating systems where this limit is close to the limit that V8 sets for itself.

R=mbrandy@us.ibm.com

BUG=

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

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

9 years agoPPC: Match -0 - x with sign bit flip.
michael_dawson [Thu, 9 Apr 2015 20:51:28 +0000 (13:51 -0700)]
PPC: Match -0 - x with sign bit flip.

Optimiation similar to what is done for x86

R=mbrandy@us.ibm.com

BUG=

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

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

9 years ago[turbofan] Fix FrameInspector when deoptimizer is disabled.
mstarzinger [Thu, 9 Apr 2015 19:40:43 +0000 (12:40 -0700)]
[turbofan] Fix FrameInspector when deoptimizer is disabled.

This is a workaround to make the debugger happy about TurboFan frames
when the debugger causes frame inspection. Note that this can happen
because the debugger can be activated while there still are optimized
TurboFan activations on the stack.

R=ishell@chromium.org
BUG=chromium:465298
TEST=mjsunit/regress/regress-crbug-465298
LOG=N

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

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

9 years agoLexical arguments for arrow functions
arv [Thu, 9 Apr 2015 19:39:34 +0000 (12:39 -0700)]
Lexical arguments for arrow functions

Only allocate 'arguments' if the scope is not an arrow scope.

BUG=v8:2700
LOG=N
R=adamk@chromium.org, wingo@igalia.cmo

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

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

9 years agoRemove comparison operator and helper function from AstRawString interface
adamk [Thu, 9 Apr 2015 19:38:24 +0000 (12:38 -0700)]
Remove comparison operator and helper function from AstRawString interface

These comparisons are only meant to be done by AstValueFactory itself (in
its string_table_ operations), so make the Compare() function a private
member of AstValueFactory.

All other clients of AstRawStrings should compare them by pointer value.
There were only two clients which failed to abide by this rule, one
recently-added (in ModuleDescriptor) and the other in Literal::Match
(in ast.cc, added in https://code.google.com/p/v8/source/detail?r=24396).

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

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

9 years ago[es6] implement spread calls
caitpotter88 [Thu, 9 Apr 2015 19:37:14 +0000 (12:37 -0700)]
[es6] implement spread calls

BUG=v8:3018
R=
LOG=N

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

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

9 years agoWindows GN component build fixes.
brettw [Thu, 9 Apr 2015 19:36:02 +0000 (12:36 -0700)]
Windows GN component build fixes.

This fixes the d8 target which previously was getting both USING_V8_SHARED
and BUILDING_V8_SHARED defined at the same time.

Renames direct_dependent_configs to public_configs (new name, same thing).

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

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

9 years agoCorrectly wrap uri.js into a function.
yangguo [Thu, 9 Apr 2015 19:34:54 +0000 (12:34 -0700)]
Correctly wrap uri.js into a function.

R=jkummerow@chromium.org

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

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

9 years agoRevert of Merge cellspace into old pointer space (patchset #8 id:180001 of https...
adamk [Thu, 9 Apr 2015 18:16:33 +0000 (11:16 -0700)]
Revert of Merge cellspace into old pointer space (patchset #8 id:180001 of https://codereview.chromium.org/1010803012/)

Reason for revert:
Causes test failures on ARM bots related to cells and write barriers.

Original issue's description:
> Merge cellspace into old pointer space
>
> BUG=
>
> Committed: https://crrev.com/4e7163ce05f135918205c7855ae60a48e5d46cc5
> Cr-Commit-Position: refs/heads/master@{#27707}

TBR=hpayer@chromium.org,balazs.kilvady@imgtec.com,yangguo@chromium.org,verwaest@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=

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

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

9 years agoSkip another debug test that fails in always-opt/turbofan
Adam Klein [Thu, 9 Apr 2015 17:46:08 +0000 (10:46 -0700)]
Skip another debug test that fails in always-opt/turbofan

TBR=mstarzinger@chromium.org

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

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

9 years ago[turbofan] support small immediates
dcarney [Thu, 9 Apr 2015 14:06:19 +0000 (07:06 -0700)]
[turbofan] support small immediates

R=titzer@chromium.org

BUG=

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

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

9 years agoRemove android_webview_build conditions.
torne [Thu, 9 Apr 2015 13:38:20 +0000 (06:38 -0700)]
Remove android_webview_build conditions.

Remove references to android_webview_build now that we no longer support
that build configuration. This also removes use_system_stlport which was
only supported with android_webview_build.

BUG=chromium:440793
LOG=n

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

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

9 years agoMerge cellspace into old pointer space
verwaest [Thu, 9 Apr 2015 13:34:16 +0000 (06:34 -0700)]
Merge cellspace into old pointer space

BUG=

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

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

9 years agoSet the default compiler for X87 to GCC.
chunyang.dai [Thu, 9 Apr 2015 13:26:29 +0000 (06:26 -0700)]
Set the default compiler for X87 to GCC.

Compiling v8 for X87 platform with clang compiler leads to some test case failure.
So we set the default compiler for X87 to GCC.

BUG=

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

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

9 years agoEagerly escape RegExp.source.
yangguo [Thu, 9 Apr 2015 13:22:17 +0000 (06:22 -0700)]
Eagerly escape RegExp.source.

Escaping used to happen lazily, implemented in an accessor property.
However, native implementation of RegExp methods use .source as well.
This leads to performance regressions. Now we do it eagerly instead.

R=jkummerow@chromium.org
BUG=chromium:436447
LOG=N

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

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

9 years ago[cq] Add win nosnap shared trybot.
machenbach [Thu, 9 Apr 2015 12:43:28 +0000 (05:43 -0700)]
[cq] Add win nosnap shared trybot.

TBR=tandrii@chromium.org

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

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

9 years agoRelax heap size assert during compaction
erikcorry [Thu, 9 Apr 2015 12:42:22 +0000 (05:42 -0700)]
Relax heap size assert during compaction

R=ulan@chromium.org
BUG=

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

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

9 years ago[turbofan] Disable select matching due to bug manifesting on arm.
titzer [Thu, 9 Apr 2015 12:41:15 +0000 (05:41 -0700)]
[turbofan] Disable select matching due to bug manifesting on arm.

R=machenbach@chromium.org
BUG=

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

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

9 years ago[turbofan] Push layout descriptors to InstructionOperand subclasses.
dcarney [Thu, 9 Apr 2015 11:28:54 +0000 (04:28 -0700)]
[turbofan] Push layout descriptors to InstructionOperand subclasses.

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

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

9 years agoMIPS: [turbofan] Materialize JSFunction from frame if possible.
balazs.kilvady [Thu, 9 Apr 2015 11:16:02 +0000 (04:16 -0700)]
MIPS: [turbofan] Materialize JSFunction from frame if possible.

Port 725cdc533cb4e31c042d32ce1979012b5bd99ced

Original commit message:
This reduces the overhead of recursive calls when context specialization
is enabled. Based on this it might be possible to further reduce the
overhead by also specializing the call itself.

As a drive-by-fix, port the fast context materialization optimization to
arm and arm64, that was previously only supported on x64 and ia32.

BUG=

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

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

9 years agoMake TestInternalWeakLists more robust against flags.
mstarzinger [Thu, 9 Apr 2015 11:01:19 +0000 (04:01 -0700)]
Make TestInternalWeakLists more robust against flags.

This makes some tests in test-heap.cc more robust against flags, now
that top-level code can be optimized by the --always-opt flag.

R=hpayer@chromium.org
TEST=cctest/test-heap/TestInternalWeakLists

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

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

9 years ago[turbofan] Make AllocatedOperand an InstructionOperand::Kind.
dcarney [Thu, 9 Apr 2015 10:40:41 +0000 (03:40 -0700)]
[turbofan] Make AllocatedOperand an InstructionOperand::Kind.

This is preparatory work to have MachineTypes encoded in AllocatedOperands.

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

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

9 years ago[turbofan] Add poor man's store elimination for storing to fields.
Benedikt Meurer [Thu, 9 Apr 2015 10:29:15 +0000 (12:29 +0200)]
[turbofan] Add poor man's store elimination for storing to fields.

This is a very simple dead store elimination that removes StoreField
nodes which are immediately followed by other StoreField nodes that
store to the same field. Ideally there should be a fully featured store
elimination, which walks over the effect graph starting from the end,
but there are some technical difficulties to solve before we can get to
that, esp. we need to think about "effect producing" operators like
ValueEffect first. Once we have that, it is trivial to remove this temporary
poor man's store elimination.

R=dcarney@chromium.org

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

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

9 years ago[test-runner] Pass slowest test durations to buildbot.
machenbach [Thu, 9 Apr 2015 09:55:59 +0000 (02:55 -0700)]
[test-runner] Pass slowest test durations to buildbot.

BUG=

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

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

9 years agoUpdate V8 DEPS.
v8-autoroll [Thu, 9 Apr 2015 09:51:40 +0000 (02:51 -0700)]
Update V8 DEPS.

Rolling v8/tools/clang to 5e71fff34c77c4ee9056fe3f2124c433768e2282

TBR=machenbach@chromium.org

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

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

9 years agoX87: Code cleanup in GenerateRecordCallTarget.
chunyang.dai [Thu, 9 Apr 2015 09:31:53 +0000 (02:31 -0700)]
X87: Code cleanup in GenerateRecordCallTarget.

port 6a222b8ff033eb523149794d37c0d0f29bc8fc40 (r27630)

original commit message:

  Code cleanup in GenerateRecordCallTarget

BUG=

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

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

9 years agoX87: Make --always-opt also optimize top-level code
chunyang.dai [Thu, 9 Apr 2015 09:30:47 +0000 (02:30 -0700)]
X87: Make --always-opt also optimize top-level code

port 2d281e71ac49058ef5696f4255ff1fa30796bc5e (r27633)

original commit message:

    Make --always-opt also optimize top-level code.

    This enables eager optimization of top-level code with TurboFan and
    extends test coverage by triggering it with the --always-opt flag.
    Script contexts are now also properly allocated in TurboFan.

BUG=

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

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

9 years ago[turbofan] cleanup InstructionOperand a little
dcarney [Thu, 9 Apr 2015 09:15:28 +0000 (02:15 -0700)]
[turbofan] cleanup InstructionOperand a little

- ConstantOperand was using a too-small field too store its virtual register
- drop ConvertTo, replace it with simple copy
- split AllocatedOperand off from Immediate and Constant to make assignment clearer, also paving the way for small Immediates
- put zone first in *Operand::New
- driveby: drop delayed ssa deconstruction experiment

R=titzer@chromium.org
BUG=

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

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

9 years agoVectorICs - turn on vector ICs for LoadIC and KeyedLoadIC
mvstanton [Thu, 9 Apr 2015 09:06:00 +0000 (02:06 -0700)]
VectorICs - turn on vector ICs for LoadIC and KeyedLoadIC

BUG=
R=jkummerow@chromium.org

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

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

9 years agoDon't #define snprintf in VS2015 - it's illegal and unneeded.
brucedawson [Thu, 9 Apr 2015 09:02:52 +0000 (02:02 -0700)]
Don't #define snprintf in VS2015 - it's illegal and unneeded.

VS 2015 supplies a conforming snprintf implementation, so #define
snprintf is no longer needed. Also, VS 2015 checks for #define of
snprintf and treats it as a fatal error.

LOG=Y
R=jarin@chromium.org
BUG=440500

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

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

9 years agoMarkBit cleanup: They have to be accessed through Marking accessors. Avoid arbitrary...
hpayer [Thu, 9 Apr 2015 08:55:37 +0000 (01:55 -0700)]
MarkBit cleanup: They have to be accessed through Marking accessors. Avoid arbitrary abuse of mark bits and make marking explicit.

Added DCHECKs to mark bit transitions to check source state.

BUG=

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

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