Commit Graph

27644 Commits

Author SHA1 Message Date
titzer
5341e9fa39 [wasm] Add tests that pass float/double parameters directly for binops and unops.
R=rossberg@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#33152}
2016-01-07 10:56:18 +00:00
rmcilroy
50cac4436a [Interpreter] Skip a couple more flaky test262 tests on Ignition.
BUG=v8:4280
LOG=N
NOTRY=true
TBR=machenbach@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#33151}
2016-01-07 10:22:11 +00:00
rmcilroy
306f195d1e [Interpreter] Add two more Ignition skips for mjsunit/compiler on Arm.
BUG=v8:4280
LOG=N
TBR=machenbach@chromium.org
NOTRY=true

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

Cr-Commit-Position: refs/heads/master@{#33150}
2016-01-07 09:58:39 +00:00
bmeurer
b0d0d57d2b [date] Date parser says true even for wrong dates, check twice.
R=yangguo@chromium.org
BUG=chromium:575082
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#33149}
2016-01-07 09:30:46 +00:00
rmcilroy
13626e97e0 [Interpreter] Enable most of the mjsunit/compiler tests for Ignition.
BUG=v8:4280
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#33148}
2016-01-07 09:00:11 +00:00
zhengxing.li
a3fd2b8174 X87: Remove strong mode support from rest argument creation.
port a94d6d6ede (r33108)

  original commit message:
  The mode requires an extra register, and since we aren't supporting it now, we can dispense with it.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#33147}
2016-01-07 07:02:48 +00:00
bmeurer
020b419c73 [turbofan] Ship TurboFan with new.target references.
This correctly marks functions containing a new.target reference as
being disabled with Crankshaft, which would have bailed out anyways.
Also note that this will trigger TurboFan for such functions and hence
widens the TurboFan intake valve.

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

Cr-Commit-Position: refs/heads/master@{#33146}
2016-01-07 06:38:44 +00:00
v8-autoroll
28f7fa5265 Update V8 DEPS.
Rolling v8/buildtools to 0f8e6e4b126ee88137930a0ae4776c4741808740

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

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

Cr-Commit-Position: refs/heads/master@{#33145}
2016-01-07 04:24:35 +00:00
littledan
6e96223750 Add Array support for @@species and subclassing
This patch implements @@species, guarded behind the --harmony-species
flag, on Arrays. Methods which return an Array will instead return
the appropriate instance based on the ArraySpeciesCreate algorithm.
The algorithm is implemented in C++ to get access to realm information
and to implement some Array methods in C++, but it is also accessed
from JavaScript through a new runtime function. A couple interactive
Octane runs show no performance regression with the flag turned off,
but turning --harmony-species on will surely have a significant
regression, as Array methods now heavily use ObjectDefineProperty.

BUG=v8:4093
LOG=Y
R=adamk,cbruni

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

Cr-Commit-Position: refs/heads/master@{#33144}
2016-01-07 02:30:01 +00:00
zhengxing.li
48bc94253f X87: [wasm] Change the test case for Run_WasmCall_Float32Sub
The reason is same as the CL #31808 (issue 1430943002, X87: Change the test case for X87 float operations), please refer: https://codereview.chromium.org/1430943002/

  Here is the key comments from CL #31808
  Some new test cases use CheckFloatEq(...) and CheckDoubleEq(...) function for result check. When GCC compiling the CheckFloatEq() and CheckDoubleEq() function, those inlined functions has different behavior comparing with GCC ia32 build and x87 build.
  The major difference is sse float register still has single precision rounding semantic. While X87 register has no such rounding precsion semantic when directly use register value.
  The V8 turbofan JITTed has exactly same result in both X87 and IA32 port.

  So we add the following sentence to do type case to keep the same precision for Run_WasmCall_Float32Sub.
  Such as: volatile float expect = *i +/- *j; // *i +/- *j, etc.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#33143}
2016-01-07 01:53:22 +00:00
littledan
09685b5b00 Add UseCounters for various standards-related code paths
- Each of the three deprecated Promise functions
- Two nonstandard pieces of Intl functionality
- Accesses of the RegExp.prototype.unicode getter on the prototype

BUG=v8:3785,v8:3238,v8:4633
LOG=N
R=adamk
TBR=hpayer

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

Cr-Commit-Position: refs/heads/master@{#33142}
2016-01-07 00:13:03 +00:00
adamk
2367abf025 [es6] Handle function names in object and class literals
This required refactoring ParsePropertyDefinition to pass the parsed
string name as an out param, since ObjectLiteralProperty stores Smis
for Smi-representable property keys.

Computed properties are not yet handled in this patch.

BUG=v8:3699
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#33141}
2016-01-06 23:39:15 +00:00
mbrandy
26f2f242d5 PPC: Fix simulator and re-enable wasm tests.
R=bradnelson@chromium.org, titzer@chromium.org, joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com
BUG=

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

Cr-Commit-Position: refs/heads/master@{#33140}
2016-01-06 23:38:12 +00:00
aseemgarg
e62e287237 refactor block loading and unloading
R=bradnelson@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#33139}
2016-01-06 20:26:20 +00:00
dusan.m.milosavljevic
8a7f302d80 MIPS64: [turbofan] Improve matching for And(Shr(x, imm), mask).
Utilise Dextu, Dextm on mips64 for widths and positions larger
than 32.

TEST=
BUG=

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

Cr-Commit-Position: refs/heads/master@{#33138}
2016-01-06 20:24:22 +00:00
caitpotter88
6cd8535c3b [promise] Test IsPromise() early in Promise.prototype.then()
Addresses TODO by Dan --- simply by moving the check and exception
earlier in the function, before calling NewPromiseCapability() or
loading the constructor.

BUG=v8:4633
LOG=N
R=adamk@chromium.org, littledan@chromium.org, cbruni@chromium.org

Fixes 'test262/built-ins/Promise/prototype/then/context-check-on-entry'

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

Cr-Commit-Position: refs/heads/master@{#33137}
2016-01-06 18:51:28 +00:00
ivica.bogosavljevic
2c63060f11 MIPS64: r6 compact branch optimization.
Several ports to enable r6 compact branch optimizations on MIPS64

Port 3573d3cb58

Original commit message:
MIPS: r6 compact branch optimization.

Port bddf8c9e08

Original commit message:
MIPS: Fix trampoline pool handling in MacroAssembler::BranchShort()

Port 6993cd0de5

Original commit message:
MIPS: Fix 'MIPS:r6 compact branch optimization.'

Jic and jialc compact branch ops are fixed as they does
not have 'forbidden slot' restriction. Also COP1 branches
(CTI instructions) added to IsForbiddenAfterBranchInstr().

Port bb332195d3

Original commit message:
MIPS: Fix trampoline pool handling in MacroAssembler::BranchShort()

Port c91bcf7192

Original commit message:
MIPS: Fix trampoline pool handling in MacroAssembler::BranchShort()
for r6.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#33136}
2016-01-06 13:36:41 +00:00
jacob.bramley
f7c7cb8fe4 [arm64] Fix AssertStackConsistency.
The implementation temporarily modifies jssp to avoid needing a scratch
register, then restores it afterwards. However, the exception path
wasn't properly restoring the value.

With this patch, failures in this part of AssertStackConsistency get
reported properly (with backtrace and a BailoutReason).

BUG=

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

Cr-Commit-Position: refs/heads/master@{#33135}
2016-01-06 09:43:48 +00:00
v8-autoroll
b784f25656 Update V8 DEPS.
Rolling v8/buildtools to 81863fe70639e85606b541d9d36e9e98c96b957e

Rolling v8/tools/clang to fe8d232767c63ce43873ffef101063a5791d171e

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

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

Cr-Commit-Position: refs/heads/master@{#33134}
2016-01-06 04:24:56 +00:00
littledan
fcff8588a5 Ship ES2015 sloppy-mode function hoisting, let, class
This patch doesn't ship all features of ES2015 variable/scoping
changes, notably omitting the removal of legacy const. I think
function hoisting, let and class in sloppy mode can stand to
themselves as a package, and the legacy const change is much
riskier and more likely to be reverted, so my intention is to
pursue those as a separate, follow-on patch.

R=adamk@chromium.org
BUG=v8:4285,v8:3305
LOG=Y
CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:linux_chromium_rel_ng;tryserver.blink:linux_blink_rel

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

Cr-Commit-Position: refs/heads/master@{#33133}
2016-01-06 02:03:07 +00:00
bradnelson
e27a3713be Disable more wasm tests.
Disabling a failing PPC wasm test.

BUG=
R=bbudge@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#33132}
2016-01-06 00:11:35 +00:00
bradnelson
4c22608133 Disable more crashing / failing wasm tests.
Disabling some tests for ppc, mips, arm.

BUG=
R=bbudge@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#33131}
2016-01-05 23:33:12 +00:00
Miran.Karic
718a554ddd MIPS: Remove JIC/JIALC forbidden slot checks in simulator
JIC and JIALC instructions do not have a forbidden slot so their
simulator implementation should not call CheckForbiddenSlot function.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#33130}
2016-01-05 22:30:54 +00:00
caitpotter88
5fcfe05a3b [promise] revert error message change for Promise.resolve()
Previously, it was `ToString(PromiseCast)`, which comes out as
"function resolve() { [native code] }". I had changed it to "Promise.resolve()",
but the other style is more consistently used.

LOG=N
R=cbruni@chromium.org, adamk@chromium.org, littledan@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#33129}
2016-01-05 22:20:41 +00:00
caitpotter88
e4af5cdbf9 [promise] Make Promise.reject match spec, and validate promise capabilities
Correctly validate promise capabilities in NewPromiseCapabilities() and in
GetCapabilitiesExtractor(). Also explicitly follows Promise.race step 2 and
similar cases in the spec, rather than passing tests asserting these steps
are taken in NewPromiseCapability

Also changes Promise.reject to match specification.

Fixes the following test262 tests:

- built-ins/Promise/all/capability-executor-called-twice.js
- built-ins/Promise/all/capability-executor-not-callable.js
- built-ins/Promise/prototype/then/capability-executor-called-twice.js
- built-ins/Promise/prototype/then/capability-executor-not-callable.js
- built-ins/Promise/reject/capability-executor-called-twice.js
- built-ins/Promise/reject/capability-executor-not-callable.js
- built-ins/Promise/resolve/capability-executor-called-twice.js
- built-ins/Promise/resolve/capability-executor-not-callable.js
- built-ins/Promise/race/capability-executor-called-twice.js
- built-ins/Promise/race/capability-executor-not-callable.js
- built-ins/Promise/reject/S25.4.4.4_A3.1_T1.js
- built-ins/Promise/race/S25.4.4.3_A3.1_T2.js

Per v8:3641, mjsunit/es6/debug-promises/throw-with-undefined-reject.js becomes invalid. The exception is thrown before the chain handler is ever invoked, and is caught externally by d8's own handler --- thus evading the uncaught exception event.

BUG=v8:4633, v8:4631, v8:4243, v8:3641
LOG=N
R=littledan@chromium.org, cbruni@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#33128}
2016-01-05 22:19:34 +00:00
balazs.kilvady
8d6899c827 MIPS: Add lsa and dlsa r6 instructions.
BUG=

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

Cr-Commit-Position: refs/heads/master@{#33127}
2016-01-05 19:46:15 +00:00
bradnelson
0cf8254213 Disable several tests, fix PPC build.
Work around ppc assembler use of Mul, Div macros.

Disable several tests that fail for nosse4.
Disable several tests that fail for msan.

BUG=
R=titzer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#33126}
2016-01-05 19:16:38 +00:00
oth
8109f63fd5 [Interpreter] Add support for jumps using constants with wide operands.
This increases the size of addressable constant pool entries for jumps
to match other bytecodes using operands indexing the constant pool.

This change also introduces reservations for constant pool entries.
Reservations are used for forward jumps to ensure a constant pool entry
will be available when the jump target (label) is bound and the jump is
patched up in the bytecode array.

BUG=v8:4280
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#33125}
2016-01-05 19:09:10 +00:00
adamk
7ab3ccb031 Ship destructuring assignment
BUG=v8:811
LOG=y
CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:linux_chromium_rel_ng;tryserver.blink:linux_blink_rel

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

Cr-Commit-Position: refs/heads/master@{#33124}
2016-01-05 19:01:42 +00:00
bradnelson
0e8b7ec8b1 Remove wasm compile time option and enable wasm behind a runtime flag.
Deferring enabling of tests to separate per platform CLs.

R=machenbach@chromium.org,titzer@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#33123}
2016-01-05 18:06:54 +00:00
thestig
beef98f160 Fix a few -Wignored-qualifiers warnings.
Review URL: https://codereview.chromium.org/1542143003

Cr-Commit-Position: refs/heads/master@{#33122}
2016-01-05 17:23:49 +00:00
machenbach
bb3972f6f8 [test] Skip test for ignition.
NOTRY=true
TBR=rmcilroy@chromium.org, mythria@chromium.org
BUG=v8:4280
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#33121}
2016-01-05 17:05:15 +00:00
mythria
3efce1c77e [Interpreted] Throws an error if rest parameters are used.
Throws an error if rest parameters are used. This feature is not
yet supported in interpreter.

BUG=v8:4280
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#33120}
2016-01-05 17:04:15 +00:00
jkummerow
b4583c0444 [prototype user tracking] Don't skip JSGlobalProxies
For a prototype chain foo -> global_proxy -> global_object, we used to
register a dependency from foo -> global_object. This is incorrect when
the global_proxy/global_object pairing is modified, e.g. when navigating
in iframes. With this patch, we properly register foo -> global_proxy and
global_proxy -> global_object dependencies.
Additionally, when a prototype's prototype changes from null to something
else, this new usage relation must be registered if there are other users
further down on the prototype chain that might expect a complete chain of
registrations to exist (which was the case before, and must be preserved).

BUG=chromium:571517
LOG=n
R=verwaest@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#33119}
2016-01-05 16:15:48 +00:00
mbrandy
bdc2746d28 PPC: Remove strong mode support from rest argument creation.
Port a94d6d6ede

Original commit message:
    The mode requires an extra register, and since we aren't supporting
    it now, we can dispense with it.

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

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

Cr-Commit-Position: refs/heads/master@{#33118}
2016-01-05 15:55:44 +00:00
mythria
47d7ae1154 [Interpreter] Pass correct closure argument when creating block context.
After this change, https://codereview.chromium.org/1475383002 we should
not pass Smi 0 for a closure and expect runtime to look it up. We should
pass the correct argument always.

BUG=v8:4280
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#33117}
2016-01-05 15:35:33 +00:00
mythria
08419a0989 [Interpreter] StateValuesRequireUpdate handles cases when deoptimization is disabled.
Fixes StateValuesRequireUpdate function to return false if deoptimization is not enabled.
When deoptimization is not enabled there is no need to create nodes for state values.

BUG=v8:4280
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#33116}
2016-01-05 15:07:50 +00:00
sigurds
3b473d7aad [turbofan] Deopt support for escape analysis
Deopt support is added on two levels. On the IR level,
a new ObjectState node is added, which represenents an
object to be materialized. ObjectState nodes appear as
inputs of FrameState and StateValues nodes. On the
instruction select/code-generation level, the
FrameStateDescriptor class handles the nesting
introduced by ObjectState, and ensures that deopt code
with CAPTURED_OBJECT/DUPLICATED_OBJECT entries are
generated similarly to what crankshaft's escape
analysis does.

Two unittests test correctness of the IR level implementation.

Correctness for instruction selection / code generation
is tested by mjsunit tests.

R=jarin@chromium.org,mstarzinger@chromium.org
BUG=v8:4586
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#33115}
2016-01-05 13:31:02 +00:00
rmcilroy
06738d6410 [Interpreter] Enable cctests for igntion variant.
BUG=v8:4280
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#33114}
2016-01-05 13:27:31 +00:00
ulan
a373e7530c Guard UnmapFreeMemoryTask with a flag.
BUG=chromium:574349
LOG=NO

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

Cr-Commit-Position: refs/heads/master@{#33113}
2016-01-05 13:11:21 +00:00
jarin
f0e41175fd [turbofan] Bidirectional representation inference.
This changes representation inference to be bidirectional:
1. truncations are propagated from uses to definitions.
2. output types are propagated from definitions to uses.
(and nodes are revisited until fixpoint.)

At the moment, (2) is used only superficially; the idea here is to
use the output type propagation to propagate types from type feedback.

For the output types to be usable, we need to keep track of the type
of the JavaScript value rather than the truncated value. Otherwise,
representation inference could not rely on the ranges indicated
by the values.

For example, for "var b = (a|0) + (a|0); return (b/16) >>> 0",
the type of b cannot be int32; otherwise the division "b/16"
would believe that it is fine to do an integer division on
the truncated value, which would give a wrong result for
2^31 <= a < 2^32.

The change makes representation inference a bit more expensive
(the phase is about 20% slower), but since this is only small part
of the overall compiler time, the overall effect is negligible.
If the running time becomes a problem, we could optimize this by
remembering when the nodes are stable (ie., no further changes to
type/truncations) and/or explicit subscriptions for changes.

BUG=v8:4583
R=bmeurer@chromium.org
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#33112}
2016-01-05 11:56:39 +00:00
mythria
a0a8b60643 [Interpreter] Adds support for wide variant of load/store lookup slots.
Adds implementation and tests for wide variant of load/store lookup slots.

BUG=v8:4280
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#33111}
2016-01-05 11:36:48 +00:00
zhengxing.li
007de5d213 [wasm] Define the FP return register for X87.
The FP parameters for X87 should be put in stack and the FP return value
  should be put in stX_0 register.

  So this CL defines the FP_RETURN_REGISTERS as stX_0 only.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#33110}
2016-01-05 11:22:21 +00:00
bmeurer
065e9c536f [runtime] Migrate several Date builtins to C++.
Almost all of the Date builtins always call into C++ at least once
anyway, so parsing, compiling and executing the JavaScript wrappers
is just a waste of time.  The most important part here is the Date
constructor itself, which is one of the blockers for new.target in
TurboFan, because compiling the Date constructor takes too much time
with TurboFan (for no reason since we end up in C++ anway).

R=cbruni@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#33109}
2016-01-05 11:05:50 +00:00
mvstanton
a94d6d6ede Remove strong mode support from rest argument creation.
The mode requires an extra register, and since we aren't supporting
it now, we can dispense with it.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#33108}
2016-01-05 10:51:37 +00:00
sigurds
89654538e7 [turbofan] Add performance counters for escape analysis
R=bmeurer@chromium.org
BUG=v8:4586
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#33107}
2016-01-05 10:30:23 +00:00
sigurds
3351ed4b78 [turbofan] Improve caching in escape analysis.
This also fixes a related bug in phi handling.

R=bmeurer@chromium.org
BUG=v8:4586
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#33106}
2016-01-05 10:18:49 +00:00
mvstanton
c89ddbb7bc Optimized TurboFan support for rest args.
R=bmeurer@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#33105}
2016-01-05 09:40:41 +00:00
machenbach
a48875c975 [test] Skip tests for ignition.
BUG=v8:4280
LOG=N
TBR=rmcilroy@chromium.org
NOTRY=true

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

Cr-Commit-Position: refs/heads/master@{#33104}
2016-01-05 08:50:12 +00:00
zhengxing.li
bdf993698a X87: [Interpreter] Fix some issues in the non-x64 InterpreterNotifyDeoptimized builtins.
port 02072112d14d2960fc730fa5cde6b759c47b61a0(r33088)

  original commit message:
  Fix stack push issues on non-x64 platforms for
  InterpreterNotifyDeoptimized builtins.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#33103}
2016-01-05 04:09:11 +00:00