Commit Graph

51168 Commits

Author SHA1 Message Date
Dominik Inführ
d891c59a79 [heap] Ensure successful background allocation after tear down started
Prevent deadlock on shutdown by allowing all allocations on background
threads after tear down was started. Background threads need the main
thread to perform the collection, which never happens when V8 is already
shutting down.

Bug: v8:10315
Change-Id: I5d3358229624aead7b0ebcfee7e5840315f23329
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2230537
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68199}
2020-06-05 11:01:05 +00:00
Arnaud Robin
e9380ae2eb [wasm] Add indentation and function names when tracing function calls
Added display of identation, function index, function names and compiler
used when tracing function calls in wasm.

R=clemensb@chromium.org

Bug: v8:10559
Change-Id: I58b4e7b077365bdee7bae9b5ad8a50178c322147
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2230532
Commit-Queue: Arnaud Robin <arobin@google.com>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68198}
2020-06-05 10:54:15 +00:00
Igor Sheludko
93e992bb64 [zone-stats] Improve zone memory usage stats tracing
1) make it possible to combine tracing logic with accounting allocator
  supporting zone compression,
2) make it possible to record zone memory usage via Chrome tracing
  machinery (especially, for already running process),
3) trace both allocated and actually used memory per zone,

Bug: v8:10572
Change-Id: I768e474ada1a384218af09efd0dfce2d9a43ac3c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2228888
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68197}
2020-06-05 09:33:45 +00:00
Manos Koukoutos
1b699b4e13 [wasm-gc][bug] Fix various bugs in wasm gc code
Changes:
- Unpack packed typed in arrays/structs where needed.
- i8 should have log-size 0.
- Use typed-funcref feature flag instead of gc where appropriate.
- Set argument indexes correctly for gc opcodes in
  function-body-decoder.
- Remove no-longer valid TODOs.

Bug: v8:7748
Change-Id: I1a73794d0f93da6c7177e496d47df4106031f0eb
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2230520
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68196}
2020-06-05 09:23:46 +00:00
Igor Sheludko
3525c81fa4 [owners] Add ishell to zone/OWNERS
Change-Id: I31e16fcfd6641d88b3b6d3195dc30464833d0821
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2231345
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68195}
2020-06-05 09:22:25 +00:00
Andreas Haas
d22a6102fe [wasm][liftoff][arm64] Implement atomic load and atomic store
R=v8-arm-ports@googlegroups.com, clemensb@chromium.org

Bug: v8:10108
Change-Id: I7564caaf0d6c1591270b59e275869f335c83ad74
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2230533
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68194}
2020-06-05 08:36:05 +00:00
Dominik Inführ
411ffd9186 [heap] Add MakeLocalHeapLabsIterable method
Add method to make LABs in all local heaps iterable and invoke this
function in Heap::MakeHeapIterable().

Bug: v8:10315
Change-Id: I6c8b1ea2337647f68995c13e6244d5ef0673b0e6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2230534
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68193}
2020-06-05 08:04:00 +00:00
Manos Koukoutos
72dffedbd4 [wasm-gc] Refactor wasm subtyping, extend it to struct/array types.
Changes:
- Remove subtyping checks from value-type.h and move them to dedicated
  files. Leave a limited version in value-type.h for testing.
- Implement subtyping for struct and array types, according to the
  wasm-gc proposal.
- Implement type equivalence checking.
- Introduce a subtyping relation cache in WasmModule.
- Rename IsSubTypeOf -> IsSubtypeOf.
- Fix v8 possible bug where iterator_range took two unused type
  parameters.
- Add unittests for subtyping.

Bug: v8:7748
Change-Id: I0ddbda4145e0412196dcf4fc63f3c5875fb3ab5a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2228497
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68192}
2020-06-05 08:02:55 +00:00
Georg Neis
b8883649d0 [turbofan] Fix bug in TypedOptimization::ReduceMaybeGrowFastElements
The replacement was done using the wrong effect node.

Bug: chromium:1086890
Change-Id: I3bfc2473415f7d28fa1bcf0ff14ffe46b82bf87b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2231340
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68191}
2020-06-05 06:21:35 +00:00
Andreas Haas
c6c0090532 [wasm] Declare functions in globals and exports
Due to recent spec changes, We do not have to check if ref.func
instructions in global declarations only refer to declared functions.
Additionally functions referenced in exports and globals are now
considered declared.

R=ecmziegler@chromium.org

Bug: v8:10556
Change-Id: I79856c7d68155a04eb36769ceed8a58fe62a9f9f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2228653
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Emanuel Ziegler <ecmziegler@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68190}
2020-06-05 05:51:45 +00:00
Yu Yin
5ecff4fe43 [mips] Correct function assembler::db/dd/dq
All these functions need to do is just write the value to the memory,
but EmitHelper will do something more than this, EmitHelper will check
if it need generate trampoline code while code generating and it will
insert trampoline code at current pc offset, this means there maybe have
trampoline code between two consecutive dd()'s target memory(pc), this
is not we want.

Change-Id: I5537f133be78aabdc4d53d4de07f388fa50f4a64
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2224963
Commit-Queue: Yu Yin <xwafish@gmail.com>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68188}
2020-06-05 01:56:32 +00:00
Ng Zhi An
e8ff9fb0c3 [cleanup][arm] Replace c-style cast with braced initialization
Bug: v8:10506
Change-Id: Ied4935b559f7298fd3d20f1a9e173ce9e7f8d96c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2230788
Reviewed-by: Bill Budge <bbudge@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68187}
2020-06-04 22:45:22 +00:00
Ng Zhi An
8d99ed0885 [clang-tidy] Make deleted member functions public
Making them private was a way to hide the functions, we can
explicitly delete them, which give a better compilation error message as
well.

Also see: https://stackoverflow.com/q/55205874

Bug: v8:10488
Change-Id: I24f70dc1f6fb227185b6f8ecb30a81e218dd2a50
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2223232
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68186}
2020-06-04 18:46:42 +00:00
Ng Zhi An
f008ad3949 [clang-tidy] Use explicit default
See
https://chromium.googlesource.com/chromium/src/+/HEAD/styleguide/c++/c++-dos-and-donts.md#prefer-to-use.

Bug: v8:10488
Change-Id: Ib3cd899d343e50c6c59702cab7ed6aa1df6a11ec
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2227622
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68185}
2020-06-04 18:08:22 +00:00
Ng Zhi An
cbe2c53dfa [clang-tidy] Use explicit default
See
https://chromium.googlesource.com/chromium/src/+/HEAD/styleguide/c++/c++-dos-and-donts.md#prefer-to-use.

Bug: v8:10488
Change-Id: Ifb818b8aca4c5f148a3fd21acc2d1d4a2b5c43be
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2227624
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68184}
2020-06-04 17:30:27 +00:00
Ng Zhi An
b1c5216238 [clang-tidy] Use explicit default
See
https://chromium.googlesource.com/chromium/src/+/HEAD/styleguide/c++/c++-dos-and-donts.md#prefer-to-use.

Bug: v8:10488
Change-Id: I4416c2bfec08474b805395b95b58a877ddbdb2fe
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2228410
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68183}
2020-06-04 16:43:59 +00:00
Seth Brenith
93d88bf02c [torque] Move JSRegExp flags definitions to Torque
This change also removes the kInvalid value from JSRegExp::Flag, so that
the values in JSRegExp::Flag correspond only to those which can exist on
the heap and not things used temporarily during parsing.

