Commit Graph

62937 Commits

Author SHA1 Message Date
Tamer Tas
81e7c574d3 [wasm-api-tests] initialize the loop variable
This CL fixes the UnboundLocalError in wasm-api-tests testsuite

TBR=machenbach@chromium.org

Bug: chromium:1091200
Change-Id: I3830153b5bd04c3bbe8bedaa8ed79f79c5139a5d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2238574
Reviewed-by: Tamer Tas <tmrts@chromium.org>
Auto-Submit: Tamer Tas <tmrts@chromium.org>
Commit-Queue: Tamer Tas <tmrts@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68295}
2020-06-10 15:39:58 +00:00
Thibaud Michaud
fe201c34db [wasm] Add use counters for anyref, bulk memory and multi value
R=clemensb@chromium.org

Bug: v8:10549
Change-Id: I516d35b0810ce147b568c1b8e32eb084753614e8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2235697
Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68294}
2020-06-10 15:15:21 +00:00
Jakob Gruber
5f07216952 [nci] Refactor optimized compilation info flags
... for more consistent naming and less boilerplate.

Getters now use the `lower_case_flag()` style. Setters now use the
`set_lower_case_flag()` style.

Bug: v8:8888
Change-Id: I5af35b13a013bf303c4ca8d86f926754af28bfce
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2237139
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68293}
2020-06-10 13:46:10 +00:00
Georg Neis
0817d7ee1f [runtime] Fix reentrancy bug in JSFunction::EnsureHasInitialMap
Foozie came up with a mind-boggling example hitting a similarly
mind-boggling bug: object construction (JSObject::New) wants to create
the constructor's function initial map (JSFunction::GetDerivedMap ->
JSFunction::EnsureHasInitialMap). To do so, it calls
JSFunction::CalculateExpectedNofProperties. This harmless sounding
function triggers compilation of the function. Since we're running with
--always-opt, this is an optimizing compilation. Turbofan ends up
depending on the function's "prototype" property, for which it wants to
create the initial map so that it can install the code dependency. That
is, EnsureHasInitialMap is reentered. At this point there is no further
compilation attempt because the bytecode now exists. The initial map is
created and installed on the function, and TF records the code
dependency on that map. When CalculateExpectedNofProperties returns
control to the outer EnsureHasInitialMap, yet another initial map is
created and set on the function, forgetting the previous one and thus
the code dependency.

I'm not sure if this bug can only be observed with --always-opt. The fix
is general.

Bug: chromium:1092011
Change-Id: I8b972748e49b9eb8f06fa17ea9ca037de2bd7532
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2238570
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68292}
2020-06-10 13:43:07 +00:00
Jakob Gruber
2e5ccd7cc0 Debug-print oddballs as 'Oddball', not 'String'
Before:
DebugPrint: 0x2f950804030d: [String] in ReadOnlySpace: #undefined
...

After:
DebugPrint: 0x2f950804030d: [Oddball] in ReadOnlySpace: #undefined
...

Bug: v8:10581
Change-Id: I21aebc40426fb17cea41a31195aa5cb553c07e2a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2239570
Auto-Submit: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68291}
2020-06-10 13:12:37 +00:00
Jakob Gruber
a305d2de5c [regexp] Fix integer overflows in TextNode::GetQuickCheckDetails
Several uc32 (= int32_t) fields were incorrectly treated as uc16
(= uint16_t):

CharacterRange::from()
CharacterRange::to()
QuickCheckDetails::Position::mask
QuickCheckDetails::Position::value

Bug: v8:10568
Change-Id: I9ea7d76e4a0cbc6ee681de2136c398cdc622bca2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2230527
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68290}
2020-06-10 12:22:47 +00:00
Santiago Aboy Solanes
abe6ce3dbf [compiler] SimplifiedLowering cleanups
List:
 * Create a method so Lower is encapsulated.
 * Rename phases methods to correspond to their own Phase name.
 * Move the phases methods closer to Run() and ordered them.
 * Simplify two for loops into one.
 * Remove unused method.
 * Clean up VisitCall.

