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

90611 Коммитов

Автор SHA1 Сообщение Дата
Jon Coppeard 9bb856e20b Bug 1855376 - Free stacks of extra parallel markers between GCs r=sfink
We currently keep all mark stacks allocated after GC, shrunk to their default size.

For parallel marking we can free the mark stacks of all markers apart from the
first. If we fail to allocate them at the start of marking we can fall back to
not marking in parallel.

This fixes the AWSY regression.

The patch also changes GCMarker::reset() to cover everything that happens in
GCMarker::stop() so you don't need to call both.

Differential Revision: https://phabricator.services.mozilla.com/D189342
2023-09-28 06:48:34 +00:00
Ben Visness 2392f9e265 Bug 1784268: Import wasm gc spec tests. r=rhunt
This required significantly reworking how the harness handles ref.extern. We no
longer "canonicalize" externrefs created by the harness, since when checking for
an externref result we now extract the numeric value contained within.

Differential Revision: https://phabricator.services.mozilla.com/D188738
2023-09-27 17:41:12 +00:00
Ben Visness c1de260786 Bug 1784268: Fix small issues blocking GC spec tests. r=rhunt
- Fix wasm module serialization order. Element segments sometimes need to refer to types during deserialization, but element segments were being deserialized before code objects (which contain types).
- Do function subtype checks on import, rather than requiring strict equality.
- Allow explicit null function references in table initializers.
- Initialize type defs and globals before tables when instantiating modules.

Differential Revision: https://phabricator.services.mozilla.com/D188737
2023-09-27 17:41:12 +00:00
Denis Palmeiro c8bc10dd79 Bug 1854650: Annotate out of line calls in perfspewer. r=iain
Differential Revision: https://phabricator.services.mozilla.com/D189389
2023-09-27 16:12:29 +00:00
Yury Delendik 8574af2210 Bug 1855288 - Allow tail calls be compiled for beta and release. r=rhunt
Differential Revision: https://phabricator.services.mozilla.com/D189274
2023-09-27 13:55:25 +00:00
Vinny Diehl 6d90b57bac Bug 449921 - Loosen requirements for characters directly following numbers r=arai,devtools-reviewers,nchevobbe
This patch newly allows cases such as MonDDYYYY and Mon.DD.YYYY.
In adding tests for this patch, I noticed that the tests for parsing
periods were broken and could not fail the way that they were written,
so I fixed them.

This patch also fixes a couple of other standing bugs...

fixes Bug 485639 - for cases like "Aug 15 2015 10:00am"
fixes Bug 1760290 - for YYYY.MM.DD

Differential Revision: https://phabricator.services.mozilla.com/D186054
2023-09-27 09:52:46 +00:00
Emilio Cobos Álvarez 9e6751a082 Bug 1854446 - Make dynamic atoms store an nsStringBuffer. r=smaug,xpcom-reviewers,nika
Performance results pending, but this shouldn't hurt utf-8 atomization
at all, and it should also make utf-16 atomization potentially cheaper.

So sending for review under the assumption that perf numbers will look
good.

Differential Revision: https://phabricator.services.mozilla.com/D189021
2023-09-27 09:06:06 +00:00
Jon Coppeard 2699e7408d Bug 1854072 - Part 2: Fix the name of the GC parameter for the parallel marking threshold r=sfink
This occurrence was missed from the previous patch and so the GC param is named
'KB' even though the value is interpreted as MB.

This affects the shell and testing functions only.

Differential Revision: https://phabricator.services.mozilla.com/D189239
2023-09-27 06:55:56 +00:00
Natalia Csoregi a6437d542f Backed out changeset 65f49a810f52 (bug 1854446) for causing multiple failures e.g. 368504-4.html. CLOSED TREE 2023-09-27 03:26:28 +03:00
Emilio Cobos Álvarez 128ee32ee2 Bug 1854446 - Make dynamic atoms store an nsStringBuffer. r=smaug,xpcom-reviewers,nika
Performance results pending, but this shouldn't hurt utf-8 atomization
at all, and it should also make utf-16 atomization potentially cheaper.

So sending for review under the assumption that perf numbers will look
good.

Differential Revision: https://phabricator.services.mozilla.com/D189021
2023-09-26 23:14:14 +00:00
Yury Delendik 8667790959 Bug 1846534 - Track unwind info for tail calls. r=jseward,mstange,profiler-reviewers
Tail calls are doing some stack data manipulations, and profiler (iterator) needs to know how to find where caller RA and FP stored. A platform now preserves temporary registers used to store FP/RA using collapse frame operations.

