Commit Graph

25529 Commits

Author SHA1 Message Date
Frank Tang
3962a0f788 Fix crash in dateStyle and unsupported nu
Bug: chromium:1107661
Change-Id: I6c55fb74bc009d2af2ae00e34fee9e1ee709a805
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2311352
Commit-Queue: Frank Tang <ftang@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69009}
2020-07-22 17:37:53 +00:00
Seth Brenith
922983dfd3 Profile-guided optimization of builtins
Design doc:
https://docs.google.com/document/d/1szInbXZfaErWW70d30hJsOLL0Es-l5_g8d2rXm1ZBqI/edit?usp=sharing

V8 can already collect data about how many times each basic block in the
builtins is run. This change enables using that data for profile-guided
optimization. New comments in BUILD.gn describe how to use this feature.

A few implementation details worth mentioning, which aren't covered in
the design doc:

- BasicBlockProfilerData currently contains an array of RPO numbers.
  However, this array is always just [0, 1, 2, 3, ...], so this change
  removes that array. A new DCHECK in BasicBlockInstrumentor::Instrument
  ensures that the removal is valid.

- RPO numbers, while useful for printing data that matches with the
  stringified schedule, are not useful for matching profiling data with
  blocks that haven't been scheduled yet. This change adds a new array
  of block IDs in BasicBlockProfilerData, so that block counters can be
  used for PGO.

- Basic block counters need to be written to a file so that they can be
  provided to a subsequent run of mksnapshot, but the design doc doesn't
  specify the transfer format or what file is used. In this change, I
  propose using the existing v8.log file for that purpose. Block count
  records look like this:

  block,TestLessThanHandler,37,29405

  This line indicates that block ID 37 in TestLessThanHandler was run
  29405 times. If multiple lines refer to the same block, the reader
  adds them all together. I like this format because it's easy to use:
  - V8 already has robust logic for creating the log file, naming it to
    avoid conflicts in multi-process situations, etc.
  - Line order doesn't matter, and interleaved writes from various
    logging sources are fine, given that V8 writes each line atomically.
  - Combining multiple sources of profiling data is as simple as
    concatenating their v8.log files together.

- It is a good idea to avoid making any changes based on profiling data
  if the function being compiled doesn't match the one that was
  profiled, since it is common to use profiling data downloaded from a
  central lab which is updated only periodically. To check whether a
  function matches, I propose using a hash of the Graph state right
  before scheduling. This might be stricter than necessary, as some
  changes to the function might be small enough that the profile data is
  still relevant, but I'd rather err on the side of not making incorrect
  changes. This hash is also written to the v8.log file, in a line that
  looks like this:

  builtin_hash,LdaZeroHandler,3387822046

Bug: v8:10470
Change-Id: I429e5ce5efa94e01e7489deb3996012cf860cf13
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2220765
Commit-Queue: Seth Brenith <seth.brenith@microsoft.com>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69008}
2020-07-22 17:12:23 +00:00
Frank Tang
6f356f799b [Intl] Remove flag for fractionalSecondDigits
DateTimeFormat's fractionalSecondDigits shipped in M84, so we
can drop the --harmony_intl_dateformat_fractional_second_digits
flag now.

Bug: v8:10485
Change-Id: If7a1a8599722073d7382635219a6fb46cdc47474
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2311410
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69007}
2020-07-22 16:57:43 +00:00
Maya Lekova
1a5cd1120a [turbofan] Fix effect chain for fast calls
This CL fixes passing the receiver of a fast call as an effect input
only in cases where the opcode supports it.

It also introduces a test for callbacks without fallback support and a
test where ConvertReceiver is not introduced.

