Commit Graph

53171 Commits

Author SHA1 Message Date
Adam Klein
ca40805ae1 [scopes] Remove dead code identified by coverage reports
Change-Id: I5b2ec3e8b0d2882465b33fedf62a6eac8f952f93
Reviewed-on: https://chromium-review.googlesource.com/c/1387965
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58679}
2019-01-09 18:31:20 +00:00
Jakob Kummerow
d77e4a8484 [ubsan][cleanup] Drop ObjectSlot::load in favor of operator*
Now that we no longer have ObjectPtr and Object* return types,
one way to load the slot's contents is enough.

Bug: v8:3770
Change-Id: I5acaeed22e68595b0e0ba036fcc4ac3d15c57462
Reviewed-on: https://chromium-review.googlesource.com/c/1400416
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58678}
2019-01-09 17:52:39 +00:00
Clemens Hammacher
01f824c176 [wasm] Merge foreground work after compilation
Instead of spawning several foreground tasks, execute the work in a
single chunk.
This will allow us in a follow-up step to remove the deferred handle
scope and pass the handles directly.

R=ahaas@chromium.org

Bug: v8:7921, v8:8423
Change-Id: I4dae6241e2a33e89e304a04cb67c2229c34f7b99
Reviewed-on: https://chromium-review.googlesource.com/c/1402545
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58677}
2019-01-09 16:17:29 +00:00
Clemens Hammacher
24a43b3c4e [Liftoff] Fix reloading register spilled multiple times
Since register can be used multiple times on the stack, they can also
be spilled into multiple stack slots. At merge points, we then might
have to reload the spilled slots. A DCHECK currently checks that each
register is only loaded once. Instead of failing, just load the first
stack slot, the others are statically known to contain the same value
anyways.

R=ahaas@chromium.org

Bug: v8:6600, chromium:919533
Change-Id: Ic0c806238b2997f006829b4b509a50468a55befa
Reviewed-on: https://chromium-review.googlesource.com/c/1403124
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58676}
2019-01-09 16:12:50 +00:00
Ben L. Titzer
49a526ace9 Remove invalid DCHECKS in unwinding-info-writer
The unwinding info writer was assuming that a block that had no initial
state must be the start or end block. It was trying to check if the
block was the start or end by asserting that the block had either
no predecessors or no successors. Loop rotation breaks this assumption,
since it can move a block from inside a loop to before the loop
header, and the block can then be the "start" block. But since
such a block has both predecessor(s) and a successor, the check was
wrong.

R=clemensh@chromium.org
BUG=chromium:913844

Change-Id: Ic24c67a822d510cb082f25608089d313c3459be8
Reviewed-on: https://chromium-review.googlesource.com/c/1373770
Commit-Queue: Ben Titzer <titzer@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58675}
2019-01-09 15:52:08 +00:00
Yang Guo
c736883ed4 Optionally use halfsiphash for integer hashing.
Change-Id: Ibd14f7b3fe78635675c76ae864112e3a3a7bc701
Reviewed-on: https://chromium-review.googlesource.com/c/1382463
Commit-Queue: Yang Guo <yangguo@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58674}
2019-01-09 15:20:51 +00:00
Camillo Bruni
e355052048 [parser] Cleaning up adding skippable function preparse data
- Add DataGatheringScope::AddSkippableFunction
- Rename preparsed_scope_data_builder to preparse_data_builder

Change-Id: Ic882de638bed91a6ca4716f88db859410f1450b8
Reviewed-on: https://chromium-review.googlesource.com/c/1400846
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58673}
2019-01-09 15:19:46 +00:00
Junliang Yan
5d39e1984c PPC: fix PPC native C linkage
R=joransiu@ca.ibm.com

Change-Id: Iba732965ba7efc961295888b1cbf6ea1ef1990b0
Reviewed-on: https://chromium-review.googlesource.com/c/1403234
Reviewed-by: Joran Siu <joransiu@ca.ibm.com>
Commit-Queue: Junliang Yan <jyan@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#58672}
2019-01-09 15:13:37 +00:00
Tamer Tas
9a529b122c [test] reformat and rename presubmit checks
R=sergiyb@chromium.org