Differential Revision: https://phabricator.services.mozilla.com/D183269
2023-09-26 21:08:00 +00:00
Ben Visness c18cb99e44 Bug 1851864: Implement array.init_data, array.init_elem, and array.fill. r=yury
Differential Revision: https://phabricator.services.mozilla.com/D188063
2023-09-26 20:59:33 +00:00
Steve Fink bcf88b9094 Bug 1852729 - Update weakRefMap when a WeakRef target is cleared r=jonco
Differential Revision: https://phabricator.services.mozilla.com/D188150
2023-09-26 18:58:13 +00:00
Joel Maher 99abb50b8d Bug 1853245 - Migrate .ini manifests to .toml (Batch 7.25). r=aryx,webdriver-reviewers,whimboo
Differential Revision: https://phabricator.services.mozilla.com/D189221
2023-09-26 17:40:01 +00:00
Ryan Hunt 48114f50e7 Bug 1854068 - wasm: Trace AnyRef spill slots in Ion frames. r=jandem
Differential Revision: https://phabricator.services.mozilla.com/D188845
2023-09-26 16:20:39 +00:00
Jan de Mooij 344dd2667b Bug 1855230 - Release helper thread lock before tracing lazy link list. r=jonco
Unlike the lists in the global helper thread state, the lazy link list is only
accessed on the runtime's main thread.

Differential Revision: https://phabricator.services.mozilla.com/D189237
2023-09-26 14:38:18 +00:00
Bryan Thrall c0ccd51634 Bug 1839007 - Add CheckRegExpSyntax jit-test r=arai
Differential Revision: https://phabricator.services.mozilla.com/D184254
2023-09-26 13:17:26 +00:00
Vinny Diehl b6d5797728 Bug 1840642 - Refactor getRealmConfiguration and getBuildConfiguration r=mgaudet
This implementation allows for the old behavior, returning a plain
object, if these functions are given no argument, while providing the
new behavior, querying the build/realm configuration, if an argument is
given.

Differential Revision: https://phabricator.services.mozilla.com/D188788
2023-09-25 15:42:19 +00:00
Jan de Mooij 839220b4d9 Bug 1853467 part 3 - Bump PropertyInfoWithKeyVector inline storage from 8 to 16. r=jonco
Speedometer 3's Charts-chartjs calls this with an object with 10 properties,
so this avoids malloc overhead.

Depends on D188967

Differential Revision: https://phabricator.services.mozilla.com/D188968
2023-09-25 15:04:48 +00:00
Jan de Mooij dcedb59cf1 Bug 1853467 part 2 - Simplify loop for Object.assign fast path. r=jonco
We don't need to use the vector in this case because both objects
are plain objects with only data properties.

Depends on D188966

Differential Revision: https://phabricator.services.mozilla.com/D188967
2023-09-25 15:04:48 +00:00
Jan de Mooij 179bf597d9 Bug 1853467 part 1 - Add fast path to Object.assign for when we can reuse the shape's PropMap. r=jonco
We already had an optimization to reuse the shape when assigning to an empty object.
This often doesn't work because the number of fixed slots is different, but in
this case we can still reuse the property map.

Differential Revision: https://phabricator.services.mozilla.com/D188966
2023-09-25 15:04:47 +00:00
Bryan Thrall 6355de0665 Bug 1848244 - Maintain parentheses in OptionalDotExpr after folding r=arai,anba
ConditionalExpr is the only case I can see where constant-folding can replace
the valid LHS of an OptionalDotExpr with another expression that isn't valid in
the AST. This can happen when the ConditionalExpr is parenthesized, and
maintaining the parentheses keeps the folded expression valid for
OptionalDotExpr.

One alternative to maintaining the parentheses is to check if folding results
in a disallowed expression (not a MemberExpression or CallExpression), and
restoring the unfolded expression if so. Wrapping in parentheses lets us keep
the folding optimization, so it seems better.

Differential Revision: https://phabricator.services.mozilla.com/D187222
2023-09-25 14:11:27 +00:00
Jan de Mooij 5d5ac1487e Bug 1854643 - Fix JS_DeletePropertyById argument type in header file. r=sfink
The changes in testGCStoreBufferRemoval.cpp are to fix "Heap is ambiguous" errors
with unified builds.