Bug: chromium:1052746
Change-Id: I6f396f4c9cbaab7ae915c908a9f805d9770f8946
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2312777
Commit-Queue: Maya Lekova <mslekova@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69005}
2020-07-22 16:07:53 +00:00
Jakob Kummerow
ae7b6fcdaf [wasm-gc] Implement br_on_cast
Bug: v8:7748
Change-Id: I6e226888d84a790efc36ac6e7c2a32bc3426bd84
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2308341
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69002}
2020-07-22 15:05:18 +00:00
Richard Stotz
51b53dd3ee [turbofan][wasm][arm] Improved saturated conversions float32 to int32.
Bug: v8:10720
Change-Id: I7a05bfb3c87c4f0f5516608da5d42fdaff466536
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2304572
Commit-Queue: Richard Stotz <rstz@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69001}
2020-07-22 15:04:13 +00:00
Richard Stotz
fafb476998 [turbofan][wasm][arm64] Improved saturated conversions float32 to int32.
The design of this change was discussed here:
https://docs.google.com/document/d/12otOj6SyXMXj0Dnnx9B6MGLMRwHPhg6RIZRazVw3tFA/

Bug: v8:10720
Change-Id: I8292dcf7272bdf4526a2d630b49fc374cdb01bdc
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2304570
Commit-Queue: Richard Stotz <rstz@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68994}
2020-07-22 14:12:38 +00:00
Maya Lekova
a269ce201d Revert "Reland "[flags] warn about contradictory flags""
This reverts commit d8f8a7e210.

Reason for revert: Breaks code_serializer variant - https://cr-buildbucket.appspot.com/build/8874070652992164976

Original change's description:
> Reland "[flags] warn about contradictory flags"
> 
> This is a reland of b8f9166664
> Difference to previous CL: Additional functionality to specify
> incompatible flags based on GN variables and extra-flags, used
> to fix the issues that came up on the waterfall.
> 
> This also changes the rules regarding repeated flags: While
> explicitly repeated flags are allowed for boolean values as long
> as they are identical, repeated flags or explicit flags in the
> presence of an active implication are disallowed for non-boolean
> flags. The latter simplifies specifying conflict rules in
> variants.py. Otherwise a rule like
> 
> INCOMPATIBLE_FLAGS_PER_EXTRA_FLAG = {
>   "--gc-interval=*": ["--gc-interval=*"],
> }
> 
> wouldn't work because specifying the same GC interval twice
> wouldn't actually count as a conflict. This was an issue with
> test/mjsunit/wasm/gc-buffer.js, which specifies
> --gc-interval=500 exactly like the extra flag by the stress bot.
> 
> Also, this now expands contradictory flags checking to d8 flags
> for consistency.
> 
> 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}
> 
> Bug: v8:10577
> Change-Id: I268e590ee18a535b13dee14eeb15ddd0a9ee8341
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2235115
> Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
> Reviewed-by: Tamer Tas <tmrts@chromium.org>
> Reviewed-by: Clemens Backes <clemensb@chromium.org>
> Reviewed-by: Georg Neis <neis@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#68989}

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

Change-Id: I7969065b0edbc463a94e530485bc2ab623d77b62
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:10577
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2312782
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Commit-Queue: Maya Lekova <mslekova@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68992}
2020-07-22 13:48:32 +00:00
Maya Lekova
470b614608 [turbofan] Remove object unwrapping for fast C calls
The object is passed now as an v8::ApiObject instead of unwrapped
C++ pointer and the embedder should do the unwrapping.

Bug: chromium:1052746
Change-Id: If5671c5fdbbe8d58435c7bd9aceccf5e17f8ea21
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2304571
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Commit-Queue: Maya Lekova <mslekova@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68991}
2020-07-22 12:24:13 +00:00
Tobias Tebbi
d8f8a7e210 Reland "[flags] warn about contradictory flags"
This is a reland of b8f9166664
Difference to previous CL: Additional functionality to specify
incompatible flags based on GN variables and extra-flags, used
to fix the issues that came up on the waterfall.

This also changes the rules regarding repeated flags: While
explicitly repeated flags are allowed for boolean values as long
as they are identical, repeated flags or explicit flags in the
presence of an active implication are disallowed for non-boolean
flags. The latter simplifies specifying conflict rules in
variants.py. Otherwise a rule like

INCOMPATIBLE_FLAGS_PER_EXTRA_FLAG = {
  "--gc-interval=*": ["--gc-interval=*"],
}

wouldn't work because specifying the same GC interval twice
wouldn't actually count as a conflict. This was an issue with
test/mjsunit/wasm/gc-buffer.js, which specifies
--gc-interval=500 exactly like the extra flag by the stress bot.