Change-Id: I1ded0b1be8c59eab72320edfef26eda42c91a89f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2216302
Reviewed-by: Sathya Gunasekaran  <gsathya@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Seth Brenith <seth.brenith@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#68182}
2020-06-04 15:39:29 +00:00
Nico Hartmann
ca54b83374 [turbofan] Fix lost exception on BigInt ops
Speculative BigInt addition fails to throw the expected exception
when called with non-BigInt inputs when the result of the computation
is unused. In paricular, this CL does:
 - Remove kNoThrow on speculative BigInt operators
 - Fix AddWithFeedback to not lose type feedback if builtin throws
   to elide existing deopt loops
 - Add handling of TypeCheckKind in RepresentationChanger where this
   was previously ignored

Bug: chromium:1073440
Change-Id: I953a5b790fc3b37a6824f0b6546a0488c51fbb3b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2228493
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Reviewed-by: Mythri Alle <mythria@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Commit-Queue: Mythri Alle <mythria@chromium.org>
Auto-Submit: Nico Hartmann <nicohartmann@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68181}
2020-06-04 15:32:29 +00:00
Tobias Tebbi
a69f31c1ab [torque] fix Torque crash when accessing fields of non-class types
When accessing a field of a non-class type, Torque will generate a
CallAccess LocationReference, which has an unknown type. We still tried
to access it's type, resulting in a DCHECK failure.

Bug: v8:7793
Change-Id: I3650643e29db852783eca1e166b700eebd1b8dc2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2209056
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Auto-Submit: Tobias Tebbi <tebbi@chromium.org>
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68180}
2020-06-04 14:17:38 +00:00
Victor Gomes
855392752a [deoptimizer] Fix interpreter stack when V8_REVERSE_JSARGS
Change-Id: I14632106886f78286034a2624f77cab9dac14b41
Bug: v8:10201
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2219927
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68179}
2020-06-04 14:16:34 +00:00
Andreas Haas
d16da853b3 [wasm] Fix missing tracing-category renaming
Bug: chromium:1084929
Change-Id: I9389a44c93c90ef6beb543e5dc15860e9aa6a338
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2230526
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68178}
2020-06-04 14:15:29 +00:00
Nico Hartmann
1d9c4a1f16 Revert "[wasm] Do not log code of functions whose module is not fully loaded"
This reverts commit 63e243a0c2.

Reason for revert: Speculative revert for https://ci.chromium.org/p/v8/builders/ci/V8%20Linux64%20TSAN/31811?

Original change's description:
> [wasm] Do not log code of functions whose module is not fully loaded
> 
> Under some circumstances, Wasm is trying to log code for which the
> wire bytes are not fully loaded yet. This can happen during streaming
> compilation when a few functions are already fully compiled but the
> engine is still streaming the remaining functions.
> 
> If the profiler now kicks in, it will attempt to log these freshly
> compiled functions. As these functions will not be executed before
> the module is fully compiled, we can simply defer the logging in this
> case.
> 
> R=​clemensb@chromium.org
> 
> Bug: chromium:1085852
> Change-Id: Idb1061cafcba7a2a654a207402dca520f79a3bbe
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2219938
> Reviewed-by: Clemens Backes <clemensb@chromium.org>
> Commit-Queue: Emanuel Ziegler <ecmziegler@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#68174}

TBR=clemensb@chromium.org,ecmziegler@chromium.org

Change-Id: I444c70e63b876b8473bf9599643bdfe39c8f1eae
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:1085852
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2230531
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Commit-Queue: Nico Hartmann <nicohartmann@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68177}
2020-06-04 13:44:52 +00:00
Victor Gomes
a35e49dfa0 [compiler] Fix CPP builtins extra arguments position when V8_REVERSE_JSARGS is set
Fix arguments order when a call to a CPP builtin is inlined.
When V8_REVERSE_JSARGS is set, the arguments should be reversed and the extra builtin parameters should be pushed last, that is, the input nodes should be located before the function arguments.

Change-Id: Icfcee15bf9e596b236bfd2615a73ce101c87857d
Bug: v8:10201
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2218289
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68175}
2020-06-04 12:13:43 +00:00
Emanuel Ziegler
63e243a0c2 [wasm] Do not log code of functions whose module is not fully loaded
Under some circumstances, Wasm is trying to log code for which the
wire bytes are not fully loaded yet. This can happen during streaming
compilation when a few functions are already fully compiled but the
engine is still streaming the remaining functions.

If the profiler now kicks in, it will attempt to log these freshly
compiled functions. As these functions will not be executed before
the module is fully compiled, we can simply defer the logging in this
case.

R=clemensb@chromium.org

Bug: chromium:1085852
Change-Id: Idb1061cafcba7a2a654a207402dca520f79a3bbe
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2219938
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Emanuel Ziegler <ecmziegler@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68174}
2020-06-04 12:05:02 +00:00
Dominik Inführ
3e0ced3398 [heap] Add ParkedMutexGuard
Introduce ParkedMutexGuard which is similar to base::MutexGuard but also
parks the LocalHeap while the thread is blocked.

Bug: v8:10315
Change-Id: I149673511df013881ed2fbb42cf22d3f9b17b92d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2230518
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68173}
2020-06-04 11:42:22 +00:00
Dominik Inführ
dbf89f8aec [heap] Add --stress-concurrent-allocation flag
Introduce --stress-concurrent-allocation flag. With this flag, V8 will
run periodically start an allocation background task, which allocates
objects. Will be used for testing background allocation.

Bug: v8:10315
Change-Id: Iddb7ff34601a492bc2f26f41cc56a2a899807cfa
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2228889
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68172}
2020-06-04 11:15:44 +00:00
Jakob Gruber
3a99db57c9 Add jgruber to deoptimizer owners
Change-Id: Iba745cae7f5b90654839abefb42b21fd9c49064f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2228650
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Auto-Submit: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68171}
2020-06-04 11:12:03 +00:00
Clemens Backes
b342cbb20b Revert "[flags] warn about contradictory flags"
This reverts commit b8f9166664.

Reason for revert: Fails gc-stress (https://ci.chromium.org/p/v8/builders/ci/V8%20Linux%20-%20gc%20stress/28341).

Original change's description:
> [flags] warn about contradictory flags
> 
> Design Doc: https://docs.google.com/document/d/1lkvu8crkK7Ei39qjkPCFijpNyxWXsOktG9GB-7K34jM/
> 
> Bug: v8:10577
> Change-Id: Ib9cfdffa401c48c895bf31caed5ee03545beddab
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2154792
> Reviewed-by: Clemens Backes <clemensb@chromium.org>
> Reviewed-by: Michael Achenbach <machenbach@chromium.org>
> Reviewed-by: Georg Neis <neis@chromium.org>
> Reviewed-by: Tamer Tas <tmrts@chromium.org>
> Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#68168}

TBR=machenbach@chromium.org,neis@chromium.org,clemensb@chromium.org,tebbi@chromium.org,tmrts@chromium.org

Change-Id: Ia1e3373fbb4c369594ceb98eb560e3ccf2cb8780
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:10577
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2230523
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68169}
2020-06-04 10:20:05 +00:00
Tobias Tebbi
b8f9166664 [flags] warn about contradictory flags
Design Doc: https://docs.google.com/document/d/1lkvu8crkK7Ei39qjkPCFijpNyxWXsOktG9GB-7K34jM/

