Commit Graph

65657 Commits

Author SHA1 Message Date
Daniel Clark
73f8a71003 Sort import assertions by code point order of the keys
Per https://tc39.es/proposal-import-assertions/#sec-assert-clause-to-assertions,
import assertions should be sorted by the import assertion [[Key]]s,
in order to prevent hosts from relying on a changing order of the
assertions to determine behavior.

Prior to this change, the assertions were being sorted by pointer. With
this CL, the keys are sorted using a code point ordering so that the
order of the assertions received by the host will be stable and
non-surprising.

This CL also switches the SourceTextModuleDescriptor's ModuleRequestMap,
RegularExportMap, and RegularImportMap to use the code point order
comparison rather than their former shortlex sort.  This change will not
be externally visible, but it seems best to make these consistent.

In order to avoid #including the fairly large ast-value-factory.h
into ast/modules.h, I changed ImportAssertions into a separate class
definition rather than keeping it as a typedef.  The alternative would
be to define a common AstRawStringComparer in ast-value-factory.h and
then #include ast-value-factory.h in both ast/modules.h and
parsing/parser.h so that the ImportAssertions typedef would have a
full, shared definition of the AstRawStringComparer type.

Bug: v8:10958
Change-Id: I29c9544aa0a4340c56e1ee631be6cabb2a2eb921
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2533038
Commit-Queue: Dan Clark <daniec@microsoft.com>
Reviewed-by: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71165}
2020-11-12 20:03:03 +00:00
Vasili Skurydzin
862215f2e8 aix: Remove unnecessary library import that breaks build on PASE environment
Change-Id: Ifcd419601d090f5995feb064b017e813dcb00121
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2532878
Reviewed-by: Milad Fa <mfarazma@redhat.com>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Commit-Queue: Vasili Skurydzin <vasili.skurydzin@ibm.com>
Cr-Commit-Position: refs/heads/master@{#71164}
2020-11-12 19:13:33 +00:00
Junliang Yan
9354663060 [ppc64/s390x] Enable v8_disable_arguments_adaptor on BUILD.gn
Bug: v8:10201
Change-Id: I947649b9862a8288581b002fd2c8e9242dc5d955
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2532608
Reviewed-by: Milad Fa <mfarazma@redhat.com>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Junliang Yan <junyan@redhat.com>
Cr-Commit-Position: refs/heads/master@{#71163}
2020-11-12 18:35:33 +00:00
Santiago Aboy Solanes
2a3504e721 [mutex] Create the SharedMutexGuardIf class
It creates a SharedMutexGuard if the boolean parameter in the
constructor is true.

Bug: v8:7790
Change-Id: I77647f648717af05b1239576b690aec6f4e8b268
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2531790
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71162}
2020-11-12 18:26:53 +00:00
Shu-yu Guo
6507b97522 Revert "[compiler] Move InternalizedString to kNeverSerialized"
This reverts commit 04cdcd5a88.

Reason for revert: TSAN failures https://ci.chromium.org/p/v8/builders/ci/V8%20Linux64%20TSAN/34180

Original change's description:
> [compiler] Move InternalizedString to kNeverSerialized
>
> Bug: v8:7790
> Change-Id: I8311b1f4b8239d0688a4b9b9057d6082942bbc00
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2534471
> Reviewed-by: Georg Neis <neis@chromium.org>
> Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#71159}

TBR=neis@chromium.org,solanes@chromium.org

Change-Id: Ib950d1c6603a80e6fadb61839559c38761aea650
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:7790
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2534294
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71161}
2020-11-12 16:46:52 +00:00
Ross McIlroy
9e4cd2bcd3 [csa][cleanup] TNodify To<Int32,Int64,IntPtr,Smi>Constant
BUG=v8:6949,v8:11074