Also, this now expands contradictory flags checking to d8 flags
for consistency.

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}

Bug: v8:10577
Change-Id: I268e590ee18a535b13dee14eeb15ddd0a9ee8341
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2235115
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Reviewed-by: Tamer Tas <tmrts@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68989}
2020-07-22 12:22:03 +00:00
Toan Pham
66ed564412 Separate metadata from code in the embedded data blob
Some platforms disable reading of bytes in the .text section,
so move the metadata into a separate .rodata section.

Bug: v8:10707
Change-Id: I30ef7a180f489f175c31f9d4dcd02115c9f516c2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2301113
Commit-Queue: Toan Pham <toanpham@google.com>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68984}
2020-07-22 09:50:27 +00:00
Jakob Gruber
991fc23962 [nci] Spawn dedicated NCI compilation jobs
This CL introduces a new pipeline mode in which each optimization
triggers both a Turbofan and an NCI compilation job. The TF code is
installed, the NCI code is inserted into the code cache for future
consumption by other contexts.

--turbo-nci enables this mode.

The old configuration (with NCI replacing TF) is still available under
the --turbo-nci-as-highest-tier flag. This flag remains useful for
testing purposes.

Drive-by: Refactor tracing in compiler.cc.

Bug: v8:8888
Change-Id: I62522e61788762250ff717eef84eae914e266f3b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2299360
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Mythri Alle <mythria@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68983}
2020-07-22 09:33:50 +00:00
Nico Hartmann
2e96276c76 [turbofan] More ScriptContextTable concurrency
Add synchronized accessors for ScriptContextTable on NativeContext.
Add corresponding cctest.

Bug: v8:7790
Change-Id: If390f3d4a72441a8b4323e9413d7627cd15514c0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2299372
Commit-Queue: Nico Hartmann <nicohartmann@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Reviewed-by: Santiago Aboy Solanes <solanes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68981}
2020-07-22 09:23:37 +00:00
Santiago Aboy Solanes
8fcf7cb06f [compiler] Test kWeakRef to kFullTransitionArray insertions
If we insert a second SIMPLE_PROPERTY_ARRAY we move from kWeakRef
encoding to kFullTransitionArray encoding. As always, we are searching
in the meantime in a background thread.

Bug: v8:7790
Change-Id: I5e3d85657dda4c199e50b9c35e7f617f1821a8f0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2243218
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68980}
2020-07-22 09:01:57 +00:00
Nico Hartmann
2d428a615f [turbofan] Concurrent ScriptContextTable access
This CL makes the ScriptContextTable concurrently accessible from the
background thread (in particular ScriptContextTable::get_context).
A cctest is added to check synchronization with tsan.

Bug: v8:7790
Change-Id: I2e2dc8c6a7cfa369787959c4d5ed5f357f4720fa
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2260567
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Commit-Queue: Nico Hartmann <nicohartmann@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68979}
2020-07-22 07:59:13 +00:00
Ng Zhi An
1d78645135 [wasm-simd][cleanup] Consolidate macros for SIMD loads
The load splat, load extend, load zero macros are essentially the same,
consolidate them into a single macro.

Change-Id: Ic812043b37524deb3a9e6ddc223bb95ae77e1d4d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2304715
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Reviewed-by: Bill Budge <bbudge@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68978}
2020-07-21 22:14:12 +00:00
Milad Farazmand
15ca7b94da PPC/s390: skip wasm-dynamic-tiering on unsupported platforms
Change-Id: I818534bc2fedd127689bf82f2cdd3a4f2f8c31e8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2310574
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Milad Farazmand <miladfar@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#68977}
2020-07-21 18:37:52 +00:00
Frank Tang
40e34e3af4 Add "collation" option to Intl.Collator
Per change in https://github.com/tc39/ecma402/pull/459/

Bug: v8:10732
Change-Id: I2ef21e8b450cbf9c61f987c61f3ba7d6959db81a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2309149
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68976}
2020-07-21 18:32:22 +00:00
Ng Zhi An
8a06685d95 [wasm-simd] Support v128 global init expressions
v128.const (kExprS128) is the only constant expression supported
(similar to the other value types).

