Commit Graph

36215 Commits

Author SHA1 Message Date
marja
ed080e6966 Disable lazy parsing inside eval (see bug).
If the eval contains a let, we need to know whether an inner function
refers to the variable to be able to decide its context allocation
status.

The added test needs https://codereview.chromium.org/2435023002/ too
in order to pass.

BUG=v8:5736

Review-Url: https://codereview.chromium.org/2574753002
Cr-Commit-Position: refs/heads/master@{#41723}
2016-12-15 14:26:58 +00:00
ishell
f1441384ff [stubs] Remove CSA::INTEGER_PARAMETERS in favor of CSA::INTPTR_PARAMETERS.
BUG=

Review-Url: https://codereview.chromium.org/2580533002
Cr-Commit-Position: refs/heads/master@{#41722}
2016-12-15 14:01:07 +00:00
ishell
1805315470 [turbofan] Added --csa-trap-on-node option that helps debugging graph verification issues.
The error reported by the graph verifier looks like:

#
# Fatal error in ../src/compiler/machine-graph-verifier.cc, line 638
# TypeError: node #54:ChangeInt32ToInt64 uses node #53:ChangeUint32ToUint64 which doesn't have an int32-compatible representation.
#
# Specify option --csa-trap-on-node=test,54 for debugging.
#

BUG=

Review-Url: https://codereview.chromium.org/2574353002
Cr-Commit-Position: refs/heads/master@{#41721}
2016-12-15 13:32:27 +00:00
ahaas
7bd61b601c [wasm] Introduce the TrapIf and TrapUnless operators to generate trap code.
Some instructions in WebAssembly trap for some inputs, which means that the
execution is terminated and (at least at the moment) a JavaScript exception is
thrown. Examples for traps are out-of-bounds memory accesses, or integer
divisions by zero.

Without the TrapIf and TrapUnless operators trap check in WebAssembly introduces 5
TurboFan nodes (branch, if_true, if_false, trap-reason constant, trap-position
constant), in addition to the trap condition itself. Additionally, each
WebAssembly function has four TurboFan nodes (merge, effect_phi, 2 phis) whose
number of inputs is linear to the number of trap checks in the function.
Especially for functions with high numbers of trap checks we observe a
significant slowdown in compilation time, down to 0.22 MiB/s in the sqlite
benchmark instead of the average of 3 MiB/s in other benchmarks. By introducing
a TrapIf common operator only a single node is necessary per trap check, in
addition to the trap condition. Also the nodes which are shared between trap
checks (merge, effect_phi, 2 phis) would disappear. First measurements suggest a
speedup of 30-50% on average.

This CL only implements TrapIf and TrapUnless on x64. The implementation is also
hidden behind the --wasm-trap-if flag.

Please take a special look at how the source position is transfered from the
instruction selector to the code generator, and at the context that is used for
the runtime call.

R=titzer@chromium.org

Review-Url: https://codereview.chromium.org/2562393002
Cr-Commit-Position: refs/heads/master@{#41720}
2016-12-15 13:31:29 +00:00
leszeks
bcb38979f7 [turbofan] Add and use bytecode loop assigment analysis
Adds assignment tracking to the bytecode analysis pass, and updates
bytecode graph builder to only create LoopExitValues for assigned
values.

Review-Url: https://codereview.chromium.org/2558093005
Cr-Commit-Position: refs/heads/master@{#41719}
2016-12-15 13:24:19 +00:00
jarin
01de216fd7 [turbofan] Handle the impossible value representation mismatch in instruction selector.
Review-Url: https://codereview.chromium.org/2579743002
Cr-Commit-Position: refs/heads/master@{#41718}
2016-12-15 12:13:06 +00:00
ivica.bogosavljevic
ee7281f8ff MIPS[64]: Disable fusion multiple-accumulate instructions
MIPS[64]R6 supports only fusion multiply-accumulate instructions, and using
these causes failures of several tests that expect exact floating-point
results. Therefore we disable fusion multiply-accumulate in both emitted and
compiled code on R6.

TEST=cctest/test-run-machops/RunFloat64MulAndFloat64Add1,mjsunit/es6/math-expm1.js
mjsunit/es6/math-fround.js,mjsunit/compiler/multiply-add.js

BUG=

Review-Url: https://codereview.chromium.org/2569683002
Cr-Commit-Position: refs/heads/master@{#41717}
2016-12-15 11:50:12 +00:00
machenbach
7c43fcb285 [release] Make release scripts work without gnumbd
This splits branch ref creation and landing. The ref now directly uses
heads (without pending) and for landing we use depot_tools.

For simplicity, the check for existing tags is removed, as it now
is very unlikely to happen again without gnumbd.

BUG=chromium:674448
NOTRY=true
TBR=tandrii@chromium.org

Review-Url: https://codereview.chromium.org/2584523002
Cr-Commit-Position: refs/heads/master@{#41716}
2016-12-15 11:48:54 +00:00
ishell
b5925c0ad0 [stubs] Enable machine graph verification for CodeStubAssembler and friends by default in debug mode.
BUG=

Review-Url: https://codereview.chromium.org/2570213002
Cr-Commit-Position: refs/heads/master@{#41715}
2016-12-15 11:45:18 +00:00
rmcilroy
ae741d042c [Interpreter] Allocate registers used as call arguments on-demand.
Allocate the registers used as arguments to a call on-demand after visiting the
argument (or reciever). This means that the visited expression can use registers
that would otherwise have been allocated for arguments which haven't been
visited yet.

The reason for doing this is to avoid keeping things live in registers
unecessarily for chained function calls, which avoids a memory leak for
functions which chain a large number of calls with large temporary arguments /
recievers.

BUG=chromium:672027

Review-Url: https://codereview.chromium.org/2557173004
Cr-Commit-Position: refs/heads/master@{#41714}
2016-12-15 10:59:57 +00:00
mstarzinger
6c620e5312 Fix usage of literal cloning for large double arrays.
This fixes a corner case where the {FastCloneShallowArrayStub} was used
for literals that are backed by a double backing store and would exceed
limits for new-space allocations on 32-bit architectures. The stub in
question does not support such literals, callers must use the runtime.
Note that this fix is for Ignition as well as FullCodeGenerator.

R=rmcilroy@chromium.org
TEST=mjsunit/regress/regress-crbug-672792
BUG=chromium:672792

Review-Url: https://codereview.chromium.org/2570843002
Cr-Commit-Position: refs/heads/master@{#41713}
2016-12-15 10:29:47 +00:00
machenbach
b02fd88d75 Reland of Whitespace change to test gnumbd shutdown - CQ (patchset #1 id:1 of https://codereview.chromium.org/2583443002/ )
Reason for revert:
Test reland

Original issue's description:
> Revert of Whitespace change to test gnumbd shutdown - CQ (patchset #1 id:1 of https://codereview.chromium.org/2579733002/ )
>
> Reason for revert:
> Test revert
>
> Original issue's description:
> > Whitespace change to test gnumbd shutdown - CQ
> >
> > BUG=chromium:674448
> > NOTRY=true
> > NOPRESUBMIT=true
> > NOTREECHECKS=true
> > TBR=tandrii@chromium.org
> >
> > Review-Url: https://codereview.chromium.org/2579733002
> > Cr-Commit-Position: refs/heads/master@{#41710}
> > Committed: 47f8979d12
>
> TBR=tandrii@chromium.org
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=chromium:674448
>
> Review-Url: https://codereview.chromium.org/2583443002
> Cr-Commit-Position: refs/heads/master@{#41711}
> Committed: 4619fbe42a

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

Review-Url: https://codereview.chromium.org/2580623003
Cr-Commit-Position: refs/heads/master@{#41712}
2016-12-15 10:12:18 +00:00
machenbach
4619fbe42a Revert of Whitespace change to test gnumbd shutdown - CQ (patchset #1 id:1 of https://codereview.chromium.org/2579733002/ )
Reason for revert:
Test revert

Original issue's description:
> Whitespace change to test gnumbd shutdown - CQ
>
> BUG=chromium:674448
> NOTRY=true
> NOPRESUBMIT=true
> NOTREECHECKS=true
> TBR=tandrii@chromium.org
>
> Review-Url: https://codereview.chromium.org/2579733002
> Cr-Commit-Position: refs/heads/master@{#41710}
> Committed: 47f8979d12

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

Review-Url: https://codereview.chromium.org/2583443002
Cr-Commit-Position: refs/heads/master@{#41711}
2016-12-15 10:10:58 +00:00
machenbach
47f8979d12 Whitespace change to test gnumbd shutdown - CQ
BUG=chromium:674448
NOTRY=true
NOPRESUBMIT=true
NOTREECHECKS=true
TBR=tandrii@chromium.org

Review-Url: https://codereview.chromium.org/2579733002
Cr-Commit-Position: refs/heads/master@{#41710}
2016-12-15 10:09:24 +00:00
Michael Achenbach
ff154c69f6 Whitespace change to test gnumbd shutdown - uploaded
BUG=chromium:674448
NOTRY=true
NOPRESUBMIT=true
NOTREECHECKS=true
TBR=tandrii@chromium.org

Review-Url: https://codereview.chromium.org/2580743004 .
Cr-Commit-Position: refs/heads/master@{#41709}
2016-12-15 10:05:47 +00:00
Michael Achenbach
aadc615ae7 Whitespace change to test gnumbd shutdown - manual
Cr-Commit-Position: refs/heads/master@{#41708}
2016-12-15 09:58:10 +00:00
tandrii
0fb9b16b48 Whitspace.
TBR=machenbach@chromium.org
NOTRY=True
NOPERSUBMIT=True
BUG=chromium:674448

Review-Url: https://codereview.chromium.org/2582443003
Cr-Commit-Position: refs/heads/master@{#41707}
2016-12-15 09:10:17 +00:00
rmcilroy
e27b348d1a [Interpreter] Templatize AccumulatorUsage and OperandType for bytecode creation.
Templatizes the AccumulatorUsage and OperandType for BytecodeNode creation and
BytecodeRegisterOptimizer::PrepareForBytecode. This allows the compiler to
statically know whether the bytecode being created accesses the accumulator
and what operand types need scaling, avoiding runtime checks in the code.

Also removes BytecodeNode::set_bytecode methods.

Review-Url: https://codereview.chromium.org/2542903003
Cr-Commit-Position: refs/heads/master@{#41706}
2016-12-15 07:56:21 +00:00
jgruber
f3b9d570cb [regexp] Let RegExp.prototype.compile return this
ES6 requires the compile method to return this:
www.ecma-international.org/ecma-262/6.0/#sec-regexp.prototype.compile

BUG=v8:5722,chromium:585775

Review-Url: https://codereview.chromium.org/2577653002
Cr-Commit-Position: refs/heads/master@{#41705}
2016-12-15 07:29:39 +00:00
mtrofin
77b50a8e12 [wasm] disable serialization for asm-wasm
Determine if the scope of the function to be serialized includes asm-
wasm, and if so, bypass serialization, since we do not support it in
that scenario.

In this change, we do so regardless of whether the asm-wasm path was
successful. This is so we keep the design simple, since the guidance
to developers, moving forward, is to use wasm.

BUG=643595

Review-Url: https://codereview.chromium.org/2573193002
Cr-Commit-Position: refs/heads/master@{#41704}
2016-12-15 05:06:54 +00:00
v8-autoroll
37253381e2 Update V8 DEPS.
Rolling v8/build: d16d922..d4ca00b

Rolling v8/third_party/catapult: b7b743b..ab73453

Rolling v8/tools/clang: 6b7c8d5..286099f

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

Review-Url: https://codereview.chromium.org/2578883002
Cr-Commit-Position: refs/heads/master@{#41703}
2016-12-15 04:32:39 +00:00
gsathya
6876165072 [stubs] Add AllocationFlags parameter to AllocateJSObjectFromMap
Review-Url: https://codereview.chromium.org/2581443002
Cr-Commit-Position: refs/heads/master@{#41702}
2016-12-15 01:08:34 +00:00
gsathya
bbc68d4110 [parser] remove %catch parsing
Promise catch prediction no longer has to be threaded through the
parser since the code using %catch has been moved to TF codestubs.

This is currently dead code.

BUG=v8:5343,v8:5741

Review-Url: https://codereview.chromium.org/2575133002
Cr-Commit-Position: refs/heads/master@{#41701}
2016-12-14 21:04:38 +00:00
bradnelson
5124589642 [wasm][asm.js] Print a deterministic success result by default.
Printing an asm.js success message and timings is useful,
but also non-deterministic. Making the message stable unless a flag is passed.
This will avoid making it a hassle in the future to create LayoutTests
that use asm.js and verify console output.

BUG=v8:4203
R=titzer@chromium.org

Review-Url: https://codereview.chromium.org/2574273002
Cr-Commit-Position: refs/heads/master@{#41700}
2016-12-14 18:13:20 +00:00
titzer
058939ab93 [wasm] Enforce limits for maximums for many WebAssembly binary entities.
This CL moves even more limits to wasm-limits.h and enforces limits for
types, functions, parameter counts, return counts, local counts, imports,
globals, and exports.

R=clemensh@chromium.org, ahaas@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/2574133002
Cr-Commit-Position: refs/heads/master@{#41699}
2016-12-14 17:46:47 +00:00
leszeks
f3b7f21cbc [turbofan] Reserve the StateValueList's size before filling it
Avoid needless resizing of the StateValueList's fields vector by
reserving its (already known) size.

Review-Url: https://codereview.chromium.org/2572683005
Cr-Commit-Position: refs/heads/master@{#41698}
2016-12-14 14:55:18 +00:00
epertoso
e521757f47 [turbofan] Cleaning up InlineApiCall in JSNativeContextReducer.
R=jarin@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/2578563002
Cr-Commit-Position: refs/heads/master@{#41697}
2016-12-14 14:23:30 +00:00
bradnelson
d40195e4f7 Revert "[ia32] Optimize index calculation for certain checked load/stores."
This reverts commit 5c1babcc16.

This seems to regress a range of benchmarks on ia32:
  Emscripten for Fannkuch, Zlib, MemOps, Life, Bullet
  AreWeFastYet for BulletLoadTime, Fasta, Fannkuch
  JetStream for towers.c, quicksort.c, gcc-loops.cpp, bigfib.cpp

BUG=673861
R=jarin@chromium.org,shiyu.zhang@intel.com

Review-Url: https://codereview.chromium.org/2573983003
Cr-Commit-Position: refs/heads/master@{#41696}
2016-12-14 14:12:37 +00:00
bradnelson
21255208e2 [wasm][asm.js] Adding timing info message about asm.js
Adding timing info going to the console about asm.js

Rename ConvertAsmToWasm -> CompileAsmViaWasm, to be more precise.
Add enum for wasm data elements.

BUG=v8:4203
R=titzer@chromium.org,yangguo@chromium.org

Review-Url: https://codereview.chromium.org/2577453003
Cr-Commit-Position: refs/heads/master@{#41695}
2016-12-14 14:10:22 +00:00
ishell
33480daa60 [stubs] Enable machine graph verification for fast accessor assembler.
... and clean it up.

BUG=

Review-Url: https://codereview.chromium.org/2569353004
Cr-Commit-Position: refs/heads/master@{#41694}
2016-12-14 13:37:39 +00:00
tebbi
859414da4c [source-positions] make the SourcePositionInfo constructor actually compute position info
R=danno@chromium.org

BUG=

Review-Url: https://codereview.chromium.org/2568303008
Cr-Commit-Position: refs/heads/master@{#41693}
2016-12-14 12:58:19 +00:00
nikolaos
f39665e360 [parser] Fix bug with non-static name method/property
Without this patch, the tests on lines 410, 414, 418 and 422 in
function testNonStaticName of test/mjsunit/es6/function-name.js
would all fail.  The bug caused non-static "name" methods and
properties to be mistaken for static ones.

R=adamk@chromium.org, verwaest@chromium.org
BUG=
LOG=N

Review-Url: https://codereview.chromium.org/2567343004
Cr-Commit-Position: refs/heads/master@{#41692}
2016-12-14 12:12:01 +00:00
titzer
576abe14c6 [runtime] Add instance size check for CheckEquivalent().
WASM exported functions have additional internal fields which change the instance
size. Adding a getter or setter to such an exported function results in its map
becoming normalized. The normalized map cache, however, finds a different map
with a different instance size, and thus BOOM.

R=verwaest@chromium.org,cbruni@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/2554343002
Cr-Commit-Position: refs/heads/master@{#41691}
2016-12-14 11:59:56 +00:00
ishell
a54d7acb11 [stubs] Enable graph verification for builtins.
... and fix the inconsistencies.

BUG=

Review-Url: https://codereview.chromium.org/2573573004
Cr-Commit-Position: refs/heads/master@{#41690}
2016-12-14 10:51:30 +00:00
alph
cc47e27a37 [profiler] Add check for SFI::script() being not undefined
BUG=v8:5735

Review-Url: https://codereview.chromium.org/2574943002
Cr-Commit-Position: refs/heads/master@{#41689}
2016-12-14 10:20:43 +00:00
yangguo
341b39f9d0 [debug-wrapper] migrate some scope related tests
R=jgruber@chromium.org
BUG=v8:5530

Review-Url: https://codereview.chromium.org/2566093002
Cr-Commit-Position: refs/heads/master@{#41688}
2016-12-14 07:20:33 +00:00
jgruber
bbf3c697ae [heap] Initialize the owner on each page after lospace allocation
The least two bits of the owner field of a Page are used to determine
whether the Page is part of a large object. If these bits are not equal
to 0x11, the page is part of a large object and needs special handling
e.g. in MemoryChunk::FromAnyPointerAddress to determine which chunk it
belongs to.

This CL fixes an issue in which the store buffer overflows after
a large object space allocation but before the object has been fully
initialized. Store buffer overflow handling attempts to look up the
chunk of a page, but fails to do so correctly since the page's owner
field has not yet been initialized.

This CL ensures that the owner field of all pages belonging to a large
object allocation are initialized to a value that is interpreted
correctly.

BUG=chromium:672041

Committed: https://crrev.com/9b6808bfb5366beebe3af30a06f9851edb2039d4
Review-Url: https://codereview.chromium.org/2565713002
Cr-Original-Commit-Position: refs/heads/master@{#41641}
Cr-Commit-Position: refs/heads/master@{#41687}
2016-12-14 06:45:35 +00:00
yangguo
825dd8a904 [debug-wrappers] remove mirror tests.
Debug mirrors will no longer be supported in the near future.
It will now only be tested by being used by the v8-inspector.

R=jgruber@chromium.org
BUG=v8:5530

Review-Url: https://codereview.chromium.org/2566103002
Cr-Commit-Position: refs/heads/master@{#41686}
2016-12-14 06:37:07 +00:00
v8-autoroll
5f874d4f4b Update V8 DEPS.
Rolling v8/build: 52f7afe..d16d922

Rolling v8/third_party/catapult: c69690a..b7b743b

Rolling v8/third_party/icu: 73e2473..9cd2828

Rolling v8/tools/clang: 7e13606..6b7c8d5

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

Review-Url: https://codereview.chromium.org/2569303003
Cr-Commit-Position: refs/heads/master@{#41685}
2016-12-14 04:31:22 +00:00
kozyatinskiy
3dea2c8354 Revert of Store SharedFunctionInfos of a Script in a FixedArray indexed by their ID (patchset #11 id:190001 of https://codereview.chromium.org/2547483002/ )
Reason for revert:
LiveEdit is broken in some cases.

Original issue's description:
> Store SharedFunctionInfos of a Script in a FixedArray indexed by their ID
>
> Now that SharedFunctionInfos have a unique ID (and the IDs are dense),
> we can use them as an index into an array, instead of using a
> WeakFixedArray where we have to do a linear scan.
>
> Hooking up liveedit is a bit more involved, see
> https://docs.google.com/presentation/d/1FtNa3U7WsF5bPhY9uGoJG5Y9hnz5VBDabfOWpb4unWI/edit
> for an overview
>
> BUG=v8:5589
> R=verwaest@chromium.org,jgruber@chromium.org
>
> Committed: https://crrev.com/6595e7405769dc9d49e9568d61485efc6d468baf
> Cr-Commit-Position: refs/heads/master@{#41600}

TBR=jgruber@chromium.org,verwaest@chromium.org,yangguo@chromium.org,jochen@chromium.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=v8:5589,chromium:673950
NOPRESUBMIT=true

Review-Url: https://codereview.chromium.org/2578433002
Cr-Commit-Position: refs/heads/master@{#41684}
2016-12-14 02:05:05 +00:00
gsathya
9fc3c017e1 PromiseHandle port to TF
Splits PromiseHandle into two TF builtins to account for catch
prediction. An exception in PromiseHandleReject builtin results in a
"caught" prediction whereas an expception in PromiseHandle results in a
"promise rejection" prediction.

An extra is_exception_caught bit is added to Code to mark this catch
prediction behavior.

BUG=v8:5343

Review-Url: https://codereview.chromium.org/2572623002
Cr-Commit-Position: refs/heads/master@{#41683}
2016-12-13 23:55:08 +00:00
gsathya
3b1a09f56d [stubs] Add CSA::IsSymbol() and CSA::IsPrivateSymbol().
Review-Url: https://codereview.chromium.org/2571883002
Cr-Commit-Position: refs/heads/master@{#41682}
2016-12-13 23:13:20 +00:00
tebbi
8ff9efc84e [turbofan] enforce single pass for redundancy elimination
R=jarin@chromium.org

BUG=

Review-Url: https://codereview.chromium.org/2568423003
Cr-Commit-Position: refs/heads/master@{#41681}
2016-12-13 20:12:49 +00:00
kozyatinskiy
73ac1d3877 [inspector] add async instrumentation for setTimeout in tests
BUG=v8:5738
R=dgozman@chromium.org

Review-Url: https://codereview.chromium.org/2574803002
Cr-Commit-Position: refs/heads/master@{#41680}
2016-12-13 19:41:22 +00:00
tebbi
c22c70b605 [turbofan] fixed escape analysis crash because of incomplete replacements
R=epertoso@chromium.org,mstarzinger@chromium.org

BUG=671324

Review-Url: https://codereview.chromium.org/2571793002
Cr-Commit-Position: refs/heads/master@{#41679}
2016-12-13 16:25:30 +00:00
honggyu.kp
6106a483de [heap] Set class RememberedSet to AllStatic
Since class RememberedSet only contains static methods, it'd be better
to make it as AllStatic class.

BUG=
R=ulan@chromium.org, yangguo@chromium.org

Review-Url: https://codereview.chromium.org/2570783004
Cr-Commit-Position: refs/heads/master@{#41678}
2016-12-13 15:37:14 +00:00
leszeks
f6ee3b5ff3 [ignition] Fix hole check for dynamic local variables
The fast-path for dynamic local variables was previously checking the
lookup variable rather than the shadowed variable when deciding whether
to add a hole check.

BUG=669540

Review-Url: https://codereview.chromium.org/2551023004
Cr-Commit-Position: refs/heads/master@{#41677}
2016-12-13 14:29:07 +00:00
ishell
b5a9381a56 [interpreter][stubs] Enable graph verification for bytecode handlers and stubs included into snapshot.
BUG=

Review-Url: https://codereview.chromium.org/2575473002
Cr-Commit-Position: refs/heads/master@{#41676}
2016-12-13 13:55:29 +00:00
jarin
a989a11639 [turbofan] Remove the unused loop peeling stress option.
Review-Url: https://codereview.chromium.org/2570803002
Cr-Commit-Position: refs/heads/master@{#41675}
2016-12-13 13:29:39 +00:00
gsathya
dfa2660672 Add PromiseReactionJobInfo to CSA
BUG=v8:5343

Review-Url: https://codereview.chromium.org/2573703002
Cr-Commit-Position: refs/heads/master@{#41674}
2016-12-13 13:22:15 +00:00