Change-Id: Ia5a52dcf42559d97eb6fd4a24f4abd3c40226017
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2531792
Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Santiago Aboy Solanes <solanes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71160}
2020-11-12 16:12:19 +00:00
Santiago Aboy Solanes
04cdcd5a88 [compiler] Move InternalizedString to kNeverSerialized
Bug: v8:7790
Change-Id: I8311b1f4b8239d0688a4b9b9057d6082942bbc00
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2534471
Reviewed-by: Georg Neis <neis@chromium.org>
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71159}
2020-11-12 15:50:19 +00:00
Georg Neis
a28eb2c81c [hash-table] Make a few accessor definitions more readable
Change-Id: I10dd526c0ec1bee9c049b8a2a352908357bb302a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2534812
Commit-Queue: Georg Neis <neis@chromium.org>
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Auto-Submit: Georg Neis <neis@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71158}
2020-11-12 15:49:09 +00:00
Pierre Langlois
4a89c01876 [heap] Do not use V8_LIKELY on FLAG_disable_write_barriers.
FLAG_disable_write_barriers is a constexpr so the V8_LIKELY macro isn't
necessary. Interestingly, it can also cause clang to warn that the code
is unreachable, whereas without `__builtin_expect()` the compiler
doesn't mind. See for example:

```
constexpr bool kNo = false;

void warns() {
  if (__builtin_expect(kNo, 0)) {
    int a = 42;
  }
}

void does_not_warn() {
  if (kNo) {
    int a = 42;
  }
}
```

Compiling V8 for arm64 with both `v8_disable_write_barriers = true` and
`v8_enable_pointer_compression = false` would trigger this warning.

Bug: v8:9533
Change-Id: Id2ae156d60217007bb9ebf50628e8908e0193d05
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2534811
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Commit-Queue: Pierre Langlois <pierre.langlois@arm.com>
Cr-Commit-Position: refs/heads/master@{#71157}
2020-11-12 15:31:34 +00:00
Seth Brenith
15f8f64755 Fix Torque definition of SmallOrderedNameDictionary
The recently-added verifiers for indexed fields have caught a bug: the
definition of SmallOrderedNameDictionary in Torque contained incorrect
padding for builds without pointer compression.

Bug: v8:11063
Change-Id: I2c3d7f06965ec0598ef4fe56923090aa89bc9df1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2529013
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Seth Brenith <seth.brenith@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#71156}
2020-11-12 15:27:10 +00:00
Marja Hölttä
cdcf3c3134 [super] Use a feedback-collecting builtin in JSGenericLowering
Bug: v8:9237
Change-Id: I1e308a5a325b01fcdc9236f13080653f3be6d328
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2527095
Commit-Queue: Marja Hölttä <marja@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71155}
2020-11-12 15:06:39 +00:00
Milad Fa
f823ac7117 PPC: [wasm-simd] Implement f32x4 and f64x2 pmin and pmax
Change-Id: I58301ded85db096ea5d141b36eb628d0cea54256
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2533353
Commit-Queue: Milad Fa <mfarazma@redhat.com>
Reviewed-by: Junliang Yan <junyan@redhat.com>
Cr-Commit-Position: refs/heads/master@{#71154}
2020-11-12 14:48:15 +00:00
Vicky Kontoura
eb0ef4d7c8 [wasm] Reverse count logic for the tiering of js-to-wasm wrappers
This CL reverses the count logic for the tiering strategy of the
js-to-wasm wrappers. The initial approach was that calls to each
function were counted up, until a threshold was reached and the function
would tier up. With this CL, each function is assigned a budget of calls
that can be handled through the generic wrapper. Calls are counted down
until the budget is exhausted, which will trigger the tier-up
for the function.

This approach comes with two advantages. Firstly, determining whether
a function's budget is exhausted is as simple as checking the flags set
from the decrement of the budget. Secondly, the code generated by the
generic wrapper does not depend on the specific value of the initial
budget.

Bug: v8:10982
Change-Id: I5e186c6cf836a9c197b41d0f7ad075b07c87a4da
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2532300
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Vicky Kontoura <vkont@google.com>
Cr-Commit-Position: refs/heads/master@{#71153}
2020-11-12 14:31:25 +00:00
Clemens Backes
83a2f390f1 [inspector][fuzzer] Suppress messages about uncaught exceptions
The fuzzer is expected to generate a lot of syntax and runtime errors,
and the respective messages just flood the fuzzer output. By always
putting a {TryCatch} scope around the execution, we prevent those
messages from being printed.
At the same time, inspector tests need to properly propagate uncaught
exceptions in the backend to the inspector, and fail on uncaught
exceptions in the frontend.

This CL allows for all these behaviours by extending the
{CatchExceptions} enum and the {TryCatch} logic in the task runner.

Drive-by: Use {base::OS::ExitProcess} instead of the explicit
{fflush} and {_exit}.

R=szuend@chromium.org

Bug: chromium:1142437
Change-Id: Ic2cb3b0de2399d25bd8c53090575308cb0e09ab0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2529135
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71152}
2020-11-12 13:45:21 +00:00
Igor Sheludko
15c9ff0758 [runtime] Remove --modify-field-representation-inplace flag
which was enabled a long ago and is not supposed to be disabled.

In addition this CL adds Representation::MightCauseMapDeprecation()
predicate and ensures it's consistent with the existing
MostGenericInPlaceChange() and CanBeInPlaceChangedTo().

Bug: v8:11104, v8:8865
Change-Id: Ia8046b76822c9b20fe3ce85de6b98570334aad21
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2527088
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71151}
2020-11-12 13:44:15 +00:00
Pierre Langlois
c1fd70b6bd [heap] Add third-party heap guard in String::LooksValid().
Bug: v8:9533
Change-Id: Id888929b45a1519f4b4a4bb73159816520461841
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2534478
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71150}
2020-11-12 13:29:45 +00:00
Junliang Yan
fc24d04e8c [ppc/s390] Remove arguments adaptor frame
Bug: v8:10201

