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

82986 Коммитов

Автор SHA1 Сообщение Дата
Tom Schuster 67961ba46a Bug 1717279 - Remove JSID_IS_SYMBOL and JSID_TO_SYMBOL. r=mgaudet
Differential Revision: https://phabricator.services.mozilla.com/D118287
2021-06-21 20:56:10 +00:00
Ted Campbell 65322c691a Bug 1716901 - Use getIntrinsicValue to implement getSelfHostedValue. r=jandem
Use the value from the intrinsics holder instead of making a new copy each time.
This also lets us remove the self-hosting global in the future.

Differential Revision: https://phabricator.services.mozilla.com/D118365
2021-06-21 20:13:51 +00:00
Ted Campbell 99d3917503 Bug 1716901 - Rename RegExp raw creation intrinsic. r=iain
Use consistent casing with the rest of intrinsics so that we can sort the
intrinsics in later patches.

Depends on D118236

Differential Revision: https://phabricator.services.mozilla.com/D118363
2021-06-21 20:13:50 +00:00
Ted Campbell e3100c80ba Bug 1716901 - Remove _ prefix from self-hosting intrinsics. r=jandem
We never had any consistency with how we named the intrinsics, so remove the
underscore prefix to match the rest of the intrinsics.

Differential Revision: https://phabricator.services.mozilla.com/D118236
2021-06-21 20:13:50 +00:00
Ted Campbell 3fb8bb1131 Bug 1716901 - Remove some unused JS self-hosting intrinsics. r=jandem
Depends on D118234

Differential Revision: https://phabricator.services.mozilla.com/D118235
2021-06-21 20:13:49 +00:00
Ted Campbell 50c06abcfc Bug 1716901 - Eagerly initialize 'undefined' on self-hosting intrinsics holder. r=jandem
The old system would initialize it on the self-hosting global and rely on
CloneValue to copy it lazily to the intrinsics-holder of a given realm. Now we
eagerly initialize the binding when the intrinics-holder is created. In
practice, once a self-hosted builtin is used it is very likely that undefined
will be needed there too. Also remove the unused 'global' binding while we are
here.

This change helps strip down the self-hosting global so that we can remove it
entirely in the future.

Differential Revision: https://phabricator.services.mozilla.com/D118234
2021-06-21 20:13:49 +00:00
Caroline Cullen 98b6954e78 Bug 1716134 - Fix diffoscope bug by sorting static asserts before generating the code. r=iain
Differential Revision: https://phabricator.services.mozilla.com/D118306
2021-06-21 20:03:25 +00:00
Asumu Takikawa fe7bf54006 Bug 1716043 - Support Wasm `try` block with no other clauses r=rhunt
The proposal spec for exception handling was recently changed
to allow a `try` block with no `catch` or `delegate` clauses:

  https://github.com/WebAssembly/exception-handling/pull/157

Differential Revision: https://phabricator.services.mozilla.com/D118088
2021-06-21 19:19:13 +00:00
Asumu Takikawa 539a058be7 Bug 1716869 - Part 2, vendor the latest wat r=rhunt
Depends on D118082

Differential Revision: https://phabricator.services.mozilla.com/D118083
2021-06-21 19:19:13 +00:00
Asumu Takikawa 2647ce5160 Bug 1716869 - Part 1, move test imports before definitions r=rhunt
The Wasm spec for the text format specifies that imports should come
before definitions:

  The second condition enforces that all imports must occur before any
  regular definition of a function, table, memory, or global, thereby
  maintaining the ordering of the respective index spaces.

  https://webassembly.github.io/spec/core/text/modules.html#text-module

However, this was not enforced for the test parser until recently.

Differential Revision: https://phabricator.services.mozilla.com/D118082
2021-06-21 19:19:12 +00:00
Asumu Takikawa d5a7547bd7 Bug 1716041 - Remove `unwind` exception instruction r=rhunt
This instruction was recently removed from the Wasm exception
handling proposal spec:

  https://github.com/WebAssembly/exception-handling/pull/156

Differential Revision: https://phabricator.services.mozilla.com/D118080
2021-06-21 19:19:12 +00:00
Jan de Mooij 2bb1b8a494 Bug 1717405 - Trigger pre-barrier before mutating the table. r=jonco
Differential Revision: https://phabricator.services.mozilla.com/D118347
2021-06-21 19:06:11 +00:00
Lars T Hansen 7474b83bc5 Bug 1697371 - Templatize baseline compiler part 6: simple instance call ops. r=rhunt
This introduces templates that capture the common code patterns around
most instance calls, and uses those where possible.  It turns out that
we can clean up the handling of return values significantly too, since
the builtin signatures capture all the necessary information and a
weird special case was removed last year.