No-Try: true
Change-Id: I94937b6852c8e7e8aece3b67eb1c2a79dbf71c25
Reviewed-on: https://chromium-review.googlesource.com/c/1392193
Commit-Queue: Tamer Tas <tmrts@chromium.org>
Reviewed-by: Sergiy Belozorov <sergiyb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58671}
2019-01-09 14:55:46 +00:00
Leszek Swirski
5e725a2b43 [parser] Don't desugar destructuring declarations.
Emit a single destructuring assignment for destructuring declarations,
which can be desugared by the bytecode generator. This allows us to
remove destructuring desugaring from the parser (specifically, the
pattern rewriter) entirely.

The pattern "rewriter" is now only responsible for walking the
destructuring pattern to declare variables, mark them assigned, and
potentially rewrite scopes for the edge case of parameters with a sloppy
eval.

Note that since the rewriter is no longer rewriting, we have to flip the
VariableProxy copying logic for var re-lookup, so that we now pass the
new VariableProxy to the variable declaration and leave the original
unresolved (rather than passing the original through and rewriting to a
new unresolved VariableProxy).

This change does have some effect on breakpoint locations, due to some
of the available information changing between the parser and bytecode
generator, however the new locations appear to be more consistent
between assignments and declarations.

Change-Id: I3a58dd0a387d2bfb8e5e9e22dde0acc5f440cb82
Reviewed-on: https://chromium-review.googlesource.com/c/1382462
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58670}
2019-01-09 14:09:23 +00:00
Stephan Herhut
5f138ac151 [regalloc] Fix register hints being ignored
When adding the new heuristic to allocate registers that do not
take part in hinting first, I managed to break hinting for most
cases. This change makes hinting operational again.

Bug: chromium:920106
Change-Id: I0f460a66196087266dcb70a7a0e5569124bdd2ff
Reviewed-on: https://chromium-review.googlesource.com/c/1402791
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Commit-Queue: Stephan Herhut <herhut@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58669}
2019-01-09 14:00:41 +00:00
Toon Verwaest
25dde52d6d [parser] Drop ParserFormalParameters::Parameter::name
It's anyway only read in case of simple parameters. In that case pattern is
guaranteed to be a VariableProxy, from which we can read the name as well.

Change-Id: Ie340064453594ab4f84b1d0223506801635c289d
Reviewed-on: https://chromium-review.googlesource.com/c/1402782
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58668}
2019-01-09 13:55:31 +00:00
Predrag Rudic
d586857cff [MIPS] Add Predrag Rudic and Aleksandar Rikalo as owners of MIPS files
Ivica Bogosavljevic is no longer part of MIPS V8 team, and therefore his
name is removed from OWNERS.

TBR=mstarzinger@chromium.org
NOTRY=true

No-Presubmit: true
Change-Id: I1ea6745b795573a17362dfd869528ddf78b8ab41
Reviewed-on: https://chromium-review.googlesource.com/c/1402775
Commit-Queue: Predrag Rudic <prudic@wavecomp.com>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58667}
2019-01-09 13:40:20 +00:00
Georg Neis
23fa506150 [turbofan] Precompute inlineability of array iteration builtins per map.
Bug: v8:7790
Change-Id: Ife2d4d19bc40ec195974c5302677fef4ab442fa2
Reviewed-on: https://chromium-review.googlesource.com/c/1398721
Commit-Queue: Georg Neis <neis@chromium.org>
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58666}
2019-01-09 12:51:37 +00:00
tzik
d65de04018 Use V8_NOEXCEPT consistently between decls and impls
This is a leftover of the previous CL.
https://chromium-review.googlesource.com/c/v8/v8/+/1402305.

noexcept keyword needs to be consistent between the declaration and
implementation in C++17.

Bug: v8:8616, chromium:752720
Change-Id: I8a21426e550d666bd84c1a6e7bc36d1eec495333
Reviewed-on: https://chromium-review.googlesource.com/c/1402305
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Taiju Tsuiki <tzik@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58665}
2019-01-09 12:39:46 +00:00
Michael Starzinger
082bfec916 [asm.js] Fix semicolon insertion in presence of Unicode.
R=clemensh@chromium.org
TEST=mjsunit/asm/regress-920076
BUG=chromium:920076

