Commit Graph

52734 Commits

Author SHA1 Message Date
Yang Guo
169fe8c2ad [node] remove everything before updating v8.
This ensures that we have a clean slate when updating to newer V8.

TBR=machenbach@chromium.org

Bug: v8:8584
Change-Id: I37f6e4a42738e5e9ea5bfdca5465d6a3e984fe65
Reviewed-on: https://chromium-review.googlesource.com/c/1378169
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58242}
2018-12-14 14:14:26 +00:00
Clemens Hammacher
768093f4c3 [wasm] Handle simple opcodes specially
Avoid the indirection via the signature, instead specialize per
signature. On a microbenchmark run locally, this speeds up Liftoff by
~5% and validation by ~15%.

R=titzer@chromium.org

Bug: v8:8423
Change-Id: Ia0e9ab0dcaa759e4ed4dcd46d2e6f16e65790915
Reviewed-on: https://chromium-review.googlesource.com/c/1373778
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58241}
2018-12-14 14:00:52 +00:00
peterwmwong
0091fbe8d7 [builtins] Move InternalPackedArray initialization into bootstrapper.
Incremental step towards the removal of JS Natives.  This CL Moves
the initialization of InternalPackedArray functions and prototype out
of prologue.js and into bootstrapper.

Bug: v8:7624
Change-Id: I7a2a1afbd1721ddc9bc9ac677c03f0817e4f1418
Reviewed-on: https://chromium-review.googlesource.com/c/1374995
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Peter Wong <peter.wm.wong@gmail.com>
Cr-Commit-Position: refs/heads/master@{#58240}
2018-12-14 13:28:59 +00:00
Camillo Bruni
fb434f1c6c [runtime] Fix Runtime_InternalSetPrototype
Do not set the name property on any function or classes. This is not
required as per spec #sec-__proto__-property-names-in-object-initializers.

Bug: v8:7773
Change-Id: Iade96573690e5b14b60434c37683f782cf9cb2cb
Reviewed-on: https://chromium-review.googlesource.com/c/1375912
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58239}
2018-12-14 12:06:04 +00:00
Clemens Hammacher
19d39a0f33 [gdb] Print DCHECK error message
When selecting the frame above the V8_Dcheck method (at the DCHECK
location), it helps enormously to immediately see the error message
generated by the DCHECK. This extends the dcheck_stop_handler to find
and print this message.

Drive-by: Speed up the handler by stopping after the first V8_Dcheck
frame.

R=mstarzinger@chromium.org

Bug: v8:8562
Change-Id: If3a8f3aaab6a0014006ccac7260f37d5d90363c5
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/1378170
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58238}
2018-12-14 10:48:35 +00:00
Alessandro Pignotti
5f6b780374 OwnedByAddressingOperand should also allow uses by ProtectedLoad
ProtectedLoad/ProtectedStore opcodes are used in WebAssembly to represent memory
accesses. Since they are not part of the allowed opcodes in OwnedByAddressingOperand
it is not possible to take advantage of addressing modes to encode common patterns
for the pointer input value.

R=jarin@chromium.org

Bug: v8:8508
Change-Id: Ic62bf13fed7b1d86afb112d9aa59cd7073a28e72
Reviewed-on: https://chromium-review.googlesource.com/c/1354458
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58237}
2018-12-14 09:39:55 +00:00
Maya Lekova
3dbb374938 [test] Fix flaky wasm test and add stable regression test
Remove a DCHECK that got triggered in the rare condition that GC kicks in
during CompilationDependencies::Commit, changing the pretenuring decision,
thus leading to deoptimization. To make sure this rare case is properly
handled, add a new FLAG_pretenure_during_compilation and a cctest that
simulates it predictably.

R=jarin@chromium.org,mvstanton@chromium.org

Bug: v8:8520
Change-Id: If83f8a3d4659a694357b3869c931c7d7c164fd1a
Reviewed-on: https://chromium-review.googlesource.com/c/1363143
Commit-Queue: Maya Lekova <mslekova@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Reviewed-by: Michael Stanton <mvstanton@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58236}
2018-12-14 09:32:59 +00:00
Stephan Herhut
508229ea68 [regalloc] Improve printing of liverange overview
Now, we also print the fixed ranges, which are used to model fixed
register constraints.

Change-Id: Ife25529c911eaf950a33a4c099636a8f8925308e
Reviewed-on: https://chromium-review.googlesource.com/c/1375913
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Commit-Queue: Stephan Herhut <herhut@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58235}
2018-12-14 09:06:58 +00:00
Jakob Kummerow
2cce5c52c2 Make RegExpFlagsFromString faster
The new ObjectPtr design makes non-inlined helper functions a little
more expensive because "this" is always a pointer where pass-by-value
would be more efficient, which is an issue for functions whose size puts
them right at the threshold of getting inlined or not. String::Get falls
into this category when called from RegExpFlagsFromString. In this case,
we can do even better than restoring inlineability by fine-tuning
the control flow a bit.