R=victorgomes@chromium.org,neis@chromium.org,ishell@chromium.org

Change-Id: I1bd0ece0e4c91abc84c24ec8331f9cbb17defa56
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2524295
Commit-Queue: Junliang Yan <junyan@redhat.com>
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Reviewed-by: Milad Fa <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/master@{#71149}
2020-11-12 13:26:15 +00:00
Andreas Haas
286f03bdf6 [wasm] Update spec tests
R=ecmziegler@chromium.org

Change-Id: Ifead2feecc5786630ab442d125826688dc170e1b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2534477
Reviewed-by: Emanuel Ziegler <ecmziegler@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71148}
2020-11-12 13:08:55 +00:00
Lutz Vahl
2970147b91 Change Version number to 8.9
TBR=vahl@chromium.org

Change-Id: Ife9b1f135cd181822f39328b2524a739ddd04e6b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2534473
Reviewed-by: Lutz Vahl <vahl@chromium.org>
Commit-Queue: Lutz Vahl <vahl@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71147}
2020-11-12 11:55:44 +00:00
Liviu Rau
2f61c5305b Revert "Reland^3 "Temporary compilation failure to test tree closing""
This reverts commit 32cae2b219.

Reason for revert: Experiment successful. Opening the tree

Original change's description:
> Reland^3 "Temporary compilation failure to test tree closing"
>
> This is a reland of e3ec228c0a
>
> Original change's description:
> > Temporary compilation failure to test tree closing
> >
> > This will be reverted after testing the new tree closer.
> >
> > No-Try: true
> > Bug: v8:10661
> > Change-Id: I1b47976ee38cda447e2960ca4b6bd274f16425fe
> > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2529131
> > Reviewed-by: Maya Lekova <mslekova@chromium.org>
> > Reviewed-by: Liviu Rau <liviurau@chromium.org>
> > Reviewed-by: Clemens Backes <clemensb@chromium.org>
> > Commit-Queue: Michael Achenbach <machenbach@chromium.org>
> > Cr-Commit-Position: refs/heads/master@{#71081}
>
> No-Try: true
> Bug: v8:10661
> Change-Id: I90742ecde3f8333c6d069b17e80b185cf26530db
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2531787
> Reviewed-by: Clemens Backes <clemensb@chromium.org>
> Reviewed-by: Maya Lekova <mslekova@chromium.org>
> Commit-Queue: Liviu Rau <liviurau@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#71145}

TBR=clemensb@chromium.org,mslekova@chromium.org,liviurau@chromium.org,machenbach@chromium.org

Change-Id: Icd9409df994cc1461fae9ea3627e5780ebd635f7
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:10661
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2534475
Reviewed-by: Liviu Rau <liviurau@chromium.org>
Commit-Queue: Liviu Rau <liviurau@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71146}
2020-11-12 11:54:36 +00:00
Michael Achenbach
32cae2b219 Reland^3 "Temporary compilation failure to test tree closing"
This is a reland of e3ec228c0a