Bug: v8:10731
Change-Id: I9b11b47a851903dfd79d3590eff67b615057f81c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2308389
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Reviewed-by: Bill Budge <bbudge@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68975}
2020-07-21 18:02:06 +00:00
Ng Zhi An
7ca9fc8e68 [wasm-simd][x64] Prototype v128.load32_zero and v128.load64_zero
Prototype in TurboFan x64 and interpreter, bailout in Liftoff.

Suggested in https://github.com/WebAssembly/simd/pull/237.

Bug: v8:10713
Change-Id: I5346c351fb2ec5240b74013e62aef07c46d5d9b6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2300924
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Bill Budge <bbudge@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68973}
2020-07-21 17:47:42 +00:00
Arnaud Robin
f181dff3f5 [wasm] Implement dynamic tiering in wasm
On desktop systems, we use a very basic tiering strategy: Everything is
initially compiled with Liftoff, and once that is done, the module can
start being used. Concurrently to the execution, we re-compile all code
with TurboFan, and hot-swap each function once TurboFan finishes.

We should start using a more dynamic strategy where each function is
tiered-up when judged necessary. This change will then tier-up each
liftoff function once it has been called 5 times.

I then added a counter in the native module, that is updated directly
from Liftoff code, and a runtime call is then made when the counter
reaches the goal.

R=clemensb@chromium.org
CC=​thibaudm@chromium.org

Bug: v8:10728
Change-Id: I8dc2b02fdff8d97781bb1cf496886594b3d7f644
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2306803
Commit-Queue: Arnaud Robin <arobin@google.com>
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68971}
2020-07-21 16:07:01 +00:00
Michael Lippautz
1cb7c70707 cppgc: Fix ODR violation in unittests target
V8 already depends on cppgc_base which means that unittests does not
need to depend on cppgc_for_testing any longer.

Move the cppgc_for_testing dependency to the stand-alone
cppgc_unittests binary

Bug: v8:10674
Change-Id: I07bfe30901eb1683d2e0ee0189f73b5244884f27
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2310249
Auto-Submit: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Anton Bikineev <bikineev@chromium.org>
Reviewed-by: Anton Bikineev <bikineev@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68970}
2020-07-21 15:34:51 +00:00
Tamer Tas
82e29d8af8 [test] Load missing file to Android devices for inspector test suite
R=rmcilroy@chromium.org,machenbach@chromium.org,jkummerow@chromium.org

Bug: chromium:1099623
Change-Id: I7f79549a5de171dd2d85c86b3c4114f8aa2250b2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2308344
Auto-Submit: Tamer Tas <tmrts@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68967}
2020-07-21 14:11:11 +00:00
Manos Koukoutos
d41fd6c562 [wasm] Rename ValueType::type_name() -> name()
Drive-by: Improve comment, use << operator where possible
Change-Id: I5d2bff57a3f19a0fbb746136a897bf50e1173775
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2308337
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68966}
2020-07-21 12:55:51 +00:00
Jakob Gruber
d1fb6b5a7c [infra] Add and enable nci_as_highest_tier variant
With work on NCI proceeding, it makes sense to test multiple
pipeline configurations.

The nci variant (passes --turbo-nci) now spawns dedicated NCI
compilation jobs and inserts generated code into the code cache.

The nci_as_highest_tier variant (passes --turbo-nci-as-highest-tier)
simply replaces TF with NCI code (no extra jobs, no extra caching).
This mode stresses NCI generated code more than the nci variant, in
which NCI code only runs on cache hits.

Bug: v8:8888
Change-Id: I4c2a43cce5271a6c288e7aba195dcc9daed6af9d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2299361
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68964}
2020-07-21 10:53:31 +00:00
Manos Koukoutos
0747681e41 [wasm-gc][cleanup] Remove array.new, struct.new
They have been replaced with {array,struct}.new_with_rtt.

Also, rework tests that used those instructions.

Bug: v8:7748
Change-Id: I2aaccb1958bf2b8d6cad4969abc612216856393d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2307318
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68961}
2020-07-21 09:53:31 +00:00
Clemens Backes
cfebd19a3a [liftoff] Disable opcode merging when debugging
For debugging code, disable opcode merging. Otherwise, the effect of the
first merged opcode would not be observable when stepping.