This should repair the regression in crbug.com/910573

Bug: chromium:910573
Change-Id: Ie6b68ef01cd978ec502d8d6c1da788c77422dce7
Reviewed-on: https://chromium-review.googlesource.com/c/1369087
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58234}
2018-12-14 01:25:02 +00:00
Frank Tang
44771cbe0c [Intl] Fixes Intl.DateTimeFormat hourCycle option issues.
Add bit flags to remember hourCycle
Reorder the code in JSDateTimeFormat::Initialize
Implement the hourCycle option resolutions
Fix intl402/DateTimeFormat/prototype/resolvedOptions/hourCycle in test262

Bug: v8:7482
Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
Change-Id: Idc136276da89b95df6ae864161b114e34f9dcae8
Reviewed-on: https://chromium-review.googlesource.com/c/1253101
Commit-Queue: Frank Tang <ftang@chromium.org>
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Reviewed-by: Jungshik Shin <jshin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58233}
2018-12-14 01:20:42 +00:00
Sigurd Schneider
b55dd17f19 Reland "Reland "Reland "[code-comments] Put code comments into the code object"""
This is a reland of 9c0a48580b

Original change's description:
> Reland "Reland "[code-comments] Put code comments into the code object""
>
> This is a reland of ed3d647284
>
> This reland fixes that padding at the end of Wasm instruction streams
> triggered asserts in the code printer.
>
> Original change's description:
> > Reland "[code-comments] Put code comments into the code object"
> >
> > This is a reland of e774cffe2b
> >
> > This reland disables a test as v8:8548 is blocking it, which was
> > broken by a recent CL. CQ did not catch this because the merge-base
> > CQ used did not yet contain the CL that caused v8:8548.
> >
> > Original change's description:
> > > [code-comments] Put code comments into the code object
> > >
> > > Code comments in the snapshot can now be enabled with gn
> > > arg 'v8_enable_snapshot_code_comments'
> > >
> > > Bug: v8:7989
> > > Change-Id: I8bd00cafa63132d00d849394c311ba15e6b6daf3
> > > Reviewed-on: https://chromium-review.googlesource.com/c/1329173
> > > Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
> > > Reviewed-by: Jakob Gruber <jgruber@chromium.org>
> > > Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
> > > Reviewed-by: Michael Stanton <mvstanton@chromium.org>
> > > Cr-Commit-Position: refs/heads/master@{#58020}
> >
> > TBR=mvstanton@chromium.org,mstarzinger@chromium.org,jgruber@chromium.org,tebbi@chromium.org
> >
> > Bug: v8:7989, v8:8548
> > Change-Id: I464fc897205fefdf2dfc2eadc54d699c4e08a0e9
> > Reviewed-on: https://chromium-review.googlesource.com/c/1361166
> > Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
> > Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
> > Cr-Commit-Position: refs/heads/master@{#58028}
>
> Bug: v8:7989, v8:8548
> Change-Id: I254f55ff687ad049f8d92b09331ed26a2bd05d7d
> Reviewed-on: https://chromium-review.googlesource.com/c/1371784
> Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
> Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
> Reviewed-by: Jakob Gruber <jgruber@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#58221}

TBR=jgruber@chromium.org,mstarzinger@chromium.org

Bug: v8:7989, v8:8548, v8:8593
Change-Id: I4f7ffc98e0281c7b744eb4a04ba0763896c7b59b
Reviewed-on: https://chromium-review.googlesource.com/c/1375919
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58232}
2018-12-13 22:35:55 +00:00
Sergiy Belozorov
7e123a74dc Revert "[tools] Add vpython config for run-tests.py"
This reverts commit 0b971dc21e.

Reason for revert: not needed anymore

Original change's description:
> [tools] Add vpython config for run-tests.py
> 
> R=​machenbach@chromium.org
> 
> Bug: v8:7187
> Change-Id: I9c64d637501f074464b1fe3637df50be447603ab
> Reviewed-on: https://chromium-review.googlesource.com/1098934
> Commit-Queue: Sergiy Byelozyorov <sergiyb@chromium.org>
> Reviewed-by: Michael Achenbach <machenbach@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#53875}

TBR=machenbach@chromium.org,sergiyb@chromium.org

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: v8:7187
Change-Id: I55d34e65c32e4ae8864ff883870d82803aa11355
Reviewed-on: https://chromium-review.googlesource.com/c/1377049
Reviewed-by: Sergiy Belozorov <sergiyb@chromium.org>
Commit-Queue: Sergiy Belozorov <sergiyb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58231}
2018-12-13 20:59:25 +00:00
Ross McIlroy
d37d767b92 [Test] Add --stress-flush-bytecode to gc-stress tester.
Also disables --stress-flush-bytecode on some mjsunit tests which fail
when bytecode flushing is stressed due to test invariants.