Original change's description:
> Temporary compilation failure to test tree closing
>
> This will be reverted after testing the new tree closer.
>
> No-Try: true
> Bug: v8:10661
> Change-Id: I1b47976ee38cda447e2960ca4b6bd274f16425fe
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2529131
> Reviewed-by: Maya Lekova <mslekova@chromium.org>
> Reviewed-by: Liviu Rau <liviurau@chromium.org>
> Reviewed-by: Clemens Backes <clemensb@chromium.org>
> Commit-Queue: Michael Achenbach <machenbach@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#71081}

No-Try: true
Bug: v8:10661
Change-Id: I90742ecde3f8333c6d069b17e80b185cf26530db
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2531787
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Commit-Queue: Liviu Rau <liviurau@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71145}
2020-11-12 11:44:14 +00:00
Sathya Gunasekaran
424e25353f [ic] Remove reordering of deprecated maps in feedback
Now that we loop the entire polymorphic weak fixed array, there's
no need to reorder the deprecated maps.

Bug: v8:10582
Change-Id: Icf03d6c0ada34f385ffb747c7246c79f7341106d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2530875
Reviewed-by: Mythri Alle <mythria@chromium.org>
Commit-Queue: Sathya Gunasekaran  <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71144}
2020-11-12 11:40:45 +00:00
Georg Neis
1c32d3269d [compiler] Strengthen a DCHECK
A PropertyCell holding the_hole can't have cell type Undefined when the
compiler sees it.

Change-Id: Idcfe6c57c669a65a4ffbe522803bf25efc8bee5f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2531785
Auto-Submit: Georg Neis <neis@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71143}
2020-11-12 11:29:35 +00:00
Santiago Aboy Solanes
0367cc898a [compiler] Create concurrency tests for Strings
Bug: v8:7790
Change-Id: I7a7ed66f66e723192a45a05e68e20c11b8262598
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2495460
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71142}
2020-11-12 11:09:05 +00:00
Sathya Gunasekaran
e2512f517e [turboprop] Loop over polymorphic array in builtin
Instead of just comparing the first 4 elements, load and loop
over the entire array so that we don't miss out on deprecate
maps.

Bug: v8:10582
Change-Id: I67542e2ab24367a11a4bb84b6745a4fa80c42772
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2524441
Commit-Queue: Sathya Gunasekaran  <gsathya@chromium.org>
Reviewed-by: Mythri Alle <mythria@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71141}
2020-11-12 08:37:59 +00:00
Jakob Gruber
e14e1e4c56 [nci] Fix DCHECK(function->is_compiled()) in CompileOptimized
For NCI compilation tasks, we don't actually install the generated
Code object on the function. In that case, we cannot make assertions
about function state.

Bug: v8:8888,chromium:1146013
Change-Id: Ia2342c52e565ccb1f6b5b09dda5e998b3fd3eb3a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2532297
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Mythri Alle <mythria@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71140}
2020-11-12 07:56:49 +00:00
Liu Yu
6927e97694 [mips64] Skip some tests about CheckedFloat64ToInt64 like arm64
Port: b4e2a1e35a