Change-Id: Ieb6d1dd84ab9434ff17ee09444e7d8ce830f898c
Reviewed-on: https://chromium-review.googlesource.com/c/1402778
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58664}
2019-01-09 12:38:41 +00:00
Clemens Hammacher
3c99ee28d3 Revert "[wasm] Inline CompileFailed step"
This reverts commit 556ef4c387.

Reason for revert: Seems to cause hangs in tests.

Original change's description:
> [wasm] Inline CompileFailed step
> 
> The {CompileFailed} just calls {AsyncCompileFailed}, which also does
> not do much. Thus just inline directly call a function instead of
> spawning a foreground task. This saves one instance of DeferredHandles.
> 
> R=​ahaas@chromium.org
> 
> Bug: v8:7921, v8:8423
> Change-Id: Ia8fb72a3ce2efd1f9a069c1a3b0b670b15fd8bce
> Reviewed-on: https://chromium-review.googlesource.com/c/1402714
> Reviewed-by: Andreas Haas <ahaas@chromium.org>
> Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#58662}

TBR=ahaas@chromium.org,clemensh@chromium.org

Change-Id: I3430fb304b8df72b93330d104c09b0a144bbd069
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:7921, v8:8423
Reviewed-on: https://chromium-review.googlesource.com/c/1402786
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58663}
2019-01-09 12:37:38 +00:00
Clemens Hammacher
556ef4c387 [wasm] Inline CompileFailed step
The {CompileFailed} just calls {AsyncCompileFailed}, which also does
not do much. Thus just inline directly call a function instead of
spawning a foreground task. This saves one instance of DeferredHandles.

R=ahaas@chromium.org

Bug: v8:7921, v8:8423
Change-Id: Ia8fb72a3ce2efd1f9a069c1a3b0b670b15fd8bce
Reviewed-on: https://chromium-review.googlesource.com/c/1402714
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58662}
2019-01-09 12:12:50 +00:00
Georg Neis
23f087ccca [turbofan] Precompute inlineability of array resize builtins per map.
Bug: v8:7790
Change-Id: Iad109ee7112b8c21b4fd89e189e68911b6aa4968
Reviewed-on: https://chromium-review.googlesource.com/c/1397708
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58661}
2019-01-09 12:09:45 +00:00
Toon Verwaest
82c0f925fe [parser] Compute IsPrivateName from the underlying string on-the-fly
Change-Id: Ib9f51cab17a3ed9e8960857e77fc80a9a08df798
Reviewed-on: https://chromium-review.googlesource.com/c/1400841
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58660}
2019-01-09 12:06:20 +00:00
Jakob Kummerow
ec2f4acf4b [ubsan] Clean up macro usage in *-inl.h
The incremental migration required several pairs of functionally
equivalent macros. This patch consolidates everything onto the
respective new version and drops the obsolete versions.

Bug: v8:3770
Change-Id: I4fb05ff223e8250c83a13f46840810b0893f410b
Reviewed-on: https://chromium-review.googlesource.com/c/1398223
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58659}
2019-01-09 12:05:15 +00:00
Michael Starzinger
56bed77bd5 [arm] Enable write-protected code pages.
R=hablich@chromium.org
BUG=chromium:845877

Change-Id: Ia5ede7b5aaa4d5937160b1e0733132c47afeb712
Reviewed-on: https://chromium-review.googlesource.com/c/1400407
Reviewed-by: Michael Hablich <hablich@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58658}
2019-01-09 11:18:15 +00:00
Toon Verwaest
5b4d4c2401 [parser] Parenthesized identifiers are invalid as part of a declaration
Bug: v8:8659
Change-Id: I7208589dcb5c40dd915a50517f83f3da646202be
Reviewed-on: https://chromium-review.googlesource.com/c/1402547
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58657}
2019-01-09 11:02:55 +00:00
Clemens Hammacher
c26b4977d6 [wasm] Create runtime objects later
For compilation we only need the NativeModule. Thus only create this
before compilation, create other runtime objects later.
This is a first step towards removing the deferred handles and
clustering all foreground work in one chunk after compilation.