Bug=v8:8395

Change-Id: If627910214b3c266e7776340ba182829148e8289
Reviewed-on: https://chromium-review.googlesource.com/c/1372071
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58230}
2018-12-13 18:37:56 +00:00
Stephan Herhut
7daf10ad05 [wasm] Annotate global handles for debuggability
This change adds labels to the various global handles used by the wasm
compilation. Labels show up in retaining path information when
debugging lifetime issues.

Change-Id: I9aee20647868b5b758412d231c817909e4130d8c
Reviewed-on: https://chromium-review.googlesource.com/c/1372124
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Stephan Herhut <herhut@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58229}
2018-12-13 18:03:56 +00:00
Clemens Hammacher
8a5c009563 Revert "Reland "Reland "[code-comments] Put code comments into the code object"""
This reverts commit 9c0a48580b.

Reason for revert: Seems to break nosnap debug: https://ci.chromium.org/p/v8/builders/luci.v8.ci/V8%20Linux%20-%20nosnap%20-%20debug/22228

Original change's description:
> Reland "Reland "[code-comments] Put code comments into the code object""
> 
> This is a reland of ed3d647284
> 
> This reland fixes that padding at the end of Wasm instruction streams
> triggered asserts in the code printer.
> 
> Original change's description:
> > Reland "[code-comments] Put code comments into the code object"
> >
> > This is a reland of e774cffe2b
> >
> > This reland disables a test as v8:8548 is blocking it, which was
> > broken by a recent CL. CQ did not catch this because the merge-base
> > CQ used did not yet contain the CL that caused v8:8548.
> >
> > Original change's description:
> > > [code-comments] Put code comments into the code object
> > >
> > > Code comments in the snapshot can now be enabled with gn
> > > arg 'v8_enable_snapshot_code_comments'
> > >
> > > Bug: v8:7989
> > > Change-Id: I8bd00cafa63132d00d849394c311ba15e6b6daf3
> > > Reviewed-on: https://chromium-review.googlesource.com/c/1329173
> > > Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
> > > Reviewed-by: Jakob Gruber <jgruber@chromium.org>
> > > Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
> > > Reviewed-by: Michael Stanton <mvstanton@chromium.org>
> > > Cr-Commit-Position: refs/heads/master@{#58020}
> >
> > TBR=mvstanton@chromium.org,mstarzinger@chromium.org,jgruber@chromium.org,tebbi@chromium.org
> >
> > Bug: v8:7989, v8:8548
> > Change-Id: I464fc897205fefdf2dfc2eadc54d699c4e08a0e9
> > Reviewed-on: https://chromium-review.googlesource.com/c/1361166
> > Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
> > Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
> > Cr-Commit-Position: refs/heads/master@{#58028}
> 
> Bug: v8:7989, v8:8548
> Change-Id: I254f55ff687ad049f8d92b09331ed26a2bd05d7d
> Reviewed-on: https://chromium-review.googlesource.com/c/1371784
> Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
> Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
> Reviewed-by: Jakob Gruber <jgruber@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#58221}

TBR=mvstanton@chromium.org,mstarzinger@chromium.org,sigurds@chromium.org,jgruber@chromium.org

Change-Id: I681a3c63120c6ab953bfe9cd2b07bcf560ebfdee
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:7989, v8:8548
Reviewed-on: https://chromium-review.googlesource.com/c/1375916
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58228}
2018-12-13 16:57:15 +00:00
Sigurd Schneider
bf16b8d395 Revert "Enable 31bit Smis everywhere"
This reverts commit c1bf25bb68.

Reason for revert: We got many regressions:

https://chromeperf.appspot.com/group_report?rev=58157

Original change's description:
> Enable 31bit Smis everywhere
> 
> This is a experiment to see how performance is impacted. If we tank
> too much, we can revert this change.
> 
> Change-Id: I01be33f5dd78aee6a5beecdc62adbaa6c3850eb1
> Bug: v8:8344
> Reviewed-on: https://chromium-review.googlesource.com/c/1355279
> Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
> Reviewed-by: Igor Sheludko <ishell@chromium.org>
> Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#58157}

TBR=jarin@chromium.org,sigurds@chromium.org,ishell@chromium.org

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: v8:8344
Change-Id: I407cb99743a08452edcecfc2e945ef98509e8d32
Reviewed-on: https://chromium-review.googlesource.com/c/1375911
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58227}
2018-12-13 16:19:40 +00:00
Mathias Bynens
f605302e33 [test] Mark early RegExp errors as FAIL_PHASE_ONLY
This ensures V8 at least throws the correct exception for these
tests, even if it happens at the wrong phase (i.e. at runtime
instead of at parse time).