Bug: v8:10424
Change-Id: Iba41f727c79a17cb0abc165ebc3141ac736dc363
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2164786
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68289}
2020-06-10 11:03:17 +00:00
Jakob Gruber
39ced501b1 Reland "[compiler] Hook in binary op builtins with feedback in generic lowering"
This is a reland of 8748613f6c, fixing
an issue accessing binary op's BinaryOperationHints.

Original change's description:
> [compiler] Hook in binary op builtins with feedback in generic lowering
>
> If --turbo-nci is enabled, use binary op builtins with feedback
> collection during generic lowering.
>
> Bug: v8:8888
> Change-Id: I307dc742488982bdc68006be5bcd1da8e68768f5
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2228614
> Commit-Queue: Jakob Gruber <jgruber@chromium.org>
> Reviewed-by: Georg Neis <neis@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#68227}

Bug: v8:8888,chromium:1092553
Change-Id: I1356659d65a5e46bc57bb6c0ebe2e9e86cb8be81
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2237128
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68288}
2020-06-10 10:19:19 +00:00
Jakob Gruber
8053d89a47 [nci] Extract feedback collection experiment to dedicated flag
This adds a dedicated --turbo-collect-feedback-in-generic-lowering
flag instead of piggy-backing on top of --turbo-nci in order to free
that up for upcoming work.

The new flag is temporary and can be removed once we've collected
enough data and made a decision on whether to enable it
unconditionally.

Bug: v8:8888
Change-Id: I5c0fd35e46b4c0237c266ba6253b9c5cb4cd7995
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2237137
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68287}
2020-06-10 10:18:02 +00:00
Anton Bikineev
c036b6cd12 cppgc: Fix byte accounting for large pages and reset labs
This fixes two issues:
- labs resetting didn't account bytes as beeing freed;
- large object were not accounted.

The CL introduces a single bottleneck for labs resetting in
ObjectAllocator, which is aware of StatsCollector. This way
NormalSpace is treated as a value object and all invariants
are maintained by ObjectAllocator (and Sweeper).

Bug: chromium:1056170
Change-Id: I027cc01fe5028a3dfa81905d7ea53dd12d1c1f20
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2237629
Commit-Queue: Anton Bikineev <bikineev@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Omer Katz <omerkatz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68286}
2020-06-10 10:16:57 +00:00
Leszek Swirski
b5273050da [string] Don't skip GetMethod on Smis in String builtins
Previously, for the various customisation points of String builtins
(like String.prototype.replace), we skipped the customisation symbol
lookup (like for Symbol.replace) for Smis.

But, we do need to do the lookup for Smis in case Number.prototype or
Object.prototype have the Symbol. This missing lookup was creating an
observable difference between Smis and HeapNumbers.

Bug: chromium:1092896
Change-Id: I8928d237fa74abeaa2aa81318b8903087c507f0d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2238030
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68285}
2020-06-10 09:47:10 +00:00
Dominik Inführ
80989b9246 [heap] Expand new space in safepoint
Move expansion of the new space into the safepoint. Otherwise background
threads race with the main thread when accessing the new space capacity.
This will most likely also be required to allow the allocation of new
space objects from background threads.

Reland of https://crrev.com/c/2235539, the timeouts were unrelated to this CL.

Bug: v8:10315
Change-Id: I134b4f27ec666cf036c346b847d164255e0fe7d7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2237626
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68284}
2020-06-10 09:02:29 +00:00
Manos Koukoutos
e512da1e39 [wasm-gc][cleanup] Remove nullref type
As per the latest update to the 'reference types' wasm proposal, the
nullref type is removed. Following that, all its uses in V8 were also
removed. This CL:
- Removes now dead code referencing nullref.
- Changes names of functions/exceptions containing 'nullref' to 'null'.
- Changes nullref to the corresponding nullable type in some tests.

