Граф коммитов

87157 Коммитов

Автор SHA1 Сообщение Дата
Tooru Fujisawa 244bc38da6 Bug 1782706: Do not set JSContext::nativeStackBase_ in helper thread. r=bthrall
Differential Revision: https://phabricator.services.mozilla.com/D152857
2022-08-17 14:52:20 +00:00
Dan Minor 313af2f09a Bug 1784513 - handle decorator member expressions with `.` in them; r=mgaudet
Currently we only support `IdentifierName`, but the grammar allows for multiple
`IdentifierName`s separated by `.`:

`DecoratorMemberExpression[?Yield, ?Await] . IdentifierName`

Differential Revision: https://phabricator.services.mozilla.com/D154814
2022-08-17 12:39:21 +00:00
Cosmin Sabou e3b648be1d Backed out changeset b7a953f0120a (bug 784513) for landing with the wrong bug number. 2022-08-17 15:55:57 +03:00
Dan Minor 235cb1ee96 Bug 784513, handle decorator member expressions with `.` in them; r=mgaudet
Currently we only support `IdentifierName`, but the grammar allows for multiple
`IdentifierName`s separated by `.`:

`DecoratorMemberExpression[?Yield, ?Await] . IdentifierName`

Differential Revision: https://phabricator.services.mozilla.com/D154814
2022-08-17 12:39:21 +00:00
Dan Minor 15ab57e6f2 Bug 1783738 - Move decorator tests to jit-test; r=mgaudet
This moves the decorator tests to jit-test because getBuildConfiguration()
doesn't seem to be consistently available while running jstests.
This also fixes two tests that were not passing with decorators enabled.

Depends on D154190

Differential Revision: https://phabricator.services.mozilla.com/D154797
2022-08-16 17:18:15 +00:00
Dan Minor 363dd80227 Bug 1783738 - Support decorator expressions on classes; r=mgaudet
This adds decorator support to class definitions and expressions

Differential Revision: https://phabricator.services.mozilla.com/D154190
2022-08-16 17:18:14 +00:00
Dan Minor c709c049fb Bug 1783738 - Support decorator expressions on methods and fields; r=mgaudet
This adds support for decorator expressions inside classes for methods
and fields. Support for class declarations and expressions is added in
the next commit.

Differential Revision: https://phabricator.services.mozilla.com/D154189
2022-08-16 17:18:14 +00:00
Dan Minor 6322854331 Bug 1783738 - Make 'accessor' a contextual keyword; r=mgaudet
This should be a contextual keyword to avoid conflicting with existing
uses of the identifier. It's inserted out of alphabetical order to
avoid having to make the range conditional on whether ENABLE_DECORATORS
is defined.

Differential Revision: https://phabricator.services.mozilla.com/D154188
2022-08-16 17:18:13 +00:00
Dan Minor c329ab3d22 Bug 1783738 - Add decorators to build configuration; r=mgaudet
This is necessary to be able to skip tests when we haven't built with support
for decorators.

Differential Revision: https://phabricator.services.mozilla.com/D154187
2022-08-16 17:18:12 +00:00
Cristian Tuns 517ada709c Backed out 4 changesets (bug 1783738) for causing reftest failures with getBuildConfiguration CLOSED TREE
Backed out changeset a10f3d51daad (bug 1783738)
Backed out changeset 6cd01666a991 (bug 1783738)
Backed out changeset 9d7f488a2cd9 (bug 1783738)
Backed out changeset 3ca5e3471c04 (bug 1783738)
2022-08-16 09:26:43 -04:00
Dan Minor 490faf0f03 Bug 1783738 - Support decorator expressions on classes; r=mgaudet
This adds decorator support to class definitions and expressions

Differential Revision: https://phabricator.services.mozilla.com/D154190
2022-08-16 12:54:42 +00:00
Dan Minor 59b75591fa Bug 1783738 - Support decorator expressions on methods and fields; r=mgaudet
This adds support for decorator expressions inside classes for methods
and fields. Support for class declarations and expressions is added in
the next commit.

Differential Revision: https://phabricator.services.mozilla.com/D154189
2022-08-16 12:54:41 +00:00
Dan Minor 346e7f1bee Bug 1783738 - Make 'accessor' a contextual keyword; r=mgaudet
This should be a contextual keyword to avoid conflicting with existing
uses of the identifier. It's inserted out of alphabetical order to
avoid having to make the range conditional on whether ENABLE_DECORATORS
is defined.

Differential Revision: https://phabricator.services.mozilla.com/D154188
2022-08-16 12:54:41 +00:00
Dan Minor e6ad5e1689 Bug 1783738 - Add decorators to build configuration; r=mgaudet
This is necessary to be able to skip tests when we haven't built with support
for decorators.