R=ahaas@chromium.org

Bug: v8:7921, v8:8423
Change-Id: If62387d68ddf0f5e067adbaef5fbeca7178958a4
Reviewed-on: https://chromium-review.googlesource.com/c/1402544
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58656}
2019-01-09 11:01:15 +00:00
Predrag Rudic
b0dc60f6b3 MIPS[64]: Port '[Deopt] Remove jump table in prologue of deopt entries.'
Port commit 4ab96a9a81

Original message:
> Remove the use of a jump table in the prologue of the deopt entries
> and instead pass the bailout id explicitly in a register when calling
> the deopt entry routine from optimized code. This unifies the logic
> with the way the Arm64 code works. It saves the following amount of
> memory in code stubs:
>
>  - arm:  384KB
>  - ia32: 480KB
>  - x64:  240KB
>
> This could be offset by a slight increase in the size of optimized code
> for loading the immediate, however this impact should be minimal and
> will scale with the maximum number of bailout ids (e.g., the size of
> code will increase by one instruction per bailout id on Arm, therefore
> ~98,000 bailouts will be needed before the overhead is greater than
> the current fixed table size).
>
> Change-Id: I838604b48fa04cbd45320c7b9dac0de08fd8eb25
> Reviewed-on: https://chromium-review.googlesource.com/c/1398224
> Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
> Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#58636}

Change-Id: I4d070b90ebd4f9d4e82eaa74fe6d41c3a39d93e8
Reviewed-on: https://chromium-review.googlesource.com/c/1400848
Reviewed-by: Sreten Kovacevic <skovacevic@wavecomp.com>
Commit-Queue: Sreten Kovacevic <skovacevic@wavecomp.com>
Cr-Commit-Position: refs/heads/master@{#58655}
2019-01-09 10:14:59 +00:00
Jakob Gruber
ba712bf89f [csa] Call FatalProcessOutOfMemory in OOM situations
OOMs in CSA code would trigger fairly arbitrary assertion failures on
some paths. This changes CSA::AllocateRaw to call
FatalProcessOutOfMemory (just like runtime methods).
CSA::AllocateFixedArray additionally checks for
FixedArray::kMaxLength.

This increases overall builtin code size on x64 release by 28K / 2.5%.

Bug: chromium:917561, chromium:848672
Change-Id: I757271264f396e0df8d8fe0570bad078075c27d5
Reviewed-on: https://chromium-review.googlesource.com/c/1400414
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58654}
2019-01-09 10:08:39 +00:00
Tom Tan
934af8dde9 .rodata from embedded.S should be read only
.rodata usually hosts read only data. MSVC link.exe complains mismatch when
merging this read/write .rodata from embedded.S with .rodata from other object
file.