Bug: v8:10577
Change-Id: Ib9cfdffa401c48c895bf31caed5ee03545beddab
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2154792
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Reviewed-by: Tamer Tas <tmrts@chromium.org>
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68168}
2020-06-04 09:50:42 +00:00
Mythri A
b61335513a [ic] Fix a bug in StoreOwnIC when storing NaN values
We use StoreOwnIC to initialize the object after creating a new object
with CreateObjectLiteral. CreateObjectLiteral stores kHoleNaNInt64
to indicate an uninitialized double field. When we actually try
to store a NaN value into that field later using StoreOwnIC, IC avoids
actually storing the new value since the existing value is "same as"
the value we try to write. The float comparison treats all NaNs as
equal. In this particular case, we should actually store the new value
since kHoleNaNInt64 value is used to represent an uninitialized field.

This cl just stores the new value even when the existing value is same
as the new value for double fields. The check is still required to
correctly track const fields.

Bug: chromium:1082293
Change-Id: Ib37061802f2403545cffa6d6fef08be074b0825d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2228886
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Mythri Alle <mythria@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68167}
2020-06-04 09:35:22 +00:00
Santiago Aboy Solanes
8e4b758e9c [cleanup] Add comments and make DCHECK more declarative in BinarySearch
Change-Id: I29c1339fa75aa26bd18b7e007a0e88de15096a43
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2219934
Reviewed-by: Georg Neis <neis@chromium.org>
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68166}
2020-06-04 08:58:53 +00:00
Frank Tang
cf209e2a08 Reland "[Intl] Use new getDefaultHourCycle to replace old hack"
This reverts commit 3b1d24cf47.

Reason for revert: The problem is fixed

Original change's description:
> Revert "[Intl] Use new getDefaultHourCycle to replace old hack"
> 
> This reverts commit 611e412768.
> 
> Reason for revert: https://crbug.com/1080367
> 
> Original change's description:
> > [Intl] Use new getDefaultHourCycle to replace old hack
> > 
> > Use the ICU 67.1 new API DateTimePatternGenerator::getDefaultHourCycle
> > to replace a hack which get the pattern of "jjmm" to find out the
> > default hour cycle of a locale
> > Bump the required API version from 65 to 67
> > 
> > Bug: v8:10225
> > Change-Id: I3378edacb6dfb8400357ac0bf3d5d50b9fe008bd
> > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2173875
> > Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
> > Commit-Queue: Frank Tang <ftang@chromium.org>
> > Cr-Commit-Position: refs/heads/master@{#67549}
> 
> TBR=jkummerow@chromium.org,ftang@chromium.org
> 
> # Not skipping CQ checks because original CL landed > 1 day ago.
> 
> Bug: v8:10225
> Change-Id: I8bdfbdfc6c906814e5a7525cbde79c9cac854bd1
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2208811
> Reviewed-by: Zhi An Ng <zhin@chromium.org>
> Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
> Commit-Queue: Zhi An Ng <zhin@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#67929}

TBR=jkummerow@chromium.org,zhin@chromium.org,ftang@chromium.org

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

Bug: v8:10225
Change-Id: I386cf0347a0fa5403fb196bb46ac77f48c9c0a0f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2229470
Reviewed-by: Frank Tang <ftang@chromium.org>
Reviewed-by: Zhi An Ng <zhin@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68165}
2020-06-04 08:00:09 +00:00
Marja Hölttä
5f9d59017c [Promise.any] Make 'errors' non-enumerable
This reflects the latest changes in the Promise.any proposal.

Bug: v8:9808
Change-Id: I0f8ea2e95f430479963bf9d9597f243024de8c74
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2222344
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68164}
2020-06-04 07:58:24 +00:00
Zhao Jiazhong
93210c88c5 [mips][wasm-simd] Bitmask instructions
Port 3406cba8fe
https://crrev.com/c/2099451

Change-Id: I7217e333f468aa24f25231d24e31c321a2c209b5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2224595
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Commit-Queue: Zhao Jiazhong <zhaojiazhong-hf@loongson.cn>
Cr-Commit-Position: refs/heads/master@{#68162}
2020-06-04 01:23:28 +00:00
Shu-yu Guo
6feae531f3 Reland "Set .name of anonymous functions on the RHS of logical assignment."
This is a reland of c342ba8247

Original change's description:
> Set .name of anonymous functions on the RHS of logical assignment.
> 
> https://github.com/tc39/proposal-logical-assignment/pull/24 reached
> consensus in June TC39.
> 
> Drive-by refactoring of testing for logical assignment ops using
> IsInRange.
> 
> Bug: v8:10579
> Change-Id: I5a203ba552a905cd28f75c5d223998431a1966ce
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2225809
> Reviewed-by: Marja Hölttä <marja@chromium.org>
> Commit-Queue: Shu-yu Guo <syg@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#68101}

Bug: v8:10579
Change-Id: I321cf0e29515a146844abc05250e9b50ad651caf
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2227255
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Reviewed-by: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68161}
2020-06-03 23:14:58 +00:00
Ng Zhi An
1495b3db39 Reland "[wasm-simd][liftoff] Fix I64x2Mul"
This relands commit 76debfda32.

This fix here is to convert the original mjsunit test into a
cctest, where we check for SIMD support, and skip the test.
We don't have lowering for I64x2 yet, so this is the
workaround.

Original change's description:
> [wasm-simd][liftoff] Fix I64x2Mul
>
> The I64x2Mul overwrote the lhs/rhs if they are the same as dst. So when
> deciding if we need temporaries, we should not only check the
> cache_state, but whether they alias dst or not.
>
> Bug: chromium:1088273
> Change-Id: I82efa9b45e0a3d321a06efde60971ce95b21490f
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2225796
> Commit-Queue: Zhi An Ng <zhin@chromium.org>
> Reviewed-by: Clemens Backes <clemensb@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#68114}

Bug: chromium:1088273
Change-Id: Ia3fd251998159d9beb581a6af3414921fe968e40
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2227068
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68159}
2020-06-03 21:56:42 +00:00
Milad Farazmand
7e89ba7fba PPC: [wasm-simd] Implement horizontal add
Change-Id: I8962c08329c57367ff82d4669880c7efb1db8875
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2229304
Reviewed-by: Junliang Yan <jyan@ca.ibm.com>
Commit-Queue: Milad Farazmand <miladfar@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#68158}
2020-06-03 21:50:13 +00:00
Ng Zhi An
02ee6904f4 [x64] Fix vroundps assembly, add disassembly
vroundps assembly is incorrect:
- the signature was wrong, vroundps takes 2 operands and 1 immediate
- when calling vinstr, should always pass xmm0, this wasn't causing
issues because our test cases were restricted enough that it was always
xmm0 anyway
- the macro assembler should use AVX_OP_SSE4_1, since roundps requires
SSE4_1
- drive-by fix for roundss and roundsd to be AVX_OP_SSE4_1
- add disasm for roundps and vroundps, and test them