Change-Id: I875a33fba10bd59942392c38500c2b80515aa9cf
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2528897
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Auto-Submit: Liu yu <liuyu@loongson.cn>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71139}
2020-11-12 07:10:29 +00:00
v8-ci-autoroll-builder
7c49621357 Update V8 DEPS.
Rolling v8/build: 1a0a9f8..b666d10

Rolling v8/third_party/aemu-linux-x64: DVv5pUl-M5J693D1Gl5WWXRACYvP3V3wzNASbl_CU4wC..1m4kyaGrLwSAY48Zj3RAdX1wmPZly0p7PQ4jmqPoDbsC

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/434681c..ac95abd

Rolling v8/third_party/depot_tools: b4f4226..26cd974

Rolling v8/tools/clang: a37c085..3aa688c

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

Change-Id: Icf17f392081eee6ed7188833c50475efd9c62cb0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2533726
Reviewed-by: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Commit-Queue: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/master@{#71138}
2020-11-12 03:42:28 +00:00
Shu-yu Guo
f1ae68351f [flags] Remove --harmony-promise-any
It's shipped since M85.

Bug: v8:9808
Change-Id: I0c2dcda601aad33d4acb379b242799f9b09e8930
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2510869
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Reviewed-by: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71137}
2020-11-12 01:09:38 +00:00
Michael Lippautz
dd80f2e4cf cppgc: Add public header-only target
The target can be used in Chromium to get basic cppgc types without
building the actual library.

Bug: chromium:1056170
Change-Id: Idaed19d265c63b2665e34d667903804708411c45
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2532308
Auto-Submit: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Omer Katz <omerkatz@chromium.org>
Reviewed-by: Omer Katz <omerkatz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71136}
2020-11-11 22:42:48 +00:00
Mythri A
301b354e86 [turboprop] Adjust OSR heuristics for Turboprop
Turboprop should tierup to OSR roughly at the same time as TurboFan,
so we wait for kProfilerTicksForTurboPropOSR ticks before OSRing. This
value was incorrect because we OSR after 4 ticks (we increment the ticks
after the tiering up decision). Also, we wait for additional ticks based
on function size. That should also adjust for the lower interrupt budget
on Turboprop.

Bug: v8:9684
Change-Id: I84c0afadd0562e598bbbe1c0cf904d7488c70261
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2532295
Commit-Queue: Mythri Alle <mythria@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71135}
2020-11-11 19:34:18 +00:00
Joyee Cheung
821fb3883a [serializer] avoid deferring objects with embedder fields
JS objects with embedder fields cannot be deferred because the
serialize/deserialize callbacks need the back reference immediately
to identify the object.

Refs: https://github.com/nodejs/node-v8/issues/175
Bug: v8:11146
Change-Id: I4292f2ab0041f7b0779620437ed26905c194cd9b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2531195
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Joyee Cheung <joyee@igalia.com>
Cr-Commit-Position: refs/heads/master@{#71134}
2020-11-11 19:24:38 +00:00
Ross McIlroy
aaa7a25061 [csa][cleanup] Remove return values from Store operators
They are never used, and can't really be TNodified since they are
not a value output in any case.

BUG=v8:6949,v8:11074

Change-Id: Id6f5807247c6fe53fb12dce9e2cfc66b5a046398
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2532305
Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
Auto-Submit: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Santiago Aboy Solanes <solanes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71133}
2020-11-11 19:17:18 +00:00
Ross McIlroy
c2a7fac927 [csa][cleanup] TNodify AtomicStore.
Splits the 64bit operation to a seperate function since there are
different return types depending upon whether the architecture is
64-bit or 32-bit.

BUG=v8:6949,v8:11074

