Commit Graph

36760 Commits

Author SHA1 Message Date
yangguo
9cd0de73dc [serializer] change internal field callbacks to take data pointer.
R=jochen@chromium.org, peria@chromium.org
BUG=chromium:617892

Review-Url: https://codereview.chromium.org/2628093003
Cr-Commit-Position: refs/heads/master@{#42268}
2017-01-12 12:25:58 +00:00
titzer
9884fb91e1 [wasm] Enable WASM by default (--expose-wasm=true).
BUG=chromium:575167
R=rossberg@chromium.org,ahaas@chromium.org,clemensh@chromium.org,bradnelson@chromium.org

Review-Url: https://codereview.chromium.org/2623743003
Cr-Original-Original-Commit-Position: refs/heads/master@{#42197}
Committed: 34b63f050b
Review-Url: https://codereview.chromium.org/2623743003
Cr-Original-Commit-Position: refs/heads/master@{#42214}
Committed: 71f5650828
Review-Url: https://codereview.chromium.org/2623743003
Cr-Commit-Position: refs/heads/master@{#42267}
2017-01-12 12:04:35 +00:00
machenbach
29e6218b7f [foozzie] Suppress some asm test cases
BUG=chromium:680110
TBR=clemensh@chromium.org, titzer@chromium.org, ahaas@chromium.org
NOTRY=true

Review-Url: https://codereview.chromium.org/2625333002
Cr-Commit-Position: refs/heads/master@{#42266}
2017-01-12 11:49:48 +00:00
jochen
81c62e070b Do security checks in the promise constructor
Since we only can do limited checks during microtask execution, do the
checks before actually creating a promise

BUG=chromium:658194
R=bmeurer@chromium.org,gsathya@chromium.org

Review-Url: https://codereview.chromium.org/2628863002
Cr-Commit-Position: refs/heads/master@{#42265}
2017-01-12 11:33:51 +00:00
mvstanton
b8294aaa97 [TypeFeedbackVector] Root literal arrays in function literals slots
Literal arrays and feedback vectors for a function can be garbage
collected if we don't have a rooted closure for the function, which
happens often. It's expensive to come back from this (recreating
boilerplates and gathering feedback again), and the cost is
disproportionate if the function was inlined into optimized code.

To guard against losing these arrays when we need them, we'll now
create literal arrays when creating the feedback vector for the outer
closure, and root them strongly in that vector.

BUG=v8:5456

Review-Url: https://codereview.chromium.org/2620753003
Cr-Original-Commit-Position: refs/heads/master@{#42258}
Committed: 3188780410
Review-Url: https://codereview.chromium.org/2620753003
Cr-Commit-Position: refs/heads/master@{#42264}
2017-01-12 11:29:09 +00:00
verwaest
2bca05685f [TurboFan] Fix JSNativeContextSpecialization::InferReceiverMap
Before the fix it checked whether the initial map of the base constructor pointed back to the new target. That's only true if initial_map->new_target_is_base() (new.target == target). Now it properly checks that the initial map of the original constructor (new.target) was created in combination with target by checking back that new.target->initial_map()->constructor() == target.

BUG=

Review-Url: https://codereview.chromium.org/2621303003
Cr-Commit-Position: refs/heads/master@{#42263}
2017-01-12 11:23:48 +00:00
bbudge
e46893c6c4 [ARM] Add vcge, vcgt instructions to assembler.
- Floating point, signed, and unsigned.
- Disassembler, simulator support too.
LOG=N
BUG=v8:4124

Review-Url: https://codereview.chromium.org/2602293002
Cr-Commit-Position: refs/heads/master@{#42262}
2017-01-12 11:20:08 +00:00
jkummerow
d23e7d2f81 [ic] Port {Load,Store}IC_Normal to TF
BUG=v8:5269

Review-Url: https://codereview.chromium.org/2622003004
Cr-Commit-Position: refs/heads/master@{#42261}
2017-01-12 10:53:09 +00:00
machenbach
3d9e2ea32d Revert of [TypeFeedbackVector] Root literal arrays in function literals slots (patchset #7 id:120001 of https://codereview.chromium.org/2620753003/ )
Reason for revert:
gc stress:
https://build.chromium.org/p/client.v8/builders/V8%20Linux%20-%20gc%20stress/builds/8105

also on mac

Original issue's description:
> [TypeFeedbackVector] Root literal arrays in function literals slots
>
> Literal arrays and feedback vectors for a function can be garbage
> collected if we don't have a rooted closure for the function, which
> happens often. It's expensive to come back from this (recreating
> boilerplates and gathering feedback again), and the cost is
> disproportionate if the function was inlined into optimized code.
>
> To guard against losing these arrays when we need them, we'll now
> create literal arrays when creating the feedback vector for the outer
> closure, and root them strongly in that vector.
>
> BUG=v8:5456
>
> Review-Url: https://codereview.chromium.org/2620753003
> Cr-Commit-Position: refs/heads/master@{#42258}
> Committed: 3188780410

TBR=bmeurer@chromium.org,mstarzinger@chromium.org,yangguo@chromium.org,mvstanton@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=v8:5456

Review-Url: https://codereview.chromium.org/2626863004
Cr-Commit-Position: refs/heads/master@{#42260}
2017-01-12 10:10:56 +00:00
clemensh
cfc2e5e180 [wasm] Refactor call site patching
For debugging, we are patching call sites to not call other
WASM_FUNCTIONs, but call WASM_TO_INTERPRETER stubs instead. When later
re-instantiating / cloning this code, the old logic for patching call
sites would miss those calls.
This CL changes the way we patch callsites by getting the called
function index per callsite from the bytecode. This requires iterating
both the source position table and the relocation table at the same
time to determine the byte position for each call.
Instead of looking up the functions to be replaced in a std::map, we now
get the function directly from a FixedArray. This reduces the complexity
from O(n*n*log(n)) to O(m), where n is the total number of functions and
m is the total byte code length (note that each function is patched
individually, so we set up the map n times before).
Constant factor are unclear though.

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

Review-Url: https://codereview.chromium.org/2627613002
Cr-Commit-Position: refs/heads/master@{#42259}
2017-01-12 09:40:17 +00:00
mvstanton
3188780410 [TypeFeedbackVector] Root literal arrays in function literals slots
Literal arrays and feedback vectors for a function can be garbage
collected if we don't have a rooted closure for the function, which
happens often. It's expensive to come back from this (recreating
boilerplates and gathering feedback again), and the cost is
disproportionate if the function was inlined into optimized code.

To guard against losing these arrays when we need them, we'll now
create literal arrays when creating the feedback vector for the outer
closure, and root them strongly in that vector.

BUG=v8:5456

Review-Url: https://codereview.chromium.org/2620753003
Cr-Commit-Position: refs/heads/master@{#42258}
2017-01-12 09:28:48 +00:00
hablich
1adc70b0f9 Revert of Pull define for version out into v8-version.h and separate build target (patchset #1 id:1 of https://codereview.chromium.org/2621983002/ )
Reason for revert:
Blocks roll: https://codereview.chromium.org/2633463002/

Original issue's description:
> Pull define for version out into v8-version.h and separate build target
>
> This is part of removing the dependency of the Chromium browser DLL on
> Windows on V8.
>
> R=jochen@chromium.org
> BUG=chromium:581766
>
> Review-Url: https://codereview.chromium.org/2621983002
> Cr-Commit-Position: refs/heads/master@{#42243}
> Committed: 4593845417

TBR=jochen@chromium.org,machenbach@chromium.org,scottmg@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=chromium:581766

Review-Url: https://codereview.chromium.org/2627713008
Cr-Commit-Position: refs/heads/master@{#42257}
2017-01-12 09:26:47 +00:00
alph
51c5d91393 [tracing] Use locale independent writer for FP values.
BUG=5820
LOG=N

Review-Url: https://codereview.chromium.org/2628463002
Cr-Commit-Position: refs/heads/master@{#42256}
2017-01-12 08:08:57 +00:00
v8-autoroll
9856ca24db Update V8 DEPS.
Rolling v8/build: 91344e6..497761f

Rolling v8/buildtools: 0ef8010..7e08d33

Rolling v8/third_party/catapult: 8b10e78..d71b471

Rolling v8/tools/clang: b644731..c30c6ff

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

Review-Url: https://codereview.chromium.org/2627933004
Cr-Commit-Position: refs/heads/master@{#42255}
2017-01-12 04:28:56 +00:00
bradnelson
26b9a9ef03 Revert of [wasm][asm.js] Disable success messages for asm.js (patchset #2 id:20001 of https://codereview.chromium.org/2628703003/ )
Reason for revert:
Trigger flaky test.

Original issue's description:
> [wasm][asm.js] Disable success messages for asm.js
>
> These interfere with layout tests.
>
> BUG=v8:4203
> R=titzer@chromium.org,jochen@chromium.org
>
> Review-Url: https://codereview.chromium.org/2628703003
> Cr-Commit-Position: refs/heads/master@{#42241}
> Committed: 9e60e7ac36

TBR=jochen@chromium.org,titzer@chromium.org,bradnelson@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=v8:4203

Review-Url: https://codereview.chromium.org/2629033003
Cr-Commit-Position: refs/heads/master@{#42254}
2017-01-12 02:22:57 +00:00
bradnelson
d11da92f43 Revert of [wasm][asm.js] Enable --validate-asm by default. (patchset #2 id:20001 of https://codereview.chromium.org/2624813002/ )
Reason for revert:
Triggers flaky tests.

Original issue's description:
> [wasm][asm.js] Enable --validate-asm by default.
>
> This directs all asm.js traffic via the Wasm backend.
>
> R=titzer@chromium.org,aseemgarg@chromium.org
> BUG=v8:4203
>
> Review-Url: https://codereview.chromium.org/2624813002
> Cr-Original-Commit-Position: refs/heads/master@{#42194}
> Committed: 946cc371ed
> Review-Url: https://codereview.chromium.org/2624813002
> Cr-Commit-Position: refs/heads/master@{#42244}
> Committed: 3169fb94c9

TBR=aseemgarg@chromium.org,titzer@chromium.org,bradnelson@google.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=v8:4203

Review-Url: https://codereview.chromium.org/2627893003
Cr-Commit-Position: refs/heads/master@{#42253}
2017-01-12 02:00:39 +00:00
bradnelson
f5f22cfc58 Revert of [wasm][asm.js] Do same work even when not printing asm info. (patchset #1 id:1 of https://codereview.chromium.org/2629043002/ )
Reason for revert:
Triggers flaky tests.

Original issue's description:
> [wasm][asm.js] Do same work even when not printing asm info.
>
> Skipping this work seems to perturb a gc-stress issue.
> More investigation is likely needed.
>
> BUG=v8:4203
> R=danno@chromium.org
>
> Review-Url: https://codereview.chromium.org/2629043002
> Cr-Commit-Position: refs/heads/master@{#42248}
> Committed: 785cedf1ee

TBR=danno@chromium.org,bradnelson@google.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=v8:4203

Review-Url: https://codereview.chromium.org/2623383002
Cr-Commit-Position: refs/heads/master@{#42252}
2017-01-12 01:59:06 +00:00
bradnelson
bd7fed1971 Reland of [wasm][asm.js] Do same work even when not printing asm info. (patchset #1 id:1 of https://codereview.chromium.org/2627223002/ )
Reason for revert:
Triggers flaky tests.

Original issue's description:
> Revert of [wasm][asm.js] Do same work even when not printing asm info. (patchset #1 id:1 of https://codereview.chromium.org/2629043002/ )
>
> Reason for revert:
> Triggers flaky tests.
>
> Original issue's description:
> > [wasm][asm.js] Do same work even when not printing asm info.
> >
> > Skipping this work seems to perturb a gc-stress issue.
> > More investigation is likely needed.
> >
> > BUG=v8:4203
> > R=danno@chromium.org
> >
> > Review-Url: https://codereview.chromium.org/2629043002
> > Cr-Commit-Position: refs/heads/master@{#42248}
> > Committed: 785cedf1ee
>
> TBR=danno@chromium.org,bradnelson@chromium.org
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=v8:4203
>
> Review-Url: https://codereview.chromium.org/2627223002
> Cr-Commit-Position: refs/heads/master@{#42250}
> Committed: 636df54873

TBR=danno@chromium.org,bradnelson@google.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=v8:4203

Review-Url: https://codereview.chromium.org/2626953003
Cr-Commit-Position: refs/heads/master@{#42251}
2017-01-12 01:57:57 +00:00
bradnelson
636df54873 Revert of [wasm][asm.js] Do same work even when not printing asm info. (patchset #1 id:1 of https://codereview.chromium.org/2629043002/ )
Reason for revert:
Triggers flaky tests.

Original issue's description:
> [wasm][asm.js] Do same work even when not printing asm info.
>
> Skipping this work seems to perturb a gc-stress issue.
> More investigation is likely needed.
>
> BUG=v8:4203
> R=danno@chromium.org
>
> Review-Url: https://codereview.chromium.org/2629043002
> Cr-Commit-Position: refs/heads/master@{#42248}
> Committed: 785cedf1ee

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

Review-Url: https://codereview.chromium.org/2627223002
Cr-Commit-Position: refs/heads/master@{#42250}
2017-01-12 01:56:47 +00:00
littledan
f62f846cd3 [test] Allow command-line flags to be turned on per test262 test
This patch changes the test262 infrastructure to pass individual flags,
specified in the status file, for tests for experimental features, rather
than passing --harmony for all runs. With this change, it should be
easier to run test262 tests in automation when developing new features.
The new workflow would be, when adding a flag, include the flag in the
test expectations file, and when removing the flag, remove the lines from
the test expectations file. This way, the status file does not have to
change when staging or unstaging, and you get the benefit of the automated
tests before staging starts.

R=adamk
CQ_INCLUDE_TRYBOTS=master.tryserver.v8:v8_linux_noi18n_rel_ng

Review-Url: https://codereview.chromium.org/2601393002
Cr-Commit-Position: refs/heads/master@{#42249}
2017-01-12 01:51:38 +00:00
bradnelson
785cedf1ee [wasm][asm.js] Do same work even when not printing asm info.
Skipping this work seems to perturb a gc-stress issue.
More investigation is likely needed.

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

Review-Url: https://codereview.chromium.org/2629043002
Cr-Commit-Position: refs/heads/master@{#42248}
2017-01-12 01:07:57 +00:00
adamk
f056905fcc Revert of [crankshaft] Also inline Math.ceil. (patchset #1 id:1 of https://codereview.chromium.org/2621903002/ )
Reason for revert:
Suspected of causing crashes on Canary: https://crbug.com/680108

Original issue's description:
> [crankshaft] Also inline Math.ceil.
>
> Inline calls to Math.ceil(x) as -Math.floor(-x) via the existing fast
> path in Crankshaft.
>
> R=ishell@chromium.org
> BUG=v8:5782
>
> Review-Url: https://codereview.chromium.org/2621903002
> Cr-Commit-Position: refs/heads/master@{#42161}
> Committed: a3859e48c3

TBR=ishell@chromium.org,bmeurer@chromium.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=v8:5782, chromium:680108

Review-Url: https://codereview.chromium.org/2629493002
Cr-Commit-Position: refs/heads/master@{#42247}
2017-01-11 22:37:55 +00:00
jshin
db883422c8 Move lang-code checking for case-mapping to C++ from JS
Move the language code checking for 4 languages requiring
special case mapping to C++ from JavaScript.

This is a speculative fix for crashes reported from Windows and
Mac Chrome canary builds when icu-case-mapping is enabled by
default. (see crbug.com/676643)

In addition, tighten up comparision operators in a couple of
places in i18n.js (=== and !== instead of == and !=).

BUG=v8:4477, v8:4476, chromium:676643
TEST=test262/{built-ins,intl402}/Strings/*, webkit/fast/js/*,
     mjsunit/string-case, intl/general/case*

Review-Url: https://codereview.chromium.org/2621393002
Cr-Commit-Position: refs/heads/master@{#42246}
2017-01-11 19:42:49 +00:00
petermarshall
84d3abe390 [Ignition] Remove unused line in DoNew.
Review-Url: https://codereview.chromium.org/2623023003
Cr-Commit-Position: refs/heads/master@{#42245}
2017-01-11 19:14:16 +00:00
bradnelson
3169fb94c9 [wasm][asm.js] Enable --validate-asm by default.
This directs all asm.js traffic via the Wasm backend.

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

Review-Url: https://codereview.chromium.org/2624813002
Cr-Original-Commit-Position: refs/heads/master@{#42194}
Committed: 946cc371ed
Review-Url: https://codereview.chromium.org/2624813002
Cr-Commit-Position: refs/heads/master@{#42244}
2017-01-11 18:42:03 +00:00
scottmg
4593845417 Pull define for version out into v8-version.h and separate build target
This is part of removing the dependency of the Chromium browser DLL on
Windows on V8.

R=jochen@chromium.org
BUG=chromium:581766

Review-Url: https://codereview.chromium.org/2621983002
Cr-Commit-Position: refs/heads/master@{#42243}
2017-01-11 18:40:53 +00:00
clemensh
a2efde46a1 [wasm] Add support for compiling WASM_INTERPRETER_ENTRY stubs
Also, add a runtime function to call the interpreter, passing a
stack-allocated buffer holding the arguments.
The WASM_INTERPRETER_ENTRY stub allocates the stack slot for the
arguments, fills it, and calls to the wasm interpreter.
It's abi is compatible with WASM functions, such that we can just
replace a call to a WASM_FUNCTION with a call to
WASM_INTERPRETER_ENTRY.
See tracking bug to get the overall picture.

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

Review-Url: https://codereview.chromium.org/2619803004
Cr-Commit-Position: refs/heads/master@{#42242}
2017-01-11 17:39:09 +00:00
bradnelson
9e60e7ac36 [wasm][asm.js] Disable success messages for asm.js
These interfere with layout tests.

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

Review-Url: https://codereview.chromium.org/2628703003
Cr-Commit-Position: refs/heads/master@{#42241}
2017-01-11 17:33:59 +00:00
ahaas
57c20f0b72 [wasm] The interpreter should not grow memory beyond module->mem_max_pages.
R=titzer@chromium.org
BUG=chromium:679352
TEST=cctest/test-run-wasm-interpreter/GrowMemory

Review-Url: https://codereview.chromium.org/2627943002
Cr-Commit-Position: refs/heads/master@{#42240}
2017-01-11 17:24:00 +00:00
clemensh
7a3366fbcd [compiler] Allow for StackSlots of arbitrary size
This will be used to pass parameters of wasm functions to the wasm
interpreter. All of them need to be packed into one buffer, which is
then passed to the interpreter.

R=ahaas@chromium.org, titzer@chromium.org
BUG=v8:5822

Review-Url: https://codereview.chromium.org/2624183002
Cr-Commit-Position: refs/heads/master@{#42239}
2017-01-11 16:10:51 +00:00
ahaas
e904894915 [wasm] (To|From)JSWrappers with I64 params throw a TypeError upon call.
According to the latest spec changes the WasmToJS wrapper and the
JSToWasm wrapper through a TypeError if the signature of the wrapper
contains a I64 parameter or return value. Originally the TypeError was
thrown when the parameter or return value was converted to or from JS.

In addition I removed all special handling of I64 parameters and return
values in the wrappers which was already dead code.

R=titzer@chromium.org

Review-Url: https://codereview.chromium.org/2626853003
Cr-Commit-Position: refs/heads/master@{#42238}
2017-01-11 15:58:03 +00:00
ahaas
b2d67f3b75 [wasm] TrapIf and TrapUnless TurboFan operators implemented on mips64.
Original commit message:
[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, v8-mips-ports@googlegroups.com

Review-Url: https://codereview.chromium.org/2627003002
Cr-Commit-Position: refs/heads/master@{#42237}
2017-01-11 15:56:54 +00:00
leszeks
1f55c1b5ae [ignition] Use Smis directly for type feedback
Since type feedback is stored as Smis, we can avoid a few shift
instructions per bytecode handler by performing type feedback updates
on Smis directly, rather than converting between Smi and Word32.

Review-Url: https://codereview.chromium.org/2624753002
Cr-Commit-Position: refs/heads/master@{#42236}
2017-01-11 15:28:14 +00:00
jkummerow
ec45e6ed2e Internalize strings in-place (reland^2)
using newly introduced ThinStrings, which store a pointer to the actual,
internalized string they represent.

BUG=v8:4520

(Previously landed as #42168 / af51befe69)
(Previously landed as #42193 / 4c699e349a)

Review-Url: https://codereview.chromium.org/2549773002
Cr-Commit-Position: refs/heads/master@{#42235}
2017-01-11 14:59:35 +00:00
rdevlin.cronin
0befccd21b Update MessageCallback typedef Value name
The Local<Value> in the MessageCallback typedef is named "error", but
should be "data" - it's referred to as "data" everywhere else, and
that seems to be the canonical name for a curried-in value.

BUG=None

Review-Url: https://codereview.chromium.org/2621163003
Cr-Commit-Position: refs/heads/master@{#42234}
2017-01-11 14:48:24 +00:00
titzer
bbf00d80aa [wasm] Implement WebAssembly.Module.exports function.
R=rossberg@chromium.org
BUG=v8:5814,chromium:575167

Review-Url: https://codereview.chromium.org/2623183002
Cr-Commit-Position: refs/heads/master@{#42233}
2017-01-11 14:40:25 +00:00
machenbach
7374a16dd1 [foozzie] Suppress some asm test cases
BUG=chromium:680110
TBR=clemensh@chromium.org, titzer@chromium.org, ahaas@chromium.org
NOTRY=true

Review-Url: https://codereview.chromium.org/2626073002
Cr-Commit-Position: refs/heads/master@{#42232}
2017-01-11 14:29:26 +00:00
titzer
d5a0860e87 [wasm] Implement the WebAssembly.Module.imports function.
R=rossberg@chromium.org
BUG=v8:5813,chromium:575167

Review-Url: https://codereview.chromium.org/2620203005
Cr-Commit-Position: refs/heads/master@{#42231}
2017-01-11 14:17:54 +00:00
ahaas
b16febbc3f [wasm] TrapIf and TrapUnless TurboFan operators implemented on mips.
Original commit message:
[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, v8-mips-ports@googlegroups.com

Review-Url: https://codereview.chromium.org/2628433004
Cr-Commit-Position: refs/heads/master@{#42230}
2017-01-11 14:07:45 +00:00
jarin
30176976e8 [turbofan] Enable escape analysis.
Review-Url: https://codereview.chromium.org/2626013002
Cr-Commit-Position: refs/heads/master@{#42229}
2017-01-11 13:47:36 +00:00
ulan
18104fac86 [heap] Add API function for checking if the heap limit was increased
for debugging. This function is needed to pass increased heap limit
from the main DevTools isolate to the worker isolates it spawns.

BUG=chromium:675911

Review-Url: https://codereview.chromium.org/2624973003
Cr-Commit-Position: refs/heads/master@{#42228}
2017-01-11 13:46:27 +00:00
hpayer
fdff4b072e [heap] Use CAS to update old to new slots in Scavenger.
BUG=chromium:676635

Review-Url: https://codereview.chromium.org/2628853002
Cr-Commit-Position: refs/heads/master@{#42227}
2017-01-11 13:32:13 +00:00
jgruber
3e362c755b [cleanup] Refactor builtins-object.cc to use TF_BUILTIN macro
BUG=

Review-Url: https://codereview.chromium.org/2621303002
Cr-Commit-Position: refs/heads/master@{#42226}
2017-01-11 13:30:13 +00:00
ulan
0959983c1a [heap, debugger] Introduce out-of-memory listener for debugger.
This API will allow DevTools to intercept out-of-memory condition,
increase the heap limit and schedule heap snapshot.

BUG=chromium:675911

Review-Url: https://codereview.chromium.org/2621873003
Cr-Commit-Position: refs/heads/master@{#42225}
2017-01-11 13:20:53 +00:00
mstarzinger
fc241b9077 [turbofan] Graph building is independent of closure.
This changes the BytecodeGraphBuilder interface to make the fact that
graph construction is independent of a closure explicit. A valid graph
can be constructed by providing only the pair of statically known values
for SharedFunctionInfo and TypeFeedbackVector. This is in preparation of
inlining based on the SharedFunctionInfo.

R=jarin@chromium.org
BUG=v8:2206

Review-Url: https://codereview.chromium.org/2626623002
Cr-Commit-Position: refs/heads/master@{#42224}
2017-01-11 13:05:53 +00:00
jarin
e0a850318f [deoptimizer] Insert more consistency checks.
This is mainly to catch a crash that we see in Canary with escape
analysis on.

Review-Url: https://codereview.chromium.org/2625893003
Cr-Commit-Position: refs/heads/master@{#42223}
2017-01-11 12:48:42 +00:00
machenbach
96b03dd111 Revert of [wasm] Enable WASM by default (--expose-wasm=true). (patchset #3 id:40001 of https://codereview.chromium.org/2623743003/ )
Reason for revert:
layout test breakages:
https://build.chromium.org/p/client.v8.fyi/builders/V8-Blink%20Linux%2064/builds/12574

revert first to unblock rolling. otherwise please rebaseline.

Original issue's description:
> [wasm] Enable WASM by default (--expose-wasm=true).
>
> BUG=chromium:575167
> R=rossberg@chromium.org,ahaas@chromium.org,clemensh@chromium.org,bradnelson@chromium.org
>
> Review-Url: https://codereview.chromium.org/2623743003
> Cr-Original-Commit-Position: refs/heads/master@{#42197}
> Committed: 34b63f050b
> Review-Url: https://codereview.chromium.org/2623743003
> Cr-Commit-Position: refs/heads/master@{#42214}
> Committed: 71f5650828

TBR=clemensh@chromium.org,ahaas@chromium.org,bradnelson@chromium.org,rossberg@chromium.org,bradnelson@google.com,titzer@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=chromium:575167

Review-Url: https://codereview.chromium.org/2621323002
Cr-Commit-Position: refs/heads/master@{#42222}
2017-01-11 12:43:33 +00:00
rmcilroy
a3052cfe22 [compiler] Collect eager inner functions for compilation during renumbering.
This CL modifies the ast-numbering phase to collect function literals which
should be compiled eagerly. This is then used to eagerly compile the inner
functions before compiling the outer function. This will be used to queue
compilation jobs on the CompilerDispatcher in a later CL.

This CL moves the compilation of eager inner functions out of the
GetSharedFunctionInfo function and instead compiles them explicitly. This
simplifies GetSharedFunctionInfo and also means there is no need to pass a
LazyCompilationMode to the function, so this concept has been removed.

BUG=v8:5203,v8:5215

Review-Url: https://codereview.chromium.org/2618553004
Cr-Commit-Position: refs/heads/master@{#42221}
2017-01-11 12:18:48 +00:00
yangguo
a8cfc2f5e4 [debugger] deprecate v8::Debug:GetDebugContext.
R=jgruber@chromium.org
BUG=v8:5530

Review-Url: https://codereview.chromium.org/2589203002
Cr-Original-Commit-Position: refs/heads/master@{#41911}
Committed: 381082168d
Review-Url: https://codereview.chromium.org/2589203002
Cr-Commit-Position: refs/heads/master@{#42220}
2017-01-11 11:59:54 +00:00
jkummerow
93a357c707 Fix: KeyedStoreGeneric must check for writable array length
This has been broken since forever.

BUG=v8:5669

Review-Url: https://codereview.chromium.org/2610343002
Cr-Commit-Position: refs/heads/master@{#42219}
2017-01-11 11:37:44 +00:00