Bug: v8:10553
Change-Id: I4046eb81a9f18d5af7137bbd46bfa0478e5a9ab2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2227252
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68157}
2020-06-03 19:16:10 +00:00
Andreas Haas
d529da0128 [wasm] Introduce v8.wasm.detailed trace event category
This CL repurposes the v8.wasm trace event category, and introduces
additionally the v8.wasm.detailed category.

The v8.wasm category is enabled by default and captures core wasm events
like validation, compilation, instantiation, and important operations
like grow-memory and tier-up timings.

The v8.wasm.detailed category is disabled by default. It captures all
events the previous v8.wasm category captured, like compilation of
single functions, time needed for register allocation, ...

This CL splits these categories to allow enabling the v8.wasm category
in telemetry benchmarks to calculate compile time and other metrics
from traces of telemetry runs.

R=ecmziegler@chromium.org

Bug: chromium:1084929
Change-Id: Ida58b8f344b0ccb6ee1210e259c3e0e993eff497
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2210230
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Reviewed-by: Emanuel Ziegler <ecmziegler@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68156}
2020-06-03 18:52:50 +00:00
Milad Farazmand
e6cd991b6c S390: [wasm-simd] Implement f32x4 and f64x2 pmin and pmax
Change-Id: I395471a93b6df55ae8d45b7627b23067ae208f54
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2226552
Commit-Queue: Deepti Gandluri <gdeepti@chromium.org>
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Reviewed-by: Junliang Yan <jyan@ca.ibm.com>
Reviewed-by: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68154}
2020-06-03 17:27:08 +00:00
Kim-Anh Tran
f38e4e5f08 [wasm][debug] Expose wasm function tables in scope view
Bug: chromium:1081735
Change-Id: Iab58b303ec718a15653ba80fefbb873ef93df003
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2218284
Commit-Queue: Kim-Anh Tran <kimanh@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68153}
2020-06-03 17:11:18 +00:00
Andreas Haas
2293a59fb7 [wasm] Remove anyref subtyping
All subtyping has been removed from the reference-types proposal. This
CL implements this proposal change now in V8.

R=manoskouk@chromium.org

Bug: v8:10556
Change-Id: I08ef064952278e03ea655461fa9f0c96426157c7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2222345
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68152}
2020-06-03 16:35:38 +00:00
Thibaud Michaud
10cf6aebfd [liftoff] Add early stop in PrepareCall spill loop
We already track register usage, so we can stop as soon as all registers
are spilled. Also iterate the stack backwards, since the bottom of the
stack is more likely to be already spilled.

R=clemensb@chromium.org

Bug: v8:10576
Change-Id: I06fe8efe257dd5b8bcb426b4e79a8815a8cb5c81
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2228494
Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68151}
2020-06-03 16:26:38 +00:00
Michael Lippautz
ab671ee816 cppgc: Add HeapStatsCollector
This ports HeapStatsCollector (former ThreadHeapStatsCollector) from
Blink. The CL only ports accounting of allocated object size which is
needed for a simple growing strategy in a follow up.

HeapStatsCollector is a global dependency for most sub components as
it provides infrastructure for measuring time (through trace scopes)
and space.

The general idea of HeapStatsCollector is to act as sink where all sub
components push time and space information. This information is then
gathered and made available via an event that is implemented as POD.
Time-dependent info is available through regular getters (pull) and
observers (push).

Change-Id: I40b4d76e1a40c56e5df1a7353622318cde730e26
Bug: chromium:1056170
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2225902
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Anton Bikineev <bikineev@chromium.org>
Reviewed-by: Omer Katz <omerkatz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68150}
2020-06-03 16:08:48 +00:00
Santiago Aboy Solanes
bdc4b6763e [compiler] Merge revisit loop into visit loop in SimplifiedLowering
This CL makes it so that we revisit nodes in the revisit queue as soon
as possible in RETYPE and PROPAGATE. This is done to revisit loops
related to backedges before moving onto other nodes.

Bug: v8:10424
Change-Id: I432c6551805903072b3f9fbc867adca82b263325
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2157373
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68149}
2020-06-03 15:49:07 +00:00
Andreas Haas
641c1a4eff [wasm] Fix bottom type handling in br-table
Even in unreachable code, the targets of br_table have to have matching
types.

R=thibaudm@chromium.org

Bug: v8:10556
Change-Id: I2e85df3cb92f7910a6bcb5ac03927c424194660d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2218062
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68148}
2020-06-03 15:46:47 +00:00
Junliang Yan
dc6186049c [heap] Create remembered-set-inl.h and move UpdateTypedSlot
1) Rename remembered-set-inl.h back to remembered-set.h
2) Introduce a new remembered-set-inl.h and move the
function definition that depends on ptr-compr-inl.h.

Change-Id: I0e16e1e428937184ff255471937c70e6bb65a11e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2223816
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68146}
2020-06-03 14:42:47 +00:00
Clemens Backes
0816423d59 [wasm][debug] Avoid use-after-free on tier down
When tiering down (or up), we first get a list of all native modules
(under a lock), then tier them down/up without holding the lock. Since
we don't hold (shared) ownership of the native module, it could die
in-between.
This CL fixes this by keeping weak pointers to the native modules, and
re-gaining a shared pointer before putting the module in the list of
modules to be tiered down/up.

R=thibaudm@chromium.org

Bug: v8:10588
Change-Id: I2891c3729f42f26d4026f3e2448e124863b95122
Cq-Include-Trybots: luci.v8.try:v8_linux64_tsan_rel
Cq-Include-Trybots: luci.v8.try:v8_linux64_tsan_isolates_rel_ng
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2228515
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68145}
2020-06-03 14:37:57 +00:00
Arnaud Robin
171d94111a [wasm] Add return value to the tracing of function calls
Added return value display when tracing function calls in wasm.
The new types handled are I32, I64, F32 and F64.
Only single return value is handled.

R=clemensb@chromium.org

Bug: v8:10559
Change-Id: I726d08fcfdc8bf2c3e43a25ec1932412ff74387b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2225024
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Arnaud Robin <arobin@google.com>
Cr-Commit-Position: refs/heads/master@{#68143}
2020-06-03 13:59:28 +00:00
Mythri A
a9b7830d3a Ensure bytecode isn't flushed when allocating feedback vector
This is a followup of the cl [1] that fixes a bug where bytecode was
getting flushed when allocating feedback vector. The fix added
IsCompiledScope before allocating a new feedback vector. We now pass
IsCompiledScope to JSFunction::EnsureFeedbackVector. This makes it
explicit that EnsureFeedbackVector expects a function that is compiled
and the bytecode shouldn't be flushed during the allocation.Also adds
a test.


[1] https://chromium-review.googlesource.com/c/v8/v8/+/2218066

Bug: v8:10560
Change-Id: I552c449a57555dffa625b2e4efa04c2c276fc0b4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2222347
Commit-Queue: Mythri Alle <mythria@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68142}
2020-06-03 13:50:17 +00:00
Andreas Haas
dbc8aa879a [wasm] Add type immediate to RefNull and RefIsNull instructions
With recent changes to the anyref proposal, null refs now have a type
immediate which declares the type of a null ref constant. Likewise,
the RefIsNull instruction is type aware now. This CL addresses these
proposal changes now.