Change-Id: If196cf658298ca0a1e5a13e1db812178307e7d12
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2531789
Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Santiago Aboy Solanes <solanes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71132}
2020-11-11 18:43:28 +00:00
Michael Lippautz
efb5786a21 cppgc: Add example for AdditionalBytes
Bug: chromium:1056170
Change-Id: I19c7d69c53cb7f4a2b8400ec31c63e88496c8982
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2532304
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Auto-Submit: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Omer Katz <omerkatz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71131}
2020-11-11 18:06:48 +00:00
Ulan Degenbaev
889b27b8da [heap] Add a simple implementation of Heap::IsPendingAllocation
The new predicate allows a background thread to check if the given
object was recently allocated and may potentially be unsafe to read
from the background thread.

The current implementation has relatively high overhead as it loads
two pointers per heap space. It will be optimized in the future.

Bug: v8:11148

Change-Id: I2a9dfb2c70de4b8214b8f8a35681a8bab1a63ca8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2532296
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71130}
2020-11-11 17:45:18 +00:00
Michael Lippautz
64206b2d83 cppgc: Mark object as constructed using std::atomic::fetch_or
Replace a manual fetch/or/store sequence with fetch_or.

Bug: chromium:1056170
Change-Id: Ib18d26686aa6e822f91b5b6662dd0bdcfafe5092
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2531788
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Omer Katz <omerkatz@chromium.org>
Auto-Submit: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Omer Katz <omerkatz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71129}
2020-11-11 17:30:18 +00:00
Ross McIlroy
e210b19632 [csa][cleanup] TNodify Atomic Compare Exchange.
Splits the 64bit operation to a seperate function since there are different
return types depending upon whether the architecture is 64-bit or 32-bit.

BUG=v8:6949,v8:11074

Change-Id: I47c84a0104f71ec8865f12cbfa201f2f76cf08bc
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2529911
Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Santiago Aboy Solanes <solanes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71128}
2020-11-11 17:09:18 +00:00
Jakob Kummerow
8d611a87b1 [wasm-gc] Known-depth constant-time subtype checks
Previously, we performed "is A subtype of B?" checks by walking
A's supertypes list and comparing every found type to B.
This CL stores not just A's immediate parent type on A, but its
entire list of supertypes, and uses that list plus compile-time
knowledge of B's distance to the root type in order to compare
only exactly one of A's supertypes to B.

Bug: v8:7748
Change-Id: I0011b72c4b54440b16494918f64d8fb119bef8b0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2527097
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Manos Koukoutos <manoskouk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71127}
2020-11-11 16:54:38 +00:00
Mythri A
b90aa33e70 [turboprop] Fix DCHECK in SetOptimizedCode
With --always-opt / %OptimizeFunctionOnNextCall it is also possible
that we see CompileOptimizedConcurrent marker when we install optimized
code. For example,
1. Mark function for concurrent optimization and trigger a job.
2. Create a new JSClosure and with --always-opt we optimize concurrently
and install optimized code. This clears the marker.
3. The installed optimized code is GCed or deopts and we re-mark the
function for concurrent optimization.
4. The optimize job created in step 1 finishes.

Bug: v8:11139, chromium:1146714
Change-Id: Ic2aa456b76d74d939441a84528bc5c27d9ea9381
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2529450
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Commit-Queue: Mythri Alle <mythria@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71126}
2020-11-11 16:44:48 +00:00
Daniel Clark
26c66541c8 Code review follow-ups from: Plumb import assertions through SourceTextModuleDescriptor's ModuleRequestMap
Address a few bits of code review feedback that came in after landing
https://chromium-review.googlesource.com/c/v8/v8/+/2493060:

- Add ModuleRequest:kAssertionEntrySize and use in place of a numeric
  literal.
- Get rid of ModuleRequestLocation and separate module_request_positions
  FixedArray, and merge these into AstModuleRequest and
  v8::internal::ModuleRequest.