Bug: v8:7748
Change-Id: I5b4606671d7b24dd48a45a3341e8a1c056fcd1d0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2238026
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68283}
2020-06-10 09:01:24 +00:00
Jakob Gruber
f6874c73bd [globals] Change uc32 to be unsigned
Prior to this change, uc16 was typedef'd to (unsigned) uint16_t while
uc32 was typedef'd to (signed) int32_t.

For consistency, and to avoid unexpected behavior around
signed/unsigned comparisons, this changes uc32 to the unsigned
uint32_t type.

As part of this change, old-style error passing (return -1, check for
negative return values) was updated to use named error values.

Bug: v8:10568
Change-Id: I8524e66ee20e8738749cd34c4fe82c14e885dcb3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2235533
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68282}
2020-06-10 08:37:46 +00:00
Leszek Swirski
d8c9ae5295 [compiler] Fix double error reporting for parser errors
Remove error reporting from parsing::Parse*, since in most cases we
didn't actually want them (clear errors afterward), and there was an
issue where Compiler::Compile would try to report errors already
reported in ParseAny, which ended up triggering unreachable code.

As a drive-by, move some one-off parse exception handling in
test-parsing into a CHECKED_PARSE_PROGRAM macro which replaces all the
"necessarily positive" calls to parsing::ParseProgram.

Bug: chromium:1091656
Change-Id: I4d463ec363312aea36ab92f1322cf66a416b9888
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2237134
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68281}
2020-06-10 08:36:41 +00:00
Clemens Backes
52ddf94979 [liftoff] Inline PopToRegister and outline SpillOneRegister
{PopToRegister} will most likely find that the stack slot is already
holding a register (89% of cases on epic). Thus put the fast path for
this in the header, so it can be inlined.

Also, {GetUnusedRegister} will mostly find an unused register (95% on
epic). Hence, make sure that the code for spilling a register is not
inlined.

Drive-by: Avoid the call to {LoadToRegister} if we already checked
before if the slot is holding a register.

R=thibaudm@chromium.org

Bug: v8:10576
Change-Id: I13797fa5c12c5359f2578a4dbebb63aa50c00e60
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2237144
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68280}
2020-06-10 08:11:31 +00:00
Clemens Backes
e33c15f6bd [wasm][cleanup] CompileCWasmEntry should never fail
This changes the return type of {CompileCWasmEntry} from a {MaybeHandle}
to {Handle}. All call sites used {ToHandleChecked} anyway, and if
compiling a c-wasm-entry failed, something seriously went wrong. Hence
fail immediately during compilation, instead of returning an empty
handle and then failing later.

R=jkummerow@chromium.org

Change-Id: I19d85e907670c92da74c9a7ab2d9b646682a02cd
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2237133
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68279}
2020-06-10 07:46:20 +00:00
Camillo Bruni
e51ad7e339 [api] Avoid using v8::NewFromUtf8Lilteral if possible
Change-Id: I4e9a70339a59845c33432fe6a8dcaacebd2046a6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2237631
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68278}
2020-06-10 07:41:50 +00:00
Kim-Anh Tran
0ad867db75 [wasm][debug] Clean up inspector tests
Pulling out common functionality related to dumping scope properties.

Bug: chromium:1093165
Change-Id: I7de377b8812b6181bac21fc0d90c416568b0d640
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2237126
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@{#68277}
2020-06-10 07:28:10 +00:00
Ng Zhi An
c828fc64eb [clang-tidy] Remove redundant destructor
This destructor is declared virtual, but the class is not subclassed
anywhere. The empty body can be replaced by a =default. But since the
destructor doesn't do anything interesting, we can remove it.

Bug: v8:10488
Change-Id: Ie9c5f2c2742f644a99d85111dec208b01ad13fba
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2219397
Commit-Queue: Frank Tang <ftang@chromium.org>
Reviewed-by: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68276}
2020-06-10 06:46:30 +00:00
Frank Tang
16ffec97e5 Fix maximize/minimize of Intl.Locale
Roll ICU to 46f53dfc
chromium/src/DEPS already roll in https://chromium-review.googlesource.com/c/chromium/src/+/2235734

