Motivated by https://crrev.com/c/1196693, this allows to declare runtime
functions with return type never in Torque. For example:
extern runtime ReThrow(Context, Object) : never;
Change-Id: I5dd8fe0ca22c778364bfcf1caf52180039c5be7e
Reviewed-on: https://chromium-review.googlesource.com/c/1282957
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56709}
This will be more consistent with other creation methods,
as discovered in
https://chromium-review.googlesource.com/c/chromium/src/+/1281166/4/headless/lib/browser/protocol/protocol_string.h
Sorry about the Churn. And it turns out I was wrong I'll have to
send one more PR for two other renames. Sorry!
Bug: chromium:891377
Cq-Include-Trybots: luci.chromium.try:linux_chromium_headless_rel;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: I10ed870bcf065c1913971ec8c194fa1c8149a2b4
Reviewed-on: https://chromium-review.googlesource.com/c/1284789
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Commit-Queue: Johannes Henkel <johannes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56708}
with internal::Address. This is in preparation for the upcoming
changes to internal::Object. The public API is unchanged, and
there should be no change in behavior either.
Most of the casts newly introduced here will disappear again once
the migration is complete.
Bug: v8:3770
Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
Change-Id: I2990b06a2511ccc5de3f98fd95a805f30ed589ab
Reviewed-on: https://chromium-review.googlesource.com/c/1036612
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56705}
Ensure that {min} is smaller than {max}, and auto-compute {max} as
{arraysize(data)}.
We had two tests which did not actually test anything.
This is the second CL in a series to improve our module decoder tests
and make them more readable.
R=titzer@chromium.org
Bug: v8:8238
Change-Id: Ie467fa54609bc5fd860608085a2d58ed8341f5e7
Reviewed-on: https://chromium-review.googlesource.com/c/1282956
Reviewed-by: Ben Titzer <titzer@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56703}
First CL in a series to improve our module decoder tests and make them
more readable.
R=titzer@chromium.org
Bug: v8:8238
Change-Id: Ie6ac83fbe2f873bfda8597ab3dd9ec4c0fb548ad
Reviewed-on: https://chromium-review.googlesource.com/c/1283054
Reviewed-by: Ben Titzer <titzer@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56702}
This will allow us to determine whether tests are not printing anything or
whether our infrastructure is failing to retrieve the stdout.
TBR=machenbach@google.com
No-Try: true
Bug: chromium:891314
Change-Id: I0786e77b4db9f247e02a25924acd6d6773c0db9f
Reviewed-on: https://chromium-review.googlesource.com/c/1282962
Commit-Queue: Sergiy Byelozyorov <sergiyb@chromium.org>
Reviewed-by: Sergiy Byelozyorov <sergiyb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56701}
This is a reland of 650703557a
Original change's description:
> [ia32,root] Add indirect calls and jumps through virtual register
>
> This adds a temporary mechanism for isolate-independent calls and
> jumps. The problem was that - as ia32 doesn't have a scratch register
> - Call and Jump cannot call through a register. This CL adds a
> so-called virtual register (= a pointer-sized field) on IsolateData.
>
> The virtual register can be removed once pc-relative calls are
> implemented and all builtins have been embedded.
>
> Bug: v8:6666
> Change-Id: I1f9d8a25643fad0b3919dd813dbe219d20fcc6bc
> Reviewed-on: https://chromium-review.googlesource.com/c/1282991
> Commit-Queue: Jakob Gruber <jgruber@chromium.org>
> Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
> Reviewed-by: Igor Sheludko <ishell@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#56693}
TBR=sigurds@chromium.org
Bug: v8:6666
Change-Id: If463e68036673c7873d0d5e1a8a01ef31263cbfa
Reviewed-on: https://chromium-review.googlesource.com/c/1283052
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56700}
This also includes ports of Array.p.toString and Array.p.toLocaleString.
Many parts of the old JS implementation are preserved, because
TypedArray.p.join still relies on it. These will be removed once
TypedArray.p.join is ported to Torque.
To simplify implementation, special handling of extremely sparse arrays
has been removed.
Performance improvements vary by array size, elements, and sparse-ness.
Some quick numbers and graphs are here:
https://docs.google.com/spreadsheets/d/125VLmRMudk8XaomLCsZQ1ewc94WCqht-8GQwU3s9BW8/edit#gid=2087673710
Cq-Include-Trybots: luci.chromium.try:linux_chromium_headless_rel;luci.v8.try:v8_linux_noi18n_rel_ng;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: Ia4069a068403ce36676c37401d349aefc976b045
Reviewed-on: https://chromium-review.googlesource.com/c/1196693
Commit-Queue: Peter Wong <peter.wm.wong@gmail.com>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56699}
This reverts commit 650703557a.
Reason for revert: https://ci.chromium.org/p/v8/builders/luci.v8.ci/V8%20Linux%20-%20noi18n%20-%20debug/23308
Original change's description:
> [ia32,root] Add indirect calls and jumps through virtual register
>
> This adds a temporary mechanism for isolate-independent calls and
> jumps. The problem was that - as ia32 doesn't have a scratch register
> - Call and Jump cannot call through a register. This CL adds a
> so-called virtual register (= a pointer-sized field) on IsolateData.
>
> The virtual register can be removed once pc-relative calls are
> implemented and all builtins have been embedded.
>
> Bug: v8:6666
> Change-Id: I1f9d8a25643fad0b3919dd813dbe219d20fcc6bc
> Reviewed-on: https://chromium-review.googlesource.com/c/1282991
> Commit-Queue: Jakob Gruber <jgruber@chromium.org>
> Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
> Reviewed-by: Igor Sheludko <ishell@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#56693}
TBR=sigurds@chromium.org,jgruber@chromium.org,ishell@chromium.org
Change-Id: I782651140eee3e75d57ad57d614a981e420fdfeb
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:6666
Reviewed-on: https://chromium-review.googlesource.com/c/1283051
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56694}
This adds a temporary mechanism for isolate-independent calls and
jumps. The problem was that - as ia32 doesn't have a scratch register
- Call and Jump cannot call through a register. This CL adds a
so-called virtual register (= a pointer-sized field) on IsolateData.
The virtual register can be removed once pc-relative calls are
implemented and all builtins have been embedded.
Bug: v8:6666
Change-Id: I1f9d8a25643fad0b3919dd813dbe219d20fcc6bc
Reviewed-on: https://chromium-review.googlesource.com/c/1282991
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56693}
All of the places where MicrotasksScope is placed on the
stack are callbacks from JavaScript, so microtasks would
never run microtasks inside one of these methods.
Change-Id: I6dc36971189d6479138b58b90e3b9acae0c3ef73
Reviewed-on: https://chromium-review.googlesource.com/c/1277721
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56687}
Previously when class names were computed and set as part of
StoreDataPropertyInLiteral calls, it was observable to static fields
as these static fields are initialized right after the classes were
constructed but before the class names were installed.
This caused the name property to be undefined for this case.
Instead, this patch always forces the creation of a name property on
the class constructor when static class fields are used. This patch
does kill the class boilerplate optimization, but currently all static
class fields are installed using a runtime call to CreateDataProperty
so this isn't any worse when using static class fields.
In the future, this can be optimized away by storing the name on the
boilerplate.
There is spec discussion here:
https://github.com/tc39/proposal-class-fields/issues/85
There isn't a resolution yet, there's still discussion about whether
to have the name be undefined always for static class field
initializers. But, I don't think that's useful as it would always kill
our boilerplate optimization (like this patch does ..., but without the
future optimization potential).
Bug: v8:5367
Change-Id: I14afdf7ece3f2d9fa3c659d2c0bc3806e0b17abb
Reviewed-on: https://chromium-review.googlesource.com/c/1281002
Reviewed-by: Mythri Alle <mythria@chromium.org>
Reviewed-by: Daniel Ehrenberg <littledan@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56686}
This does not change the behavior, just makes it more explicit rather than
relying on the "presubmit" string being present in the builder name, which is
about to be deprecated.
R=machenbach@chromium.org, tandrii@chromium.org
No-Try: true
No-Tree-Checks: true
Bug: chromium:893955
Change-Id: I99724b42510a93012dd40e338b1ff8f4047c1276
Reviewed-on: https://chromium-review.googlesource.com/c/1280582
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Sergiy Byelozyorov <sergiyb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56685}
This bug surfaced in builds with some versions of libstdc++
(use_custom_libcxx=false), because of an additional debug check in
std::min_element.
Change-Id: I799c0a282101373ecf743eed61f911886ca23dc8
Reviewed-on: https://chromium-review.googlesource.com/c/1282989
Reviewed-by: Daniel Clifford <danno@chromium.org>
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56682}
In preparation for sharing RO_SPACE between all Isolates within a
process, this first pulls RO_SPACE out of the Startup snapshot and puts
it in its own ReadOnly snapshot.
The snapshot is first populated with the read-only roots. After that the
StartupSerializer serializes as before but starting from the first
mutable root. References to objects in the ReadOnly snapshot that aren't
themselves roots are added to a new cache called ReadOnlyObjectCache
which functions like the PartialSnapshotCache but lives in the
ReadOnlySerializer rather than the StartupSerializer. These cache
entries are referenced using a new bytecode: ReadOnlyObjectCache. (To
make room for this, the ApiReference bytecode has been moved).
To reduce code duplication, the StartupSerializer has been refactored to
create a new base class RootSerializer, which ReadOnlySerializer also
subclasses. The base class is responsible primarily for keeping track of
already serialized roots and visiting the roots.
Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
Change-Id: Iff26042886130ae22eccf2e11b35f6f226f4a792
Bug: v8:8191
Reviewed-on: https://chromium-review.googlesource.com/c/1244676
Commit-Queue: Dan Elphick <delphick@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56681}
This improves the performance of ExtractFixedArray and
CloneFastJSArray for double arrays, which in turn improve the
performance of cloning double arrays with slice() or spreading.
This, however, does not improve performance of spreading holey
double arrays, because spreading needs extra work to convert
holes to undefined.
Bug: v8:7980
Change-Id: Ib8aed74abbb0b06982a3b754e134fa415cb7de2d
Reviewed-on: https://chromium-review.googlesource.com/c/1280308
Reviewed-by: Michael Stanton <mvstanton@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Commit-Queue: Hai Dang <dhai@google.com>
Cr-Commit-Position: refs/heads/master@{#56680}
The InstructionSelector on x64 was missing the ability to properly match
comparisons of memory operands with zero, i.e. it used to turn something
like
Word32Equal(Load[Uint8](o, i), Int32Constant(0))
into
movzbl reg, [o,i]
cmp 0, reg
even requiring a temporary register. Now with this change it generates
the proper
cmpb [o,i], 0
sequence.
R=sigurds@chromium.org
Bug: v8:8238
Change-Id: I52a71bbf95c85e11cb275f0f4a5726a6873cde95
Reviewed-on: https://chromium-review.googlesource.com/c/1281342
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56677}
This bug does not affect the Torque run on tip-of-tree, but surfaced
in https://crrev.com/c/1196693.
The logic in Stack::DeleteRange was completely wrong and does not work
if the number of moved elements is bigger than the number of deleted
elements.
Change-Id: I5433b3b06e2e54646104493e9bc5e77b9763a521
Reviewed-on: https://chromium-review.googlesource.com/c/1282103
Reviewed-by: Michael Stanton <mvstanton@chromium.org>
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56676}
This adds root-relative access in a couple of spots (e.g.: LoadRoot,
CompareRoot, PushRoot, Push, Move, etc.). Some methods now dispatch
based on whether the given Immediate is an embedded object.
ShouldGenerateIsolateIndependentCode() was added as a porting crutch:
it forces isolate-independent code for builtins even though the
builtin is not in the Builtins::IsIsolateIndependent() whitelist. This
allows us to easily figure out which builtins can be white-listed with
--print-embedded-builtin-candidates.
Newly isolate-independent builtins are now whitelisted.
Drive-by: Remove dead CompareRoot and JumpIfRoot helpers.
Bug: v8:6666
Change-Id: I6b5f6f71b90ac22e7e15482af0617b0ca1c319da
Reviewed-on: https://chromium-review.googlesource.com/c/1280665
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56673}
Change Heap::IterateStrongRoots to never iterate the read-only roots. In
doing so remove VISIT_ALL_BUT_READ_ONLY and
VISIT_ONLY_STRONG_FOR_SERIALIZATION. All such uses should now use
VISIT_ALL and VISIT_ONLY_STRONG. Where ReadOnlyRoots iteration is
required, this adds ReadOnlyRoots(isolate)->Iterate() at the call site.
Add new begin, end, strong_mutable_roots_begin and
strong_mutable_roots_end methods to RootsTable and try and make the
existing uses a little more consistent.
Bug: v8:8191
Change-Id: Ie9d0f9e5186db418428e2fafd38432b0bd879daa
Reviewed-on: https://chromium-review.googlesource.com/c/1278500
Commit-Queue: Dan Elphick <delphick@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56672}
As well as a few other things in JSNativeContextSpecialization.
Bug: v8:7790
Change-Id: Ic13abec45797bb4c6cc66a140180122529c7288d
Reviewed-on: https://chromium-review.googlesource.com/c/1280327
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56670}
If `out` is empty accessing `out.back()` is invalid.
TBR=yangguo@chromium.org
Bug: chromium:894934
Change-Id: I7286c5b6a9857f1cdb2bcaf383094bee65bac393
Reviewed-on: https://chromium-review.googlesource.com/c/1282565
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56669}
The code for the initialization of the wrapper promise was using the
generic InitializeJSObjectFromMap() helper, which generates a loop to
initialization all fields of some generic object. In this particular
case we're constructing a JSPromise, so we only need to initialize the
elements and properties pointers, since all the other fields are taken
care of by the PromiseInit() call on the next line anyways.
Bug: v8:7253, v8:8238
Change-Id: If11963d1f94607ed9e48788f597c81c7344aafbe
Reviewed-on: https://chromium-review.googlesource.com/c/1281602
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56665}
There's a AsyncBuiltinsAssembler::InitializeNativeClosure() helper which
is used by the `await` builtins to initialize the native closures, which
are registered as fulfill/reject handlers. This helper initializes a
JSFunction based on the builtin SharedFunctionInfo. Since we are dealing
with builtins here, there's no point in using the fully generic helper
CodeStubAssembler::GetSharedFunctionInfoCode(), but we can immediately
assume that the SharedFunctionInfo::function_data() field contains a Smi
builtin index (guarded by TNode CASTs).
This almost cuts the generated code size for the `await` builtins in a
half, and might also yield some performance improvements due to reduced
register and instruction cache pressure.
Bug: v8:7253, v8:8238
Change-Id: I3415c2f9e0f04a7154c4bf4c3fe8156854dbfe13
Reviewed-on: https://chromium-review.googlesource.com/c/1281604
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56662}
- Add a new Intl::ResolveLocale method and uses it in all the intl objects.
- Fix CanonicalizeLocaleList to call out to HasProperty as per spec.
- Add calls to CanonicalizeLocaleList where it was previously missing.
- Change CanonicalizeLocaleListJS calls to CanonicalizeLocaleList now
that we have migrated ResolveLocale.
Bug: v8:5751
Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
Change-Id: I4249d2045c1556f18d570b00f7c92cbc3fa52077
Reviewed-on: https://chromium-review.googlesource.com/c/1270255
Reviewed-by: Adam Klein <adamk@chromium.org>
Reviewed-by: Frank Tang <ftang@chromium.org>
Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56660}