Bug: chromium:919180
Change-Id: I7789e42afe116cc4bf772e2cbb312d19e4ce7fe5
Reviewed-on: https://chromium-review.googlesource.com/c/1396361
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58653}
2019-01-09 07:58:51 +00:00
Joyee Cheung
c8561b1ad4 [parser] add source posisionts to private field synthetic variables
Bug: v8:8354
Change-Id: I20bb169695d7ecca739f14f9a3ddfafed0dcb964
Reviewed-on: https://chromium-review.googlesource.com/c/1393284
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Commit-Queue: Joyee Cheung <joyee@igalia.com>
Cr-Commit-Position: refs/heads/master@{#58652}
2019-01-09 05:11:24 +00:00
v8-ci-autoroll-builder
41a6496715 Update V8 DEPS.
Rolling v8/build: 121336d..117f6f1

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/c805793..3511bed

Rolling v8/third_party/depot_tools: d16b51b..da90c53

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

Change-Id: Ie1ad71d68998fa7acfe59bbc04a7f5f2deea5a38
Reviewed-on: https://chromium-review.googlesource.com/c/1401816
Reviewed-by: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Commit-Queue: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/master@{#58651}
2019-01-09 03:40:03 +00:00
Sathya Gunasekaran
f417b4aad8 [class] Fix early error for duplicate private fields
Bug: v8:8656
Change-Id: I86f00d377ac99a065c4ecf02abed08ec4feb3686
Reviewed-on: https://chromium-review.googlesource.com/c/1401214
Reviewed-by: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58650}
2019-01-09 00:53:05 +00:00
Sathya Gunasekaran
82e9aa59bf [class] Add tests for private static fields
Bug: v8:5368
Change-Id: I4142c4051e394f1a249421bf68da456381e390ae
Reviewed-on: https://chromium-review.googlesource.com/c/1401326
Reviewed-by: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58649}
2019-01-09 00:53:05 +00:00
Deepti Gandluri
f8e2634e96 [wasm] Add SIMD Shuffles for x64
Change-Id: I241565dea56db982a46eed8ecdd2fd2692c368ce
Reviewed-on: https://chromium-review.googlesource.com/c/1395800
Reviewed-by: Bill Budge <bbudge@chromium.org>
Commit-Queue: Deepti Gandluri <gdeepti@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58648}
2019-01-08 21:46:39 +00:00
Frank Tang
25b1f7e11a [Intl] Add object tracking for INTL_JS_*
Bug: v8:7481
Change-Id: I2587de31faa4dee3ae6f3d5a1872161aae48d1d3
Reviewed-on: https://chromium-review.googlesource.com/c/1395321
Commit-Queue: Frank Tang <ftang@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58647}
2019-01-08 20:01:53 +00:00
Frank Tang
09b995e18f [Intl] Remove skipped tests depend on stable sort
TC39 accept stable sort in Oct 2018

Bug: v8:7808
Change-Id: I2ad1bca62bda10838dc33acb109a5c937a3b1947
Reviewed-on: https://chromium-review.googlesource.com/c/1400401
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58646}
2019-01-08 19:11:47 +00:00
Frank Tang
c985078234 [Intl] Fix -0 formatting bugs
The spec changed in 7/2018 to treat -0 and 0 differently.
https://github.com/tc39/ecma402/pull/232

Bug: v8:7474, v8:8099
Change-Id: I77db4ae716b081b7628dc7ee253a463520c7f6e9
Reviewed-on: https://chromium-review.googlesource.com/c/1400403
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58645}
2019-01-08 19:10:42 +00:00
Clemens Hammacher
d953d9fb24 [compiler] Add fast path for simple parallel moves
Most parallel moves do not actually require the heavy analysis in the
GapResolver since there is no overlap between source and destination
registers. Handle some of these cases by a fast-path to avoid the
quadratic behaviour in the general case.
The fast path is taken for about 2/3 of the non-empty parallel moves on
wasm workloads.

R=herhut@chromium.org, titzer@chromium.org

Bug: v8:8423
Change-Id: I026256fd6cf268f176fccc97f0f427e07629aeb3
Reviewed-on: https://chromium-review.googlesource.com/c/1400410
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Stephan Herhut <herhut@chromium.org>
Reviewed-by: Ben Titzer <titzer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58644}
2019-01-08 17:50:40 +00:00
Mike Stanton
780818726a [Torque] Array.prototype.filter moves to Torque.
Change-Id: Ifc71ae885b2a08b898ace7f75a8df0ca2b9c3a3d
Reviewed-on: https://chromium-review.googlesource.com/c/1275820
Commit-Queue: Michael Stanton <mvstanton@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Reviewed-by: Daniel Clifford <danno@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58643}
2019-01-08 16:13:50 +00:00
Maya Lekova
1ab4b006a3 [test] Disabling mjsunit/compiler/array-multiple-receiver-maps temporarily
TBR=machenbach@chromium.org

Bug: v8:8653

NOTRY=true

Change-Id: Ifb80024142491649e66114bed2179faa45365b73
Reviewed-on: https://chromium-review.googlesource.com/c/1400843
Commit-Queue: Maya Lekova <mslekova@chromium.org>
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58642}
2019-01-08 15:44:05 +00:00
Peter Marshall
8784512feb [cpu-profiler] Add logging to flaky tests
These flakes can't be reproduced locally so we need more information
when they fail. Add some logging so that we can figure out why they
are breaking.