Bug: v8:10448
Change-Id: I147189527e57282c6cc7a1e92f832275d5ef55c6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2237353
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68275}
2020-06-10 00:01:37 +00:00
Ng Zhi An
ecbb51c346 [clang-tidy] Remove constructor with empty body
This constructor can be default, and since it isn't doing anything,
can be removed.

See
https://chromium.googlesource.com/chromium/src/+/HEAD/styleguide/c++/c++-dos-and-donts.md#prefer-to-use.

Bug: v8:10488
Change-Id: I5da7d78063c57d318f6cec578185bad6f83a1a3b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2233980
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Reviewed-by: Anton Bikineev <bikineev@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68274}
2020-06-09 23:39:58 +00:00
Ng Zhi An
2debc9df5d [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: I27cb7b9aa3d2b90e1c05c1f12585f94c746cbdb1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2233981
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68273}
2020-06-09 23:14:30 +00:00
Ng Zhi An
798d66f1a6 [clang-tidy] Use explicit default
The constructor of AbstractState isn't doing anything interesting, so
can be removed.

See
https://chromium.googlesource.com/chromium/src/+/HEAD/styleguide/c++/c++-dos-and-donts.md#prefer-to-use.

Bug: v8:10488
Change-Id: If413a69aa83689f55a51e48179b75287a4620d5e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2233857
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68272}
2020-06-09 20:09:27 +00:00
Clemens Backes
c64c060b12 [wasm] Remove WasmDebugInfo and InterpreterHandle
The interpreter is only used for testing, and is now instantiated and
invoked directly instead of via the {WasmDebugInfo}, holding the
{InterpreterHandle}.

This CL removes both classes.

R=ahaas@chromium.org

Bug: v8:10389
Change-Id: Iede3feea413decae1edc28146b871a819e204768
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2237132
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68271}
2020-06-09 18:21:04 +00:00
Manos Koukoutos
ba688c6ec9 [wasm] Rename anyref to externref, anyref flag/feature to reftypes
The reference types wasm proposal dropped all subtyping. Subsequently,
the 'anyref' type was renamed to externref.
This changes all references of the *type* anyref to externref.
Additionally, the flag that permits this extension is renamed to
"reftypes" to mirror the proposal name.

Bug: v8:7748
Change-Id: Icf323f13b9660fd10540e65125af053fca3a03f9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2232941
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Kim-Anh Tran <kimanh@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68270}
2020-06-09 17:51:04 +00:00
v8-ci-autoroll-builder
62c5221206 Update V8 DEPS.
Rolling v8/build: 036a45e..7ad9ac5

Rolling v8/third_party/aemu-linux-x64: WCiGqc2IsqMVCcj8UruU8vGLvhfosP46CB3tAy6N2boC..pcue74MrtwdptQfnABqz12W-F6Br8-PlTN1pD5o_aQsC

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/69b4144..03e7ff4

Rolling v8/third_party/depot_tools: a85d58e..dcb5c85

Rolling v8/tools/clang: 3c04a1b..6ddf849

TBR=machenbach@chromium.org,tmrts@chromium.org,v8-waterfall-sheriff@grotations.appspotmail.com

Change-Id: I0f54772060f8f45968bcd35ab6cd8e928b00a2ac
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2235655
Reviewed-by: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68269}
2020-06-09 16:50:32 +00:00
Clemens Backes
ff2e485f2e [utils] Add OwnedVector::NewForOverwrite
The existing {OwnedVector::New} value-initializes all elements, which
means zeroing them in case on integral types. In many cases though we
know that we will overwrite the content anyway, so the initialization is
redundant.
In the case of assembly buffers for wasm compilation, this zeroing
showed up with several percent of execution times for some benchmarks.