R=thibaudm@chromium.org

Bug: v8:10350
Change-Id: Id656c9dee8f9676bf3d7881f3782e5ead76b5e71
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2306802
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68960}
2020-07-21 09:49:21 +00:00
Clemens Backes
be8faa4e86 [liftoff] Add test for opcode-merging during stepping
We currently still merge opcodes (i.e. i32 comparisons plus a br_if).
This CL adds a test for this, which checks for the current behaviour.
A follow-up CL will fix this and update the expected output accordingly.

R=thibaudm@chromium.org

Bug: v8:10350
Change-Id: I846aa931a3ec1a27043f04e830503d5732ae473e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2307232
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68957}
2020-07-21 09:05:08 +00:00
Manos Koukoutos
c108d7a058 [wasm-gc] Implement array.new_with_rtt
Also remove traces of array.new_sub

Bug: v8:7748
Change-Id: I96a922a16406960a80af0788e9cad5aa5692000a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2307237
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68956}
2020-07-21 08:35:17 +00:00
Marja Hölttä
96c5916dd4 Reland2: [Atomics.waitAsync] Implement Atomics.waitAsync
Original design doc:
https://docs.google.com/document/d/1dthXsVHMc1Sd_oYf9a-KZSFOd_a8dUgnt4REAG8YIXA

Design changes:
https://docs.google.com/document/d/1aeEGDm1XSqoJkQQKz9F75WqnuAa2caktxGy_O_KpO9Y

Reland:
- rewrote timing dependent tests to be more robust
- removed 1 flaky test
- disabled tests for DelayedTasksPlatform

Original:  https://chromium-review.googlesource.com/c/v8/v8/+/2202981

TBR=ishell@chromium.org, ulan@chromium.org

Bug: v8:10239
Change-Id: I2a042e419462f4c9f54ec549bfe16ec6684560b7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2307211
Commit-Queue: Marja Hölttä <marja@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68954}
2020-07-21 06:43:48 +00:00
Frank Tang
583f5ecc23 Change length from 0 to 2 for Intl.DisplayNames
Bug: v8:10733
Change-Id: I417c19b13ecc3de1e7a33ed31e4eb0129eabe7e8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2309113
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68952}
2020-07-21 03:19:47 +00:00
Ng Zhi An
6b4e55a892 [wasm-simd] Add a test for select with v128 params
I was looking around and couldn't find any tests for select with v128
params. Adding it for completion.

Change-Id: I9e3770e37eaddb23fc99649579b175536c1df844
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2308093
Reviewed-by: Bill Budge <bbudge@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68951}
2020-07-20 22:33:43 +00:00
Michael Achenbach
448c25f233 [test] Make mjsunit harness more robust to fuzzers
Some fuzzers replaced strigify and then caused uncaught errors
from harness methods using prettyPrinted.

Bug: chromium:1102897
Change-Id: I7ae6a90040ba0aa5ec1efa4a8b73e053ec75dd79
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2304814
Auto-Submit: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Commit-Queue: Maya Lekova <mslekova@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68947}
2020-07-20 15:07:59 +00:00
Kim-Anh Tran
bad0135180 [js] Test if setBreakpoint sets breakpoint on first breakable location
Bug: chromium:1105172
Change-Id: I1e683e5040501464ef6c7427d1e1f7923cd23831
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2304587
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Kim-Anh Tran <kimanh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68941}
2020-07-20 12:45:47 +00:00
Clemens Backes
c512d6173f [cleanup] Remove V8_2PART_UINT64_C macro
Replace by inline constants with separators (single quotes) for better
readability.

R=mlippautz@chromium.org

Bug: v8:10506
Change-Id: Iae7c72eeb9d463c63c2d135f6236edc6821d1e63
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2297379
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68939}
2020-07-20 11:52:17 +00:00
Maya Lekova
80c3192728 Revert "[Atomics.waitAsync] Disable flaky test"
This reverts commit b995a8a46f.

Reason for revert: Test addition got reverted.