R=jkummerow@chromium.org

Bug: v8:10556
Change-Id: I810dfa3a4ab4389afc9639f897cee5d43e9b62cb
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2215172
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68141}
2020-06-03 13:27:27 +00:00
Zhao Jiazhong
c5fe2cb3d4 [mips][wasm-simd][liftoff] Implement bitmask
Port aa5bcc09bf
https://crrev.com/c/2225090

Change-Id: Ib3b159ebcee0d4da5ce003b08d02cd36b7218016
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2228097
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Zhao Jiazhong <zhaojiazhong-hf@loongson.cn>
Cr-Commit-Position: refs/heads/master@{#68138}
2020-06-03 13:05:27 +00:00
Dan Elphick
81c34968a7 [heap] Make ReadOnlySpace use bump pointer allocation
This changes ReadOnlySpace to no longer be a PagedSpace but instead it
is now a BaseSpace. BasicSpace is a new base class that Space inherits
from and which has no allocation methods and does not dictate how the
pages should be held.

ReadOnlySpace unlike Space holds its pages as a
std::vector<ReadOnlyPage>, where ReadOnlyPage directly subclasses
BasicMemoryChunk, meaning they do not have prev_ and next_ pointers and
cannot be held in a heap::List. This is desirable since with pointer
compression we would like to remap these pages to different memory
addresses which would be impossible with a heap::List.

Since ReadOnlySpace no longer uses most of the code from the other
Spaces it makes sense to simplify its memory allocation to use a simple
bump pointer and always allocate a new page whenever an allocation
exceeds the remaining space on the final page.

Change-Id: Iee6d9f96cfb174b4026ee671ee4f897909b38418
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2209060
Commit-Queue: Dan Elphick <delphick@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68137}
2020-06-03 11:59:37 +00:00
Jakob Gruber
86fee30e25 Include standard heap object header when debug-printing String objects
This brings %DebugPrint(string) closer to %DebugPrint(object) by also
including the pointer, object kind, and RO/old space. Especially the
pointer can be useful while debugging.

One could consider going even further end printing full details of
the string object, e.g. first and second pointers for cons strings.

Before:

 $ out/debug/d8 --allow-natives-syntax -e '%DebugPrint("abc");'
 DebugPrint: #abc
 0x263f080402cd: [Map] in ReadOnlySpace
 [...]

After:

 $ out/debug/d8 --allow-natives-syntax -e '%DebugPrint("abc");'
 DebugPrint: 0xa830824ffe1: [String] in OldSpace: #abc
 0xa83080402cd: [Map] in ReadOnlySpace
 [...]

Drive-by: Document string printing functions.
Drive-by: Use PrintUC16 in spots that don't want a full debug print.

Bug: v8:10581
Change-Id: Ided59047b9c3edc1830ce7721376dddfd24fad1d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2228509
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68136}
2020-06-03 11:55:54 +00:00
Igor Sheludko
0262bc10fc [zone-stats] Introduce v8.zone_stats tracing category
... in order to make it possible to collect zone memory usage stats
from Chrome.

Drive-by-cleanup: move TracingFlags definition to a separate file.

Bug: v8:10572
Change-Id: I05fb65e207d573d5c18821067cfff4c37f2d77cd
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2226561
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68135}
2020-06-03 11:31:35 +00:00
Dan Elphick
ae489decb1 [heap] Move MemoryChunk fields to BasicMemoryChunk
This moves several fields that will be needed by ReadOnlySpace pages
when it stops using MemoryChunk into BasicMemoryChunk.

Additionally AllocationStats is moved from spaces.h into
allocation-stats.h.

Bug: v8:10473, v8:10454
Change-Id: I76a66565a260126e629bd7588a5418267dfa8423
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2228722
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Dan Elphick <delphick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68134}
2020-06-03 10:37:34 +00:00
Peter Ralbovsky
70eb08982c Integrate fuzzilli into v8
Fuzzilli is open source fuzzer by Samuel Groß (saelo@google.com)
that can be used to find bugs in v8 javascript engine. As we want
to automate fuzzing for current versions of v8, we want to merge
fuzzilli toolkit into v8 code, so that fuzzer can automatically
update to the newest version.
So far Fuzzilli has been maintained at
https://github.com/googleprojectzero/fuzzilli .


Bug tracker Id: https://bugs.chromium.org/p/v8/issues/detail?id=10571

Change-Id: I83ddc7e8bb31664c19e4044395bb9044a1c12031
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2201760
Reviewed-by: Tamer Tas <tmrts@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Michael Stanton <mvstanton@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Michael Stanton <mvstanton@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68132}
2020-06-03 09:53:24 +00:00
Thibaud Michaud
01724ace94 [assembler][x64] Inline Operand constructor
On x86-64, we spend significant time constructing and copying operands
in Liftoff (around 5% locally). Inlining the constructor and helper
functions removes most of the overhead.

R=clemensb@chromium.org

Bug: v8:10576
Change-Id: I1663e3e92abe7683eba9320e77fce9be8f84b4ca
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2225023
Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68130}
2020-06-03 09:13:19 +00:00
Iain Ireland
b65fcfe925 [regexp] Fix non-unicode ignore-case backreferences
https://crrev.com/c/2072858 rewrote the implementation of non-unicode
ignore-case matches to comply with the JS spec in some corner
cases. It fixed character matches and character class matches.

We missed a similar bug in the implementation of back references. This
CL fixes that bug.

The main change is in regexp-macro-assembler.cc, where
CaseInsensitiveCompareUC16 is split into CaseInsensitiveCompareUnicode
(which has the same semantics as before) and
CaseInsensitiveCompareNonUnicode (which has the semantics described
here: https://tc39.es/ecma262/#sec-runtime-semantics-canonicalize-ch).

Most of the rest of the patch undoes https://crrev.com/c/2081816 to
once again make the unicode flag available to the macroassembler, so
that we can decide which helper function to call.

The testcase is a version of test/intl/regress-10248.js, modified to
test backreferences.

Bug: v8:10573
Change-Id: I70ef7d134d37f99b1f75a5eba17020e82d59f1b9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2219284
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68129}
2020-06-03 08:59:08 +00:00
Georg Neis
8c0bae39e9 Update deoptimizer/OWNERS
Also change the component from Runtime to Compiler.

Change-Id: Ifb19e0d584b279b5f9bc6bc60531e64d4fecb4ad
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2218285
Commit-Queue: Georg Neis <neis@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68126}
2020-06-03 07:50:48 +00:00
Jakob Gruber
0e8c33a57c [builtins] Fix String.p.split for one-byte-wraps-two-byte string
It's possible for a one-byte string to wrap a two-byte string. For
example:

      CONS_ONE_BYTE_STRING_TYPE
wraps THIN_STRING_TYPE
wraps EXTERNAL_INTERNALIZED_STRING_TYPE

We thus have to validate the extracted instance type when relying on
the string being one-byte.

Bug: chromium:1088179
Change-Id: Id0f996761a3ae2f1233e12c95e663e77d4a5ebf9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2226752
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68124}
2020-06-03 04:54:05 +00:00
Ng Zhi An
5d8f3b46a5 [ia32] Replace c-style cast with brace initialization.
Bug: v8:10506
Change-Id: I896d0d614524bb9515593fb1fb2b1e3e9892a026
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2225938
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68122}
2020-06-03 00:44:48 +00:00
Ng Zhi An
1b62ffa864 [clang-tidy] Make deleted constructor public
Making them private was a way to hide the constructor, we can
explicitly delete them, which give a better compilation error message as
well.