Hence this CL introduces a new {OwnedVector::NewForOverwrite} (along the
lines of {std::make_unique_for_overwrite}), which only
default-initializes the values (meaning no initialization for integral
values).

R=thibaudm@chromium.org

Bug: v8:10576
Change-Id: I8d2806088acebe8a264dea2c7ed74b0423671d4f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2237140
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68268}
2020-06-09 16:38:39 +00:00
Milad Farazmand
ea0a1561c1 PPC: [wasm-simd] Implement simd comparisons
Change-Id: I782f5b0dd8ed374df406fb615f6e74efed8b5368
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2235658
Reviewed-by: Junliang Yan <jyan@ca.ibm.com>
Commit-Queue: Milad Farazmand <miladfar@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#68267}
2020-06-09 16:06:52 +00:00
Zhao Jiazhong
2ef37fb675 [mips][wasm-simd] Implement f32x4 f64x2 pmin pmax
This CL also fixes bitmask instructions on mips platform.

Change-Id: I550daca3b6b4ece151928836f316d3960a7af437
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2230090
Commit-Queue: Zhao Jiazhong <zhaojiazhong-hf@loongson.cn>
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68266}
2020-06-09 15:33:37 +00:00
Clemens Backes
d5ba4e5483 [wasm] Skip regression test in slow_path variant
The test takes several minutes, because the {slice} call does thousands
of runtime calls, which again call {ValidateElements} for every single
added element (in debug mode).
Hence this CL skips the test in the slow_path variant.

R=leszeks@chromium.org

Change-Id: I2fbaaf32809ecb34de1f563f34bd65ce8b7ab238
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2237628
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68265}
2020-06-09 15:32:32 +00:00
Manos Koukoutos
5e1cf17beb [wasm-gc] Check for illegal indexes in fun defs
Reference types in function definitions signatures are not allowed to
refer to function types (this will change when we fully integrate the
typed function references proposal).

Bug: v8:7748
Change-Id: I2456b810f85e608c48a952ef9e64d7a8ff78892b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2231352
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68264}
2020-06-09 15:05:12 +00:00
Georg Neis
ebfb8771d1 [deoptimizer] Add missing HeapNumber allocation
This caused a CHECK failure after my recent CL.

Bug: chromium:1084820, chromium:1092650
Change-Id: Icdc2a755c6b30ad01dccc908e0e5e137fedf8918
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2237145
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68263}
2020-06-09 15:04:07 +00:00
Leszek Swirski
7f69e7f907 [arm64] Fix unused function error
Landing this simple fix rather than reverting

Tbr: rmcilroy@chromium.org

No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Change-Id: I230300c32bf6a97cd82376c46461735dd34378b9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2237632
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68262}
2020-06-09 15:03:04 +00:00
Ambroise Vincent
dfa0f31ac6 [arm64] Add FJCVTZS support
This includes the instruction opcode, its use in TF, its support in the
simulator and the detection of the associated CPU feature.

The instruction can be tested in the simulator with the new
--sim-arm64-optional-features flag.

Change-Id: I6047fa16696394fe0ced4535f7788d2c8716a18c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2222348
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68261}
2020-06-09 14:39:42 +00:00
Marja Hölttä
539979f4a9 [Promise combinators] Spec change: check "resolve" early
Promise.{all,allSettled,any,race} should check resolve is a function before
opening their iteratable.

PR: https://github.com/tc39/ecma262/pull/1912

PR for Promise.any: https://github.com/tc39/proposal-promise-any/pull/65

This CL includes the following cleanup changes:
- Made it more explicit that the constructor is a Constructor.
- Removed unnecessary nested try blocks (a try can have both a catch and a label).
- Moved commonly used definitions out of promise-race.tq where they don't belong.
- Made the parameter order of PerformPromiseAll match the spec.