Differential Revision: https://phabricator.services.mozilla.com/D154187
2022-08-16 12:54:41 +00:00
Tim Chevalier 7b7c37a440 Bug 1781128 - Remove INITIALIZED_LENGTH_FIELD slot for records r=jandem
This slot is not necessary, as the initialized length can always be computed
from the sorted keys array.

Differential Revision: https://phabricator.services.mozilla.com/D152685
2022-08-16 00:57:26 +00:00
André Bargull 5855fc2684 Bug 1784490 - Part 3: Remove unnecessary includes in js/src/builtin. r=mgaudet
Similar to part 1, remove includes which are flagged as unnecessary by IWYU.

Differential Revision: https://phabricator.services.mozilla.com/D154536
2022-08-15 12:59:05 +00:00
André Bargull 888303d10b Bug 1784490 - Part 2: Remove StringsAreEqual from intl/CommonFunctions.h. r=mgaudet
Collator.cpp:
It's actually faster to compare the entries as Span, because we don't have
to scan for the terminating null-character.

That leaves only two other callers to `StringsAreEqual`. Inline it into both
files and give the version in "String.cpp" a better name. `CaseMappingLocale`
should probably be changed to return a `Span`, so we can remove another caller
with raw pointers from `mozilla::intl`, but that's better left for another bug.

Depends on D154534

Differential Revision: https://phabricator.services.mozilla.com/D154535
2022-08-15 12:59:05 +00:00
André Bargull 5495534331 Bug 1784490 - Part 1: Remove unnecessary includes in js/src/builtin/intl. r=mgaudet
Remove unnecessary includes reported by IWYU, but don't bother with adding all
missing includes, because that requires more effort to filter out invalid
suggestions from IWYU. The added includes are only needed to avoid build breakage.

Differential Revision: https://phabricator.services.mozilla.com/D154534
2022-08-15 12:59:03 +00:00
Marian-Vasile Laza d1dd9ef346 Backed out 3 changesets (bug 1784490) for causing build bustages. CLOSED TREE
Backed out changeset 6e9b32e45fee (bug 1784490)
Backed out changeset a79a9860433b (bug 1784490)
Backed out changeset f5aadfd152c5 (bug 1784490)
2022-08-15 15:11:09 +03:00
André Bargull e0fc07c997 Bug 1784490 - Part 3: Remove unnecessary includes in js/src/builtin. r=mgaudet
Similar to part 1, remove includes which are flagged as unnecessary by IWYU.

Depends on D154535

Differential Revision: https://phabricator.services.mozilla.com/D154536
2022-08-15 11:47:44 +00:00
André Bargull 77cf0d55b4 Bug 1784490 - Part 2: Remove StringsAreEqual from intl/CommonFunctions.h. r=mgaudet
Collator.cpp:
It's actually faster to compare the entries as Span, because we don't have
to scan for the terminating null-character.

That leaves only two other callers to `StringsAreEqual`. Inline it into both
files and give the version in "String.cpp" a better name. `CaseMappingLocale`
should probably be changed to return a `Span`, so we can remove another caller
with raw pointers from `mozilla::intl`, but that's better left for another bug.

Depends on D154534

Differential Revision: https://phabricator.services.mozilla.com/D154535
2022-08-15 11:47:43 +00:00
André Bargull 65d200ba02 Bug 1784490 - Part 1: Remove unnecessary includes in js/src/builtin/intl. r=mgaudet
Remove unnecessary includes reported by IWYU, but don't bother with adding all
missing includes, because that requires more effort to filter out invalid
suggestions from IWYU. The added includes are only needed to avoid build breakage.

Differential Revision: https://phabricator.services.mozilla.com/D154534
2022-08-15 11:47:43 +00:00
Julian Seward 4ebfb64753 Bug 1774840 - Implement new GC instructions in baseline (Part 3). r=rhunt.
Adds wasm baseline implementation and test cases for `array.new_fixed`.

Differential Revision: https://phabricator.services.mozilla.com/D154230
2022-08-15 10:08:39 +00:00
Julian Seward c5d5216d8e Bug 1774840 - Implement new GC instructions in baseline (Part 2). r=rhunt.
In the existing GC array implementation, change some names that are `length`
or `elementsLength` to be `numElements`, to remove ambiguity about whether
those quantities are "number of bytes" or "number of array elements".  No
functional change.

Differential Revision: https://phabricator.services.mozilla.com/D154229
2022-08-15 10:08:38 +00:00
Julian Seward 5f86714cba Bug 1774840 - Implement new GC instructions in baseline (Part 1). r=rhunt.
Part 1 - debug/comment improvements.  No functional change.

* Add a debug-only method BaseCompiler::showStack, to dump the compiler's
  value stack to stderr.

* Add comment describing argument-handling in BaseCompiler::emitInstanceCall.