Original change's description:
> [Atomics.waitAsync] Disable flaky test
> 
> TBR=mslekova@chromium.org
> 
> No-Try: true
> Bug: v8:10725, v8:10239
> Change-Id: Ia2f721f8a26a90dda658664315f0170841c3303e
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2306798
> Reviewed-by: Marja Hölttä <marja@chromium.org>
> Reviewed-by: Maya Lekova <mslekova@chromium.org>
> Commit-Queue: Marja Hölttä <marja@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#68931}

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

Change-Id: I0c5565222f509676fe60af5378ad04f806930da3
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:10725
Bug: v8:10239
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2306800
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Commit-Queue: Maya Lekova <mslekova@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68937}
2020-07-20 10:10:31 +00:00
Marja Hölttä
f088491b9e Revert "Reland [Atomics.waitAsync] Implement Atomics.waitAsync"
This reverts commit c5845b47bd.

Reason for revert: Too many tests are flaky

Original change's description:
> Reland [Atomics.waitAsync] Implement Atomics.waitAsync
> 
> Original design doc:
> https://docs.google.com/document/d/1dthXsVHMc1Sd_oYf9a-KZSFOd_a8dUgnt4REAG8YIXA
> 
> Design changes:
> https://docs.google.com/document/d/1aeEGDm1XSqoJkQQKz9F75WqnuAa2caktxGy_O_KpO9Y
> 
> Previous (reverted) version:  https://chromium-review.googlesource.com/c/v8/v8/+/2202981
> 
> Relanding with fix: tests need --noincremental-marking
> 
> TBR=ishell@chromium.org, ulan@chromium.org, syg@chromium.org, ahaas@chromium.org
> 
> Bug: v8:10239
> Change-Id: Id122225d5d2ed67cbeb3269df115c7208a33a281
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2306791
> Reviewed-by: Marja Hölttä <marja@chromium.org>
> Reviewed-by: Andreas Haas <ahaas@chromium.org>
> Commit-Queue: Marja Hölttä <marja@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#68929}

TBR=ulan@chromium.org,marja@chromium.org,ahaas@chromium.org,ishell@chromium.org,syg@chromium.org

Change-Id: If06da737749806982d1fb95811f540d6667543d5
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:10239
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2306799
Reviewed-by: Marja Hölttä <marja@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68935}
2020-07-20 09:50:59 +00:00
Thibaud Michaud
69553feaab [wasm][tail-call] Fix CanTailCall check
The CanTailCall check only passes if the return locations are the
same in the caller and the callee. However, stack returns are expected
to be at a different offset depending on the stack space reserved for
parameters.

R=clemensb@chromium.org

Bug: v8:7431
Change-Id: Iaac15fce889d6cd7d1ac88f320a872202281fb5a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2289789
Reviewed-by: Georg Neis <neis@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68933}
2020-07-20 09:07:29 +00:00
Marja Hölttä
9df54e0767 [tests] Disable slow tests for gc-stress (they time out)
Bug: v8:9506
Change-Id: If570b71d95030dd5fbe31d86d307ab0b45827308
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2306796
Reviewed-by: Sathya Gunasekaran  <gsathya@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68932}
2020-07-20 08:59:39 +00:00
Marja Hölttä
b995a8a46f [Atomics.waitAsync] Disable flaky test
TBR=mslekova@chromium.org

No-Try: true
Bug: v8:10725, v8:10239
Change-Id: Ia2f721f8a26a90dda658664315f0170841c3303e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2306798
Reviewed-by: Marja Hölttä <marja@chromium.org>
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68931}
2020-07-20 08:57:29 +00:00
Marja Hölttä
c5845b47bd Reland [Atomics.waitAsync] Implement Atomics.waitAsync
Original design doc:
https://docs.google.com/document/d/1dthXsVHMc1Sd_oYf9a-KZSFOd_a8dUgnt4REAG8YIXA

Design changes:
https://docs.google.com/document/d/1aeEGDm1XSqoJkQQKz9F75WqnuAa2caktxGy_O_KpO9Y

Previous (reverted) version:  https://chromium-review.googlesource.com/c/v8/v8/+/2202981

Relanding with fix: tests need --noincremental-marking

TBR=ishell@chromium.org, ulan@chromium.org, syg@chromium.org, ahaas@chromium.org