Also see: https://stackoverflow.com/q/55205874

Bug: v8:10488
Change-Id: I624efdb03edb4d1d07f95e756f2c87baba4b3ffe
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2223236
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68121}
2020-06-02 23:35:28 +00:00
Ng Zhi An
cebbf6103d [clang-tidy] Add override to overridden destructors
See
https://clang.llvm.org/extra/clang-tidy/checks/modernize-use-override.html
for more on this warning.

Bug: v8:10488
Change-Id: Icfb54d8f4ab0efe0fdf51bd1920511b7505207d0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2223234
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68120}
2020-06-02 21:32:46 +00:00
Frank Tang
ba3a9424f1 [Intl] Changes of toStringTag of Intl.*
Implement the spec changes in https://github.com/tc39/ecma402/pull/430

Bug: v8:10554
Change-Id: I421d6feb94810027cf17ff58a4ec5357940ef44a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2212889
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68119}
2020-06-02 20:31:45 +00:00
Clemens Backes
38948b8e92 [wasm][interpreter] Remove activations
Since the interpreter cannot call out to JS any more, there cannot be
more than one activation at a time. Hence remove the concept of
activations.

R=ahaas@chromium.org

Bug: v8:10389
Change-Id: Ifda5624e192464a1aed2943787bc6860d1917719
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2219942
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68118}
2020-06-02 20:20:05 +00:00
Clemens Backes
634d5952a7 Revert "[wasm-simd][liftoff] Fix I64x2Mul"
This reverts commit 76debfda32.

Reason for revert: Nullptr access in new test: https://ci.chromium.org/p/v8/builders/ci/V8%20Linux/37265

Original change's description:
> [wasm-simd][liftoff] Fix I64x2Mul
> 
> The I64x2Mul overwrote the lhs/rhs if they are the same as dst. So when
> deciding if we need temporaries, we should not only check the
> cache_state, but whether they alias dst or not.
> 
> Bug: chromium:1088273
> Change-Id: I82efa9b45e0a3d321a06efde60971ce95b21490f
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2225796
> Commit-Queue: Zhi An Ng <zhin@chromium.org>
> Reviewed-by: Clemens Backes <clemensb@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#68114}

TBR=clemensb@chromium.org,zhin@chromium.org

Change-Id: I5fd337b71d82d262d36ff410077a11c17b50036b
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:1088273
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2226756
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68117}
2020-06-02 20:12:08 +00:00
Clemens Backes
6b633af775 [wasm] Disallow nullptr modules in decoder
In production, we will always pass a pointer to the decoded module. The
only reason for the existance of the nullptr checks is that tests
sometimes don't pass a module here. Hence we pay in production code for
a test-only feature.

This CL fixes this by always passing a module pointer from the decoder
tests. This even simplifies the code a lot by removing redundant code.

The {TestModuleBuilder} class was moved before the definitions of the
{FunctionBodyDecoderTest} class in order to be able to reuse it there.
It's unmodified otherwise.

R=ahaas@chromium.org

Bug: v8:10576
Change-Id: I7d876bfc8a27b50fe713afb8848fb4f642287cfa
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2226749
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68116}
2020-06-02 20:01:35 +00:00
Shu-yu Guo
e0f2e5a515 Revert "Set .name of anonymous functions on the RHS of logical assignment."
This reverts commit c342ba8247.

Reason for revert: Incorrectly parsed destructuring + logical assignment

Original change's description:
> Set .name of anonymous functions on the RHS of logical assignment.
> 
> https://github.com/tc39/proposal-logical-assignment/pull/24 reached
> consensus in June TC39.
> 
> Drive-by refactoring of testing for logical assignment ops using
> IsInRange.
> 
> Bug: v8:10579
> Change-Id: I5a203ba552a905cd28f75c5d223998431a1966ce
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2225809
> Reviewed-by: Marja Hölttä <marja@chromium.org>
> Commit-Queue: Shu-yu Guo <syg@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#68101}

TBR=marja@chromium.org,syg@chromium.org

Change-Id: I7992941bb31ad063611a45a65d20517803910475
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:10579
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2227059
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68115}
2020-06-02 19:26:27 +00:00
Ng Zhi An
76debfda32 [wasm-simd][liftoff] Fix I64x2Mul
The I64x2Mul overwrote the lhs/rhs if they are the same as dst. So when
deciding if we need temporaries, we should not only check the
cache_state, but whether they alias dst or not.

Bug: chromium:1088273
Change-Id: I82efa9b45e0a3d321a06efde60971ce95b21490f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2225796
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68114}
2020-06-02 19:21:55 +00:00
Ng Zhi An
6dca4f96f4 [clang-tidy] Make deleted constructor public
Making them private was a way to hide the constructor, we can
explicitly delete them, which give a better compilation error message as
well.

Also see: https://stackoverflow.com/q/55205874

Bug: v8:10488
Change-Id: Ie9200b317e4d2f47b9e869701149960341878d3c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2223235
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68113}
2020-06-02 19:20:35 +00:00
Clemens Backes
447ad5ccbe [codegen] Move SourcePositionTableBuilder to Zone
The SourcePositionTableBuilder unconditionally allocates heap memory for
every Liftoff compilation. This shows up with 1-2% of compilation time
in profiles. Hence move the vector contained in the
SourcePositionTableBuilder into the compilation zone. Such a zone
already exists for both Liftoff and TurboFan, so we can easily save
allocations this way.

R=thibaudm@chromium.org

Bug: v8:10576
Change-Id: Ia83d05cc8c36c775ebff6ec2064e9c3f8cc4d384
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2224221
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68112}
2020-06-02 19:18:07 +00:00
Dominik Inführ
f62fc2e1a8 [heap] Allow enabling --local-heaps by default
All tests pass now with --concurrent-allocation and --local-heaps flags
set to true.

Bug: v8:10315
Change-Id: I03a70933aa0db4d9e74933ad2fc4cb81105cb889
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2218061
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68111}
2020-06-02 19:03:25 +00:00
Milad Farazmand
2ae3fa5076 PPC/s390: Reland "[wasm-simd][liftoff][ia32][x64] Implement bitmask"
Port aa5bcc09bf

Original Commit Message:

    This relands commit d04b5e4755.

    The fix here is in the assembler for pmovmskb, emit_optional_rex_32 should be
    called after emitting the prefix byte.

    Original change's description:
    > [wasm-simd][liftoff][ia32][x64] Implement bitmask
    >
    > Implements i8x16 i16x8 i32x4 bitmask.
    >
    > This was merged into the proposal in
    > https://github.com/WebAssembly/simd/pull/201/.
    >
    > Bug: v8:9909,v8:10308
    > Change-Id: I882f0c2697213cdf593e745112e0897cee252009
    > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2222607
    > Commit-Queue: Zhi An Ng <zhin@chromium.org>
    > Reviewed-by: Clemens Backes <clemensb@chromium.org>
    > Cr-Commit-Position: refs/heads/master@{#68090}

R=zhin@chromium.org, joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com
BUG=
LOG=N

Change-Id: Id73795d3628067199ac6ac592a9b0b1c57fc65a4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2226311
Reviewed-by: Zhi An Ng <zhin@chromium.org>
Commit-Queue: Milad Farazmand <miladfar@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#68109}
2020-06-02 18:25:25 +00:00
Anton Bikineev
ad54f1bb17 cppgc: Add write barrier
This moves from Blink:
1) implementation of the marking write barrier;
2) WriteBarrierWorklist to Marker;
3) incremental/concurrent marking options.