Bug: v8:8649, v8:8648
Change-Id: I2fb1384bb7592c6fc68c08952505e79329f00bec
Reviewed-on: https://chromium-review.googlesource.com/c/1400418
Commit-Queue: Peter Marshall <petermarshall@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58641}
2019-01-08 15:38:42 +00:00
Yang Guo
052083f1f8 [d8] no longer require js2c for d8
R=jgruber@chromium.org

Bug: v8:7624
Change-Id: I357e0b9d497ebff03e0e41a3495621c5b4c63464
Reviewed-on: https://chromium-review.googlesource.com/c/1400402
Commit-Queue: Yang Guo <yangguo@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58640}
2019-01-08 15:11:30 +00:00
Peter Marshall
9e15860520 [cpu-profiler] De-duplicate CodeEntry objects for inline stacks
Within an inline stack we would have multiple copies of the exact same
CodeEntry object to represent an inline frame. We had one copy for every
time that the frame appeared in an inline stack. One CodeEntry can have
multiple inline stacks and each stack can have multiple inline frames.
In the common case, the stacks overlap and repeat frames.

This CL creates a single CodeEntry object to represent each inlined
function as an inline frame (for a given CodeEntry with inlinings). This
removes most of the duplication of inline CodeEntry objects. We still
have some duplication, e.g. if we inline bar() into foo() and foo2() but
they are not themselves inlined into anything, then we will have two
inline CodeEntry objects for bar(). Removing all duplication is harder
to achieve because the lifetime of the inlined frame CodeEntry is now no
longer tied to the inliner.

Get rid of the InlineEntry struct as it is now indentical to
CodeEntryAndLineNumber.

We store the list of canonical inline CodeEntry objects on the
CodeObject of the inlining function so that it can own the lifetimes of
inlined frames.

Also rename inline_locations_ to inline_stacks_ to be clearer.

Bug: v8:7719

Change-Id: Ied765b4cce7fd33f3290798331f1e6767cc42e8c
Reviewed-on: https://chromium-review.googlesource.com/c/1396086
Commit-Queue: Peter Marshall <petermarshall@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Reviewed-by: Alexei Filippov <alph@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58639}
2019-01-08 14:57:46 +00:00
Toon Verwaest
379095c1e1 [parser] Simplify assignment parsing
Change-Id: Ie157933d32acf89ff3c1571c843f07ff6fd1c525
Reviewed-on: https://chromium-review.googlesource.com/c/1400782
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58638}
2019-01-08 14:56:10 +00:00
Toon Verwaest
7c3595effa [parser] Reparse arrow functions with unidentified syntax errors in the correct scope
Bug: chromium:919710
Change-Id: I5a04e76fbc925a89b0ebe1916637f6ae5d109b24
Reviewed-on: https://chromium-review.googlesource.com/c/1400419
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58637}
2019-01-08 14:46:07 +00:00
Ross McIlroy
4ab96a9a81 [Deopt] Remove jump table in prologue of deopt entries.
Remove the use of a jump table in the prologue of the deopt entries
and instead pass the bailout id explicitly in a register when calling
the deopt entry routine from optimized code. This unifies the logic
with the way the Arm64 code works. It saves the following amount of
memory in code stubs:

 - arm:  384KB
 - ia32: 480KB
 - x64:  240KB

This could be offset by a slight increase in the size of optimized code
for loading the immediate, however this impact should be minimal and
will scale with the maximum number of bailout ids (e.g., the size of
code will increase by one instruction per bailout id on Arm, therefore
~98,000 bailouts will be needed before the overhead is greater than
the current fixed table size).

Change-Id: I838604b48fa04cbd45320c7b9dac0de08fd8eb25
Reviewed-on: https://chromium-review.googlesource.com/c/1398224
Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58636}
2019-01-08 14:14:10 +00:00
Camillo Bruni
9cd84510be [parser] Avoid processing empty preparse data objects
Always precheck that the PreparseData has data before serializing it.

Drive-by-fix:
- rename preparsed_scope_data_builder_ to preparse_data_builder_

