This moves the entire code generation phase (including code emission
into the native module) into the background task. The code manager is
fully thread safe by now and there are no Isolate-bound steps anymore.
The only step remaining on the foreground task is publishing the fully
finished code to other threads via {NativeModule::PublishCode}.
R=clemensh@chromium.org
BUG=v8:7921
Change-Id: Ia64c6ce945aabd071b26e61ef8d397fb7727a038
Reviewed-on: https://chromium-review.googlesource.com/1135004
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54425}
This is a reland of 5b744bfbd4.
Node is fixed by this pull request:
https://github.com/v8/node/pull/75
Original change's description:
> Fix and extend lldbinit
>
> 1) Define all commands in one file.
> 2) Add logic to make 'jco' print current pc by default.
> 3) Add a comment to explain how to load the lldb_commands.py file.
> 4) Minor refactorings.
>
> R=ahaas@chromium.org
> No-Try: true
>
> Bug: v8:7754
> Change-Id: I553f2ce4cefedad05466c692a8665a570372b76a
> Reviewed-on: https://chromium-review.googlesource.com/1127892
> Reviewed-by: Andreas Haas <ahaas@chromium.org>
> Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#54329}
Bug: v8:7754
Change-Id: I8645ae07176fe6983a581dd175ed6f2b2b15d4ea
Reviewed-on: https://chromium-review.googlesource.com/1135026
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54424}
This is in preparation of removing the using statements that are
currently in third_party/inspector_protocol/lib/Collections_h.template.
Once this is done I can update
https://chromium-review.googlesource.com/c/deps/inspector_protocol/+/1135832
some more and eventually roll it into v8 (and chromium's third party).
R=dgozman
Cq-Include-Trybots: luci.chromium.try:linux_chromium_headless_rel;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: I75a7b291715f241e3b58fb97ac91a0b0ff0ca70b
Reviewed-on: https://chromium-review.googlesource.com/1135968
Commit-Queue: Johannes Henkel <johannes@chromium.org>
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54422}
The manual scope is usually used to test corner cases of GC behavior so
disable the ineffective GC detecton there.
Bug: v8:7859
Change-Id: I92a1e43db739846ff0db20a60cc2ace79496e5fe
Reviewed-on: https://chromium-review.googlesource.com/1135140
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54418}
Since Liftoff is fully implemented on arm64, we can enable the
wasm/liftoff test.
R=ahaas@chromium.org
Bug: v8:6600
Change-Id: I901480a417a7cc438357a67b819f226e4d3b1df4
Reviewed-on: https://chromium-review.googlesource.com/1134776
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54417}
Some Linux kernels are built without `madvise()`. In that
case, do not crash but rather ignore the return value instead.
Refs: https://github.com/nodejs/node/issues/21562
Change-Id: Iff8d0d0e9e7935804e2fc994be7f8bd21c553846
Reviewed-on: https://chromium-review.googlesource.com/1131943
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54415}
api.h: MAKE_TO_LOCAL funcs need the types to be available.
scope.h, func-name-inferrer.h, bigint.h, module.h: These were using inline
headers -> de-inlined.
BUG=v8:7754,v8:7490
Change-Id: Id072f537682fb867cd68d79ca95b06628780d01f
Reviewed-on: https://chromium-review.googlesource.com/1131175
Commit-Queue: Marja Hölttä <marja@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54414}
Set number of fixpoint iterations to 10 before switching to the linear
algorithm. The flag's initial default value was set to 0 to use the
linear algorithm all the time for testing purposes.
Bug: chromium:844008
Change-Id: Ib0fd6241b55468ef5be2c4cc3cc147db2d432c83
Reviewed-on: https://chromium-review.googlesource.com/1134769
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@google.com>
Cr-Commit-Position: refs/heads/master@{#54413}
This patch adds a variant of EmbedderGraph::AddEdge() which
allows the embedder to specify the name of an edge. The edges
added without name are element edges with auto-incremented indexes
while the edges added with names will be internal edges with
the specified names for more meaningful output in the heap
snapshot.
Refs: https://github.com/nodejs/node/pull/21741
Bug: v8:7938
Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
Change-Id: I8feefa2cf6911743e24b3b2024e0e849b0c65cd3
Reviewed-on: https://chromium-review.googlesource.com/1133299
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54412}
The WasmGrowMemory builtin (defined in builtins-wasm-gen.cc) expects
the runtime function to return a Smi. Thus ensure that we are really
always returning a Smi.
R=mstarzinger@chromium.org
Change-Id: I153d75a2ab8773adbcce01e9aa125a234c93d077
Reviewed-on: https://chromium-review.googlesource.com/1131737
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54411}
Currently the fuzzer only tests Turbofan and Liftoff in isolation. In
order to test that both tiers use the same ABI, it should also test
calls from one tier to the other.
This CL introduces a new flag which controls which function will be
compiled by which tier, and uses that in the fuzzer.
R=ahaas@chromium.org
Bug: chromium:862931, v8:6600
Change-Id: I450b906700972cfdb496b1734faed9f8208d652f
Reviewed-on: https://chromium-review.googlesource.com/1134775
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54409}
When we changed FeedbackMetadata to be it's own type instead of a
subtype of FixedArray, we missed this check for valid objects in old
space. This restores the old behavior during verification.
Bug: chromium:862433
Change-Id: Icdb144df4aebc0c6d78a28405c7f53e40b2e1376
Reviewed-on: https://chromium-review.googlesource.com/1134995
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Peter Marshall <petermarshall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54408}
Instead of passing {uint8_t*, size_t} pairs as arguments, pass
{Vector<uint8_t>}. This is less error prone and {Vector} provides some
helpful methods.
R=ahaas@chromium.org
Bug: v8:7754
Change-Id: I7469054774618e0bd5c9d38501759b1b2c51d104
Reviewed-on: https://chromium-review.googlesource.com/1134773
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54406}
getGetoption() in intl.js misimplemented Ecma 402 #sec-getoption by
calling options[property] twice, once to check if it's defined
and the second time to retrieve the value when it's defined.
Bug: v8:7869
Test: test262/intl402/RelativeTimeFormat/con*/cons*/option*order
Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
Change-Id: I6d585767232c9f4c0252e65e2891c813db3da641
Reviewed-on: https://chromium-review.googlesource.com/1128444
Commit-Queue: Jungshik Shin <jshin@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54405}
An unordered_map typically provides better performance. Instead of a
compare function, we now need a hash function and equality defined on
{Signature<T>}.
R=mstarzinger@chromium.org
Bug: chromium:862123
Change-Id: Iba71030f91949d7453740c884de1d8a4f921c618
Reviewed-on: https://chromium-review.googlesource.com/1131182
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54404}
The instruction got removed from the proposal.
R=titzer@chromium.org
Bug: v8:7581
Change-Id: I3e27bad923544896ebf6ab8969e5c365a397f6c9
Reviewed-on: https://chromium-review.googlesource.com/1128754
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54402}
With ReadOnlyRoots and GetIsolate on JSReceiver, we can remove almost
every isolate parameter from <Object>::Print. The remaining ones, like
Map, are special-caseable for read-only maps, and as a result we can
remove isolate parameters from <Object>::Print entirely.
This patch also opportunistically cleans up a few places where isolates
were only needed for Object::Print, such as TransitionAccessors and
DescriptorArrays.
TBR=yangguo@chromium.org,mstarzinger@chromium.org
Bug: v8:7786
Change-Id: Id44bd53b9893e679eea5f37b9548257595a1bfd9
Reviewed-on: https://chromium-review.googlesource.com/1133385
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Dan Elphick <delphick@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54401}
With the introduction of multiple tables the element section is able to
initialize any of the defined tables. However, the spec says that only
tables of type AnyFunc can be initialized.
With this CL we validate that entries in the element section only
target AnyFunc tables.
R=titzer@chromium.org
Bug: v8:7581
Change-Id: Ifea383b13c91f582813b2aa4f01a5f724575cfa0
Reviewed-on: https://chromium-review.googlesource.com/1130519
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54400}
Follow-up to r54219 ( https://chromium-review.googlesource.com/1124450 )
They're relevant if we also iterate the heap and check there are no pointers to
the original FixedArrayBase, but in the landed version of that CL we don't do
that.
BUG=chromium:859809
Change-Id: Iffd8b76e74b6690cde961d4c542cb16ddd934f33
Reviewed-on: https://chromium-review.googlesource.com/1131123
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54396}
Uses Heap::FromWritableHeapObject where the object must be mutable and
otherwise pass Isolate in. String and subclasses should now be free of
GetIsolate/GetHeap.
Bug: v8:7786
Change-Id: Ic9d55250ea4afebbebda87be9415ccdaa4fc8779
Reviewed-on: https://chromium-review.googlesource.com/1131736
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Dan Elphick <delphick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54395}
Happily this also removes a use of GetIsolate().
Also delete Descriptor::Init which is no longer needed and some friend
declarations.
Bug: v8:7786
Change-Id: Ica803ef6c8963b38aef72121ff4fb737c9780920
Reviewed-on: https://chromium-review.googlesource.com/1133982
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Dan Elphick <delphick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54394}
This is the first CL to refactor WebAssembly.instantiateStreaming to
make it spec compliant again. The design doc where the whole change is
discussed is available in the tracking bug. The tracking bug also
references prototype implementations of the whole change, which includes
the changes in this CL.
Tests for the new API functions will be added with the second V8 CL
which adds the implementation of the API functions.
R=ulan@chromium.org
Bug: chromium:860637
Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
Change-Id: Ia1048b7ca0291c824ef4212ebde2c6054e102069
Reviewed-on: https://chromium-review.googlesource.com/1127667
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54393}
On {Isolate::PrintStack}, we currently only print the pc offset for
wasm compiled frame. This CL changes this to also print the absolute PC.
R=ahaas@chromium.org
Change-Id: Ic72b7ad140ef74d2f284fdd8827b858cc78cf1c0
Reviewed-on: https://chromium-review.googlesource.com/1133985
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54392}
Converts the Shape functions IsKey and IsLive to take ReadOnlyRoots
rather Isolate. This allows HashTableBase::FindEntry and
ObjectHashTableBase::Lookup to also take ReadOnlyRoots rather than
Isolate.
Bug: v8:7786
Change-Id: I37efea1d20139f394d6365569438755cb8fc44c4
Reviewed-on: https://chromium-review.googlesource.com/1133391
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Dan Elphick <delphick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54390}
Was only used when concurrent marking was disabled at compile-time.
Change-Id: I3977a2cbcfb27e527b2bca4b49887558595c4215
Reviewed-on: https://chromium-review.googlesource.com/1128959
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@google.com>
Cr-Commit-Position: refs/heads/master@{#54384}
No change in functionality, this only changes spelling.
Bug: v8:5751
Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
Change-Id: I8dad2315288e82b23782545b050e9502d0320de5
Reviewed-on: https://chromium-review.googlesource.com/1133679
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54381}
Move some of PreParsedScopeData's santity checks, such as the magic
value separating skippable function data from scope data, to be debug
only, to save memory.
Start position of inner skippable functions is still kept, because it's
too good at catching bugs, but we may want to remove it in the future
as well.
Relanding unchanged after the (unrelated) flake it exposed is fixed in:
https://chromium-review.googlesource.com/1131503
Bug: chromium:818642
Change-Id: Id1d9fe757875cd05ea9a92b41e7256c3ee86fc8e
Reviewed-on: https://chromium-review.googlesource.com/1131505
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54380}
A module's exported variables are assigned a cell index based on their
order in the exported variable map. This map is keyed by the variable
name, an AstRawString*.
Unfortunately, these string pointers are not guaranteed to increase
monotonically as variables are encountered, which means that this map
isn't stable across parses. In particular, it can cause failures for
setVariableValue if the parser is unlucky.
This patch adds a custom comparator to these AstRawString* keyed maps,
which is stable across parses.
Change-Id: Ie6e88fc2d252d873de661d7fc5278feba3955727
Reviewed-on: https://chromium-review.googlesource.com/1131503
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54379}
See
https://chromium-review.googlesource.com/c/chromium/deps/icu/+/1128503
for ICU changes.
Fix tests for ICU 61/Unicode 11/CLDR 33.1
* Update mjsunit/harmony/regexp-property-script-extensions.js per
ScriptExtensions.txt in Unicode 11
* Update mjsunit/intl-numberformat-formattoparts.js for CLDR 33.1
* Mark an invalid Mozilla test (Georgian uppercasing)
* Fix currency format test (U+00A0 instead of U+0020)
* Enable Script_Extensions tests (test262)
* Add support for Extended_Pictographic in regex
Ref. https://github.com/tc39/ecma262/issues/1219.
Bug: chromium:850334, v8:7825
Test: intl/*, test262/intl402/*
Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
Change-Id: I146080cdc1164db4a71f484918723cf302666df8
Reviewed-on: https://chromium-review.googlesource.com/1111857
Reviewed-by: Mathias Bynens <mathias@chromium.org>
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54376}