Bug: v8:8467
Change-Id: I101aa2c7e073a56163c29e96e6c47f6ff0a01e53
Reviewed-on: https://chromium-review.googlesource.com/c/1375909
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Mathias Bynens <mathias@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58226}
2018-12-13 15:52:28 +00:00
Michael Starzinger
4f2333692f [wasm] Fix indentation when printing exception expressions.
R=herhut@chromium.org
BUG=v8:8091

Change-Id: Ia4353dff0726a4c317c8e5e41617d93df193705f
Reviewed-on: https://chromium-review.googlesource.com/c/1375849
Reviewed-by: Stephan Herhut <herhut@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58225}
2018-12-13 15:21:52 +00:00
Michael Starzinger
366cddfa82 [wasm] Allow storing of arguments count in a safepoint.
This overlays the "arguments count" and the "deoptimization index"
fields within a safepoint entry. It allows for a larger value of
arguments count to be stored in entries that do not contain a
deoptimization index. Currently the arguments count is unused in
TurboFan, but it will be used to handle reference type arguments in
WebAssembly code.

R=ahaas@chromium.org
BUG=v8:7581

Change-Id: I1e1d5af7e69288f046dc327de5d6e0466fc9ceaf
Reviewed-on: https://chromium-review.googlesource.com/c/1371829
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58224}
2018-12-13 15:07:54 +00:00
Sigurd Schneider
7a79c0b10b [debugger] Disable debug/lazy-deopt-then-flush-bytecode
Bug: v8:8592
Change-Id: I60d9454e9696ac22ebdbdcc1023942698d4c94bc
Notry: true
Reviewed-on: https://chromium-review.googlesource.com/c/1375910
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58223}
2018-12-13 14:57:29 +00:00
Clemens Hammacher
acc4ed885e [Liftoff] Avoid unneeded CacheState Steal
When finishing a one-armed if, the else state has to be merged into the
end state. We did this before by switching to the else state, then
doing the merge. This CL changes this to avoid the switch.

Drive-by: Add a few missing "const" qualifiers. The style guide forbids
non-const l-value references.

R=titzer@chromium.org

Bug: v8:8423, v8:6600
Change-Id: Iab2aeca393147fba55493bebabd27bc4d77baa0f
Reviewed-on: https://chromium-review.googlesource.com/c/1375656
Reviewed-by: Ben Titzer <titzer@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58222}
2018-12-13 14:56:24 +00:00
Sigurd Schneider
9c0a48580b Reland "Reland "[code-comments] Put code comments into the code object""
This is a reland of ed3d647284

This reland fixes that padding at the end of Wasm instruction streams
triggered asserts in the code printer.

Original change's description:
> Reland "[code-comments] Put code comments into the code object"
>
> This is a reland of e774cffe2b
>
> This reland disables a test as v8:8548 is blocking it, which was
> broken by a recent CL. CQ did not catch this because the merge-base
> CQ used did not yet contain the CL that caused v8:8548.
>
> Original change's description:
> > [code-comments] Put code comments into the code object
> >
> > Code comments in the snapshot can now be enabled with gn
> > arg 'v8_enable_snapshot_code_comments'
> >
> > Bug: v8:7989
> > Change-Id: I8bd00cafa63132d00d849394c311ba15e6b6daf3
> > Reviewed-on: https://chromium-review.googlesource.com/c/1329173
> > Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
> > Reviewed-by: Jakob Gruber <jgruber@chromium.org>
> > Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
> > Reviewed-by: Michael Stanton <mvstanton@chromium.org>
> > Cr-Commit-Position: refs/heads/master@{#58020}
>
> TBR=mvstanton@chromium.org,mstarzinger@chromium.org,jgruber@chromium.org,tebbi@chromium.org
>
> Bug: v8:7989, v8:8548
> Change-Id: I464fc897205fefdf2dfc2eadc54d699c4e08a0e9
> Reviewed-on: https://chromium-review.googlesource.com/c/1361166
> Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
> Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#58028}

Bug: v8:7989, v8:8548
Change-Id: I254f55ff687ad049f8d92b09331ed26a2bd05d7d
Reviewed-on: https://chromium-review.googlesource.com/c/1371784
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58221}
2018-12-13 14:51:52 +00:00
Clemens Hammacher
bed304a354 [wasm] Use atomic instead of mutex for error checking
Different threads check this flag multiple times per function, and
currently all of them synchronize on a single mutex. It's not even a
reader-writer-lock, hence they might block each other just for checking
whether an error has been set.
Threads don't rely on precise information here, this is just a check to
abort early if compilation failed anyway. Also in the current
implementation, no ordering is guaranteed on this error field.

