platform/upstream/v8.git
8 years agoReland of "[heap] Concurrency support for heap book-keeping info"
mlippautz [Wed, 16 Sep 2015 11:18:07 +0000 (04:18 -0700)]
Reland of "[heap] Concurrency support for heap book-keeping info"

Adds concurrency support for:
- MemoryChunk: Fragmentation counters
- MemoryChunk: High-water mark
- MemoryAllocator: Lowest and highest ever allocated addresses, size, and
  capacity

R=hpayer@chromium.org
BUG=chromium:524425
LOG=N

This reverts commit 0db34dbe8111f8670c82bb4c42110400a9050d08.

BUG=

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

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

8 years ago[builtins] Unify the String constructor.
bmeurer [Wed, 16 Sep 2015 10:44:36 +0000 (03:44 -0700)]
[builtins] Unify the String constructor.

Implement the String constructor completely as native builtin,
avoiding the need to do gymnastics in JavaScript builtin to
properly detect the no argument case (which is different from
the undefined argument case) and also allowing to just
tailcall through to ToString or SymbolDescriptiveString for
the common case. Also the JavaScript builtin was misleading
since the case for construct call was unused, but could be
triggered in a wrong way once we support tail calls from
constructor functions.

This refactoring allows us to properly implement subclassing
for String builtins, once we have the correct initial_map on
derived classes (it's merely a matter of using NewTarget
instead of the target register now).

This introduces a new %SymbolDescriptiveString runtime
entry, which is also used by Symbol.toString() now.

R=mstarzinger@chromium.org

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

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

8 years agoVector ICs: Hook up vectors in platform builtins to their SharedFunctionInfos.
mvstanton [Wed, 16 Sep 2015 10:08:50 +0000 (03:08 -0700)]
Vector ICs: Hook up vectors in platform builtins to their SharedFunctionInfos.

BUG=v8:4423
LOG=N

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

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

8 years agoAdd myself to heap owners
jochen [Wed, 16 Sep 2015 07:31:40 +0000 (00:31 -0700)]
Add myself to heap owners

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

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

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

8 years agoMIPS64: Fix unittests (to not use invalid load representation).
paul.lind [Tue, 15 Sep 2015 21:28:13 +0000 (14:28 -0700)]
MIPS64: Fix unittests (to not use invalid load representation).

Same as https://codereview.chromium.org/1340303002/

BUG=

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

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

8 years ago[Atomics] Remove support for atomic accesses on floating-point values.
binji [Tue, 15 Sep 2015 21:24:50 +0000 (14:24 -0700)]
[Atomics] Remove support for atomic accesses on floating-point values.

R=jarin@chromium.org

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

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

8 years agoFix spread operator in ArrayLiterals when nested in other literals
adamk [Tue, 15 Sep 2015 16:43:29 +0000 (09:43 -0700)]
Fix spread operator in ArrayLiterals when nested in other literals

Mark ArrayLiterals utilizing the spread operator as non-simple.
This causes them to return false for IsCompileTimeValue, and thus
causes spread to work as expected in nested literals.

BUG=v8:4417
LOG=y

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

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

8 years ago[mips] Fix mips unittests (to not use invalid load representation).
jarin [Tue, 15 Sep 2015 15:50:32 +0000 (08:50 -0700)]
[mips] Fix mips unittests (to not use invalid load representation).

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

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