Differential Revision: https://phabricator.services.mozilla.com/D112966
2021-06-21 10:05:39 +00:00
Emilio Cobos Álvarez fb069248c0 Bug 1716045 - Unify font-family storage. r=mats,jfkthame
This changes font-family storage to reuse the rust types, removing a
bunch of code while at it. This allows us to, for example, use a single
static font family for -moz-bullet and clone it, rather than creating a
lot of expensive copies.

Differential Revision: https://phabricator.services.mozilla.com/D118011
2021-06-18 19:35:50 +00:00
Jan de Mooij 4935f5f838 Bug 1715512 part 21 - Rename memory reporter for tree shapes to shared shapes. r=jonco
Shapes no longer form a tree.

Differential Revision: https://phabricator.services.mozilla.com/D117321
2021-06-18 12:02:17 +00:00
Jan de Mooij 1b73b237e2 Bug 1715512 part 20 - Rename Shape to PropMap in a few places. r=jonco
Also add a SWEEP_PROP_MAP phase because SWEEP_SHAPE still has other uses.

Differential Revision: https://phabricator.services.mozilla.com/D117320
2021-06-18 12:02:17 +00:00
Jan de Mooij 3cc60aaa15 Bug 1715512 part 19 - Remove now-unused JSID_EMPTY. r=jonco
Differential Revision: https://phabricator.services.mozilla.com/D117319
2021-06-18 12:02:16 +00:00
Jan de Mooij 47cf2adeed Bug 1715512 part 18 - Implement NativeObject::checkShapeConsistency. r=jonco
Differential Revision: https://phabricator.services.mozilla.com/D117318
2021-06-18 12:02:16 +00:00
Jan de Mooij a3518be084 Bug 1715512 part 17 - Add PropMap::dump and fix Shape::dump. r=jonco
Differential Revision: https://phabricator.services.mozilla.com/D117317
2021-06-18 12:02:15 +00:00
Jan de Mooij f40586484d Bug 1715512 part 16 - Rename inDictionary to isDictionary. r=jonco
Also rename the IN_DICTIONARY flag to IS_DICTIONARY.

Shapes are no longer "part of" a dictionary list.

Differential Revision: https://phabricator.services.mozilla.com/D117316
2021-06-18 12:02:15 +00:00
Jan de Mooij 5694cde5ee Bug 1715512 part 15 - Fix tests. r=jonco
The jit-test was triggering slices that were "too long" for the test to abort the
sweep phase. Reduce the count for the test to pass.

The devtools test was failing because shapes no longer show up in the visible part
of the memory allocation table (it's more down the list because there are fewer
shapes). Use PropMap instead.

Differential Revision: https://phabricator.services.mozilla.com/D117315
2021-06-18 12:02:15 +00:00
Jan de Mooij 7a4335895f Bug 1715512 part 14 - Change shapes to be based on property maps. r=jonco
This is mostly removing code that's now implemented in property maps:

 45 files changed, 1469 insertions(+), 2932 deletions(-)

See also the new SMDOC comment in Shape.h

In CacheIR.cpp remove the previous shape check. This is no longer necessary
after this code got rewritten a while ago.

Differential Revision: https://phabricator.services.mozilla.com/D117314
2021-06-18 12:02:14 +00:00
André Bargull 0ed0217733 Bug 1715007 - Part 2: Add "language-region" language tags for all "language-script-region" tags. r=tcampbell,dminor
Implement the changes from <https://github.com/tc39/ecma402/pull/501>.

Instead of just adding the fixed list of old-style locales from
`oldStyleLanguageTagMappings`, add any locale "xx-ZZ" when ICU supports the
locale "xx-Yyyy-ZZ".

Differential Revision: https://phabricator.services.mozilla.com/D117017
2021-06-18 09:22:14 +00:00
André Bargull 5fb308d38c Bug 1715007 - Part 1: Add testing function to retrieve all available locales. r=tcampbell
Add a testing function to retrieve all available locales in preparation to test
the changes in part two.

Differential Revision: https://phabricator.services.mozilla.com/D117016
2021-06-18 09:22:13 +00:00
André Bargull c121de17f1 Bug 1685075 - Part 3: Use the actual supported locale when computing the default locale. r=zbraniecki
This change ensures we don't report "en-US-posix" as the default locale when
`LANG=C` is set by the user, because that could be confusing after part 2.

The current rules about selecting the appropriate default locale were last
discussed in <https://bugzilla.mozilla.org/show_bug.cgi?id=1175347>. The
preference in that bug was to accept every part of the default locale as long
as there's a possible fallback locale. For example when the user locale is
"de-ZA", which can be supported through the fallback to "de", "de-ZA" as a whole
is accepted. But "de-ZA" is not accepted when the default locale is for example
just "de".

