Commit Graph

36296 Commits

Author SHA1 Message Date
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
marja
788e74f5dc Preparsing inner functions: Tentatively turn on FLAG_lazy_inner_functions.
BUG=v8:5501

Review-Url: https://codereview.chromium.org/2567953003
Cr-Commit-Position: refs/heads/master@{#41673}
2016-12-13 13:13:49 +00:00
jarin
e32535af5a [turbofan] Remove value numbering from late optimization pass.
Review-Url: https://codereview.chromium.org/2570813002
Cr-Commit-Position: refs/heads/master@{#41672}
2016-12-13 13:03:20 +00:00
shiyu.zhang
5c1babcc16 [ia32] Optimize index calculation for certain checked load/stores.
It reduces the add operation for certain checked load/stores by pre-do the add in compiling phase.

BUG=

Review-Url: https://codereview.chromium.org/2563483005
Cr-Commit-Position: refs/heads/master@{#41671}
2016-12-13 12:45:46 +00:00
marja
0c827cd000 PreParsing inner funcs: Remove nonsense code from PreParser.
The assignment in default parameters (e.g., function foo(a = somedefault) { }
doesn't flow through PreParserFactory::NewAssignment even if the comment claims so.
Thus, piping through the variables is not needed.

Kudos to neis@ for pointing this out.

BUG=v8:5501
R=neis@chromium.org

Review-Url: https://codereview.chromium.org/2569983003
Cr-Commit-Position: refs/heads/master@{#41670}
2016-12-13 12:35:11 +00:00
leszeks
1df36a80de [turbofan] Add a mutex for recording compilation statistics
There was previously a race between different phases recording their
first entry -- and thus, their insert order -- on the main and
concurrent-compilation thread. This would later manifest as a segfault
when creating the sorted array of phases for --turbo-stats (as two
phases would have the same insert order and so there would be a gap in
the array).

Review-Url: https://codereview.chromium.org/2572713003
Cr-Commit-Position: refs/heads/master@{#41669}
2016-12-13 12:15:14 +00:00
yangguo
449829b85c [serializer] API to re-use global proxy in v8::Context::FromSnapshot.
R=jochen@chromium.org, peria@chromium.org
BUG=chromium:617892

Review-Url: https://codereview.chromium.org/2571743002
Cr-Commit-Position: refs/heads/master@{#41668}
2016-12-13 11:24:58 +00:00
mstarzinger
397a09afc5 Revert of [deoptimizer] Enable test that should no longer fail. (patchset #1 id:1 of https://codereview.chromium.org/2568723003/ )
Reason for revert:
Still flakes on ARM.

Original issue's description:
> [deoptimizer] Enable test that should no longer fail.
>
> R=jarin@chromium.org
> TEST=cctest/test-cpu-profiler/CollectDeoptEvents
>
> Committed: https://crrev.com/3f9c2c590d687562d6adb531d1159738c07013f4
> Cr-Commit-Position: refs/heads/master@{#41664}

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

Review-Url: https://codereview.chromium.org/2568403003
Cr-Commit-Position: refs/heads/master@{#41667}
2016-12-13 10:29:12 +00:00
ulan
ca9209d705 [heap] Special handling for small heaps in eager finalization of
incremental marking.

BUG=chromium:671994

Review-Url: https://codereview.chromium.org/2565173004
Cr-Commit-Position: refs/heads/master@{#41666}
2016-12-13 10:25:53 +00:00
machenbach
cd23d6771a Revert of [heap] Enable black allocation when finalizing marking. (patchset #3 id:40001 of https://codereview.chromium.org/2440943002/ )
Reason for revert:
Seems to block roll:
https://codereview.chromium.org/2569133002/

Original issue's description:
> [heap] Enable black allocation when finalizing marking.
>
> BUG=chromium:630386
>
> Committed: https://crrev.com/a98d971412a5c32967bbef4b77b9d2658055ff1c
> Cr-Commit-Position: refs/heads/master@{#41655}

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

Review-Url: https://codereview.chromium.org/2567353002
Cr-Commit-Position: refs/heads/master@{#41665}
2016-12-13 09:41:04 +00:00
mstarzinger
3f9c2c590d [deoptimizer] Enable test that should no longer fail.
R=jarin@chromium.org
TEST=cctest/test-cpu-profiler/CollectDeoptEvents

Review-Url: https://codereview.chromium.org/2568723003
Cr-Commit-Position: refs/heads/master@{#41664}
2016-12-13 09:19:38 +00:00
vegorov
7371284dcf Fix how Hydrogen traces inlined functions.
https://crrev.com/c3a6ca68d0646b10885ef7017557eaf463db2e4a changed what kind of information is dumped which broke some properties of the output that IRHydra relies on:

1. Because IRHydra does not have access to the whole scripts it relies on function sources dumps to map IR and deoptimization to the actual source. This means that source positions must be dumped in a way that allows for this mapping and previously we used positions relative to the beginning of the function to allow that. Now we are dumping absolute script positions which means that function sources must be annotated with the start position so that IRHydra (or any other similar tools) could translate absolute script positions into function-relative ones.

2. When dumping inlined functions we should dump which function are we inlining into because position itself is not enough to recover the inlining stack from the output.

BUG=

Review-Url: https://codereview.chromium.org/2573653002
Cr-Commit-Position: refs/heads/master@{#41663}
2016-12-13 07:31:30 +00:00
gsathya
10e30279b7 [typedarrays] fix typo
Review-Url: https://codereview.chromium.org/2569663003
Cr-Commit-Position: refs/heads/master@{#41662}
2016-12-13 06:21:45 +00:00
v8-autoroll
6e232fde83 Update V8 DEPS.
Rolling v8/build: 7321edc..52f7afe

Rolling v8/third_party/catapult: 19565fd..c69690a

Rolling v8/tools/clang: 53bdedc..7e13606

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

Review-Url: https://codereview.chromium.org/2566153004
Cr-Commit-Position: refs/heads/master@{#41661}
2016-12-13 04:35:53 +00:00
gsathya
2886e3917f [promises] Refactor CreatePromise
BUG=v8:5343

Review-Url: https://codereview.chromium.org/2571663002
Cr-Commit-Position: refs/heads/master@{#41660}
2016-12-13 02:15:20 +00:00
zhengxing.li
493d48d8a6 [x86] [crankshaft] unify jump label's distance value in DoWrapReceiver().
Currently the jump label's distance value in LCodeGen::DoWrapReceiver() of X86 is unconsistent.

  For avoiding potential bugs caused by this unconsistent usage for the same label when DeoptEveryNTimes()
  return true, This CL unify the label's distance value usage in LCodeGen::DoWrapReceiver().

  For more informations, please refer CL #41419 (https://codereview.chromium.org/2539403002/ ).

BUG=

Review-Url: https://codereview.chromium.org/2554493002
Cr-Commit-Position: refs/heads/master@{#41659}
2016-12-13 01:56:23 +00:00
lpy
dca99f4fc8 [Tracing] Show background parsing runtime statistics in tracing
When ParseOnBackground is done, we should construct a trace event and dump all
background parsing runtime statistics as argument. In tracing we don't want to
merge it back to to main thread, instead we show the trace event together with
background parsing trace event on script streamer thread track in Trace Viewer.

To perf sheriff: A series of counters ParseBackgroundxxx and
PreparseBackgroundxxx will be taken into account in this patch, thus runtime
statistics graph will increase after this patch gets landed.

BUG=v8:5089

Review-Url: https://codereview.chromium.org/2559403002
Cr-Commit-Position: refs/heads/master@{#41658}
2016-12-12 23:15:08 +00:00
dgozman
2bdd0feb77 [inspector] Store interger in context embedder data instead of a string.
This is to improve the performance of common operation of
extracting contextId or contextGroupId out of Context.

BUG=none

Review-Url: https://codereview.chromium.org/2558913004
Cr-Commit-Position: refs/heads/master@{#41657}
2016-12-12 21:17:32 +00:00
jkummerow
bb753b6dd7 [stubs] Fix negative index lookup in hasOwnProperty
...and HasProperty, for dictionary-elements receivers.

BUG=chromium:673008

Review-Url: https://codereview.chromium.org/2568943002
Cr-Commit-Position: refs/heads/master@{#41656}
2016-12-12 20:13:07 +00:00
hpayer
a98d971412 [heap] Enable black allocation when finalizing marking.
BUG=chromium:630386

Review-Url: https://codereview.chromium.org/2440943002
Cr-Commit-Position: refs/heads/master@{#41655}
2016-12-12 19:54:37 +00:00