Differential Revision: https://phabricator.services.mozilla.com/D188986
2023-09-25 12:12:52 +00:00
Denis Palmeiro 9c5ba26ca8 Bug 1853438: Emit DEBUG_INFO records for the pc used by an IonIC r=iain
Differential Revision: https://phabricator.services.mozilla.com/D188401
2023-09-22 13:59:46 +00:00
Tooru Fujisawa 245ec20b8d Bug 1851938 - Cancel and join ongoing AsyncScriptCompileTasks during shutdown. r=nbp
Differential Revision: https://phabricator.services.mozilla.com/D188675
2023-09-21 10:50:29 +00:00
Jon Coppeard dfbe267537 Bug 1854072 - Change parallel marking threshold pref to use MB instead of KB r=sfink
While the limit when setting the pref is surprising, I think it  makes more
sense to change this pref to use MB like most of the other GC prefs after which
the problem will not arise.

Differential Revision: https://phabricator.services.mozilla.com/D188715
2023-09-21 09:00:09 +00:00
Yoshi Cheng-Hao Huang b758eaeb68 Bug 1841859 - Part 2: Parse the referrer policy from http header and update the referrer policy. r=jonco,smaug
This implementes the following requirement from the spec:

https://html.spec.whatwg.org/#fetch-a-single-module-script

12. In both cases, let processResponseConsumeBody given response response and null, failure, or a byte sequence bodyBytes be the following algorithm:

  5. Let referrerPolicy be the result of parsing the `Referrer-Policy` header given response.
  6. If referrerPolicy is not the empty string, set options's referrer policy to referrerPolicy.

Differential Revision: https://phabricator.services.mozilla.com/D186944
2023-09-20 17:32:15 +00:00
Yoshi Cheng-Hao Huang cd69bc3c65 Bug 1841859 - Part 1: Move ReferrerPolicy to ScriptLoadRequest and LoadedScript. r=jonco,smaug
Suggested by jonco during review,
https://phabricator.services.mozilla.com/D186944#inline-1036982

Differential Revision: https://phabricator.services.mozilla.com/D187385
2023-09-20 17:32:15 +00:00
Iulian Moraru 98e5cc913d Backed out 22 changesets (bug 1839396) for causing multiple spidermonkey bustages and jittest failures. CLOSED TREE
Backed out changeset c17523ff7eb5 (bug 1839396)
Backed out changeset 771c47934e72 (bug 1839396)
Backed out changeset d219a4366950 (bug 1839396)
Backed out changeset f1accceff8b8 (bug 1839396)
Backed out changeset 1dd3b4a4da66 (bug 1839396)
Backed out changeset 8645391a6359 (bug 1839396)
Backed out changeset 03082f8db52c (bug 1839396)
Backed out changeset 93a56d4cd58f (bug 1839396)
Backed out changeset 96be1bbf8fff (bug 1839396)
Backed out changeset b0a898413a0f (bug 1839396)
Backed out changeset b0dc61dbe899 (bug 1839396)
Backed out changeset d89ee847ad56 (bug 1839396)
Backed out changeset 42f370321925 (bug 1839396)
Backed out changeset 0321a4a743de (bug 1839396)
Backed out changeset d3f56d11a4b4 (bug 1839396)
Backed out changeset c193770e3745 (bug 1839396)
Backed out changeset d68820286c44 (bug 1839396)
Backed out changeset f10974287494 (bug 1839396)
Backed out changeset 6bbf058933c5 (bug 1839396)
Backed out changeset 101beccd6098 (bug 1839396)
Backed out changeset 030fc635d134 (bug 1839396)
Backed out changeset 89e13efa6b37 (bug 1839396)
2023-09-20 20:58:00 +03:00
Iulian Moraru f44f30add8 Merge mozilla-central to autoland on a CLOSED TREE 2023-09-20 20:47:09 +03:00
Iulian Moraru 077fc34d03 Backed out 2 changesets (bug 1840642) to unblock fuzzing. a=backout
Backed out changeset b0769fdf63e5 (bug 1840642)
Backed out changeset 5f569dc82bbd (bug 1840642)
2023-09-20 20:44:11 +03:00
Otto Länd 4b221aa6ec Bug 1839396: apply code formatting via Lando
# ignore-this-changeset
2023-09-20 17:04:32 +00:00
Nicolas B. Pierron dff59ae92c Bug 1839396 part 19 - Add documentation to GenericPrinter classes. r=mgaudet
Differential Revision: https://phabricator.services.mozilla.com/D183761
2023-09-20 17:00:11 +00:00
Nicolas B. Pierron e1112e440c Bug 1839396 part 18 - Remove GenericPrinter::putAsciiPrintable. r=mgaudet
`putAsciiPrintable` was added temporarily as a substitute for externalizing the
logic done by `QuoteString`, while providing an interface which is as efficient.

