Commit Graph

29551 Commits

Author SHA1 Message Date
v8-autoroll
99ebb5bab4 Update V8 DEPS.
Rolling v8/tools/clang to f5219dd53ee7a87a07085ce03083456231ba0c27

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

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

Cr-Commit-Position: refs/heads/master@{#35009}
2016-03-23 03:24:00 +00:00
echristo
d6d8230697 Fix a warning about inline asm source/destination mismatches for cache_type_register_.
The warning notes that we'd want a 'w' register here because the size of
the operand is 32-bit, however, the instruction only takes an 'x'
register and so force that using the 'x' modifier on the instruction.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#35008}
2016-03-22 21:48:32 +00:00
ishell
4e8670d1fa [es6] Stage tail call elimination.
BUG=v8:4698
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#35007}
2016-03-22 20:54:34 +00:00
jyan
a68b1fdc06 S390: Turn LoadIndexedInterceptor into a Turbofan stub
Port 9536c3886b

R=verwaest@chromium.org, joransiu@ca.ibm.com, mbrandy@us.ibm.com, michael_dawson@ca.ibm.com
BUG=

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

Cr-Commit-Position: refs/heads/master@{#35006}
2016-03-22 20:38:24 +00:00
jyan
f62ac8aad2 S390: Turn StoreWithInterceptor into a turbofan stub
Port 75ed4a6071
R=verwaest@chromium.org, joransiu@ca.ibm.com, mbrandy@us.ibm.com, michael_dawson@ca.ibm.com
BUG=

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

Cr-Commit-Position: refs/heads/master@{#35005}
2016-03-22 20:20:29 +00:00
jyan
0503ba760f S390: [stubs] Split ToNumberStub into reusable subparts.
Port b7aa4c3ab3

Original commit message:
    Split ToNumberStub into the entry ToNumberStub, and two new stubs,
    StringToNumberStub and NonNumberToNumberStub, which can be used when we
    already know something about the input (i.e. in various branches of the
    code stubs, or in TurboFan graphs).

    Also introduce an appropriate StringToNumber simplified operator for
    TurboFan, that is pure and is lowered to an invocation of the newly
    added StringToNumberStub.

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

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

Cr-Commit-Position: refs/heads/master@{#35004}
2016-03-22 20:11:17 +00:00
jyan
716ab0d3b4 S390: [crankshaft] Fixing ES6 tail call elimination.
Port acbb968ded
Port 66e22b79e8

Original commit messages:
    In case when F inlined normal call to G which tail calls H we should not write translation for G for the tail call site.
    Otherwise we will see G in a stack trace inside H.

    This CL also enables all existing tests related to ES6 tail call elimination and adds more combinations.

    Always generate lazy bailout points for tail calls because Debugger could still require them to inspect optimized frames.

R=ishell@chromium.org, joransiu@ca.ibm.com, mbrandy@us.ibm.com, michael_dawson@ca.ibm.com
BUG=chromium:596473, v8:4698
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#35003}
2016-03-22 18:16:34 +00:00
adamk
ed18aa65ea Remove support for legacy const, part 1
Now that ES2015 const has shipped, in Chrome 49, legacy const declarations
are no more. This lets us remove a bunch of code from many parts of the
codebase.

In this patch, I remove parser support for generating legacy const variables
from const declarations. This also removes the special "illegal declaration"
bit from Scope, which has ripples into all compiler backends.

Also gone are any tests which relied on legacy const declarations.

Note that we do still generate a Variable in mode CONST_LEGACY in one case:
function name bindings in sloppy mode. The likely fix there is to add a new
Variable::Kind for this case and handle it appropriately for stores in each
backend, but I leave that for a later patch to make this one completely
subtractive.

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

Cr-Commit-Position: refs/heads/master@{#35002}
2016-03-22 17:52:13 +00:00
littledan
64b2b1ac33 Fix match default behavior on strings for ES2015 semantics
String.prototype.match is specified to call out to the current
value of RegExp.prototype[Symbol.match] when passed a string argument,
rather than the original value. This patch updates the RegExp code
to do that.

R=yangguo@chromium.org
BUG=v8:4602
LOG=Y

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

Cr-Commit-Position: refs/heads/master@{#35001}
2016-03-22 17:25:51 +00:00
joransiu
bdcefb9dc1 S390:[crankshaft] Sign-ext key before array access
The 'key' value being passed into an array access should
be sign-extended on 64-bit platforms before being used to
index into memory.  Otherwise, garbage in the upper 32-bits
may result in a segmentation fault.

Minor fix to DoFlooringDivI to enforce 32-bit operations for calculation.

R=jyan@ca.ibm.com,michael_dawson@ca.ibm.com,mbrandy@us.ibm.com
BUG=

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

Cr-Commit-Position: refs/heads/master@{#35000}
2016-03-22 17:18:29 +00:00
mbrandy
f0d88f9084 PPC: Introduce a code stub version of Array.prototype.push
Port 1134688ced

Original commit message:
    This roughly doubles performance for generic Array.prototype.push.

R=verwaest@chromium.org, joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com
BUG=

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

Cr-Commit-Position: refs/heads/master@{#34999}
2016-03-22 16:57:28 +00:00
mbrandy
69e8bb4357 PPC: [stubs] Split ToNumberStub into reusable subparts.
Port b7aa4c3ab3

Original commit message:
    Split ToNumberStub into the entry ToNumberStub, and two new stubs,
    StringToNumberStub and NonNumberToNumberStub, which can be used when we
    already know something about the input (i.e. in various branches of the
    code stubs, or in TurboFan graphs).

    Also introduce an appropriate StringToNumber simplified operator for
    TurboFan, that is pure and is lowered to an invocation of the newly
    added StringToNumberStub.

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

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

Cr-Commit-Position: refs/heads/master@{#34998}
2016-03-22 16:53:52 +00:00
mbrandy
46471067ff PPC: [es6] Faster implementation of OrdinaryHasInstance.
Port b6419fa229

Original commit message:
    Now implemented as a builtin that delegates to the InstanceOfStub. That
    stub was parameterized to fallback to either Runtime_InstanceOf or to
    Runtime_OrdinaryHasInstance depending on the --harmony-instanceof flag.
    Once the feature stabilizes and the flag is no longer needed, we can get
    rid of this parameterization again.

R=mstarzinger@chromium.org, joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com
BUG=v8:4447
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#34997}
2016-03-22 16:39:57 +00:00
mbrandy
a6bf5bbdea PPC: [crankshaft] Fixing ES6 tail call elimination.
Port acbb968ded
Port 66e22b79e8

Original commit messages:
    In case when F inlined normal call to G which tail calls H we should not write translation for G for the tail call site.
    Otherwise we will see G in a stack trace inside H.

    This CL also enables all existing tests related to ES6 tail call elimination and adds more combinations.

    Always generate lazy bailout points for tail calls because Debugger could still require them to inspect optimized frames.

R=ishell@chromium.org, joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com
BUG=chromium:596473, v8:4698
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#34996}
2016-03-22 16:38:08 +00:00
mstarzinger
3521b37df2 Revert of [es6] Ship new ES6 instanceof operator semantics. (patchset #1 id:1 of https://codereview.chromium.org/1820903002/ )
Reason for revert:
Breaks two layout tests when rolling into Chromium. Tests needs investigation and most likely a rebaseline. The following are the tests that fail:

- imported/web-platform-tests/html/semantics/text-level-semantics/the-time-element/001.html
- fast/dom/Window/window-postmessage-clone-deep-array.html

https://storage.googleapis.com/chromium-layout-test-archives/V8-Blink_Linux_64/5594/layout-test-results/results.html

Original issue's description:
> [es6] Ship new ES6 instanceof operator semantics.
>
> R=hablich@chromium.org
> BUG=v8:4447
> LOG=n
>
> Committed: https://crrev.com/5836807ea89b96ecfb4bbd8febf0d67bb8dae9ed
> Cr-Commit-Position: refs/heads/master@{#34984}

TBR=hablich@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=v8:4447

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

Cr-Commit-Position: refs/heads/master@{#34995}
2016-03-22 16:04:52 +00:00
bmeurer
0bedf6f061 [stubs] Introduce AddStub and SubtractStub.
This adds two new stubs, AddStub and SubtractStub, for the plus and the
minus operators, and hooks them up with TurboFan and Ignition.
Especially the addition case is very heavy and we might want to look
into splitting that up further into specialized stubs (similar to what
we did with ToNumberStub recently).

R=epertoso@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#34994}
2016-03-22 15:43:55 +00:00
jfb
890f3dd7c5 Use C++11 / gnu++11, not 0x
Cleanup, and matches Chromium's build.

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

Cr-Commit-Position: refs/heads/master@{#34993}
2016-03-22 15:24:43 +00:00
ishell
df694d5524 [crankshaft] Support inlining of function calls in tail position (in ES6 sense).
BUG=v8:4698
LOG=N
TBR=bmeurer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#34992}
2016-03-22 14:44:33 +00:00
oth
9383d14b9f [interpreter] Disable mjsunit/ignition/elided-instruction
BUG=v8:4680
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#34991}
2016-03-22 14:40:45 +00:00
ssanfilippo
0a4820d01e [Interpreter] Rebuild dispatch table when FLAG_trace_ignition_codegen is enabled.
Otherwise, no handler would be dumped when using a snapshot.

BUG=v8:4280
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#34990}
2016-03-22 13:55:33 +00:00
bmeurer
43fe7d6854 [builtins] Add support for JS builtins written in TurboFan.
This CL adds support for builtins with JavaScript linkage written using
the TurboFan CodeStubAssembler, but with a JSCall descriptor (which was
already supported thanks to a previous patch by Ben Smith). As a first
example, we convert the Math.sqrt builtin and thereby get rid of the
%_MathSqrt intrinsic, which causes trouble for the representation
selection pass in the JavaScript pipeline.

R=mstarzinger@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#34989}
2016-03-22 13:25:54 +00:00
mlippautz
fddd4f06f9 [heap] Optimize migration of objects round two
* Not jump around all memory to gather whether we need to profile
* Cache this information and dispatch to a templatized function

BUG=chromium:524425
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#34988}
2016-03-22 13:24:02 +00:00
verwaest
1134688ced Introduce a code stub version of Array.prototype.push
This roughly doubles performance for generic Array.prototype.push.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#34987}
2016-03-22 12:51:40 +00:00
ishell
a7ac81f41a [es6] Don't disable ES6 tail call elimination when Debugger is on.
BUG=v8:4698
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#34986}
2016-03-22 12:39:26 +00:00
mstarzinger
9d3e055212 [presubmit] Disable linter check for alpha-sorted includes.
The linter (i.e. cpplint.py) no longer needs to check for alpha-sorted
include directives because our source formatting (i.e. clang-format)
will take care of this by now. This is the current default configuration
of the underlying linter anyways.

Note that the two tools disagree about the correct ordering about files
containing dash characters. The ordering suggested by the formatter is
more natural. Having the formatter trigger linter errors is not a good
situation to be in.

R=jochen@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#34985}
2016-03-22 12:27:12 +00:00
mstarzinger
5836807ea8 [es6] Ship new ES6 instanceof operator semantics.
R=hablich@chromium.org
BUG=v8:4447
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#34984}
2016-03-22 11:42:11 +00:00
epertoso
d158bf14b3 [Interpreter] TurboFan implementation of intrinsics.
Introduces a bytecode whose handler executes the equivalent of %_IsArray and %_IsJSReceiver without a runtime call.

BUG=v8:4822
LOG=y

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

Cr-Commit-Position: refs/heads/master@{#34983}
2016-03-22 11:36:05 +00:00
mythria
27338320f4 [Interpreter] Fixes CopyBytecodeArray to copy interrupt_budget field.
Fixes CopyBytecodeArray to set the interrupt_budget field.

BUG=v8:4280,v8:4690
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#34982}
2016-03-22 11:05:21 +00:00
mstarzinger
31d3c8a074 [compiler] Move PassesFilter onto SharedFunctionInfo.
The JSFunction::PassesFilter predicate is not fine-grained enough to
actually distinguish different closures and hence can be changed into
SharedFunctionInfo::PassesFilter instead. This will allow the compiler
to use is more broadly.

R=jkummerow@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#34981}
2016-03-22 10:02:15 +00:00
hpayer
3a69da3988 [heap] Adding fine grained timer scopes to external callbacks.
BUG=

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

Cr-Commit-Position: refs/heads/master@{#34980}
2016-03-22 08:17:35 +00:00
ishell
66e22b79e8 [crankshaft] Always generate lazy bailout points for tail calls ...
... because Debugger could still require them to inspect optimized frames.

BUG=chromium:596473, v8:4698
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#34979}
2016-03-22 08:15:47 +00:00
mtrofin
1da4b88e82 [turbofan] Fix operands for VisitDiv on Intel.
The idiv instruction has 2 registers as output. This needs to be
modeled so that the move optimizer won't incorrectly elide away
moves.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#34978}
2016-03-22 08:04:48 +00:00
jarin
e1bd9af173 [turbofan] Add more sanity checks to representation inference.
The CL also add guard nodes to places where we assume that certain
values are numbers.

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

Cr-Commit-Position: refs/heads/master@{#34977}
2016-03-22 06:50:52 +00:00
bmeurer
1d0df88b11 [intrinsics] Remove unused intrinsic %_IncrementStatsCounter.
This was once meant to be used for JavaScript code stubs, but since we
found a better way to do code stubs using TurboFan, we don't need this
runtime entry and intrinsic anymore.

R=jarin@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#34976}
2016-03-22 06:35:39 +00:00
zhengxing.li
4c0ad04919 X87: [es6] Faster implementation of OrdinaryHasInstance.
port b6419fa229 (r34959)

  original commit message:
  Now implemented as a builtin that delegates to the InstanceOfStub. That
  stub was parameterized to fallback to either Runtime_InstanceOf or to
  Runtime_OrdinaryHasInstance depending on the --harmony-instanceof flag.
  Once the feature stabilizes and the flag is no longer needed, we can get
  rid of this parameterization again.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#34975}
2016-03-22 06:25:27 +00:00
zhengxing.li
400f6c5038 X87: Extends testb and cmpb/cmpw instruction support in the ia32 assembler.
port 22523f25b1 (r34925)

  original commit message:
  This is in preparation for a CL that does the equivalent of http://crrev.com/1780193003 for ia32.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#34974}
2016-03-22 05:39:56 +00:00
akos.palfi
9deff0fa26 MIPS: Fix '[stubs] Split ToNumberStub into reusable subparts.'
BUG=

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

Cr-Commit-Position: refs/heads/master@{#34973}
2016-03-22 05:39:55 +00:00
zhengxing.li
9640015ec4 X87: [crankshaft] Fixing ES6 tail call elimination.
port acbb968ded (r34920)

  original commit message:
  In case when F inlined normal call to G which tail calls H we should not write translation for G for the tail call site.
  Otherwise we will see G in a stack trace inside H.

  This CL also enables all existing tests related to ES6 tail call elimination and adds more combinations.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#34972}
2016-03-22 04:20:59 +00:00
zhengxing.li
236d7005b6 X87: [stubs] Split ToNumberStub into reusable subparts.
port b7aa4c3ab3 (r34922)

  original commit message:
  Split ToNumberStub into the entry ToNumberStub, and two new stubs,
  StringToNumberStub and NonNumberToNumberStub, which can be used when we
  already know something about the input (i.e. in various branches of the
  code stubs, or in TurboFan graphs).

  Also introduce an appropriate StringToNumber simplified operator for
  TurboFan, that is pure and is lowered to an invocation of the newly
  added StringToNumberStub.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#34971}
2016-03-22 04:15:55 +00:00
v8-autoroll
dcee82d61e Update V8 DEPS.
Rolling v8/third_party/android_tools to 19728471dd63a968668288488403286b68e4ae9e

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

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

Cr-Commit-Position: refs/heads/master@{#34970}
2016-03-22 03:38:37 +00:00
caitpotter88
4720062073 [es7] stage --harmony_exponentiation_operator
BUG=v8:3915
LOG=N
R=adamk@chromium.org, littledan@chromium.org, rossberg@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#34969}
2016-03-21 23:11:13 +00:00
jfb
ed76b66aab wasm: add flag to dump modules
Flags --dump_wasm_module and --dump_wasm_module_path=/path/to/folder allow us to run a bunch of tests and capture all of the wasm module files including the ones that come from the .js and .cc tests which are built on the fly, as well as the asm2wasm tests.

The files are all uniquely named `HASH.{ok,failed}.wasm`.

This will be especilly useful for fuzz testing, but could also be used for other tests including non-V8 tests.

For now I manually hacked tools/testrunner/local/execution.py so that tools/run-tests.py can output the modules. We may want to ad a flag to run-tests.py proper if this turns out to be useful.

R=bradnelson@chromium.org, titzer@chromium.org, kcc@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#34968}
2016-03-21 21:42:59 +00:00
bradnelson
cca5c3f630 Fix conversion to float32, typing issue, split apart asm-wasm tests.
Add missing conversions from other types to f32 in fround.
Restrict fround() to only float, double, signed, unsigned (no unions / intish).
Restrict Bitwise operations to intish, particularly |0, when not applied to a foreign function.

Adding more exhaustive tests of stdlib Math, move to a separate file.
Adding tests of interesting values for the stdlib asm.js functions.

BUG= https://bugs.chromium.org/p/v8/issues/detail?id=4203
TEST=test-asm-validator,asm-wasm
R=titzer@chromium.org,rossberg@chromium.org
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#34967}
2016-03-21 20:34:40 +00:00
caitpotter88
e6f4b7491c [parser] implement error reporting for Scanner
Enables the Scanner to provide a better error message when errors occur
in escape sequences, numbers, strings, etc.

BUG=v8:4829, v8:3230
LOG=N
R=adamk@chromium.org, littledan@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#34966}
2016-03-21 20:27:44 +00:00
mlippautz
34fe5ee929 [heap] Optimize migration of objects
* Better inlining
* Avoid vtable lookup for visitor

BUG=chromium:524425
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#34965}
2016-03-21 19:43:33 +00:00
adamk
249bf75e0c Remove runtime flags for Proxy and Reflect
Both of them shipped in Chrome 49 without incident.

Also move relevant tests from harmony/ to es6/.

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

Cr-Commit-Position: refs/heads/master@{#34964}
2016-03-21 19:40:02 +00:00
caitpotter88
609d7958ba [cleanup] add missing #undef SCANNER_ACCESSORS to parser-base.h
BUG=

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

Cr-Commit-Position: refs/heads/master@{#34963}
2016-03-21 19:24:29 +00:00
ishell
e6dca379b6 [crankshaft] Check if the function is callable before generating a tail call via Call builtin.
This is necessary to ensure that "Called non callable" exception will get a proper message and stack trace even for calls at tail position.

BUG=chromium:595615, v8:4698
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#34962}
2016-03-21 19:24:28 +00:00
yangguo
5dedb164eb [regexp] require exact match for unicode property names.
R=littledan@chromium.org
BUG=v8:4810
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#34961}
2016-03-21 19:22:24 +00:00
ulan
5ff7901e24 Fix JSInliningHeuristic::CandidateCompare predicate.
STL requires comparison to be a strict weak ordering.

In particular the predicate should be antisymmetric:
f(x, y) implies !f(y, x).

BUG=v8:4848
LOG=NO

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

Cr-Commit-Position: refs/heads/master@{#34960}
2016-03-21 18:26:39 +00:00