The test cases were adapted to use a locale which has multiple subtags and which
has only partial support in `Intl.Collator`: `Intl.Collator` only natively
supports "az", but not "az-Cyrl-AZ". "az-Cyrl-AZ" is completely supported by all
other Intl service constructors.

Depends on D117976

Differential Revision: https://phabricator.services.mozilla.com/D117977
2021-06-18 09:22:13 +00:00
André Bargull f9c007f933 Bug 1653024 - Part 2: Enable test262 feature for Intl.DateTimeFormat.prototype.formatRange by default. r=tcampbell
Depends on D118026

Differential Revision: https://phabricator.services.mozilla.com/D118027
2021-06-18 06:41:37 +00:00
André Bargull 5233fa2f3e Bug 1653024 - Part 1: Enable Intl.DateTimeFormat.prototype.formatRange by default. r=tcampbell
Differential Revision: https://phabricator.services.mozilla.com/D118026
2021-06-18 06:41:36 +00:00
Jan de Mooij 46764ce6b6 Bug 1715512 part 13 - Add heuristics for converting a shared map with many properties to a dictionary map. r=jonco
This will replace what we currently have in ShouldConvertToDictionary.
The HadElementsAccess object flag we currently use there will be removed
in a later patch.

Differential Revision: https://phabricator.services.mozilla.com/D117313
2021-06-17 16:51:44 +00:00
Jan de Mooij bc0d957a0e Bug 1715512 part 12 - Add memory reporting for property maps. r=jonco
Differential Revision: https://phabricator.services.mozilla.com/D117312
2021-06-17 16:51:44 +00:00
Jan de Mooij e10ed74d26 Bug 1715512 part 11 - Add fast path for sealing/freezing properties. r=jonco
This corresponds to the fast path we currently have in SetIntegrityLevel, but
makes it more of a core operation.

The old Shape-based implementation doesn't support dictionary objects, but this
patch adds code for dictionary maps because it's easy to implement and is much
faster than the generic seal/freeze code.

Differential Revision: https://phabricator.services.mozilla.com/D117311
2021-06-17 16:51:44 +00:00
Jan de Mooij 26c07b486d Bug 1715512 part 10 - Implement operations for dictionary maps. r=jonco
Differential Revision: https://phabricator.services.mozilla.com/D117310
2021-06-17 16:51:43 +00:00
Jan de Mooij 93db42dc33 Bug 1715512 part 9 - Implement operations for shared maps. r=jonco
Differential Revision: https://phabricator.services.mozilla.com/D117309
2021-06-17 16:51:43 +00:00
Jan de Mooij bc740e8c0d Bug 1715512 part 8 - Add more property map code. r=jonco
This adds most of the layout code and basic operations. Subsequent patches will
implement methods for mutating maps.

Differential Revision: https://phabricator.services.mozilla.com/D117308
2021-06-17 16:51:42 +00:00
Jan de Mooij 531b5e0b77 Bug 1715512 part 7 - Add PropertyKey::isVoid. r=jonco
Differential Revision: https://phabricator.services.mozilla.com/D117307
2021-06-17 16:51:42 +00:00
Jan de Mooij d996928925 Bug 1715512 part 6 - Prepare PropertyInfo for property maps. r=jonco
Mpas will store an array of PropertyInfos, add a private constructor to make
that work.

Also add a CompactPropertyInfo type that occupies two bytes instead of four. This
will be used for compact maps.

Differential Revision: https://phabricator.services.mozilla.com/D117306
2021-06-17 16:51:42 +00:00
Jan de Mooij 962566d41b Bug 1715512 part 5 - Add GetObjectFlagsForNewProperty overload that takes JSClass and ObjectFlags instead of shape. r=jonco
The overload taking a shape will be removed in a later patch.

Differential Revision: https://phabricator.services.mozilla.com/D117305
2021-06-17 16:51:41 +00:00
Jan de Mooij fe0f6beef0 Bug 1715512 part 4 - Add (Shared)PropMapAndIndex tagged pointer type. r=jonco
This will for example be used in the PropMapTable which maps from PropertyKey to
map + index.