Now, `EscapePrinter` is used to replace the content of `QuoteString` while
providing the same implementation, except that it is based on `put` instead of
`putAsciiPrintable`. The `EscapePrinter` already provides the guarantees that
are asserted by `putAsciiPrintable`, thus there is no longer any need for it.

As this patch set introduced `putAsciiPrintable`, there is not yet any external
consumer of it, and `EscapePrinter` should cover all use cases where non-ascii
inputs are provided.

Differential Revision: https://phabricator.services.mozilla.com/D183760
2023-09-20 17:00:11 +00:00
Nicolas B. Pierron bf2079b179 Bug 1839396 part 17 - Make QuoteString and JSONQuoteString infallible. r=mgaudet
The previous patch reimplemented QuoteString to use a `StringSegmentRange`,
which should avoid mutating the inner parts of `JSRope`, while remaining fast on
`JSAtom`-s.

As the StringSegmentRange does not need to allocate with `ensureLinear`, then
all the failures are reported by the `put` functions using the `GenericPrinter`
mechanism, and the `release` functions of `Sprinter` would report the failure if
any.

Thus, there is no need for retuning a boolean value anymore from `QuoteString`
and `JSONQuoteString`, while this is still necessary to check the returned value
variant of `QuoteString` which returns `UniqueChars` by using the `release`
function of `Sprinter`.

Differential Revision: https://phabricator.services.mozilla.com/D183759
2023-09-20 17:00:10 +00:00
Nicolas B. Pierron aaac9b0bb0 Bug 1839396 part 16.2 - GenericPrinter::putString: Handle StringSegmentRange failures. r=arai
When reporting failure, we have to prevent continuation iterating over the
string segments, and stop early, as well as not ignoring the errors.

Differential Revision: https://phabricator.services.mozilla.com/D188248
2023-09-20 17:00:10 +00:00
Nicolas B. Pierron 4802861d94 Bug 1839396 part 16.1 - Reimplement QuoteString using EscapePrinter. r=arai,mgaudet
`QuoteString` is today only available as a mean to serialize a `JSString` to a
`Sprinter`, or by making an extra temporary allocation whch is most likely
discarded once the serialized content has been used once.

This implementation provide a generic escaping mechanism, named `EscapePrinter`,
which can be used on top of any existing Printer class, and with any escaping
logic such as different quotes, or different quotation marks if needed. The
different quoting strategies are implemented using a class which provides
`isSafeChar` and `convertInto` to normalize the `JSString` input characters into
characters which are properly encoded for the Printer.

This change keep the original `QuoteString` behavior, while replacing its
fallible implementation by an infallible implementation. `QuoteString` had an
undocummented side-effect of linearizing the strings while reading them, which
causes memory allocation and potential GC failures. This change replaces the
`ensureLinear` call by the new `GenericPrinter::putString` function which relies
on `StringSegmentRange` to iterate over the string fragments and serialize the
content which does not have the same side-effects.

If performance issue arise from this modification, calls to `ensureLinear`
should be added before the `QuoteString` calls.

Differential Revision: https://phabricator.services.mozilla.com/D183758
2023-09-20 17:00:10 +00:00
Nicolas B. Pierron dcb8feecbc Bug 1839396 part 16.0 - Add JSContext* argument to Sprinter::putString. r=mgaudet
`putString` requires a JSContext, and it is taken out of Sprinter, which does
not make much sense. Making it explicit that a JSContext is required to print
JSString would make things simpler for users instead of failing during the
execution.

Differential Revision: https://phabricator.services.mozilla.com/D187202
2023-09-20 17:00:09 +00:00
Nicolas B. Pierron b47a865543 Bug 1839396 part 15 - Replace Sprinter::jsprintf. r=mgaudet
Sprinter::jsprintf is nowadays the same as GenericPrinter::printf which Sprinter
inherit from. This patch removes all calls to Sprinter::jsprintf and replaces
them by Sprinter::printf.

The advantage of using GenericPrinter::printf is that this reduce the dependency
on Sprinter-specific interface and moves us toward being able to move more
consumers over to the GenericPrinter.