Differential Revision: https://phabricator.services.mozilla.com/D154228
2022-08-15 10:08:38 +00:00
Jan de Mooij 49529a9109 Bug 1784478 - Support loading from rope right-child in MacroAssembler::loadStringChar. r=anba
Differential Revision: https://phabricator.services.mozilla.com/D154527
2022-08-14 11:23:12 +00:00
Mohamed Atef 9b822c126b Bug 1784435: Support generic error in js::StringToBigInt. r=arai
Differential Revision: https://phabricator.services.mozilla.com/D154581
2022-08-13 14:36:36 +00:00
Yury Delendik b3b91f03ec Bug 1780819 - Allow non-nullable references in locals. r=rhunt
* Allows non-defaultable locals to be present
* Adds UnsetLocalsState to track state (as defined by spec)
* Add testing of generated sequences of blocks and locals operations

Differential Revision: https://phabricator.services.mozilla.com/D154003
2022-08-12 20:41:03 +00:00
Ryan Hunt f3a70ff9e6 Bug 1782770 - wasm: Don't make extra copy of FuncType for debugging. r=yury
Now that we transfer all type definitions to Metadata, we can
remove the special debugging case where we would transfer all
function types. Instead, we can just transfer the funcTypeIndex
and find the function type in Metadata.

Differential Revision: https://phabricator.services.mozilla.com/D153500
2022-08-12 17:21:56 +00:00
Ryan Hunt 4ed81efbb9 Bug 1782770 - wasm: Make ValType a uint32_t now that rtt's are gone. r=yury
ValType needed to be pointer size to support (rtt) types. Now that
they have been removed, we can revert to 32-bit on all platforms.

Differential Revision: https://phabricator.services.mozilla.com/D153499
2022-08-12 17:21:56 +00:00
Ryan Hunt bbc6652080 Bug 1782770 - wasm: Transfer all type definitions to Metadata. r=yury
Metadata stores a vector of TypeDef that comes from the type section of the module.
We currently only transfer a type if it's a struct type, array type, or else a
function type that cannot fit in an immediate for call_indirect signature checks.

Because we filter out some types, this means we need to renumber the type index
space to match. This is a bit hacky, and is difficult to do consistently.

The original reason for only bringing function types that cannot fit in an
immediate was to reduce the size of metadata as most function types can fit in an
immediate. However, I discovered that we make a copies of function types for
FuncExport and FuncImport metadata. This can create multiple copies of the original
function type, e.g. when multiple exported functions reference the same type
definition.

If we instead transfer all types and store the index of the function type in
FuncExport/FuncImport we can reduce total metadata size, reduce allocations,
and remove type renumbering.

This commit does this by:
  1. Transferring all type definitions to Metadata (WasmGenerator.cpp)
  2. Removing the typeRenumbering vector
  3. Replacing FuncType with typeIndex on FuncImport/FuncExport
  4. Updating all users of FuncImport/FuncExport to get the FuncType using
     the typeIndex and Metadata. This the bulk of the changes.

Differential Revision: https://phabricator.services.mozilla.com/D153498
2022-08-12 17:21:55 +00:00
Yulia Startsev dee4b84e71 Bug 1784477 - Make ModuleLoaderBase thread-insensitive; r=jonco
Differential Revision: https://phabricator.services.mozilla.com/D147323
2022-08-12 16:18:44 +00:00
Yulia Startsev ddbc6378de Bug 1784477 - Remove Dynamic Import option; r=jonco
Differential Revision: https://phabricator.services.mozilla.com/D154529
2022-08-12 16:18:44 +00:00
André Bargull ad1746d63e Bug 1784092 - Part 5: Update test262 exclusions. r=mgaudet
Differential Revision: https://phabricator.services.mozilla.com/D154271
2022-08-12 15:22:19 +00:00
André Bargull e02f67890b Bug 1784092 - Part 4: Update test262. r=mgaudet
Update test262 after enabling the features from part 2.

Depends on D154269

Differential Revision: https://phabricator.services.mozilla.com/D154270
2022-08-12 15:22:18 +00:00
André Bargull 56216f7437 Bug 1784092 - Part 3: Update test262 importer feature checks. r=mgaudet
Enable "array-grouping" and "change-array-by-copy" tests.

Depends on D154268

Differential Revision: https://phabricator.services.mozilla.com/D154269
2022-08-12 15:22:18 +00:00
André Bargull 40c109ec7b Bug 1784092 - Part 2: Enable change-array-by-copy build option by default on Nightly. r=mgaudet
This only enables the build option, which allows to actually run any tests in CI.

Depends on D154267

Differential Revision: https://phabricator.services.mozilla.com/D154268
2022-08-12 15:22:17 +00:00
André Bargull 437553873a Bug 1784092 - Part 1: Remove tests for removed TypedArray.prototype.toSpliced function. r=mgaudet
Depends on D154266