Bug: v8:10239
Change-Id: Id122225d5d2ed67cbeb3269df115c7208a33a281
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2306791
Reviewed-by: Marja Hölttä <marja@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68929}
2020-07-20 08:08:59 +00:00
Marijn Kruisselbrink
0c1a75ee23 Expose async iterator prototype.
Exposes initial_async_iterator_prototype the same way that
initial_iterator_prototype is exposed, to let blink implement
async iterables better.

Bug: chromium:1087157
Change-Id: I94f65eedb3aad0bf62cb4808935f320fe4bf4e9c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2300779
Commit-Queue: Marijn Kruisselbrink <mek@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68921}
2020-07-17 16:30:11 +00:00
Kim-Anh Tran
99fc380656 [wasm] Test if setBreakpoint sets breakpoint on first breakable location
Bug: chromium:1105172
Change-Id: I55213b28b619479aadcaaf830453ffde33f0005e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2304569
Commit-Queue: Kim-Anh Tran <kimanh@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68919}
2020-07-17 15:10:41 +00:00
Clemens Backes
42b4f15a1e [liftoff] Fix missing stack move
The {operator==} on {VarState} did not check the spill offset, so when
merging stack states, we forgot to move stack values if both source and
destination were stack slots, but at different offsets.
This CL fixes this by removing the {operator==}, because the semantics
(and use) are not clear, and it's only used in one place anyway.
The equality check was mostly redundant, so inlining it also makes the
code smaller and faster.

R=ahaas@chromium.org

Bug: v8:10702
Change-Id: I6c8b2cfd1002274175c9a17d305692e4631fd7dc
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2304574
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68916}
2020-07-17 13:52:28 +00:00
Igor Sheludko
3a89fc8e73 [zone] Final cleanup of zone allocations
... by migrating old-style code
  MyObject* obj = new (zone) MyObject(...)

to the new style
  MyObject* obj = zone->New<MyObject>(...)

... and prohibiting accidental use of the old-style.

Bug: v8:10689
Change-Id: Id75774ac12e3d0f95cb3a538066dffbf7815e438
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2300490
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68905}
2020-07-16 17:47:46 +00:00
Victor Gomes
23792eca4e [tests] Fix parameter indices in test-code-generator and test-torque
This is exactly the same issue as in https://crrev.com/c/2299364 for test-torque.cc

Change-Id: I066d93918c94d0c68278c72d9b60ec92a1c5f68b
Bug: v8:10201
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2300546
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Auto-Submit: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68897}
2020-07-16 14:26:15 +00:00
Jakob Kummerow
4d4cdaf417 [wasm-gc] Support i31ref in ref.test/ref.cast
We must perform "smi-checks" before loading an object's map
whenever the object might be an i31ref.

Bug: v8:7748
Change-Id: I2d9839ddcb0c2e8c35b9bea38afe50d55dd084cb
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2299370
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68893}
2020-07-16 13:32:25 +00:00
Jakob Kummerow
3720f90577 [wasm-gc] Fix: externref is not a subtype of eqref
Bug: v8:7748
Change-Id: I30eb7b08b40159e399730eef5866e1f0fbf706e1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2299368
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68892}
2020-07-16 13:18:35 +00:00
Omer Katz
b09ed9f32a cppgc: Port MarkingVerifier
This CL ports MarkingVerifier from blink.

The existing verifier checks only references on heap.
This new verifier checks references both on heap and on stack.

Bug: chromium:1056170
Change-Id: I083dcb0087125312cca34a2201015a9aecfe6ea4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2300484
Commit-Queue: Omer Katz <omerkatz@chromium.org>
Reviewed-by: Anton Bikineev <bikineev@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68891}
2020-07-16 13:05:15 +00:00
Mythri A
2ba80497a7 [turbofan] Skip optimizations for large unmapped 'arguments'
We cannot allocate large arrays exceeding the size of
kMaxRegularHeapObjectSize in young space. Bailout of optimization in
such cases.

Bug: chromium:1105746
Change-Id: I4f7357c2dd7b3e70d747f9067660725ecf6ae768
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2300481
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Commit-Queue: Mythri Alle <mythria@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68889}
2020-07-16 12:15:55 +00:00