Change-Id: I8e709af8f69db44e03caa9132f06a7b8c906bfdb
Reviewed-on: https://chromium-review.googlesource.com/c/1387305
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58635}
2019-01-08 14:03:03 +00:00
Michael Achenbach
58ca563860 Revert "[wasm] Remove finisher task"
This reverts commit ac2fb66b65.

Reason for revert: Flakily crashes on several bots:
https://ci.chromium.org/p/v8/builders/luci.v8.ci/V8%20Win32/18524
https://ci.chromium.org/p/v8/builders/luci.v8.ci/V8%20Win64%20-%20msvc/6824
https://ci.chromium.org/p/v8/builders/luci.v8.ci/V8%20Linux64%20-%20internal%20snapshot/19766

Original change's description:
> [wasm] Remove finisher task
> 
> This removes the finisher task and instead finishes compilation units
> from the background.
> It also changes ownership of the AsyncCompileJob to be shared among all
> tasks that still operate on it. The AsyncCompileJob dies when the last
> reference dies.
> 
> R=​ahaas@chromium.org
> CC=​​​mstarzinger@chromium.org
> 
> Bug: v8:7921, v8:8423
> Change-Id: Id09378327dfc146459ef41bc97176a8716756ae4
> Cq-Include-Trybots: luci.v8.try:v8_linux64_tsan_rel
> Reviewed-on: https://chromium-review.googlesource.com/c/1335553
> Reviewed-by: Andreas Haas <ahaas@chromium.org>
> Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#58630}

TBR=ahaas@chromium.org,clemensh@chromium.org

Change-Id: I6b332b66adaec8f713fb31f4c8517cae7ebb4645
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:7921, v8:8423
Cq-Include-Trybots: luci.v8.try:v8_linux64_tsan_rel
Reviewed-on: https://chromium-review.googlesource.com/c/1400420
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58634}
2019-01-08 13:58:12 +00:00
Stephan Herhut
2dfba659dd [regalloc] Prefer registers that are not used for arguments.
Simple experiment that prefers free registers that are not used for
arguments to prevent cases where we allocate a free register without
hint and thereby block later uses of that register for no good
reason.

Bug: v8:8311
Change-Id: I95e96b150410e97937cb72d575ae6bece9ee08f9
Reviewed-on: https://chromium-review.googlesource.com/c/1397668
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Commit-Queue: Stephan Herhut <herhut@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58633}
2019-01-08 13:33:00 +00:00
Andreas Haas
0adcb82a8b [wasm][anyref] Allow export of mutable anyref globals
R=titzer@chromium.org

Bug: v8:7581
Change-Id: I4725eada889cc8cf6a3ca537f05b1da2f5e83f2b
Reviewed-on: https://chromium-review.googlesource.com/c/1400413
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Ben Titzer <titzer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58632}
2019-01-08 13:30:59 +00:00
peterwmwong
7164251aec [js] Remove macros.py and simplify js2c.py
- Remove macros.py
- Inlines macros into d8.js
- Remove dead code (macros and message templates)
  from js2c.py
- Remove empty src/js directory

Bug: v8:7624
Change-Id: I8dfb69f2f8cb3746b67de816ffc8eb305cbcdee6
Reviewed-on: https://chromium-review.googlesource.com/c/1400150
Commit-Queue: Peter Wong <peter.wm.wong@gmail.com>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58631}
2019-01-08 13:26:02 +00:00
Clemens Hammacher
ac2fb66b65 [wasm] Remove finisher task
This removes the finisher task and instead finishes compilation units
from the background.
It also changes ownership of the AsyncCompileJob to be shared among all
tasks that still operate on it. The AsyncCompileJob dies when the last
reference dies.

R=ahaas@chromium.org
CC=​​mstarzinger@chromium.org

Bug: v8:7921, v8:8423
Change-Id: Id09378327dfc146459ef41bc97176a8716756ae4
Cq-Include-Trybots: luci.v8.try:v8_linux64_tsan_rel
Reviewed-on: https://chromium-review.googlesource.com/c/1335553
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58630}
2019-01-08 13:24:57 +00:00