Change-Id: If6d628d29bfa6fbd9933c6cdaa706623128ccc5d
Bug: v8:10958
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2530478
Reviewed-by: Marja Hölttä <marja@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Dan Clark <daniec@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#71125}
2020-11-11 16:36:48 +00:00
Seth Brenith
2388f2c1ef Fix v8windbg failure on non-ptr-compr builds
On builds without pointer compression enabled, v8windbg currently fails
to display information about objects in the Locals pane. This is because
some important code to get a type name was hidden behind a
COMPRESS_POINTERS_BOOL check. The existing cctest
test-v8windbg/V8windbg is sufficient to catch this error, but apparently
nobody ever runs that test in the failing configuration (Windows,
symbol_level = 2, v8_enable_pointer_compression = false).

Change-Id: Ia4e2714b11e6854b3f4f6b72da4ae8c352e8cddc
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2530413
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Seth Brenith <seth.brenith@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#71124}
2020-11-11 16:15:28 +00:00
Tobias Tebbi
f88090727d [torque] @relaxedWrite annotation; generate Context C++ class/BodyDescr.
This CL lets Torque generate the Context C++ class and BodyDescriptor
for Context.
This requires two Torque changes:

- Allow @generateBodyDescriptor on @abstract classes, since all Context
  classes share the same BodyDescriptor.

- Add a new annotation @relaxedWrite, which makes C++ setters
  use WRITE_RELAXED_FIELD instead of WRITE_FIELD.
  Attention: As a side-effect, this CL disables using
    WRITE_RELAXED_FIELD by default for all non-array fields. If this
    causes problems, we should manually add @relaxedWrite to the
    corresponding fields.

Bug: v8:7793

Change-Id: I735b310bcb36a3612d86c22efa9c0bfc108d4ca6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2529453
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71123}
2020-11-11 15:35:48 +00:00
Frank Emrich
4b71ac6b6f [dict-proto] Printing of orderded hash tables
This adds support for OrderedHashSet, OrderedHashMap, and
OrderedNameDictionary to Object::Print.
It also refactors the existing printing of (unordered) hash sets, maps,
and dictionaries to increase code reuse.

Bug: v8:7569
Change-Id: I598f6a025f4170e440d3840ce18234772068a7ca
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2523320
Commit-Queue: Frank Emrich <emrich@google.com>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71122}
2020-11-11 15:23:08 +00:00
Michael Lippautz
0d827da34d cppgc: Add more basic type traits
Adds traits for checking for Member,WeakMember, and UntracedMember
types.

This allows the embedder to specify its own traits and restrictions
around cppgc types.

Bug: chromium:1056170
Change-Id: Ibe60b774128f72f1398267edd81233c50fca6eb7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2532299
Reviewed-by: Omer Katz <omerkatz@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71121}
2020-11-11 14:59:08 +00:00
Ross McIlroy
30ae0d768f [csa][cleanup] TNodify Atomic binary ops.
Splits the 64bit operations to a seperate function since there are different
return types depending upon whether the architecture is 64-bit or 32-bit.

BUG=v8:6949,v8:11074

Change-Id: I13cc576a26f60288281c42df3326ba902fd36dbb
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2529910
Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Santiago Aboy Solanes <solanes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71120}
2020-11-11 14:50:18 +00:00
Michael Achenbach
b13cb74723 Revert "Reland^2 "Temporary compilation failure to test tree closing""
This reverts commit ca0613c1b3.

Reason for revert: Experiment finished.