We can avoid taking the mutex by turning the field into an atomic
pointer. It will be updated at most once, from nullptr to the first
error detected. To check whether an error is set, we can even use
relaxed memory order, since we won't look into the object behind the
pointer.

R=titzer@chromium.org

Bug: v8:8423
Change-Id: I71354c8d463a57c219eb21e53136556ae787ebd4
Cq-Include-Trybots: luci.v8.try:v8_linux64_tsan_rel
Reviewed-on: https://chromium-review.googlesource.com/c/1375661
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Ben Titzer <titzer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58220}
2018-12-13 14:34:30 +00:00
Tobias Tebbi
bc9704e030 [csa] enable basic Turbofan machine graph optimizations
This enables Turbofan's machine graph constant folding and branch
reduction on CSA/Torque code.

Bug: v8:7793
Change-Id: I5ada63d0c6d920e5f900b8e9255d884c799a9c1e
Reviewed-on: https://chromium-review.googlesource.com/c/1373785
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58219}
2018-12-13 13:06:55 +00:00
Leszek Swirski
a176aec77f [ignition] Add golden files for destructuring assignment
Change-Id: I71c6e52229cae2aba0a5aec1844c0643484354e5
Reviewed-on: https://chromium-review.googlesource.com/c/1375657
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58218}
2018-12-13 12:39:02 +00:00
v8-ci-autoroll-builder
a4e445a195 Update V8 DEPS.
Rolling v8/build: e250719..8ee3e8b

Rolling v8/test/wasm-js/data: 6fdf92b..2640923

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/149e7c6..368ebf1

Rolling v8/third_party/depot_tools: e760411..7fa4fbc

Rolling v8/third_party/fuchsia-sdk: 7914672..21261c5

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

Change-Id: Icee1968139aefa20bb0416e324b02ac4d594c349
Reviewed-on: https://chromium-review.googlesource.com/c/1375002
Reviewed-by: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58217}
2018-12-13 12:33:02 +00:00
Ross McIlroy
3cdee40e59 [Compiler] Ensure JSFunction is reset if bytecode was flushed before trying to deoptimize it.
BUG=v8:8395

Change-Id: I6e4c7550d71f4fe8b4df36a0a5794f89bf94d70a
Reviewed-on: https://chromium-review.googlesource.com/c/1373774
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58216}
2018-12-13 12:27:20 +00:00
Igor Sheludko
bc078ce4fc [ptr-compr] Introduce CompressedXxxSlots
for accessing compressed on-heap slots with corresponding contents.

Bug: v8:7703
Change-Id: Icb314f02f4d5e8d70b997dec02ee9a9568af5d5d
Reviewed-on: https://chromium-review.googlesource.com/c/1370040
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58215}
2018-12-13 12:07:03 +00:00
Michael Achenbach
50b72266ff Revert "Reland "[build] Pull binutils via DEPS""
This reverts commit 09c49ee064.

Reason for revert: Still breaks the node.js bot.

Original change's description:
> Reland "[build] Pull binutils via DEPS"
> 
> This is a reland of 98bbb636b1
> 
> Original change's description:
> > [build] Pull binutils via DEPS
> >
> > This pulls binutils from a subtreed repository of Chromium:
> > https://chromium.googlesource.com/chromium/src/third_party/binutils/
> >
> > Bug: chromium:718157
> > Change-Id: I532c7e84d83f716728e4f9f715cfdb82ea5d5f98
> > Reviewed-on: https://chromium-review.googlesource.com/c/1370043
> > Reviewed-by: Yang Guo <yangguo@chromium.org>
> > Reviewed-by: Sergiy Belozorov <sergiyb@chromium.org>
> > Commit-Queue: Michael Achenbach <machenbach@chromium.org>
> > Cr-Commit-Position: refs/heads/master@{#58180}
> 
> Bug: chromium:718157, v8:8584
> Change-Id: I1c9773bc5fa0a629e35db5151e535e63839f2801
> Reviewed-on: https://chromium-review.googlesource.com/c/1375655
> Reviewed-by: Sergiy Belozorov <sergiyb@chromium.org>
> Commit-Queue: Michael Achenbach <machenbach@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#58213}

TBR=machenbach@chromium.org,yangguo@chromium.org,sergiyb@chromium.org

Change-Id: I1935f4aef0d6eb4f58e25197d14ccf2c2c645b15
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:718157, v8:8584
Reviewed-on: https://chromium-review.googlesource.com/c/1375659
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58214}
2018-12-13 12:05:58 +00:00
Michael Achenbach
09c49ee064 Reland "[build] Pull binutils via DEPS"
This is a reland of 98bbb636b1