Bug: chromium:1056170
Change-Id: Ia3e31ffd920a99803420b1453695fe2fb8d843b8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2218064
Commit-Queue: Anton Bikineev <bikineev@chromium.org>
Reviewed-by: Omer Katz <omerkatz@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68108}
2020-06-02 18:03:35 +00:00
Ng Zhi An
f672cefd30 [wasm-simd][liftoff][arm][arm64] Implement bitmask
Implement i8x16 i16x8 i32x4 bitmask for arm and arm64.

The instruction sequence is the same as TurboFan, we have some special
handling for getting the second temporary Q register, reuse src if
possible.

Bug: v8:9909,v8:10308
Change-Id: I1c6fe0d076f0e14d05c4cc532e4d976f4ebcce30
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2222608
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68107}
2020-06-02 17:32:35 +00:00
Ng Zhi An
aa5bcc09bf Reland "[wasm-simd][liftoff][ia32][x64] Implement bitmask"
This relands commit d04b5e4755.

The fix here is in the assembler for pmovmskb, emit_optional_rex_32 should be
called after emitting the prefix byte.

Original change's description:
> [wasm-simd][liftoff][ia32][x64] Implement bitmask
>
> Implements i8x16 i16x8 i32x4 bitmask.
>
> This was merged into the proposal in
> https://github.com/WebAssembly/simd/pull/201/.
>
> Bug: v8:9909,v8:10308
> Change-Id: I882f0c2697213cdf593e745112e0897cee252009
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2222607
> Commit-Queue: Zhi An Ng <zhin@chromium.org>
> Reviewed-by: Clemens Backes <clemensb@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#68090}

Bug: v8:9909, v8:10308
Change-Id: I4897585c86b87f72dc8f142b275171276d135a24
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2225090
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68106}
2020-06-02 16:31:15 +00:00
gengjiawen
a16ad725b9 build: fix build on msvc
See: https://github.com/nodejs/node-v8/issues/158#issuecomment-636909258
Change-Id: I50c732cd682cd4627a463822a4dfd1678dff266e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2226121
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68105}
2020-06-02 15:33:11 +00:00
Seth Brenith
7ce4b196ce [diagnostics] Make basic block profiling more configurable
This change adds more granular control to the behavior that was
previously controlled by the single flag --turbo-profiling. With this
change, it becomes possible to:
- output information only about builtins, ignoring functions compiled at
  runtime
- skip the very slow process of writing the schedule and disassembly for
  all builtins, if you only want the block counts and don't need verbose
  output

This change also moves the output step from Shell::OnExit to
Isolate::DumpAndResetStats so that it's more consistent with other
features and works in hosts other than d8.

Bug: v8:10470, v8:9119
Change-Id: I19b1caca3ff27a2e4a6fdc7ad2f8174f8d678b3a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2216717
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Seth Brenith <seth.brenith@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#68104}
2020-06-02 15:18:52 +00:00
Jakob Gruber
a70348d0e0 Unify string debug printing
This unifies functionality between release-mode ShortPrint and
debug-mode Print:

- Prefixes and suffixes are now consistent. 'u' for two-byte, '#' for
  internalized, 'c' for cons, '>' for thin.
- Logic was simplified and is now based on 3 functions:
  PrefixForDebugPrint, PrintUC16, SuffixForDebugPrint.
- %DebugPrint no longer interprets strings as 'code markers'.
- The ancient and unused use_verbose_printer flag was removed.

Bug: v8:10581
Change-Id: Iebc6a746a2683f9f5a8ef60579836e7f66a188fa
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2224868
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68103}
2020-06-02 15:08:21 +00:00
George Wort
7c0c52861f [turbolizer] Display live range uses
Display UsePositions in the intervals
in live ranges in turbolizer.

Uses are shown as vertical red lines.

Bug: v8:7327
Change-Id: Iab8d08989b9113d1b7d393252de5988e8b25b8de
Notry: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2224215
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Reviewed-by: Santiago Aboy Solanes <solanes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68102}
2020-06-02 15:04:11 +00:00
Shu-yu Guo
c342ba8247 Set .name of anonymous functions on the RHS of logical assignment.
https://github.com/tc39/proposal-logical-assignment/pull/24 reached
consensus in June TC39.

Drive-by refactoring of testing for logical assignment ops using
IsInRange.

Bug: v8:10579
Change-Id: I5a203ba552a905cd28f75c5d223998431a1966ce
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2225809
Reviewed-by: Marja Hölttä <marja@chromium.org>
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68101}
2020-06-02 15:00:21 +00:00
Jakob Gruber
6463c0f00c [compiler] Hook in compare op builtins with feedback in generic lowering
If --turbo-nci is enabled, use compare op builtins with feedback
collection during generic lowering.

Bug: v8:8888
Change-Id: I886020e2ee280f65388d9987c70958546f99e0f3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2215821
Reviewed-by: Georg Neis <neis@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68100}
2020-06-02 12:24:47 +00:00
Clemens Backes
d47ab50b54 [liftoff] Use ZoneVectors during compilation
The allocation of heap storage for the vectors shows up in profiles, and
also the destruction of the contained elements.
Since we already have a compilation zone available, we can easily move
the vectors and all contained elements into the zone, where they will be
deallocated together with all other data at once.

R=thibaudm@chromium.org

Bug: v8:10576
Change-Id: I2c3d318f9b19b1b8c2e4e57e7523cd1c79192cc6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2224220
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68099}
2020-06-02 11:24:37 +00:00
Dominik Inführ
37e3cac7c5 [heap] Do not verify slots in concurrent sweeper
Cannot verify whether slots are cleared from a concurrent sweeping task,
the OLD_TO_NEW remembered set is owned by the main thread.

Bug: v8:10562
Change-Id: I0c880f7f96350aa35b44d2966c9621576825374c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2215820
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68098}
2020-06-02 10:55:07 +00:00
Clemens Backes
f843917592 [d8] Improve error message for illegal --trace-path
Unconditionally check for errors (instead of a DCHECK), and print a
better error message (including the file path) if the file cannot be
opened.

R=tebbi@chromium.org
CC=machenbach@chromium.org

Bug: chromium:1087039
Change-Id: Ia5cb76b309e78631ecf9462de6c7cd3eb4bf9e59
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2224226
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68097}
2020-06-02 10:47:07 +00:00
Clemens Backes
5fcb414ac2 [wasm][debug] Support multi-threaded breakpoints
This adds support for multiple isolates sharing the same module but
setting different breakpoints. This is simulated by having a debugger
test that runs in the "--isolates" variant, i.e. two isolates running
the same test at the same time. Both isolates will set and remove
breakpoints.