8 years agoRevert of [heap] Concurrency support for heap book-keeping info (patchset #4 id:60001...
mlippautz [Tue, 15 Sep 2015 15:11:36 +0000 (08:11 -0700)]
Revert of [heap] Concurrency support for heap book-keeping info (patchset #4 id:60001 of https://codereview.chromium.org/1340923004/ )

Reason for revert:
crashing: http://build.chromium.org/p/client.v8/builders/V8%20Win32%20-%20debug%20-%203/builds/4716

Original issue's description:
> [heap] Concurrency support for heap book-keeping info.
>
> Adds concurrency support for:
> - MemoryChunk: Fragmentation counters
> - MemoryChunk: High-water mark
> - MemoryAllocator: Lowest and highest ever allocated addresses, size, and
>   capacity
>
> R=hpayer@chromium.org
> BUG=chromium:524425
> LOG=N
>
> Committed: https://crrev.com/63190721cda4966e01d71e92a730ce48ea789fbc
> Cr-Commit-Position: refs/heads/master@{#30749}

TBR=hpayer@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=chromium:524425

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

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

8 years agoAdd barriers to atomic utils.
mlippautz [Tue, 15 Sep 2015 14:58:44 +0000 (07:58 -0700)]
Add barriers to atomic utils.

Loads get an acquire, store/cas a release. Increment gets a full barrier.

R=hpayer@chromium.org
BUG=

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

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

8 years ago[es6] Move builtin constructors for primitives to strict mode.
bmeurer [Tue, 15 Sep 2015 14:32:25 +0000 (07:32 -0700)]
[es6] Move builtin constructors for primitives to strict mode.

The ES6 specification says that "Built-in functions that are ECMAScript
function objects must be strict mode functions", which in particular
means that you can never test for them using the "caller" field of a
sloppy mode function.

CQ_INCLUDE_TRYBOTS=tryserver.v8:v8_linux_layout_dbg,v8_linux_nosnap_dbg
R=mstarzinger@chromium.org
BUG=v8:105
LOG=n

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

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

8 years ago[heap] Concurrency support for heap book-keeping info.
mlippautz [Tue, 15 Sep 2015 13:50:26 +0000 (06:50 -0700)]
[heap] Concurrency support for heap book-keeping info.

Adds concurrency support for:
- MemoryChunk: Fragmentation counters
- MemoryChunk: High-water mark
- MemoryAllocator: Lowest and highest ever allocated addresses, size, and
  capacity

R=hpayer@chromium.org
BUG=chromium:524425
LOG=N

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

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

8 years ago[heap] Extend mutex guards for CodeRange.
mlippautz [Tue, 15 Sep 2015 13:45:18 +0000 (06:45 -0700)]
[heap] Extend mutex guards for CodeRange.

Previously the mutex only guarded free_list_. The extension covers also
allocation_list_.

BUG=chromium:524425
LOG=N

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

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

8 years ago[runtime] Replace the EQUALS builtin with proper Object::Equals.
bmeurer [Tue, 15 Sep 2015 13:14:36 +0000 (06:14 -0700)]
[runtime] Replace the EQUALS builtin with proper Object::Equals.

Move the implementation of the Abstract Equality Comparison to the
runtime and thereby remove the EQUALS dispatcher builtin. Also remove
the various runtime entry points that were only used to support the
EQUALS builtin.

Now the Abstract Equality Comparison is also using the correct
ToPrimitive implementation, which properly supports @@toPrimitive.

CQ_INCLUDE_TRYBOTS=tryserver.v8:v8_linux_layout_dbg,v8_linux_nosnap_dbg
R=mstarzinger@chromium.org
BUG=v8:4307
LOG=n

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

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

8 years ago[heap] Move slots buffer into a separate file.
hpayer [Tue, 15 Sep 2015 12:35:05 +0000 (05:35 -0700)]
[heap] Move slots buffer into a separate file.

BUG=

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

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

8 years agoX87: [Interpreter] Add support for JS calls.
chunyang.dai [Tue, 15 Sep 2015 12:24:48 +0000 (05:24 -0700)]
X87: [Interpreter] Add support for JS calls.

port e7fb233946b990ecbbbd76cc6529f62bd5da64e3 (r30710).

original commit message:

    Adds support for JS calls to the interpreter. In order to support
    calls from the interpreter, the PushArgsAndCall builtin is added
    which pushes a sequence of arguments onto the stack and calls
    builtin::Call.

    Adds the Call bytecode.

BUG=

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

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

8 years agoX87: [builtins] Simplify String constructor code.
chunyang.dai [Tue, 15 Sep 2015 12:16:35 +0000 (05:16 -0700)]
X87: [builtins] Simplify String constructor code.

port eadfd666318c1dd959d7fac7c27538ef478a8b72 (r30706).

original commit message:

    The String constructor was somewhat complex with a lot of micro
    optimizations that are not relevant or even misguided. It would be
    really hard to port that code to ES6, which requires String to be
    subclassable. So as a first step we reduced the necessary complexity
    to the bare minimum (also removing the last user of the fairly complex
    MacroAssembler::LookupNumberStringCache method).

    This also removes the counters for the String constructor, which
    were not properly exposed anymore (and not kept in sync with inlined
    versions of the String constructor anyway).

BUG=

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

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

8 years agoX87: Make FlushICache part of Assembler(Base) and take Isolate as parameter.
chunyang.dai [Tue, 15 Sep 2015 11:51:38 +0000 (04:51 -0700)]
X87: Make FlushICache part of Assembler(Base) and take Isolate as parameter.

port 9fc4fc141fa1d1aa1a3ccb901518cdffa0d6d268 (r30695).

BUG=

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

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

8 years ago[heap] Let caller figure out target space for evacuation when compacting.
mlippautz [Tue, 15 Sep 2015 11:44:48 +0000 (04:44 -0700)]
[heap] Let caller figure out target space for evacuation when compacting.

R=hpayer@chromium.org
BUG=chromium:524425
LOG=N

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

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

8 years agoX87: [builtins] Remove the weird STACK_OVERFLOW builtin.
chunyang.dai [Tue, 15 Sep 2015 11:31:13 +0000 (04:31 -0700)]
X87: [builtins] Remove the weird STACK_OVERFLOW builtin.

port 39604dda567b9ba9f4dcfe42f95471f30ec7cb6b (r30693).

original commit message:

    Just use a %ThrowStackOverflow runtime function instead, which
    does the trick, especially since the Isolate already has a
    preallocated StackOverflow error for that.

BUG=

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

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

8 years agoX87: [stubs] Simplify the non-function case of CallConstructStub.
chunyang.dai [Tue, 15 Sep 2015 11:26:51 +0000 (04:26 -0700)]
X87: [stubs] Simplify the non-function case of CallConstructStub.

port 622fa0ea21b3517b1feaed447c87e580bafac865 (r30691).

original commit message:

    Currently we do this dance between the CallConstructStub, the
    CALL_* builtins and the %GetConstructorDelegate, %GetProxyTrap,
    and %Apply runtime functions for every [[Construct]] operation on
    non-function callables. This is complexity is unnecessary, and can
    be simplified to work without any JS builtin. This will also make it
    a lot easier to implement ES6 compliant [[Construct]] for proxies.

    Also sanitize the invariant for CallConstructStub, which up until now
    always restored the context itself, but that force us to always create
    another copy of all arguments in case of proxies and other callables,
    so we can relax that constraint by making the caller restore the context
    (this only affects fullcodegen, since the optimizing compilers already
    properly restore the context anyway).

BUG=

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

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

8 years agoX87: Vector ICs: The Oracle needs to report feedback for the object literals and...
chunyang.dai [Tue, 15 Sep 2015 11:20:36 +0000 (04:20 -0700)]
X87: Vector ICs: The Oracle needs to report feedback for the object literals and the count operation.

port 752b0308df72461bfeb644bf6dd8dd331fcdb722 (r30686).

original commit message:

    The refactoring is because it's awkward and error-prone to deterimine which IC slot an
    ObjectLiteralProperty uses for feedback. The fix is for each one to know it's own slot. In the
    numbering pass, we allocate slots for the ObjectLiteral, then hand out those slots into the
    properties.

    It adds one word to the ObjectLiteralProperty expression - I'm investigating if thats a
    problem.

    This changes makes compiling the object literal cleaner across the three compilers. Also, the
    slot allocation logic in ObjectLiteral::ComputeFeedbackRequirements() was refactoring to mimic
    the style in full-codegen. This is useful since it must remain in sync with
    FullCodegen::VisitObjectLiteral().

BUG=

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

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

8 years ago[turbofan] Fix JSInliner to handle non-returning bodies.
mstarzinger [Tue, 15 Sep 2015 11:19:02 +0000 (04:19 -0700)]
[turbofan] Fix JSInliner to handle non-returning bodies.

The assumption that every function body produces a value does not hold
for functions that e.g. unconditionally throw or endlessly loop. This
fixes the inlining logic to handle such cases.

R=bmeurer@chromium.org
TEST=mjsunit/regress/regress-crbug-530598
BUG=chromium:530598
LOG=n

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

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

8 years agoReland VectorICs: ia32 store ics need a virtual register.
mvstanton [Tue, 15 Sep 2015 10:14:11 +0000 (03:14 -0700)]
Reland VectorICs: ia32 store ics need a virtual register.

(reason for revert/reland: patch incorrectly left --vector-stores flag
 on, helpfully revealing some gcstress issues to look at, but they
 don't need to block this CL).

Some pretty hacky code was used to carry out the tail-call
handler dispatch on ia32 vector stores due to a lack
of free registers. It really tanks performance. A better
approach is to use a virtual register on the isolate.

BUG=
TBR=jkummerow@chromium.org, vogelheim@chromium.org

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

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

8 years agobuiltins.cc return PackedElementsKind where applicable
cbruni [Tue, 15 Sep 2015 09:08:28 +0000 (02:08 -0700)]
builtins.cc return PackedElementsKind where applicable

Returning a result array with holey elements kind in where we actually have a packed kind causes performance regressions.

LOG=N
BUG=chromium:531357

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

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

8 years ago[turbofan] Model arguments object materialization in graph.
mstarzinger [Tue, 15 Sep 2015 09:07:21 +0000 (02:07 -0700)]
[turbofan] Model arguments object materialization in graph.

This models the materialization of arguments objects in the prologue
within the IR graph. It will in turn allow us to optimize access to
these objects and also correctly handle them with inlining.

R=bmeurer@chromium.org,mvstanton@chromium.org
TEST=cctest/test-run-jsobjects/Arguments*

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

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

8 years agoPort cfi blacklist from chromium.
machenbach [Tue, 15 Sep 2015 08:45:34 +0000 (01:45 -0700)]
Port cfi blacklist from chromium.

BUG=chromium:515782
LOG=n

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

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

8 years agoRemove transitional GN code.
brettw [Tue, 15 Sep 2015 08:43:25 +0000 (01:43 -0700)]
Remove transitional GN code.

The conditionals were added to facilitate a two-sided build GN config update
where the default optimization config was renamed. This is complete so the
transitional code can be removed.

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

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

8 years ago[Interpreter] Avoid shadowing variables in the bytecode graph builder.
oth [Tue, 15 Sep 2015 08:18:23 +0000 (01:18 -0700)]
[Interpreter] Avoid shadowing variables in the bytecode graph builder.

Reported by Bruce Dawson.

BUG=v8:4280
LOG=N

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

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

8 years ago[test] More robust perf runner with profiler option.
machenbach [Tue, 15 Sep 2015 08:15:54 +0000 (01:15 -0700)]
[test] More robust perf runner with profiler option.

NOTRY=true

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

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

8 years ago[Docs] Add information on how to contribute to the README
hablich [Tue, 15 Sep 2015 07:52:58 +0000 (00:52 -0700)]
[Docs] Add information on how to contribute to the README

I noticed after reading a few GitHub comments that the information
about contributing to V8 is hard to find. I think it makes sense
to add this information to the README.

NOTRY=true
R=jochen@chromium.org, seththompson@chromium.org
LOG=N

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

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

8 years agoMIPS: Fix testcases r6_beqzc and mov.
Ilija.Pavlovic [Tue, 15 Sep 2015 07:36:59 +0000 (00:36 -0700)]
MIPS: Fix testcases r6_beqzc and mov.

Remove incorrect usage of callee-saved FPU regs (f20 and above).
Also remove unnecessary push/pop which were occasionally unpaired,
and caused crash.

TEST=cctest/test-assembler-mips[64]
BUG=

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

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

8 years agoFix printing of types and do some cleanups.
neis [Tue, 15 Sep 2015 06:41:54 +0000 (23:41 -0700)]
Fix printing of types and do some cleanups.

R=jarin
BUG=

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

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

8 years agoRevert of [crankshaft] Re-add fast-case for string add left/right. (patchset #1 id...
machenbach [Tue, 15 Sep 2015 06:40:36 +0000 (23:40 -0700)]
Revert of [crankshaft] Re-add fast-case for string add left/right. (patchset #1 id:1 of https://codereview.chromium.org/1339053002/ )

Reason for revert:
[Sheriff] Fails mozilla with deadcode:
http://build.chromium.org/p/client.v8/builders/V8%20Linux%20-%20deadcode/builds/5357

Original issue's description:
> [crankshaft] Re-add fast-case for string add left/right.
>
> Now the StringAddStub can optionally convert it's parameters to strings
> (following the rules for the addition operator). This could be further
> optimized once we have a ToPrimitiveStub, but it should be sufficient
> for the moment.
>
> Also removed the unused Strength parameter to the HStringAdd operator,
> because string addition does not depend on language mode.
>
> CQ_INCLUDE_TRYBOTS=tryserver.v8:v8_win_nosnap_shared_rel,v8_linux_nosnap_dbg
> R=mstarzinger@chromium.org
> BUG=v8:4307
> LOG=n
>
> Committed: https://crrev.com/d261849e53fbf8c36efae42d478271f87acff70f
> Cr-Commit-Position: refs/heads/master@{#30726}

TBR=mstarzinger@chromium.org,jarin@chromium.org,bmeurer@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=v8:4307

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

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

8 years ago[crankshaft] Re-add fast-case for string add left/right.
bmeurer [Tue, 15 Sep 2015 06:00:33 +0000 (23:00 -0700)]
[crankshaft] Re-add fast-case for string add left/right.

Now the StringAddStub can optionally convert it's parameters to strings
(following the rules for the addition operator). This could be further
optimized once we have a ToPrimitiveStub, but it should be sufficient
for the moment.

Also removed the unused Strength parameter to the HStringAdd operator,
because string addition does not depend on language mode.

CQ_INCLUDE_TRYBOTS=tryserver.v8:v8_win_nosnap_shared_rel,v8_linux_nosnap_dbg
R=mstarzinger@chromium.org
BUG=v8:4307
LOG=n

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

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

8 years ago[turbofan] Limit the load/store machine types to the ones we actually use.
jarin [Tue, 15 Sep 2015 05:45:20 +0000 (22:45 -0700)]
[turbofan] Limit the load/store machine types to the ones we actually use.

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

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

8 years agoUpdate V8 DEPS.
v8-autoroll [Tue, 15 Sep 2015 03:25:54 +0000 (20:25 -0700)]
Update V8 DEPS.

Rolling v8/buildtools to f7310ee61725e68b1c8921e381830362cf4f0999

TBR=machenbach@chromium.org,vogelheim@chromium.org,hablich@chromium.org

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

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

8 years agoRemoving function filtering from the v8 sampling
alph [Tue, 15 Sep 2015 01:21:42 +0000 (18:21 -0700)]
Removing function filtering from the v8 sampling

Filtering out functions does not allow sample processor
to figure out if a sample hit a non-frame region of a function.

The filtering should be done in the frontend.

BUG=chromium:529931
LOG=N

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

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

8 years agoPPC: [builtins] Simplify String constructor code.
mbrandy [Mon, 14 Sep 2015 23:16:35 +0000 (16:16 -0700)]
PPC: [builtins] Simplify String constructor code.

Port eadfd666318c1dd959d7fac7c27538ef478a8b72

Original commit message:
    The String constructor was somewhat complex with a lot of micro
    optimizations that are not relevant or even misguided. It would be
    really hard to port that code to ES6, which requires String to be
    subclassable. So as a first step we reduced the necessary complexity
    to the bare minimum (also removing the last user of the fairly complex
    MacroAssembler::LookupNumberStringCache method).

    This also removes the counters for the String constructor, which
    were not properly exposed anymore (and not kept in sync with inlined
    versions of the String constructor anyway).

R=bmeurer@chromium.org, joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com, dstence@us.ibm.com
BUG=

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

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

8 years agoPPC: [Interpreter] Add support for JS calls.
mbrandy [Mon, 14 Sep 2015 23:15:28 +0000 (16:15 -0700)]
PPC: [Interpreter] Add support for JS calls.

Port e7fb233946b990ecbbbd76cc6529f62bd5da64e3

Original commit message:
    Adds support for JS calls to the interpreter. In order to support
    calls from the interpreter, the PushArgsAndCall builtin is added
    which pushes a sequence of arguments onto the stack and calls
    builtin::Call.

    Adds the Call bytecode.

R=rmcilroy@chromium.org, joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com, dstence@us.ibm.com
BUG=v8:4280
LOG=N

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

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

8 years ago[test] Add an option to the perf runner to support running with the internal profiler.
gdeepti [Mon, 14 Sep 2015 23:14:20 +0000 (16:14 -0700)]
[test] Add an option to the perf runner to support running with the internal profiler.

Enhance the perf runner to run with the profiler and print the summary for each d8 run. This automates running the profiler with multiple benchmarks.

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

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

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

8 years agoRevert of VectorICs: ia32 store ics need a virtual register. (patchset #3 id:40001...
machenbach [Mon, 14 Sep 2015 18:58:49 +0000 (11:58 -0700)]
Revert of VectorICs: ia32 store ics need a virtual register. (patchset #3 id:40001 of https://codereview.chromium.org/1336313002/ )

Reason for revert:
[Sheriff] Breaks GC stress on mac:
http://build.chromium.org/p/client.v8/builders/V8%20Mac%20GC%20Stress/builds/2536

Original issue's description:
> VectorICs: ia32 store ics need a virtual register.
>
> Some pretty hacky code was used to carry out the tail-call
> handler dispatch on ia32 vector stores due to a lack
> of free registers. It really tanks performance. A better
> approach is to use a virtual register on the isolate.
>
> BUG=
>
> Committed: https://crrev.com/b26e98f19b5e77df50cb4a259f099ee6afa335e3
> Cr-Commit-Position: refs/heads/master@{#30718}

TBR=jkummerow@chromium.org,vogelheim@chromium.org,mvstanton@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=

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

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

8 years agoVectorICs: ia32 store ics need a virtual register.
mvstanton [Mon, 14 Sep 2015 14:49:22 +0000 (07:49 -0700)]
VectorICs: ia32 store ics need a virtual register.

Some pretty hacky code was used to carry out the tail-call
handler dispatch on ia32 vector stores due to a lack
of free registers. It really tanks performance. A better
approach is to use a virtual register on the isolate.

BUG=

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

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

8 years agoelements.cc CopyDoubleToObjectElements: avoid excessive HandleScopes
cbruni [Mon, 14 Sep 2015 14:29:46 +0000 (07:29 -0700)]
elements.cc CopyDoubleToObjectElements: avoid excessive HandleScopes

BUG=

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

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

8 years ago[heap] No leakage of objects-visiting.h outside of heap.
mstarzinger [Mon, 14 Sep 2015 12:28:34 +0000 (05:28 -0700)]
[heap] No leakage of objects-visiting.h outside of heap.

This prevents the internal objects-visiting.h to be usable outisde of
the "heap" directory. The static object visitation is only usefull
within the GC and is now properly encapsulated.

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

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

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

8 years agoUsing GetMoreGeneralElementsKind in more places
cbruni [Mon, 14 Sep 2015 12:16:54 +0000 (05:16 -0700)]
Using GetMoreGeneralElementsKind in more places

BUG=

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

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

8 years ago[loggers] Guard object/code move events using mutexes.
mlippautz [Mon, 14 Sep 2015 12:06:43 +0000 (05:06 -0700)]
[loggers] Guard object/code move events using mutexes.

Parallel compaction, i.e., concurrently moving of objects (and code) requires
proper synchronization in the logger.

R=hpayer@chromium.org
BUG=chromium:524425
LOG=N

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

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

8 years agoFix initialization order (setup) for JSArrayBuffer objects.
mlippautz [Mon, 14 Sep 2015 11:59:14 +0000 (04:59 -0700)]
Fix initialization order (setup) for JSArrayBuffer objects.

BUG=chromium:531322
LOG=N
R=jochen@chromium.org

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

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

8 years ago[heap] Separate scavenger functionality into own file.
mstarzinger [Mon, 14 Sep 2015 11:44:20 +0000 (04:44 -0700)]
[heap] Separate scavenger functionality into own file.

This moves scavenging functionality into a separate component so that
neither the scavenger nor objects-visiting need to be exposed outside
the heap.

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

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

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

8 years agoPreserve the ElementsKind in builtin.cc Slice early return
cbruni [Mon, 14 Sep 2015 10:32:35 +0000 (03:32 -0700)]
Preserve the ElementsKind in builtin.cc Slice early return

LOG=N

BUG=chromium:531348

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

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

8 years ago[Interpreter] Add support for JS calls.
rmcilroy [Mon, 14 Sep 2015 10:05:18 +0000 (03:05 -0700)]
[Interpreter] Add support for JS calls.

Adds support for JS calls to the interpreter. In order to support
calls from the interpreter, the PushArgsAndCall builtin is added
which pushes a sequence of arguments onto the stack and calls
builtin::Call.

Adds the Call bytecode.

MIPS port contributed by akos.palfi@imgtec.com in https://codereview.chromium.org/1334873002/

BUG=v8:4280
LOG=N

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

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

8 years agoMake --turbo-stats output more self-explanatory.
neis [Mon, 14 Sep 2015 09:25:18 +0000 (02:25 -0700)]
Make --turbo-stats output more self-explanatory.

BUG=

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

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

8 years agoConstruct Range rather than Constant when typing integers.
neis [Mon, 14 Sep 2015 09:23:19 +0000 (02:23 -0700)]
Construct Range rather than Constant when typing integers.

Also clarify some comments.

R=jarin@chromium.org
BUG=

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

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

8 years ago[builtins] Remove STRING_ADD_LEFT and STRING_ADD_RIGHT builtins.
bmeurer [Mon, 14 Sep 2015 08:40:44 +0000 (01:40 -0700)]
[builtins] Remove STRING_ADD_LEFT and STRING_ADD_RIGHT builtins.

These builtins present an optimization for the general addition case,
where one side is already known to be a string. Unfortunately this
optimization is wrong in the presence of @@toPrimitive (there are some
ideas how to implement a similar optimization using the prototype
backpointer mechanism that jkummerow@ introduced earlier). So this
also removes the broken %_IsStringWrapperSafeForDefaultValueOf, which is
the key part of the optimization mentioned above.

R=mstarzinger@chromium.org
BUG=v8:4307
LOG=n

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

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

8 years ago[builtins] Simplify String constructor code.
bmeurer [Mon, 14 Sep 2015 07:51:07 +0000 (00:51 -0700)]
[builtins] Simplify String constructor code.

The String constructor was somewhat complex with a lot of micro
optimizations that are not relevant or even misguided. It would be
really hard to port that code to ES6, which requires String to be
subclassable. So as a first step we reduced the necessary complexity
to the bare minimum (also removing the last user of the fairly complex
MacroAssembler::LookupNumberStringCache method).

This also removes the counters for the String constructor, which
were not properly exposed anymore (and not kept in sync with inlined
versions of the String constructor anyway).

R=jarin@chromium.org

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

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

8 years agoFixing Sloppy Symbol.iterator setter
cbruni [Mon, 14 Sep 2015 07:19:58 +0000 (00:19 -0700)]
Fixing Sloppy Symbol.iterator setter
In certiain cases the ArgumentsIteratorSetter would trigger an invalid
state in the LookupIterator when being overridden. This is now solved
by bypassing the SetDataProperty and directly using
DefinePropertyOrElementIgnoringAttributes since we know exactly which
property we're going to install

LOG=N
BUG=chromium:521484

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

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

8 years agoWhitespace change to test gnumbd for master branch.
tandrii [Sun, 13 Sep 2015 19:35:29 +0000 (12:35 -0700)]
Whitespace change to test gnumbd for master branch.

R=machenbach@chromium.org
BUG=530941
NOTRY=true
NOPRESUBMIT=true

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

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

8 years agoOptionally use new GN optimization config.
brettw [Fri, 11 Sep 2015 18:28:15 +0000 (11:28 -0700)]
Optionally use new GN optimization config.

The GN default optimization flag is changing from being specific to the
debug/release status of the build to always being "default_optimization" so
it's easier to override without being conditional on the exact setup in
BUILDCONFIG.gn. See https://codereview.chromium.org/1324623005/

Since V8 is DEPS-ed in, it will need to support both modes to allow a landing.
This patch uses a temporary transitional flag I added to BUILDCONFIG to
indicate which variant should be used. After the patch is landed, we can remove
the new conditions and just remove default_optimization.

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

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

8 years agoProfiler code clean-up
yurys [Fri, 11 Sep 2015 16:29:55 +0000 (09:29 -0700)]
Profiler code clean-up

BUG=None
LOG=N

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

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

8 years ago[MIPS] Remove obsolete MacroAssembler::FlushICache.
mstarzinger [Fri, 11 Sep 2015 16:00:44 +0000 (09:00 -0700)]
[MIPS] Remove obsolete MacroAssembler::FlushICache.

R=mlippautz@chromium.org

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

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

8 years agoMIPS: Save and restore callee-saved FP registers in cctest/ConvertDToI.
akos.palfi [Fri, 11 Sep 2015 15:31:08 +0000 (08:31 -0700)]
MIPS: Save and restore callee-saved FP registers in cctest/ConvertDToI.

Correctly save and restore FP registers in cctest/ConvertDToI to
avoid accidental register overwriting by the generated code.

Note: This failure is manifested only in R6 mode.

TEST=test/cctest/interpreter/test-interpreter
BUG=

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

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

8 years agoMIPS: Refine '[stubs] Simplify the non-function case of CallConstructStub.'
balazs.kilvady [Fri, 11 Sep 2015 15:12:37 +0000 (08:12 -0700)]
MIPS: Refine '[stubs] Simplify the non-function case of CallConstructStub.'

Port 622fa0ea21b3517b1feaed447c87e580bafac865

Original commit message:
Currently we do this dance between the CallConstructStub, the
CALL_* builtins and the %GetConstructorDelegate, %GetProxyTrap,
and %Apply runtime functions for every [[Construct]] operation on
non-function callables. This is complexity is unnecessary, and can
be simplified to work without any JS builtin. This will also make it
a lot easier to implement ES6 compliant [[Construct]] for proxies.

Also sanitize the invariant for CallConstructStub, which up until now
always restored the context itself, but that force us to always create
another copy of all arguments in case of proxies and other callables,
so we can relax that constraint by making the caller restore the context
(this only affects fullcodegen, since the optimizing compilers already
properly restore the context anyway).

BUG=

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

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

8 years agoPPC: Make FlushICache part of Assembler(Base) and take Isolate as parameter.
mbrandy [Fri, 11 Sep 2015 15:09:56 +0000 (08:09 -0700)]
PPC: Make FlushICache part of Assembler(Base) and take Isolate as parameter.

Port 9fc4fc141fa1d1aa1a3ccb901518cdffa0d6d268

R=mlippautz@chromium.org, joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com, dstence@us.ibm.com
BUG=chromium:524425
LOG=N

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

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

8 years agoPPC: [builtins] Remove the weird STACK_OVERFLOW builtin.
mbrandy [Fri, 11 Sep 2015 15:08:49 +0000 (08:08 -0700)]
PPC: [builtins] Remove the weird STACK_OVERFLOW builtin.

Port 39604dda567b9ba9f4dcfe42f95471f30ec7cb6b

Original commit message:
    Just use a %ThrowStackOverflow runtime function instead, which
    does the trick, especially since the Isolate already has a
    preallocated StackOverflow error for that.

R=bmeurer@chromium.org, joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com, dstence@us.ibm.com
BUG=

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

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

8 years agoPPC: [stubs] Simplify the non-function case of CallConstructStub.
mbrandy [Fri, 11 Sep 2015 15:07:42 +0000 (08:07 -0700)]
PPC: [stubs] Simplify the non-function case of CallConstructStub.

Port 622fa0ea21b3517b1feaed447c87e580bafac865

Original commit message:
    Currently we do this dance between the CallConstructStub, the
    CALL_* builtins and the %GetConstructorDelegate, %GetProxyTrap,
    and %Apply runtime functions for every [[Construct]] operation on
    non-function callables. This is complexity is unnecessary, and can
    be simplified to work without any JS builtin. This will also make it
    a lot easier to implement ES6 compliant [[Construct]] for proxies.

    Also sanitize the invariant for CallConstructStub, which up until now
    always restored the context itself, but that force us to always create
    another copy of all arguments in case of proxies and other callables,
    so we can relax that constraint by making the caller restore the context
    (this only affects fullcodegen, since the optimizing compilers already
    properly restore the context anyway).

R=bmeurer@chromium.org, joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com, dstence@us.ibm.com
BUG=

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

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

8 years agoMake FlushICache part of Assembler(Base) and take Isolate as parameter.
mlippautz [Fri, 11 Sep 2015 12:59:30 +0000 (05:59 -0700)]
Make FlushICache part of Assembler(Base) and take Isolate as parameter.

BUG=chromium:524425
LOG=N

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

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

8 years agoWhitespace change to smoke-test auto-bisect.
Michael Achenbach [Fri, 11 Sep 2015 11:35:36 +0000 (13:35 +0200)]
Whitespace change to smoke-test auto-bisect.

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

8 years ago[builtins] Remove the weird STACK_OVERFLOW builtin.
bmeurer [Fri, 11 Sep 2015 10:21:27 +0000 (03:21 -0700)]
[builtins] Remove the weird STACK_OVERFLOW builtin.

Just use a %ThrowStackOverflow runtime function instead, which
does the trick, especially since the Isolate already has a
preallocated StackOverflow error for that.

R=mstarzinger@chromium.org

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

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

8 years agoVector ICs: gyp flag to run with vector-stores on.
mvstanton [Fri, 11 Sep 2015 10:00:05 +0000 (03:00 -0700)]
Vector ICs: gyp flag to run with vector-stores on.

This is so we can build with the flag on in the snapshot.
D8 then needs to be run with --vector-stores.

BUG=
R=machenbach@chromium.org

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

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

8 years ago[stubs] Simplify the non-function case of CallConstructStub.
bmeurer [Fri, 11 Sep 2015 09:45:04 +0000 (02:45 -0700)]
[stubs] Simplify the non-function case of CallConstructStub.

Currently we do this dance between the CallConstructStub, the
CALL_* builtins and the %GetConstructorDelegate, %GetProxyTrap,
and %Apply runtime functions for every [[Construct]] operation on
non-function callables. This is complexity is unnecessary, and can
be simplified to work without any JS builtin. This will also make it
a lot easier to implement ES6 compliant [[Construct]] for proxies.

Also sanitize the invariant for CallConstructStub, which up until now
always restored the context itself, but that force us to always create
another copy of all arguments in case of proxies and other callables,
so we can relax that constraint by making the caller restore the context
(this only affects fullcodegen, since the optimizing compilers already
properly restore the context anyway).

R=mstarzinger@chromium.org

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

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

8 years ago[turbofan] Greedy: live range grouping.
mtrofin [Fri, 11 Sep 2015 05:35:41 +0000 (22:35 -0700)]
[turbofan] Greedy: live range grouping.

Grouping of live ranges that would be beneficial if
allocated on the same register. Currently, that means phi
outputs and inputs.

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

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

8 years agoPPC: Vector ICs: The Oracle needs to report feedback for the object literals and...
mbrandy [Thu, 10 Sep 2015 19:18:22 +0000 (12:18 -0700)]
PPC: Vector ICs: The Oracle needs to report feedback for the object literals and the count operation.

Port 752b0308df72461bfeb644bf6dd8dd331fcdb722

Original commit message:
    The refactoring is because it's awkward and error-prone to deterimine which IC slot an
    ObjectLiteralProperty uses for feedback. The fix is for each one to know it's own slot. In the
    numbering pass, we allocate slots for the ObjectLiteral, then hand out those slots into the
    properties.

    It adds one word to the ObjectLiteralProperty expression - I'm investigating if thats a
    problem.

    This changes makes compiling the object literal cleaner across the three compilers. Also, the
    slot allocation logic in ObjectLiteral::ComputeFeedbackRequirements() was refactoring to mimic
    the style in full-codegen. This is useful since it must remain in sync with
    FullCodegen::VisitObjectLiteral().

R=mvstanton@chromium.org, joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com, dstence@us.ibm.com
BUG=

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

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

8 years agoProfiler: resolve top of stack address to a function
yurys [Thu, 10 Sep 2015 17:45:39 +0000 (10:45 -0700)]
Profiler: resolve top of stack address to a function

When we cannot map top frame's pc to a code object and top frame is JS frame we now assume that it was a frameless invocation of a native function (e.g. __fmod) and try to resolve address on top of the stack into a JS function.

BUG=chromium:529931
LOG=Y

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

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

8 years ago[Interpreter] Skeleton bytecode graph builder
oth [Thu, 10 Sep 2015 16:21:34 +0000 (09:21 -0700)]
[Interpreter] Skeleton bytecode graph builder

Add skeleton version bytecode-graph-builder.{h,cc} for existing
bytecodes.

BUG=v8:4280
LOG=N

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

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

8 years agoVector ICs: The Oracle needs to report feedback for the object literals and the count...
mvstanton [Thu, 10 Sep 2015 15:02:21 +0000 (08:02 -0700)]
Vector ICs: The Oracle needs to report feedback for the object literals and the count operation.

The refactoring is because it's awkward and error-prone to deterimine which IC slot an
ObjectLiteralProperty uses for feedback. The fix is for each one to know it's own slot. In the
numbering pass, we allocate slots for the ObjectLiteral, then hand out those slots into the
properties.

It adds one word to the ObjectLiteralProperty expression - I'm investigating if thats a
problem.

This changes makes compiling the object literal cleaner across the three compilers. Also, the
slot allocation logic in ObjectLiteral::ComputeFeedbackRequirements() was refactoring to mimic
the style in full-codegen. This is useful since it must remain in sync with
FullCodegen::VisitObjectLiteral().

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

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

8 years agoParsing especially large nested functions takes up more memory than necessary.
conradw [Thu, 10 Sep 2015 14:40:57 +0000 (07:40 -0700)]
Parsing especially large nested functions takes up more memory than necessary.
Inner functions must be eagerly parsed for scope analysis, but the full AST is
also kept around even though it's not needed.

This CL mitigates this problem by allocating some AstNodes of the inner function
to a temporary Zone which is deallocated once the scope information has been
built. The remaining nodes (such as VariableProxy) must persist until scope
analysis actually happens, and have to be allocated to a parser-persistent Zone.

BUG=417697
LOG=N

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

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

8 years agoEnable loads and stores to global vars through property cell shortcuts installed...
ishell [Thu, 10 Sep 2015 14:21:18 +0000 (07:21 -0700)]
Enable loads and stores to global vars through property cell shortcuts installed into parent script context.

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

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

8 years agoAdd instrumentation to track down a crasher
jkummerow [Thu, 10 Sep 2015 14:07:39 +0000 (07:07 -0700)]
Add instrumentation to track down a crasher

LoadICs must always return a JS-accessible value (nothing internal).
Dictionary property keys are guaranteed to be unique names.

BUG=chromium:527994
LOG=n

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

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

8 years ago[es6] fixup for rest parameters perf test
caitpotter88 [Thu, 10 Sep 2015 13:44:58 +0000 (06:44 -0700)]
[es6] fixup for rest parameters perf test

BUG=v8:2160
LOG=N
NOTRY=true
R=adamk, machenbach@chromium.org, rossberg

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

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

8 years agoContinuing removing deprecated functions from cctests
mythria [Thu, 10 Sep 2015 13:09:53 +0000 (06:09 -0700)]
Continuing removing deprecated functions from cctests

Removes deprecated functions from:
- test-unique.cc
- test-unscopables-hidden-prototype.cc
- test-utils-arm64.cc
- test-utils.cc
- test-version.cc
- test-weakmaps.cc
- test-weaksets.cc
- trace-extension.cc
- trace-extension.h

BUG=v8:4134
LOG=n

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

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

8 years ago[runtime] Move binary operator fallbacks into the runtime.
bmeurer [Thu, 10 Sep 2015 13:04:15 +0000 (06:04 -0700)]
[runtime] Move binary operator fallbacks into the runtime.

Replace the ADD, SUB, etc. builtins with proper runtime implementations,
and expose them as runtime calls that can be used by the code stubs and
the interpreter (for now).

Also remove all the support runtime functions for ADD, SUB and friends,
namely %NumberAdd, %NumberSub, and so on.

R=mstarzinger@chromium.org
CQ_INCLUDE_TRYBOTS=tryserver.v8:v8_linux_layout_dbg,v8_linux_nosnap_dbg

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

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

8 years agoDo not look for the slot in the ScopeInfo's global range when it's not necessary.
ishell [Thu, 10 Sep 2015 12:54:53 +0000 (05:54 -0700)]
Do not look for the slot in the ScopeInfo's global range when it's not necessary.

This fixes the Runtime_DeclareGlobals performance regression caused by a huge number of global var declarations mentioned in chromium:517778.

BUG=chromium:517778
LOG=N

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

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

8 years agoTypedArray accessor detection: consider entire prototype chain
fedor [Thu, 10 Sep 2015 12:21:47 +0000 (05:21 -0700)]
TypedArray accessor detection: consider entire prototype chain

When looking up a special accessor for known TypedArray fields
("length", "byteLength", "byteOffset"), consider the entire prototype
chain, not only the direct prototype.
This allows subclasses of TypedArrays to benefit from fast specialized
accesses.

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

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

8 years agoFix for v8:4380 introduced a regression in Octane crypto.
mvstanton [Thu, 10 Sep 2015 11:38:07 +0000 (04:38 -0700)]
Fix for v8:4380 introduced a regression in Octane crypto.

Narrowed the scope of the fix, to make a best effort to avoid DEOPT in
case the hole is loaded, but not to permute the choice of a consolidated
load in case that effort fails.

BUG=chromium:530005
LOG=N

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

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

8 years agoAdding template parameter to PrototypeIterator GetCurrent
cbruni [Thu, 10 Sep 2015 10:56:06 +0000 (03:56 -0700)]
Adding template parameter to PrototypeIterator GetCurrent

BUG=

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

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

8 years ago[runtime] Remove Runtime::KeyedGetObjectProperty function.
mstarzinger [Thu, 10 Sep 2015 10:48:51 +0000 (03:48 -0700)]
[runtime] Remove Runtime::KeyedGetObjectProperty function.

R=conradw@chromium.org

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

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

8 years ago[turbofan] Disable test that started to timeout.
mstarzinger [Thu, 10 Sep 2015 10:39:02 +0000 (03:39 -0700)]
[turbofan] Disable test that started to timeout.

The two tests in question got a lot slower and started to timeout now
that the C++ fallback implementation of the %Arguments intrinsics is
composable with respect to inlining.

R=bmeurer@chromium.org,machenbach@chromium.org

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

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

8 years ago[turbofan] Remove obsolete --turbo-try-catch flag.
mstarzinger [Thu, 10 Sep 2015 09:38:29 +0000 (02:38 -0700)]
[turbofan] Remove obsolete --turbo-try-catch flag.

This removes the aforementioned flag which has been on by default for a
while now. Note that this does not control optimization decisions, only
the last-resort bailout in the graph builder.

R=bmeurer@chromium.org

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

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

8 years agoX87: On a call to Array(), we patched a call ic.
chunyang.dai [Thu, 10 Sep 2015 08:39:50 +0000 (01:39 -0700)]
X87: On a call to Array(), we patched a call ic.

port ba7b64139886ab7987406a92bf0e801b807c9fe4 (r30649)

original commit message:

   This CL makes do with a single dispatcher which inlines the special handling for the Array() call case, loading the allocation site found in the vector and c

BUG=

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

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

8 years ago[runtime] Sanitize %NewClosure runtime entries.
bmeurer [Thu, 10 Sep 2015 08:35:55 +0000 (01:35 -0700)]
[runtime] Sanitize %NewClosure runtime entries.

There are now two runtime entries %NewClosure and %NewClosure_Tenured,
with the same signature (one parameter, the SharedFunctionInfo, and the
context of the caller).

Also remove the HFunctionLiteral special case instruction from Crankshaft,
as HCallWithDescriptor with FastNewClosureStub or HCallRuntime with
either %NewClosure or %NewClosure_Tenured can easily do that for you.

Also remove the redundant context parameter from the JSCreateClosure
operator, because every JS operator already takes a context input.

CQ_INCLUDE_TRYBOTS=tryserver.v8:v8_linux_nosnap_dbg

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

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

8 years agoMIPS: Fix illegal use of at register
Djordje.Pesic [Thu, 10 Sep 2015 06:02:25 +0000 (23:02 -0700)]
MIPS: Fix illegal use of at register

Fix illegal use of at register when ldc1 and sdc1 are called. Added dchecks to prevent such a usage.

TEST=mjsunit/asm/float64array-negative-offset(r6), mjsunit/asm/float64array-outofbounds(r6)

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

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

8 years agoX87: [calls] Consistent call protocol for calls.
chunyang.dai [Thu, 10 Sep 2015 05:42:39 +0000 (22:42 -0700)]
X87: [calls] Consistent call protocol for calls.

port b37907ff7f866873ddfbfc97670b43c19a5fc7f9 (r30648).

original commit message:

    The number of actual arguments should always be available, there's no
    point in trying to optimize away a simple assignment of an immediate to
    a register before some calls.

    The main motivation is to have a consistent state at the beginning of every
    function. Currently the arguments register (i.e. rax or eax) either contains
    the number of arguments or some random garbage depending on whether
    the callsite decided that the callee might need the information or not.
    This causes trouble with runtime implementations of functions that
    do not set internal_formal_parameter_count to the DontAdaptArguments
    sentinel (we don't have any of those yet), but also makes it impossible
    to sanity check the arguments in the callee, because the callee doesn't
    know whether the caller decided to pass the number of arguments or
    random garbage.

BUG=

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

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

8 years agoX87: [builtins] Unify the various versions of [[Call]] with a Call builtin.
chunyang.dai [Thu, 10 Sep 2015 05:41:33 +0000 (22:41 -0700)]
X87: [builtins] Unify the various versions of [[Call]] with a Call builtin.

port ccbb4ff00f1d8f32fd9227cd7aba1723791e5744 (r30629)

original commit message:

    The new Call and CallFunction builtins supersede the current
    CallFunctionStub (and CallIC magic) and will be the single bottleneck
    for all calling, including the currently special Function.prototype.call
    and Function.prototype.apply builtins, which had handwritten (and
    not fully compliant) versions of CallFunctionStub, and also the
    CallIC(s), which where also slightly different.

    This also reduces the overhead for API function calls, which is still
    unnecessary high, but let's do that step-by-step.

    This also fixes a bunch of cases where the implicit ToObject for
    sloppy receivers was done in the wrong context (in the caller
    context instead of the callee context), which basically meant
    that we allowed cross context access to %ObjectPrototype%.

BUG=

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

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

8 years agoX87: [runtime] Replace many buggy uses of %_CallFunction with %_Call.
chunyang.dai [Thu, 10 Sep 2015 05:40:25 +0000 (22:40 -0700)]
X87: [runtime] Replace many buggy uses of %_CallFunction with %_Call.

port db2ba190dba6983b94eae36e111b0feebb97587e (r30634).

original commit message:

    The semantics of the %_CallFunction intrinsic seem to be very unclear,
    which resulted in a lot of bugs. Especially the combination with
    %IsSloppyModeFunction is always a bug, because the receiver would be
    wrapped in the wrong context. So the %IsSloppyModeFunction helper is
    gone now, and many of the buggy uses of %_CallFunction are also
    eliminated.

    If you ever need to call something with a different receiver, then
    %_Call is your friend now. It does what you want and implements the
    call sequence fully (and correct).

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

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

8 years agoPPC: Fix "Desugar %DefaultConstructorCallSuper partially in parser."
mbrandy [Wed, 9 Sep 2015 20:34:37 +0000 (13:34 -0700)]
PPC: Fix "Desugar %DefaultConstructorCallSuper partially in parser."

R=mstarzinger@chromium.org, joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com, dstence@us.ibm.com
BUG=

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

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

8 years ago[turbofan] relative_id of splinters and their children.
mtrofin [Wed, 9 Sep 2015 19:33:56 +0000 (12:33 -0700)]
[turbofan] relative_id of splinters and their children.

A LiveRange is identified by 2 integers: the vreg() of its TopLevel,
which is the virtual register (operand) ID; and a relative_id(), which has
no meaning in the program, but is valuable in debugging or tracing
scenarios.

This change ensures that relative_id is unique even in cases of splinter
ranges and their children.

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

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

8 years agoDesugar %DefaultConstructorCallSuper partially in parser.
mstarzinger [Wed, 9 Sep 2015 17:45:43 +0000 (10:45 -0700)]
Desugar %DefaultConstructorCallSuper partially in parser.

This desugars the loading of the super constructor function using the
%GetPrototype runtime function in the parser. The produced code remains
the same while fewer parts need to be glued together.

R=bmeurer@chromium.org

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

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

8 years ago[runtime] Move AtomicIsLockFree out of Runtime class.
mstarzinger [Wed, 9 Sep 2015 17:13:20 +0000 (10:13 -0700)]
[runtime] Move AtomicIsLockFree out of Runtime class.

R=binji@chromium.org

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

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

8 years agoPPC: [calls] Consistent call protocol for calls.
mbrandy [Wed, 9 Sep 2015 16:09:18 +0000 (09:09 -0700)]
PPC: [calls] Consistent call protocol for calls.

Port b37907ff7f866873ddfbfc97670b43c19a5fc7f9

Original commit message:
    The number of actual arguments should always be available, there's no
    point in trying to optimize away a simple assignment of an immediate to
    a register before some calls.

    The main motivation is to have a consistent state at the beginning of every
    function. Currently the arguments register (i.e. rax or eax) either contains
    the number of arguments or some random garbage depending on whether
    the callsite decided that the callee might need the information or not.
    This causes trouble with runtime implementations of functions that
    do not set internal_formal_parameter_count to the DontAdaptArguments
    sentinel (we don't have any of those yet), but also makes it impossible
    to sanity check the arguments in the callee, because the callee doesn't
    know whether the caller decided to pass the number of arguments or
    random garbage.

R=bmeurer@chromium.org, joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com, dstence@us.ibm.com
BUG=v8:4413
LOG=n

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

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

8 years agoPPC: On a call to Array(), we patched a call ic. This CL makes do with a single dispa...
mbrandy [Wed, 9 Sep 2015 15:58:52 +0000 (08:58 -0700)]
PPC: On a call to Array(), we patched a call ic. This CL makes do with a single dispatcher which inlines the special handling for the Array() call case, loading the allocation site found in the vector and calling the array constructor stub appropriately.

Port ba7b64139886ab7987406a92bf0e801b807c9fe4

R=mvstanton@chromium.org, joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com, dstence@us.ibm.com
BUG=

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

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