Original change's description:
> [build] Pull binutils via DEPS
>
> This pulls binutils from a subtreed repository of Chromium:
> https://chromium.googlesource.com/chromium/src/third_party/binutils/
>
> Bug: chromium:718157
> Change-Id: I532c7e84d83f716728e4f9f715cfdb82ea5d5f98
> Reviewed-on: https://chromium-review.googlesource.com/c/1370043
> Reviewed-by: Yang Guo <yangguo@chromium.org>
> Reviewed-by: Sergiy Belozorov <sergiyb@chromium.org>
> Commit-Queue: Michael Achenbach <machenbach@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#58180}

Bug: chromium:718157, v8:8584
Change-Id: I1c9773bc5fa0a629e35db5151e535e63839f2801
Reviewed-on: https://chromium-review.googlesource.com/c/1375655
Reviewed-by: Sergiy Belozorov <sergiyb@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58213}
2018-12-13 11:34:18 +00:00
Jakob Gruber
e61d3564e7 [builtins] Associate ASM builtins with descriptors
Post-stub-to-builtin migration, all explicit connection between
descriptors and their associated ASM code has been lost. This restores
the connection where possible. Builtins without an associated
descriptor are marked with the DummyDescriptor.

Drive-by: alpha-sort the descriptor list.
Drive-by: use Builtins::CallableFor in code factory.

Bug: v8:8562, v8:8553
Change-Id: If1f13bbaf7e42453b3235cc97c58ada91b5fa7b8
Reviewed-on: https://chromium-review.googlesource.com/c/1373552
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58212}
2018-12-13 11:32:28 +00:00
Sergiy Belozorov
996cf21954 [tools] Generate additional variant for FAIL_PHASE_ONLY tests
The additional variant does not use wrapper disabling phase tests and negated
outcome processor. This allows to ensure that tests marked FAIL_PHASE_ONLY, do
actually fail without it.

R=machenbach@chromium.org

Bug: v8:8467
Change-Id: I66e07bd7107520872cc013bf0f33fdc6664baf56
Reviewed-on: https://chromium-review.googlesource.com/c/1361164
Commit-Queue: Sergiy Belozorov <sergiyb@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58211}
2018-12-13 11:28:57 +00:00
Mythri
bc887f3151 Update runtime IC to check if feedback vector is valid before using it
With V8 lite mode we don't allocate feedback vectors always. This cl
adds a new NO_FFEDBACK IC state and uses it use/update feedback only
when there is a valid feedback vector.

Bug: v8:8394
Change-Id: I9b66ac38c69876e5c1e6eb01ba328a49678c8738
Reviewed-on: https://chromium-review.googlesource.com/c/1365278
Commit-Queue: Mythri Alle <mythria@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58210}
2018-12-13 11:00:54 +00:00
Alexander Timokhin
014eb820f5 Reland "Don't use |v8_initializers| code in |v8_base|"
This is a reland of 2e36e9ea1e

Was reverted because of v8_presubmit.py issue in
https://chromium-review.googlesource.com/c/v8/v8/+/1374292

Original change's description:
> Don't use |v8_initializers| code in |v8_base|
>
> Removing |CodeStubAssembler| from |v8_base| source list (see
> https://chromium-review.googlesource.com/c/v8/v8/+/1346329) leads to
> linkage problems with some build configurations because it was explicitly
> and implicitly included in |v8_base| code.
>
> This CL decouple this code and fixes problems.
>
> Bug: v8:7777
> Change-Id: I58de5c62914bc77645ed6cc9114409890bc13189
> Reviewed-on: https://chromium-review.googlesource.com/c/1372067
> Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
> Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
> Reviewed-by: Jakob Gruber <jgruber@chromium.org>
> Commit-Queue: Jakob Gruber <jgruber@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#58200}

Bug: v8:7777
Change-Id: Iaa00e73c7dbd8c413fbf15a17709aa12eda9a706
Reviewed-on: https://chromium-review.googlesource.com/c/1375654
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58209}
2018-12-13 10:48:44 +00:00
Michael Achenbach
c4fdb272bc [build] Manually roll luci-go
This ports:
https://crrev.com/c/1374050

TBR=sergiyb@chromium.org