Differential Revision: https://phabricator.services.mozilla.com/D117304
2021-06-17 16:51:41 +00:00
Jan de Mooij 3c2da551f2 Bug 1715512 part 3 - Add SMDOC comment for property maps. r=jonco
Differential Revision: https://phabricator.services.mozilla.com/D117303
2021-06-17 16:51:40 +00:00
Jan de Mooij 2d38e8c094 Bug 1715512 part 2 - Add PropMap GC thing. r=jonco
Differential Revision: https://phabricator.services.mozilla.com/D117302
2021-06-17 16:51:40 +00:00
Jan de Mooij 78bafa39d3 Bug 1715512 part 1 - Add TenuredCellWithFlags. r=jonco
Differential Revision: https://phabricator.services.mozilla.com/D117301
2021-06-17 16:51:40 +00:00
Jon Coppeard b4a00f01a6 Bug 1716940 - Pass external thread stack size through to the JS engine r=sfink,bas
This adds plumbing to make the JS engine set the stack quota based on the
actual stack size for external thread pool threads (and internal thread pool
ones).

The quota is calculated as 90% of the size, which is currently hardcoded into
the constants.

Differential Revision: https://phabricator.services.mozilla.com/D118183
2021-06-17 16:14:19 +00:00
Jon Coppeard 3723bb6f3a Bug 1716529 - Don't create allocation sites until baseline r=jandem
This stops creating allocation sites for IC stubs when running in the baseline
interpreter. When a script is compiled in baseline proper this scans the IC
chain for ops that could potentially reference allocation sites, and allocates
them where necessary.

This should result in fewer sites being created and less overhead for code that
doesn't reach baseline.

Differential Revision: https://phabricator.services.mozilla.com/D117920
2021-06-17 14:26:35 +00:00
Ted Campbell 839b596a5e Bug 1716901 - Use GetBuiltinConstructor instead of bare self-hosting constructors. r=jandem
Instead of defining (slimmed-down) constructors on the instrinsics holder,
simply use the JSOp::BuiltinObject mechanism (which uses ProtoKey slots on the
GlobalObject). This reduces the initialization requirements on the self-hosted
global which simplifies removing it later. Using `BuiltinObject` instead of
`GetIntrinsic` loses BaselineInterpreter support but the cases here are
uncommon.

Differential Revision: https://phabricator.services.mozilla.com/D118106
2021-06-17 13:39:12 +00:00
Ted Campbell 04092bfab2 Bug 1716901 - Add GetBuiltinSymbol for self-hosting. r=jandem
Instead of relying on builtin bindings for well-known symbols, use the
BytecodeEmitter to map `GetBuiltinSymbol` to `JSOp::Symbol`. The old code relies
on `GetIntrinsic` to clone by matching well-known symbol code, while the new
system directly uses `JSOp::Symbol` with the appropriate symbol-code.

Differential Revision: https://phabricator.services.mozilla.com/D118105
2021-06-17 13:39:12 +00:00
Ted Campbell 11d48bc1e3 Bug 1716901 - Add WellKnownAtoms for well-known Symbols. r=arai
Support the list of well-known Symbols as ParserAtoms that can be matched in the
Parser/BytecodeEmitter.

Differential Revision: https://phabricator.services.mozilla.com/D118104
2021-06-17 13:39:12 +00:00
Iulian Moraru bb7e748707 Backed out changeset 360ca5ba051e (bug 1716529) for causing spidermonkey build bustages. CLOSED TREE 2021-06-17 15:00:30 +03:00
Andi-Bogdan Postelnicu f07c975367 Bug 1519636 - Reformat recent changes to the Google coding style. r=necko-reviewers,emilio
Updated with clang-format version 12.0.0 (taskcluster-FZRqPXamQIOU_i4hF0cAcg)

Differential Revision: https://phabricator.services.mozilla.com/D117905
2021-06-17 11:00:22 +00:00
Jon Coppeard 5997bc1e3d Bug 1716529 - Don't create allocation sites until baseline r=jandem
This stops creating allocation sites for IC stubs when running in the baseline
interpreter. When a script is compiled in baseline proper this scans the IC
chain for ops that could potentially reference allocation sites, and allocates
them where necessary.

This should result in fewer sites being created and less overhead for code that
doesn't reach baseline.

Differential Revision: https://phabricator.services.mozilla.com/D117920
2021-06-17 08:57:55 +00:00
Jan de Mooij a0630bc990 Bug 1716324 part 2 - Rely on default stack size for jsapi-tests, gdb-tests, and JS shell main thread. r=tcampbell
Differential Revision: https://phabricator.services.mozilla.com/D117656
2021-06-17 07:59:02 +00:00
Jan de Mooij 5bd1917c8c Bug 1716324 part 1 - Set default stack quota when creating the JSContext. r=tcampbell
Uses the stack limit values currently used for the JS shell. This fixes confusing
behavior when the embedding forgets to call JS_SetNativeStackQuota.

Differential Revision: https://phabricator.services.mozilla.com/D117655
2021-06-17 07:59:01 +00:00