Bug: v8:10578
Change-Id: I9deb5d5106db7350a0d0ad52f165ff2469e7074b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2232544
Commit-Queue: Marja Hölttä <marja@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68260}
2020-06-09 13:48:22 +00:00
Clemens Backes
f436a324bc [cleanup] Make RelocInfo::NONE have value 0
The {NONE} reloc info is the one used most often, i.e. for every
assembler call that takes an {Immediate} on x64 which is not
relocatable.
Hence assign value 0 to {NONE} such that constructing such immediates is
faster and also checking for this most common case is faster.

R=ishell@chromium.org

Bug: v8:10576
Change-Id: I3c048710b80dd31fa5b5d3b1415d72a24d95cb90
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2237136
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68259}
2020-06-09 13:30:02 +00:00
Clemens Backes
6e903d93e6 [wasm] Instantiate interpreter for testing directly
Avoid going through the {WasmDebugInfo}, which existed for debugging in
the interpreter in production. Instead, tests now instantiate the
interpreter directly.

This will unblock the removal of the whole {WasmDebugInfo}, and finally
moving the interpreter to the test directory.

R=ahaas@chromium.org

Bug: v8:10389
Change-Id: I8ae76a1d5bff716c129781b11a15369a80b13603
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2235543
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68258}
2020-06-09 13:04:32 +00:00
Clemens Backes
206a88ba86 [wasm][interpreter] Remove the ReferenceStackScope
The reference stack was set by the scope, and reset when leaving the
scope, in order to avoid leaking objects via cycles in the reference
tree, involving global handles which are considered strong roots.
Since the interpreter cannot call out to JS any more, we cannot create
such cycles any more. Hence, the ReferenceStackScope is removed, and the
FixedArray for the reference stack is allocated as a global handle
instead.

This will unblock removing the WasmDebugInfo object, which was used by
the ReferenceStackScope before this CL.

R=ahaas@chromium.org

Bug: v8:10389
Change-Id: I2e3c6a03750846679eecd9e6a07042db962aad9c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2235542
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68257}
2020-06-09 12:59:39 +00:00
Dominik Inführ
a3632a56c2 [heap] Calculate committed after used memory
Fix dcheck failure where committed was smaller than used memory. This was because of background threads allocating between calculating both stats and used memory could already be larger due to those background allocations. Avoid this first calculating used memory and committed memory afterwards.

Bug: v8:10563, v8:10315
Change-Id: Ic07970f607941140e3028bddde3e365b66aa4b5f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2237138
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68256}
2020-06-09 12:25:18 +00:00
Dominik Inführ
d6794defad [heap] Rename CreateFillerObjectFromSweeper
Rename CreateFillerObjectFromSweeper to CreateFillerObjectAtBackground.
Also use CreateFillerObjectAtBackground in PagedSpace::Free since this
is used from both main and background threads.

Bug: v8:10315
Change-Id: I1dc8ca2b1c81bdfd192c0ae8d8547eb577f3f8c3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2235534
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68255}
2020-06-09 11:51:58 +00:00
Nico Hartmann
a99ca6e6cb [turbofan] Make BigInt operations kNoThrow again
A previous CL removed the kNoThrow flags from both
SpeculativeBigIntAdd and SpeculativeBigIntSubtract. This introduced a
bug, because the JSTypeHintLowering phase, where these operators are
introduced during inlining, does not support the generation of throwing
operators.

Since these operators always deoptimize in case of an error, instead of
throwing the exception directly, it is safe to mark them as kNoThrow.

Bug: chromium:1091461
No-Try: true
No-Tree-Checks: true
Change-Id: I551616b0c462647574e5af8824d9ed7b3252659d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2235113
Commit-Queue: Nico Hartmann <nicohartmann@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68254}
2020-06-09 11:24:09 +00:00
Arnaud Robin
ee96d8bf16 [wasm] Add tracing support in turbofan
Added wasm tracing support for turbofan with the flag --trace-wasm.
The test suite was updated accordingly.