Bug: chromium:914712
Change-Id: Ia5eccd9b689ca103d819e65706b4c8ad062a677d
Reviewed-on: https://chromium-review.googlesource.com/c/1375653
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58208}
2018-12-13 10:09:20 +00:00
Jakob Gruber
28b01697ff [asm] Pad instruction area with int3
The disassembler expects the actual instruction area of a code object
(i.e. from InstructionStart() to the first embedded metadata section
such as the handler table) to contain only valid instructions.

This changes asm::DataAlign() to pad with 0xcc bytes, which are int3
instructions on x64 and ia32.

Bug: v8:8559
Change-Id: I8a0920a85d4de89194e5c8d3d1a541d8b36fef92
Reviewed-on: https://chromium-review.googlesource.com/c/1375652
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58207}
2018-12-13 09:56:21 +00:00
Yang Guo
46e450ed04 [node] also remove deleted files that are gitignored.
R=machenbach@chromium.org

Bug: v8:8584
Change-Id: If7947ef3e06e3808476625690227fe93b7728d7b
Reviewed-on: https://chromium-review.googlesource.com/c/1375649
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58206}
2018-12-13 09:10:54 +00:00
Clemens Hammacher
b5c757d6b7 [wasm] Deprecate old serialization API
Uses of the old API were removed from chromium in
https://crrev.com/c/1373749.

R=adamk@chromium.org

Bug: chromium:912031
Change-Id: I3fed4d72c147ef8e00ec96f869af2134e7ee71c8
Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
Reviewed-on: https://chromium-review.googlesource.com/c/1373769
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58205}
2018-12-13 09:02:28 +00:00
Yutaka Hirano
228b362a52 Introduce v8::Promise::Then(context, on_fulfilled, on_rejected)
Currently v8::Promise::Then takes only one handler. It should take two handlers,
on_fulfilled and on_rejected like ECMAScript Promise.

Bug: chromium:912848
Change-Id: I08a20990a27b3f8621225fad42a8de1dad67796f
Reviewed-on: https://chromium-review.googlesource.com/c/1375509
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Yutaka Hirano <yhirano@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58204}
2018-12-13 08:41:55 +00:00
Frank Tang
fe0c99ad43 [Intl] Remove fixed tests.
TBR=jshin@chromium.org

Bug: v8:8469
Change-Id: I60f7868a19eec925a597f1355182c2fd8550a2d2
Reviewed-on: https://chromium-review.googlesource.com/c/1374990
Reviewed-by: Frank Tang <ftang@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Commit-Queue: Jungshik Shin <jshin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58203}
2018-12-13 01:36:16 +00:00
Frank Tang
105a977db2 [Intl] Roll ICU to 2823bdd7 from 407b393
407b393..2823bdd7
 https://chromium-review.googlesource.com/c/chromium/src/+/1373009

The following change includes:

  2823bdd7 Fix crash of new Intl.DateTimeFormat("ja-u-tz-uslax")

Test: v8: intl/regress-8469
Bug: v8:8469

Change-Id: I349402026744cce44269a7ef5a3c6e416a8d9ff6
Reviewed-on: https://chromium-review.googlesource.com/c/1372073
Commit-Queue: Frank Tang <ftang@chromium.org>
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Reviewed-by: Jungshik Shin <jshin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58202}
2018-12-12 21:00:45 +00:00
Michael Achenbach
7975e215f7 Revert "Don't use |v8_initializers| code in |v8_base|"
This reverts commit 2e36e9ea1e.

Reason for revert: Missing explicit include in cc file:
https://ci.chromium.org/p/v8/builders/luci.v8.ci/V8%20Presubmit/986

Original change's description:
> Don't use |v8_initializers| code in |v8_base|
> 
> Removing |CodeStubAssembler| from |v8_base| source list (see
> https://chromium-review.googlesource.com/c/v8/v8/+/1346329) leads to
> linkage problems with some build configurations because it was explicitly
> and implicitly included in |v8_base| code.
> 
> This CL decouple this code and fixes problems.
> 
> Bug: v8:7777
> Change-Id: I58de5c62914bc77645ed6cc9114409890bc13189
> Reviewed-on: https://chromium-review.googlesource.com/c/1372067
> Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
> Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
> Reviewed-by: Jakob Gruber <jgruber@chromium.org>
> Commit-Queue: Jakob Gruber <jgruber@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#58200}

TBR=jkummerow@chromium.org,jgruber@chromium.org,bmeurer@chromium.org,atimoxin@yandex-team.ru

Change-Id: I3e41fb5f8a9db6a78c56546a08e55610885d312b
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:7777
Reviewed-on: https://chromium-review.googlesource.com/c/1374292
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58201}
2018-12-12 18:26:38 +00:00
Alexander Timokhin
2e36e9ea1e Don't use |v8_initializers| code in |v8_base|
Removing |CodeStubAssembler| from |v8_base| source list (see
https://chromium-review.googlesource.com/c/v8/v8/+/1346329) leads to
linkage problems with some build configurations because it was explicitly
and implicitly included in |v8_base| code.

This CL decouple this code and fixes problems.

Bug: v8:7777
Change-Id: I58de5c62914bc77645ed6cc9114409890bc13189
Reviewed-on: https://chromium-review.googlesource.com/c/1372067
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58200}
2018-12-12 18:04:55 +00:00
Clemens Hammacher
63e46a69f5 [Liftoff] Remove redundant stack_base field
This information is already stored in ControlBase::stack_depth.