Differential Revision: https://phabricator.services.mozilla.com/D154267
2022-08-12 15:22:17 +00:00
André Bargull ba2a960d5f Bug 1784454: Initialise dense elements before copying into them. r=mgaudet
Differential Revision: https://phabricator.services.mozilla.com/D154505
2022-08-12 15:15:52 +00:00
André Bargull bcdadebfbb Bug 1784091: Update unscopable names for Array grouping. r=mgaudet
Differential Revision: https://phabricator.services.mozilla.com/D154266
2022-08-12 12:49:55 +00:00
André Bargull b4cd6b075b Bug 1784090 - Part 5: Avoid copying the array for ArrayToSorted. r=mgaudet
Change `MergeSort` to directly modify its input instead of creating a copy.
`ArraySort` now needs to copy the input and re-arrange any holes, whereas
`ArrayToSorted` can directly return the result from `MergeSort`.

Depends on D154264

Differential Revision: https://phabricator.services.mozilla.com/D154265
2022-08-12 12:49:54 +00:00
André Bargull 324aa95386 Bug 1784090 - Part 4: Inline ArraySort into ArrayToSorted. r=mgaudet
Inline `ArraySort` into `ArrayToSorted` in preparation for the next part.

Depends on D154263

Differential Revision: https://phabricator.services.mozilla.com/D154264
2022-08-12 12:49:54 +00:00
André Bargull a6906a1108 Bug 1784090 - Part 3: Change comments to single-line comments. r=mgaudet
We generally prefer single-line comments in new code.

Depends on D154262

Differential Revision: https://phabricator.services.mozilla.com/D154263
2022-08-12 12:49:54 +00:00
André Bargull 2dbab44bf7 Bug 1784090 - Part 2: Remove SortArray with direct call to ArraySort. r=mgaudet
Depends on D154261

Differential Revision: https://phabricator.services.mozilla.com/D154262
2022-08-12 12:49:53 +00:00
André Bargull 5911ceb687 Bug 1784090 - Part 1: Create fewer copies in TypedArrayToSorted. r=mgaudet
Change `MergeSortTypedArray` to return the sorted array. `TypedArraySort` now
needs to copy the sorted elements back into the original array and
`TypedArrayToSorted` can directly return the sorted array. When `TypedArrayToSorted`
is called without a comparator function, we still have to create a copy in
`TypedArrayToSorted` which is then passed to `TypedArrayNativeSort`. When the
input has fewer than two elements, we only have to copy the input without performing
any sort operations.

Differential Revision: https://phabricator.services.mozilla.com/D154261
2022-08-12 12:49:53 +00:00
Cosmin Sabou 0426478035 Backed out 11 changesets (bug 1784090, bug 1784091, bug 1784092) for causing SM assertion failures on js/Value.h. CLOSED TREE
Backed out changeset a8f802732daf (bug 1784092)
Backed out changeset b92f9185c00e (bug 1784092)
Backed out changeset 293b349acef8 (bug 1784092)
Backed out changeset 43f09ff76a7c (bug 1784092)
Backed out changeset 8525901a008a (bug 1784092)
Backed out changeset 94fcc8600381 (bug 1784091)
Backed out changeset 35d068070f81 (bug 1784090)
Backed out changeset 3966a0f0f413 (bug 1784090)
Backed out changeset 3492785e6bb1 (bug 1784090)
Backed out changeset ac8bb0be9f26 (bug 1784090)
Backed out changeset 9c38d51940e8 (bug 1784090)
2022-08-12 12:38:04 +03:00
André Bargull e1af99c7b1 Bug 1784092 - Part 5: Update test262 exclusions. r=mgaudet
Differential Revision: https://phabricator.services.mozilla.com/D154271
2022-08-12 08:44:18 +00:00
André Bargull 690bcb5e95 Bug 1784092 - Part 4: Update test262. r=mgaudet
Update test262 after enabling the features from part 2.

Depends on D154269

Differential Revision: https://phabricator.services.mozilla.com/D154270
2022-08-12 08:44:18 +00:00
André Bargull 9dc71a7f29 Bug 1784092 - Part 3: Update test262 importer feature checks. r=mgaudet
Enable "array-grouping" and "change-array-by-copy" tests.

Depends on D154268

Differential Revision: https://phabricator.services.mozilla.com/D154269
2022-08-12 08:44:17 +00:00
André Bargull cde63795b3 Bug 1784092 - Part 2: Enable change-array-by-copy build option by default on Nightly. r=mgaudet
This only enables the build option, which allows to actually run any tests in CI.

Depends on D154267

Differential Revision: https://phabricator.services.mozilla.com/D154268
2022-08-12 08:44:17 +00:00