R=clemensb@chromium.org

Bug: v8:10559
Change-Id: Ie6ee2a05142081416d8572d4d72dcd315e0bf285
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2235536
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Arnaud Robin <arobin@google.com>
Cr-Commit-Position: refs/heads/master@{#68253}
2020-06-09 10:35:33 +00:00
Santiago Aboy Solanes
f6f80d650d [cleanup][compiler] Remove unused methods from machine-graph-verifier
Change-Id: I56264fae4f60018a324667ec093bc02296d74d87
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2232546
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68252}
2020-06-09 10:30:29 +00:00
Dominik Inführ
a75cc46de2 [heap] Return Optional from GlobalMemoryAvailable
Return no value when global memory scheduling is off. Previously
returned new_space->Capacity()+1 since this value was used in the
callers to compare the result to.

Bug: v8:10315
Change-Id: I7c7289ee9319fe9c791c3cb9b9b46cca54815904
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2235704
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68251}
2020-06-09 09:32:30 +00:00
Dominik Inführ
8bdd4e86ad [heap] Invoke OldGenerationAllocationCounter in Safepoint
OldGenerationAllocationCounter() needs to be invoked in safepoint,
otherwise invocation races with background threads incrementing the
counter.

Bug: v8:10315
Change-Id: Iab005582bab7ebf63e7a5a796b25690f499a99eb
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2235544
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68250}
2020-06-09 09:31:28 +00:00
Santiago Aboy Solanes
60f38070d7 [cleanup][compiler] Remove unused MachineType creation methods
Change-Id: Ic6130cee088d3bc12fdfb4a5f947138b34466456
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2232545
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68249}
2020-06-09 09:22:18 +00:00
Leszek Swirski
926ce88782 Revert "[wasm-simd] Prototype f64x2 rounding instructions"
This reverts commit f7f72b7b3a.

Reason for revert: Flaky timeouts of slow-path tests -- specifically, mjsunit/regress/wasm/regress-9017, which appears to have regressed from ~2 min to ~3-4 min 

https://logs.chromium.org/logs/v8/buildbucket/cr-buildbucket.appspot.com/8878016799136124416/+/steps/Check_-_slow_path__flakes_/0/logs/regress-9017/0

Original change's description:
> [wasm-simd] Prototype f64x2 rounding instructions
> 
> Implements f64x2 ceil, floor, trunc, nearestint, for interpreter and
> x64.
> 
> Bug: v8:10553
> Change-Id: I12a260a3b1d728368e5525d317d30fc9581cae04
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2213082
> Commit-Queue: Zhi An Ng <zhin@chromium.org>
> Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
> Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#68241}

TBR=gdeepti@chromium.org,tebbi@chromium.org,zhin@chromium.org

Change-Id: I9915dd375c7f0e08b5414189efb29ed1c90cb96d
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:10553
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2237131
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68248}
2020-06-09 08:38:52 +00:00
Andreas Haas
7260f62b88 [wasm][ia32][liftoff] Implement AtomicAdd except AtomicAddU64
This CL
* Adds the xadd instruction to the ia32 assembler and disassembler;
* Implements the AtomicAdd instructions, except AtomicAddU64, on ia32;

R=clemensb@chromium.org

Bug: v8:10108
Change-Id: Ic8653a9f96148282951104fefb4185c4c0db89a3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2232719
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68247}
2020-06-09 07:48:49 +00:00
Iain Ireland
17f8f12bcb [regexp] Document incorrect assertion in intl/regress-10573.js
There are at least three equivalence classes where this assertion
should not actually hold:

  '\u0390\u1fd3',              // ΐΐ
  '\u03b0\u1fe3',              // ΰΰ
  '\ufb05\ufb06',              // ſtst

Bug: v8:10591
Change-Id: I26cb43d2e67c54e689f1831ea13be46c73d5e92d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2231595
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68246}
2020-06-09 06:27:27 +00:00