R=titzer@chromium.org

Bug: v8:8423
Change-Id: Ie707878b5d7ee5180e44881086d05a590c0dea21
Reviewed-on: https://chromium-review.googlesource.com/c/1373786
Reviewed-by: Ben Titzer <titzer@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58199}
2018-12-12 17:54:20 +00:00
Clemens Hammacher
e5984c64c7 [wasm] Simplify error detection at end of functions
The {last_end_found_} field is redundant. If it's false, there will be
a control struct left on the stack.
Thus remove that field, and simplify the error detection condition.

R=titzer@chromium.org

Bug: v8:8423
Change-Id: I16ac4597f229c5e3abd923f8eb504f93afb82eb4
Reviewed-on: https://chromium-review.googlesource.com/c/1373788
Reviewed-by: Ben Titzer <titzer@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58198}
2018-12-12 17:53:15 +00:00
Clemens Hammacher
8afce15a69 [wasm][cleanup] Fix NumLocals function
Should be num_locals, and const.

R=titzer@chromium.org

Bug: v8:8562
Change-Id: I60889c9912ef95d344ede4d7755028116feee47e
Reviewed-on: https://chromium-review.googlesource.com/c/1373784
Reviewed-by: Ben Titzer <titzer@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58197}
2018-12-12 17:51:25 +00:00
Ben Smith
4084185b3c [wasm] Implement memory.init and memory.drop
`memory.init` copies bytes from a passive data segment to linear memory.

`memory.drop` is an instruction that informs the wasm VM that the instance no
longer needs access to the passive data segment.

Information about the passive data segments, including their contents, length,
and whether they are dropped, is stored in the `WasmInstanceObject` as primitive
arrays.

Bug: v8:7747
Change-Id: I1515c8868c9be227743456a539126c15280b5365
Reviewed-on: https://chromium-review.googlesource.com/c/1370691
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Ben Smith <binji@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58196}
2018-12-12 17:33:05 +00:00
Clemens Hammacher
972c290248 [wasm] Remove WasmCompilationUnit::failed
Compilation failures are already stored in the {CompilationState}. We
never use the information which individual compilation unit failed.
Hence remove that getter, and only check for failure of the overall
compilation.

R=ahaas@chromium.org

Bug: v8:7921, v8:8343
Change-Id: Ibf90be233c9ff576ec8a3413ba5abefe2fdb645e
Reviewed-on: https://chromium-review.googlesource.com/c/1373783
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58195}
2018-12-12 17:00:55 +00:00
Jakob Gruber
fac40e55c3 [snapshot] Don't restrict off-heap targets to builtin hosts
There's no reason to restrict off-heap targets to builtin host Code
objects during serialization. They can also occur e.g. in irregexp
code created by embedded scripts.

Drive-by: unify the list of reloc modes that have a
target_address_address.

Bug: v8:8572,v8:6666
Change-Id: I26dce735463b79677a7b7dcfdb604c5234b5f10b
Reviewed-on: https://chromium-review.googlesource.com/c/1371568
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58194}
2018-12-12 16:37:23 +00:00
peterwmwong
640d3adf5f [builtins] Remove InternalArray and reduce InternalPackedArray constructors.
InternalPackedArray now only has one constructor variant that expects no
arguments (Chrome's only usage of InternalPackedArray). As such, these TFC
builtins are no longer used and were removed:
- InternalArrayNoArgumentConstructor_Holey
- InternalArraySingleArgumentConstructor_Packed
- InternalArraySingleArgumentConstructor_Holey

On x64.release, this reduces builtins size by ~1.2KB.

Bug: v8:7624
Change-Id: I7316608dc02b1e09e9e414ee1aeb1fb08410c6f6
Reviewed-on: https://chromium-review.googlesource.com/c/1372772
Commit-Queue: Peter Wong <peter.wm.wong@gmail.com>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58193}
2018-12-12 16:13:41 +00:00