The DebugInfo will keep a separate list of breakpoints per isolate, and
when recompiling a function for debugging it will respect all
breakpoints in all isolates.
In order to ensure consistency if multiple isolates are setting or
removing breakpoints simultaneously, we go back to a more coarse-grained
locking scheme, where the DebugInfo lock is held while re-compiling
Liftoff functions.

While recompilation will install the code in the module-global code
table and jump table (and hence all isolates will use it for future
calls), only the stack of the requesting isolate is rewritten to
immediately use new code. This is OK, because other isolates are not
interested in the new breakpoint(s) anyway.
On {SetBreakpoint}, we always need to rewrite the stack of the
requesting isolate though, even if the breakpoint was set before by
another isolate.

Drive-by: Some fixes in SharedFunctionInfo in order to support setting
breakpoints via the Debug mirror.

R=thibaudm@chromium.org

Bug: v8:10359
Change-Id: If659afb273260fc5e8124b4b617fb4322de473c7
Cq-Include-Trybots: luci.v8.try:v8_linux64_tsan_rel
Cq-Include-Trybots: luci.v8.try:v8_linux64_tsan_isolates_rel_ng
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2218059
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68096}
2020-06-02 10:27:17 +00:00
Georg Neis
f3d463923e [turbofan] Fix a typer monotonicity bug
Bug: chromium:1085804
Change-Id: I98f12da97334bd5fd32bd01b1eca56be895dc0a8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2218286
Commit-Queue: Georg Neis <neis@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68095}
2020-06-02 10:23:47 +00:00
Leszek Swirski
e4cc52bfeb [offthread] Don't set marking bit on off-thread large pages
Bug: chromium:1088350
Change-Id: I9dc9f6b323ebe2e751167880acad0eed3584222a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2224227
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68094}
2020-06-02 10:07:47 +00:00
jiepan
1f5842ad7a Fix printing order of opcode prefix and space
Leading whitespaces are used to indiate control depth,
opcode prefix should be printed after the whitespaces.

Change-Id: I0a22864d1d5a2e643b15a4c10909c0387922f8e3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2224959
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Jie Pan <jie.pan@intel.com>
Cr-Commit-Position: refs/heads/master@{#68092}
2020-06-02 04:43:55 +00:00
Francis McCabe
cc1b741ef3 Revert "[wasm-simd][liftoff][ia32][x64] Implement bitmask"
This reverts commit d04b5e4755.

Reason for revert: closed the tree with a simd related test failure:
https://ci.chromium.org/p/v8/builders/ci/V8%20Linux64/37487?

Original change's description:
> [wasm-simd][liftoff][ia32][x64] Implement bitmask
> 
> Implements i8x16 i16x8 i32x4 bitmask.
> 
> This was merged into the proposal in
> https://github.com/WebAssembly/simd/pull/201/.
> 
> Bug: v8:9909,v8:10308
> Change-Id: I882f0c2697213cdf593e745112e0897cee252009
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2222607
> Commit-Queue: Zhi An Ng <zhin@chromium.org>
> Reviewed-by: Clemens Backes <clemensb@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#68090}

TBR=clemensb@chromium.org,zhin@chromium.org

Change-Id: I2e090f92d84b8f7d8bbf0725a4f64efaa18f3c65
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:9909, v8:10308
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2223829
Reviewed-by: Francis McCabe <fgm@chromium.org>
Commit-Queue: Francis McCabe <fgm@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68091}
2020-06-01 19:26:53 +00:00
Ng Zhi An
d04b5e4755 [wasm-simd][liftoff][ia32][x64] Implement bitmask
Implements i8x16 i16x8 i32x4 bitmask.

This was merged into the proposal in
https://github.com/WebAssembly/simd/pull/201/.

Bug: v8:9909,v8:10308
Change-Id: I882f0c2697213cdf593e745112e0897cee252009
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2222607
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68090}
2020-06-01 18:04:21 +00:00
Ng Zhi An
c4be24e3f7 [wasm-simd][liftoff][arm][arm64] Implement all_true
Implement all_true for arm and arm64. Instruction sequence is the same
as TurboFan.

Bug: v8:9909
Change-Id: Ibe57c6ae6f700dfe5bd23a91a243778b6481c5a0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2222606
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68089}
2020-06-01 17:00:34 +00:00
Zhao Jiazhong
b972069f32 [mips][wasm-simd][liftoff] Implement all_true
Port b37995382a
https://crrev.com/c/2220446

Change-Id: I5de86c0aaf0f9262fd9cd63078c75c0013f5c962
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2223886
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Zhao Jiazhong <zhaojiazhong-hf@loongson.cn>
Cr-Commit-Position: refs/heads/master@{#68088}
2020-06-01 13:20:20 +00:00
Tobias Tebbi
85bc1b0cab [torque] check FixedArray length
Bug: chromium:1086890
Change-Id: I8345f209d8f4e40a57df166664f403a6cf6c6652
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2222346
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Auto-Submit: Tobias Tebbi <tebbi@chromium.org>
Reviewed-by: Michael Stanton <mvstanton@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68085}
2020-05-30 14:46:49 +00:00
Seth Brenith
50af61718d [torque] Improve field types in Script
This is a partial reland of https://crrev.com/c/v8/v8/+/2199640 .

Change-Id: I9e7506ade0938079166e63926e11b67615f909e7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2216239
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Seth Brenith <seth.brenith@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#68083}
2020-05-29 23:52:28 +00:00
Milad Farazmand
847ff2532d PPC/s390: [wasm-simd][liftoff][ia32][x64] Implement all_true
Port b37995382a

Original Commit Message:

    Implement all v8x16 v16x8 v32x4 all_true on ia32 and x64. arm and arm64
    bailout for now, will be implemented later.

R=zhin@chromium.org, joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com
BUG=
LOG=N

Change-Id: Ie1c3791387b650a9ff802968002832160ee814dd
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2222668
Reviewed-by: Zhi An Ng <zhin@chromium.org>
Commit-Queue: Milad Farazmand <miladfar@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#68081}
2020-05-29 19:13:47 +00:00
Ng Zhi An
5c1b36e6b7 [clang-tidy] Use explicit default
See
https://chromium.googlesource.com/chromium/src/+/HEAD/styleguide/c++/c++-dos-and-donts.md#prefer-to-use.

Bug: v8:10488
Change-Id: I1e971f57831bbf901c79ff4894a951b8dbe615e6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2219410
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68080}
2020-05-29 17:40:08 +00:00
Bill Budge
34ab998f83 [torque] Fix NumberParseFloat regression.
- Changes javascript builtins to use explicit parameters rather than
  variadic, where possible.

tbr=tebbi@chromium.org

Bug: chromium:1085370
Change-Id: I84f01684729b32a9d27df3d021e72c34cc3a8aaf
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2215225
Commit-Queue: Bill Budge <bbudge@chromium.org>
Reviewed-by: Santiago Aboy Solanes <solanes@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68079}
2020-05-29 17:31:27 +00:00
Milad Farazmand
7a80c7e14b S390: Use load immediate instead of add immediate
Change-Id: I33412dcf08106d717d11ee37d29b2a3c1d608727
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2219280
Reviewed-by: Joran Siu <joransiu@ca.ibm.com>
Commit-Queue: Milad Farazmand <miladfar@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#68078}
2020-05-29 17:29:57 +00:00