Differential Revision: https://phabricator.services.mozilla.com/D181500
2023-09-20 17:00:09 +00:00
Nicolas B. Pierron 755f14a255 Bug 1839396 part 14 - GC: Bubble-up infallible print functions. r=jonco
Now that Sprinter::put and Sprinter::jsprintf functions are infallible, there is
no need to return a boolean from Nursery::printProfileDurations and
Statistics::printProfileTimes functions.

Differential Revision: https://phabricator.services.mozilla.com/D181499
2023-09-20 17:00:08 +00:00
Nicolas B. Pierron 13454e29f9 Bug 1839396 part 13 - Convert GenericPrinter::put to be infallible. r=mgaudet
Remove the boolean returned value of printing functions of the GenericPrinter
and all descendant classes.

The goal being that error checking is the responsibility of the wrapping
function in charge of the GenericPrinter, and that functions in charge of
providing content should assume that everything is always written successfully.

This patch only look at the GenericPrinter methods, consumers of these functions
would be updated in subsequent patches.

Differential Revision: https://phabricator.services.mozilla.com/D181498
2023-09-20 17:00:08 +00:00
Nicolas B. Pierron f9ec219ed5 Bug 1839396 part 12 - Make Fprinter / LSPrinter short-circuit on previous errors. r=mgaudet
As we are going to remove the returned value, and to be extra cautious, we skip
future re-entry in case of previous failures.

Differential Revision: https://phabricator.services.mozilla.com/D181497
2023-09-20 17:00:07 +00:00
Nicolas B. Pierron 9d6070db8c Bug 1839396 part 11 - Make Sprinter put functions infallible. r=mgaudet
As functions are made infallible, only the 2 release functions are reporting
errors. The advantage of this approach is that the error reporting and checking
would only happen in the release functions calls in the future.  This enables
the upcoming set of patches to change the return type of put functions to make
them infallible, reduce the number of visible branches in debugging code.

This makes the Sprinter class more like a "Sink allocator", where the smell of
allocation failures does not propagate immediatly through the sinking water until
all the water has been through.

Differential Revision: https://phabricator.services.mozilla.com/D181496
2023-09-20 17:00:07 +00:00
Nicolas B. Pierron cfe89700c2 Bug 1839396 part 10 - Replace Sprinter::string by Sprinter::release. r=mgaudet
When using Sprinter::string, one assumes that out-of-memory errors have been
reported earlier. As the code is being converted to be infallible, the
out-of-memory is thus needed when the release function is called. This change
replaces all Sprinter::string by Sprinter::release and explicit the error
checking code path which would be relevant when the Sprinter::put function would
become infallible in follow-up patches.

Differential Revision: https://phabricator.services.mozilla.com/D181495
2023-09-20 17:00:07 +00:00
Nicolas B. Pierron 6766383903 Bug 1839396 part 9 - Add Sprinter::releaseJS. r=mgaudet
Sprinter::releaseJS centralize a mechanism which used in many places across the
JS engine, and replaces it with a single function call as well as democratising
the proper handling of UTF8 which might be added to Sprinter allocated strings.

Differential Revision: https://phabricator.services.mozilla.com/D181494
2023-09-20 17:00:06 +00:00
Nicolas B. Pierron b85cf38472 Bug 1839396 part 8 - Remove Sprinter::operator[]. r=mgaudet
Differential Revision: https://phabricator.services.mozilla.com/D181493
2023-09-20 17:00:06 +00:00
Nicolas B. Pierron f1a3fb648c Bug 1839396 part 7 - Update Sprinter::put to remove stringAt usage. r=mgaudet
Differential Revision: https://phabricator.services.mozilla.com/D181492
2023-09-20 17:00:05 +00:00
Nicolas B. Pierron 125f499b2c Bug 1839396 part 6 - Add Sprinter::length. r=mgaudet
Differential Revision: https://phabricator.services.mozilla.com/D181491
2023-09-20 17:00:05 +00:00
Nicolas B. Pierron 31c49a30c2 Bug 1839396 part 5 - Move GenericPrinter::flush after print/put functions. r=mgaudet
Differential Revision: https://phabricator.services.mozilla.com/D181490
2023-09-20 17:00:04 +00:00
Nicolas B. Pierron bcb716601c Bug 1839396 part 4 - ExpressionDecompiler::getOutput reuse Sprinter allocation. r=arai
Sprinter already create strings, and the ExpressionDecompiler duplicates this
logic to copy the content of the Sprinter buffer. While there is a benefit in
case we over-allocated ahead using Sprinter, this should still reduce the peak
memory allocation.

Differential Revision: https://phabricator.services.mozilla.com/D181489
2023-09-20 17:00:04 +00:00