This is required for jumbo builds to work before the stable jumbo chunk
algorithm[*] can reland.
[*] https://chromium-review.googlesource.com/c/chromium/src/+/1102218
Bug: chromium:856964, chromium:782863
Change-Id: Ibbe0994980eb554acd4e1557e733d07526a90608
Reviewed-on: https://chromium-review.googlesource.com/1117059
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Mostyn Bramley-Moore <mostynb@vewd.com>
Cr-Commit-Position: refs/heads/master@{#54070}
The name itself does not make sense any more since the {NativeModule} is
shared across instances. It is also only used for debugging, so remove
it, and replace it by the address of the {NativeModule} itself in debug
output.
R=mstarzinger@chromium.org
Bug: v8:7754
Change-Id: I02f9252981b776934811a904287be31c7076e90b
Reviewed-on: https://chromium-review.googlesource.com/1114965
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54064}
The motivation for this CL were the expensive UnhandledIsSorted() checks,
which increase mksnapshot time (v8:7895).
In addition, it is a cleanup and removes a potential for quadratic
performance.
Change-Id: I33e734e4e20183768dbf8222adcbb3abc1f1a6bf
Reviewed-on: https://chromium-review.googlesource.com/1116960
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Reviewed-by: Stephan Herhut <herhut@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54063}
This fixes include violations where normal "foo.h" headers included
inline "bar-inl.h" headers. It also removes two (almost) dead methods.
R=clemensh@chromium.org
BUG=v8:7754
Change-Id: I11c6ce71650db22f3c1d7cf5ca50529c94b94839
Reviewed-on: https://chromium-review.googlesource.com/1117076
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54060}
Replace two more pairs of {std::unique_ptr} and {size_t} by
{OwnedVector}.
R=mstarzinger@chromium.org
Change-Id: Ifdf03abf9759fbbb4adde76a494073625723a03d
Reviewed-on: https://chromium-review.googlesource.com/1116785
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54057}
This CL adds the young generation lage object spaces and a flag
--young-generation-large-objects that by default allocates all
large objects in this space. This is a preparation CL. The space
is not fully functional.
Bug: chromium:852420
Change-Id: Ib66d26fa52cda89bf04787084826aeb84b6ec1ac
Reviewed-on: https://chromium-review.googlesource.com/1099164
Commit-Queue: Hannes Payer <hpayer@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54056}
Rolling v8/third_party/icu: f61e46d..172d331
This also disables the test that is broken by this roll.
TBR=gsathya@chromium.org
Bug: chromium:856119
Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
Change-Id: If400b5b388b683d6e2d013673b53ca0c1b7572ce
Reviewed-on: https://chromium-review.googlesource.com/1116794
Commit-Queue: Sergiy Byelozyorov <sergiyb@chromium.org>
Reviewed-by: Sergiy Byelozyorov <sergiyb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54055}
This is a reland of 91f113e2bb
Original change's description:
> Reland "[heap] Visit individual ephemerons instead of collections"
>
> This is a reland of 9aba015976
>
> Original change's description:
> > [heap] Visit individual ephemerons instead of collections
> >
> > When marking ephemerons visit individual ephemerons with key and value
> > unreachable instead of simply iterating all ephemerons in all weak
> > collections. Also visit ephemerons at end of concurrent marking to do
> > work we would otherwise need to do in the atomic pause.
> >
> > Bug: chromium:844008
> > Change-Id: I3400ad1f81c0cdc0fe6506a1f1146a6743a7fcd7
> > Reviewed-on: https://chromium-review.googlesource.com/1113934
> > Commit-Queue: Dominik Inführ <dinfuehr@google.com>
> > Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
> > Cr-Commit-Position: refs/heads/master@{#54039}
>
> Bug: chromium:844008
> Change-Id: I4c44e74c7cf5fe380ffa4ce9f106bebb57bc023d
> Reviewed-on: https://chromium-review.googlesource.com/1116438
> Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
> Commit-Queue: Dominik Inführ <dinfuehr@google.com>
> Cr-Commit-Position: refs/heads/master@{#54046}
Bug: chromium:844008
Change-Id: Ie9d606c51aacdfa9ffe77fe4cf780e30dd445d52
Reviewed-on: https://chromium-review.googlesource.com/1116639
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@google.com>
Cr-Commit-Position: refs/heads/master@{#54053}
We currently store the protected instructions per code object in a
{std::unique_ptr<std::vector<ProtectedInstructionData>>}. This wastes
memory, because it requires two heap allocations, plus the vector might
over-allocate (and it currently does, because it is filled dynamically
during compilation).
This CL changes that to store the protected instructions in an
{OwnedVector}. This requires one copy after generating the list of
{ProtectedInstructionData} in an {std::vector} during compilation, but
saves memory afterwards.
R=mstarzinger@chromium.org
Bug: chromium:856938
Change-Id: Ie290a17dc32f27fbbfe0c000a52297181c954550
Reviewed-on: https://chromium-review.googlesource.com/1116701
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54052}
Currently mksnapshot fails due to ubsan issues. With a nosnap build it
will be easier to track down failures initially as normal test
failures, since mksnapshot isn't called with the sanitizer
environment variables.
NOTRY=true
TBR=jgruber@chromium.org
Bug: v8:7860
Change-Id: I897a8d307d90f545c80a90e1e1a2a632ffae1c3e
Reviewed-on: https://chromium-review.googlesource.com/1116783
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54051}
We spend 2/3rds of all time in mksnapshot in UnhandledIsSorted.
This was found by tikuta@ (see https://crbug.com/v8/7891#c15).
This CL does two things: it optimizes the function a bit (it's now
twice as fast), and turns all related DCHECKs into SLOW_DCHECKs, which
means that they disabled by the v8_enable_fast_mksnapshot build flag.
Bug: v8:7891, v8:6688, v8:7895
Change-Id: Iec2b230be39ec0a0ba0863f1153073e9bf1a47ce
Reviewed-on: https://chromium-review.googlesource.com/1116556
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54050}
{PrintCollection} can print any collection which is iterable via a
standard for-each loop in C++. The output format of {4, 7, 11} is:
[4, 7, 11]
This helper avoids a few repetitions of manually outputting such
collections.
R=titzer@chromium.org
Bug: v8:7754
Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
Change-Id: Iaa91e5465968a029815b3aa2b35948f711956cdb
Reviewed-on: https://chromium-review.googlesource.com/1112005
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54048}
This is a reland of 9aba015976
Original change's description:
> [heap] Visit individual ephemerons instead of collections
>
> When marking ephemerons visit individual ephemerons with key and value
> unreachable instead of simply iterating all ephemerons in all weak
> collections. Also visit ephemerons at end of concurrent marking to do
> work we would otherwise need to do in the atomic pause.
>
> Bug: chromium:844008
> Change-Id: I3400ad1f81c0cdc0fe6506a1f1146a6743a7fcd7
> Reviewed-on: https://chromium-review.googlesource.com/1113934
> Commit-Queue: Dominik Inführ <dinfuehr@google.com>
> Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#54039}
Bug: chromium:844008
Change-Id: I4c44e74c7cf5fe380ffa4ce9f106bebb57bc023d
Reviewed-on: https://chromium-review.googlesource.com/1116438
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@google.com>
Cr-Commit-Position: refs/heads/master@{#54046}
This reverts commit 9aba015976.
Reason for revert: causes widespread breakage on Chromium-integrated builds, failing here:
CHECK_EQ(0, heap()->local_embedder_heap_tracer()->NumberOfWrappersToTrace());
in MarkCompactCollector::ProcessEphemeronMarking(). See e.g. https://logs.chromium.org/v/?s=chromium%2Fbb%2Fclient.v8.fyi%2FV8-Blink_Linux_64__dbg_%2F12321%2F%2B%2Frecipes%2Fsteps%2Fwebkit_unit_tests%2F0%2Fstdout and more on https://ci.chromium.org/p/v8/g/fyi/console
Original change's description:
> [heap] Visit individual ephemerons instead of collections
>
> When marking ephemerons visit individual ephemerons with key and value
> unreachable instead of simply iterating all ephemerons in all weak
> collections. Also visit ephemerons at end of concurrent marking to do
> work we would otherwise need to do in the atomic pause.
>
> Bug: chromium:844008
> Change-Id: I3400ad1f81c0cdc0fe6506a1f1146a6743a7fcd7
> Reviewed-on: https://chromium-review.googlesource.com/1113934
> Commit-Queue: Dominik Inführ <dinfuehr@google.com>
> Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#54039}
TBR=ulan@chromium.org,dinfuehr@google.com
Change-Id: Ib44bfe8c49e8fc30c3d0f2beba03a2895530dfd6
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:844008
Reviewed-on: https://chromium-review.googlesource.com/1116118
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54045}
When marking ephemerons visit individual ephemerons with key and value
unreachable instead of simply iterating all ephemerons in all weak
collections. Also visit ephemerons at end of concurrent marking to do
work we would otherwise need to do in the atomic pause.
Bug: chromium:844008
Change-Id: I3400ad1f81c0cdc0fe6506a1f1146a6743a7fcd7
Reviewed-on: https://chromium-review.googlesource.com/1113934
Commit-Queue: Dominik Inführ <dinfuehr@google.com>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54039}
In the process, add a utility functions to automate printing out comma-separated
lists. Also make sure that the << operator applies to "const Type&" rather than
"const Type*" for consistency elsewhere and generally just good practice.
Bug: v8:7793
Change-Id: I488e8383c4a9496552e63601738d6bcca0ca6e80
Reviewed-on: https://chromium-review.googlesource.com/1111854
Commit-Queue: Daniel Clifford <danno@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54038}
This CL separates the BigInt allocation code in the DataView BigInt
getters from the logic of the getters themselves.
This makes the code much easier to read and understand.
Change-Id: I9f7ee3fb819f0606dc631bac89e386f6fec43655
Reviewed-on: https://chromium-review.googlesource.com/1107632
Commit-Queue: Théotime Grohens <theotime@google.com>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54036}
Instead of just discarding the expression classifier after parsing an after
parsing an arrow function, accumulate the async arrow formal parameters errors
BUG=v8:7817
R=gsathya@chromium.org, littledan@chromium.org, marja@chromium.org
Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
Change-Id: I0a84a25d7d42f89200b6fbf05eab3d39ab51fb10
Reviewed-on: https://chromium-review.googlesource.com/1113622
Reviewed-by: Daniel Ehrenberg <littledan@chromium.org>
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Commit-Queue: Caitlin Potter <caitp@igalia.com>
Cr-Commit-Position: refs/heads/master@{#54034}
Remove the GetHeap call in object setters, replacing it with a new
Heap::FromHeapObject method which explicitly tests for the object
not being in RO space. The hope is that this method is used sparingly.
As a drive-by, memoize the heap access in the write barrier macros,
to avoid having to calculate the heap location twice.
Bug: v8:7786
Change-Id: I26d1c41c673eddced17be316da6d51a16ac853e7
Reviewed-on: https://chromium-review.googlesource.com/1114614
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54033}
All Object::Print functions now take an Isolate* parameter. Various
XX::XXPrint functions now take an Isolate if it's needed rather than
calling GetIsolate(). Such method use DECL_PRINTER_WITH_ISOLATE rather
than DECL_PRINTER.
The _v8_internal_Print_ function (intended for use in gdb) now uses
Isolate::Current() to get hold of an Isolate.
Reduces the GetIsolate and GetHeap count by 9 and 5 respectively.
Also removes unneeded gdb/lldb macros (along with their support
functions), jfv, jfm, jda and jta, since job does the same thing.
Bug: v8:7786
Change-Id: Ib93ebca6ca47c4db9c85cc6d9ff8004da5942dec
Reviewed-on: https://chromium-review.googlesource.com/1112001
Commit-Queue: Dan Elphick <delphick@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54029}
This is a reland of f0bcbc90c1.
A few casts were still wrong.
Original change's description:
> Reland "Introduce MutableHeapNumber class."
>
> This is a reland of 40ac6b187a, which
> was incorrect due to a bad merge.
>
> Original change's description:
> > Introduce MutableHeapNumber class.
> >
> > V8 knows heap numbers and mutable heap numbers. They have
> > difference instance types, but in C++ code we've used the
> > same class for both (HeapNumber). Confusingly, however,
> > IsHeapNumber would return false for mutable heap numbers,
> > while HeapNumber::cast would succeed.
> >
> > This CL adds a separate class MutableHeapNumber and
> > eliminates the confusing behavior.
> >
[...]
> TBR=bmeurer@chromium.org
> TBR=ulan@chromium.org
>
> Change-Id: I3af1014c949821dfac0754a3e48c65ce1bad1ad1
> Reviewed-on: https://chromium-review.googlesource.com/1114539
> Reviewed-by: Georg Neis <neis@chromium.org>
> Commit-Queue: Georg Neis <neis@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#54022}
Change-Id: I19a33da4b6abcd445b528a84d4f56ba1964d337b
Reviewed-on: https://chromium-review.googlesource.com/1114100
Commit-Queue: Georg Neis <neis@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54027}
Remove the one-argument Handle constructor and "handle" factory method,
replacing them with Isolates where available and GetIsolate() methods
otherwise.
TBR=verwaest@chromium.org
Bug: v8:7786
Change-Id: I8ee92ef727c05382c984a3e4c290198d0b312619
Reviewed-on: https://chromium-review.googlesource.com/1113542
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Dan Elphick <delphick@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54025}
This reverts commit f0bcbc90c1.
Reason for revert: Still failing bots.
Original change's description:
> Reland "Introduce MutableHeapNumber class."
>
> This is a reland of 40ac6b187a, which
> was incorrect due to a bad merge.
>
> Original change's description:
> > Introduce MutableHeapNumber class.
> >
> > V8 knows heap numbers and mutable heap numbers. They have
> > difference instance types, but in C++ code we've used the
> > same class for both (HeapNumber). Confusingly, however,
> > IsHeapNumber would return false for mutable heap numbers,
> > while HeapNumber::cast would succeed.
> >
> > This CL adds a separate class MutableHeapNumber and
> > eliminates the confusing behavior.
> >
> > TBR=bmeurer@chromium.org
> >
> > Change-Id: Id894d177c7fe8cc3f451be80c273b50daee91378
> > Reviewed-on: https://chromium-review.googlesource.com/1113544
> > Commit-Queue: Georg Neis <neis@chromium.org>
> > Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
> > Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
> > Cr-Commit-Position: refs/heads/master@{#54012}
>
> TBR=bmeurer@chromium.org
> TBR=ulanchromium.org
>
> Change-Id: I3af1014c949821dfac0754a3e48c65ce1bad1ad1
> Reviewed-on: https://chromium-review.googlesource.com/1114539
> Reviewed-by: Georg Neis <neis@chromium.org>
> Commit-Queue: Georg Neis <neis@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#54022}
TBR=ulan@chromium.org,jarin@chromium.org,neis@chromium.org,bmeurer@chromium.org
Change-Id: I99c226e95dfb0b913903cc83193f6e51de8c1b47
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/1114099
Reviewed-by: Georg Neis <neis@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54024}
We had a kRootRegisterBias on x64 before. This CL ports the feature to
all other platforms as well. The root register bias is helpful to adjust
the value of the root register, which allows to better utilize signed
immediate offset constants in load instructions.
We currently use a separate add instruction to add kRootRegisterBias
in the code that initializes the root register. This could be improved
by adding a custom relocation mode ensuring that instead of the root
address, the root address plus the bias is inserted (and in this way
the add instruction can be omitted).
Bug: v8:6666
Change-Id: I55cf02ab85d11e3c6d0d83a8f7905dbf924890f1
Reviewed-on: https://chromium-review.googlesource.com/1113539
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54023}
This is a reland of 40ac6b187a, which
was incorrect due to a bad merge.
Original change's description:
> Introduce MutableHeapNumber class.
>
> V8 knows heap numbers and mutable heap numbers. They have
> difference instance types, but in C++ code we've used the
> same class for both (HeapNumber). Confusingly, however,
> IsHeapNumber would return false for mutable heap numbers,
> while HeapNumber::cast would succeed.
>
> This CL adds a separate class MutableHeapNumber and
> eliminates the confusing behavior.
>
> TBR=bmeurer@chromium.org
>
> Change-Id: Id894d177c7fe8cc3f451be80c273b50daee91378
> Reviewed-on: https://chromium-review.googlesource.com/1113544
> Commit-Queue: Georg Neis <neis@chromium.org>
> Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
> Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#54012}
TBR=bmeurer@chromium.org
TBR=ulanchromium.org
Change-Id: I3af1014c949821dfac0754a3e48c65ce1bad1ad1
Reviewed-on: https://chromium-review.googlesource.com/1114539
Reviewed-by: Georg Neis <neis@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54022}