Original change's description:
> Reland^2 "Temporary compilation failure to test tree closing"
>
> This is a reland of df156ffcba
>
> Original change's description:
> > Reland "Temporary compilation failure to test tree closing"
> >
> > This is a reland of e3ec228c0a
> >
> > Original change's description:
> > > Temporary compilation failure to test tree closing
> > >
> > > This will be reverted after testing the new tree closer.
> > >
> > > No-Try: true
> > > Bug: v8:10661
> > > Change-Id: I1b47976ee38cda447e2960ca4b6bd274f16425fe
> > > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2529131
> > > Reviewed-by: Maya Lekova <mslekova@chromium.org>
> > > Reviewed-by: Liviu Rau <liviurau@chromium.org>
> > > Reviewed-by: Clemens Backes <clemensb@chromium.org>
> > > Commit-Queue: Michael Achenbach <machenbach@chromium.org>
> > > Cr-Commit-Position: refs/heads/master@{#71081}
> >
> > No-Try: true
> > Bug: v8:10661
> > Change-Id: Ia628c5eb7609b57c9ad7ebe042e63d056e0ff85f
> > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2529144
> > Commit-Queue: Michael Achenbach <machenbach@chromium.org>
> > Reviewed-by: Clemens Backes <clemensb@chromium.org>
> > Reviewed-by: Maya Lekova <mslekova@chromium.org>
> > Cr-Commit-Position: refs/heads/master@{#71085}
>
> No-Try: true
> Bug: v8:10661
> Change-Id: I1237e62bc6745be61bf4e073055f782c44d8c2c2
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2529148
> Commit-Queue: Liviu Rau <liviurau@chromium.org>
> Reviewed-by: Clemens Backes <clemensb@chromium.org>
> Reviewed-by: Maya Lekova <mslekova@chromium.org>
> Reviewed-by: Liviu Rau <liviurau@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#71117}

TBR=clemensb@chromium.org,mslekova@chromium.org,liviurau@chromium.org,machenbach@chromium.org

Change-Id: I364735218833d54370d16d8b1a644d14910bbcd4
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:10661
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2532302
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71119}
2020-11-11 14:36:39 +00:00
Clemens Backes
adfc954121 [d8][cleanup] Remove uses of DISALLOW_COPY_AND_ASSIGN
Replace by explicitly deleting the copy constructor and copy assignment
operator.

R=zhin@chromium.org

Bug: v8:11074
Change-Id: Ifbfaad91d555649f586f37c251c6f4c378dcba46
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2523317
Reviewed-by: Zhi An Ng <zhin@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71118}
2020-11-11 14:28:18 +00:00
Michael Achenbach
ca0613c1b3 Reland^2 "Temporary compilation failure to test tree closing"
This is a reland of df156ffcba

Original change's description:
> Reland "Temporary compilation failure to test tree closing"
>
> This is a reland of e3ec228c0a
>
> Original change's description:
> > Temporary compilation failure to test tree closing
> >
> > This will be reverted after testing the new tree closer.
> >
> > No-Try: true
> > Bug: v8:10661
> > Change-Id: I1b47976ee38cda447e2960ca4b6bd274f16425fe
> > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2529131
> > Reviewed-by: Maya Lekova <mslekova@chromium.org>
> > Reviewed-by: Liviu Rau <liviurau@chromium.org>
> > Reviewed-by: Clemens Backes <clemensb@chromium.org>
> > Commit-Queue: Michael Achenbach <machenbach@chromium.org>
> > Cr-Commit-Position: refs/heads/master@{#71081}
>
> No-Try: true
> Bug: v8:10661
> Change-Id: Ia628c5eb7609b57c9ad7ebe042e63d056e0ff85f
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2529144
> Commit-Queue: Michael Achenbach <machenbach@chromium.org>
> Reviewed-by: Clemens Backes <clemensb@chromium.org>
> Reviewed-by: Maya Lekova <mslekova@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#71085}

No-Try: true
Bug: v8:10661
Change-Id: I1237e62bc6745be61bf4e073055f782c44d8c2c2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2529148
Commit-Queue: Liviu Rau <liviurau@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Reviewed-by: Liviu Rau <liviurau@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71117}
2020-11-11 14:22:58 +00:00
Jakob Gruber
273df17d8e [nci] Check Isolate::concurrent_recompilation_enabled
... instead of FLAG_concurrent_recompilation. The
optimizing_compile_dispatcher may be nullptr despite the flag being
set.

Bug: v8:8888,chromium:1145988
Change-Id: Ia3a6b1a95dde2b8cdd43dd2beebf04c66f145f78
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2531781
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Maya Lekova <mslekova@chromium.org>
Auto-Submit: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71116}
2020-11-11 13:18:18 +00:00