XPCWrappedNativeScope is now allocated and destroyed with the CompartmentPrivate
that owns it. In follow-up bugs we could merge the two classes (see bug 1032928).
This also removes the dying-scopes list. XPCJSRuntime now stores the list of all
scopes as mozilla::LinkedList.
Differential Revision: https://phabricator.services.mozilla.com/D22492
--HG--
extra : moz-landing-system : lando
This adds new code to provide the module-relative initial function offset for
each function, and adds checks that the bytecode / code offsets are correct.
Differential Revision: https://phabricator.services.mozilla.com/D22141
--HG--
rename : third_party/rust/cranelift-codegen-meta/src/base/settings.rs => third_party/rust/cranelift-codegen-meta/src/shared/settings.rs
rename : third_party/rust/cranelift-codegen-meta/src/base/types.rs => third_party/rust/cranelift-codegen-meta/src/shared/types.rs
extra : rebase_source : fd70523925d5d0655917bd9068f7ed35836c714a
extra : histedit_source : e64727d7be746dc3f327909db83f091602e259a9%2Cfc2a4335c2adada30a265a50fa76ef75a2b00bad
The structure layout was incorrectly computed because of the reference, meaning
that the data located after the reference was incorrect. In particular, it
means the minimal memory size wasn't correctly read. This works around it by
using a pointer, and rename a few function parameters to make their role
clearer.
Differential Revision: https://phabricator.services.mozilla.com/D22139
--HG--
extra : rebase_source : 77d341968bd40df311b49aeeebe12437ca0d6c57
Changes to decoding, dispatch, and encoding to handle a uint32_t
representation for the secondary opcode.
Also a drive-by fix to remove an orphaned enum in WasmTypes.h
Differential Revision: https://phabricator.services.mozilla.com/D22295
--HG--
extra : rebase_source : 6d598437e69fb93b722a9df9b48ab8d36897070f
extra : histedit_source : 92c6aa6ada4d8c6f8616945af8839205749d3b92
Renamed the test to reflect that it is really just a test of the script preloader
as well. I just moved it to get it close to the ScriptPreloader and near existing
tests.
Differential Revision: https://phabricator.services.mozilla.com/D22330
--HG--
rename : testing/marionette/harness/marionette_harness/tests/unit/test_startup_caches.py => js/xpconnect/tests/marionette/test_preloader_telemetry.py
extra : moz-landing-system : lando
- Add separate function to import fixture files instead of treating them like
test files. This simplifies the code structure a bit and avoids unnecessary
output spew, because the test262 test record parser no longer complains about
missing yaml frontmatter.
- Write reftest terms into a new test262/jstests.list file for raw tests.
- Allow including nested jstests.list files in _parse_external_manifest.
Differential Revision: https://phabricator.services.mozilla.com/D21677
--HG--
extra : moz-landing-system : lando
This flag is only used by IonAnalysis and rarely so it should be
computed there instead of in all script/function code paths.
Differential Revision: https://phabricator.services.mozilla.com/D22432
--HG--
extra : moz-landing-system : lando
Split into one part for JSScript internal initialization of flags and a
second part for linking the JSFunction and JSScript only after the
script is fully initialized.
Depends on D22322
Differential Revision: https://phabricator.services.mozilla.com/D22323
--HG--
extra : moz-landing-system : lando
When compiling a script with lazy inner functions, we now know the
scopes that those inner functions belong too and need to save this
information on the inner function itself (as enclosingScope). This patch
makes that process more explicit in JSScript initialization so we can
better reason about error / OOM paths.
Depends on D22319
Differential Revision: https://phabricator.services.mozilla.com/D22320
--HG--
extra : moz-landing-system : lando
Use an ExitScope similar to to XDRScript for more consistency.
Depends on D22316
Differential Revision: https://phabricator.services.mozilla.com/D22317
--HG--
extra : moz-landing-system : lando
Compute this flag directly from BytecodeEmitter data structures instead
of needing to access the partially initialized script while setting its
own flags.
Depends on D22313
Differential Revision: https://phabricator.services.mozilla.com/D22315
--HG--
extra : moz-landing-system : lando
This removes the redundant set of TreatAsRunOnce which is instead set by
CompileOptions before we start compiling. The IsModule flag is now set
directly similar to IsForEval.
Differential Revision: https://phabricator.services.mozilla.com/D22313
--HG--
extra : moz-landing-system : lando
Debugger or OOM errors can close the generator after JSOP_ASYNCAWAIT enqueued
a promise job for AsyncFunctionResume. Change AsyncFunctionResume to handle
this case and also try to reject the result promise with the pending OOM error
if possible.
Differential Revision: https://phabricator.services.mozilla.com/D22301
--HG--
extra : moz-landing-system : lando
- Remove nullptr checks for `calleeTemplate` because it can't be null for
function frames.
- Always skip over `InterpretGeneratorResume` to ensure baseline sees the same
number of debugger enter-frame events as interpreter.
Differential Revision: https://phabricator.services.mozilla.com/D22299
--HG--
extra : moz-landing-system : lando
Atomic tests are invalid in the ARM64 Simulator, because it lacks proper atomics emulation.
Differential Revision: https://phabricator.services.mozilla.com/D22307
--HG--
extra : moz-landing-system : lando
The previous patch makes both String.prototype.matchAll and Symbol.matchAll
unconditional features.
This patch was made by first making the changes to test262-update.py, then
re-running it against the test262 revision already indicated by
js/src/tests/test262/GIT-INFO: `python test262-update.py --revision
59b89a1c834faadc359aecc882587b513877b59b`.
Depends on D22370
Differential Revision: https://phabricator.services.mozilla.com/D22371
--HG--
extra : moz-landing-system : lando
No pref; the feature is not risky or complicated enough to warrant it. It's
easy enough to back this out if need be.
Differential Revision: https://phabricator.services.mozilla.com/D22370
--HG--
extra : moz-landing-system : lando
"browser.firstrun.*" seems to have been unused since the end of XUL-based
Fennec, whereas the code referencing the "browser.snippets.*" prefs was removed
in bug 1482836.
Differential Revision: https://phabricator.services.mozilla.com/D20862
--HG--
extra : moz-landing-system : lando
They're only used in CodeGenerator.cpp so we can now move some of the helper
classes and templates from the header file to the cpp file.
Differential Revision: https://phabricator.services.mozilla.com/D22278
--HG--
extra : moz-landing-system : lando
Bulk memory operations can be enabled at the same time Cranelift is, in which
case partial initialization of elements/segments/etc. implementation is
statically implemented, but dynamically controlled by wasmBulkMemoryOps().
Cranelift doesn't implement bulk memory operations yet, so wasmBulkMemoryOps()
returns false, while the static behavior is there. Thus, we have to temporarily
disable partial initialization tests when running with Cranelift. This will go
away when Cranelift supports bulk memory operations.
Differential Revision: https://phabricator.services.mozilla.com/D22271
--HG--
extra : moz-landing-system : lando
In bug 1264235 we have some indication that observed bugs with the
startup cache might have been resolved, but we don't really know
until we collect data. Collecting these stats will give us the
ability to have more certainty that the startup cache is functioning
correctly in the wild.
Differential Revision: https://phabricator.services.mozilla.com/D19573
--HG--
extra : moz-landing-system : lando
The tab_test() would compile and link the module for every element of
the result array, but the module should be invariant for the result
array, so this is not necessary.
Differential Revision: https://phabricator.services.mozilla.com/D21933
--HG--
extra : rebase_source : f17933261df6f2c36100a77dee1b9d7d735cd9d9
extra : histedit_source : 962b579d49b386130beccb7096da286c8c811d48
Our bounds checking is a little too stringent - we disallow
zero-length operations at the edge of the memory, table, or segment,
but the spec allows that, a behavior inherited (from active segments)
from the MVP. It's also a natural consequence of how we handle bounds
checks for non-zero length operations.
So loosen the tests slightly and adapt the test cases, testing both at
the edge of the table/memory/segment and one past that. In the former
case we allow the operation, in the latter not.
Differential Revision: https://phabricator.services.mozilla.com/D21929
--HG--
extra : rebase_source : 0e236edf655c6a35b5dfbf2f535b197a283a7c20
extra : histedit_source : 221e3ca5d35056f02182fcc34a45df53114ddebf
Also removes the old callVM overload so new code in BaselineCompiler must use
the new mechanism.
Differential Revision: https://phabricator.services.mozilla.com/D22059
--HG--
extra : moz-landing-system : lando
We had multiple overloads for js::Throw so I renamed the one we call here
for JSOP_THROW to js::ThrowOperation.
Differential Revision: https://phabricator.services.mozilla.com/D22058
--HG--
extra : moz-landing-system : lando
This was specialised so that it wouldn't crash on mobile wouldn't crash
when: SubChunkLimit + SubChunkStepstep > NurseryChunkUsableSize becase
NurseryChunkUsableSize is smaller on mobile.
However Bug 1530575 reduced the value of SubChunkStep so now we no-longer
need to specialise SubChunkLimit. We never tested the impact of
SubChunkLimit on mobile so it's just simpler to have one value.
Differential Revision: https://phabricator.services.mozilla.com/D21645
--HG--
extra : moz-landing-system : lando
Avoid assertion failures with this test by adding finishgc() calls.
Add finisgc() shell builtin functions.
Differential Revision: https://phabricator.services.mozilla.com/D21644
--HG--
extra : moz-landing-system : lando
InitGetterSetterOperation had multiple overloads, I renamed them to
InitPropGetterSetterOperation and InitElemGetterSetterOperation.
Differential Revision: https://phabricator.services.mozilla.com/D21686
--HG--
extra : moz-landing-system : lando
Remove the `if (!mozilla::IsPointer<T>::value || thing)` check in
GCVariantImplementation::trace, as GCPolicy will dispatch these to
GCPointerPolicy and InternalPointerPolicy (for pointers) and StructGCPolicy (for
non-pointers).
Also use Rooted for prevState_ in AutoSetNewObjectMetadata and remove
inherit from CustomAutoRooter.
The CacheIR code only sees transparent CCWs so it's fine to do a static unwrap.
DebuggerObject::unwrap is more complicated. We're in the debugger's compartment
there; I went with UnwrapOneCheckedStatic as it seems safest and simplest for
now.
Differential Revision: https://phabricator.services.mozilla.com/D21354
--HG--
extra : moz-landing-system : lando
I've only added support for these, renamed in a couple of error
messages and a few test cases, not renamed all the uses, because there
are so many. Will file followup bugs for that work, but it won't be
urgent.
Note, wabt no longer recognizes get_local et al, it requires local.get
etc. But we should remain backward compatible for a long while still.
Differential Revision: https://phabricator.services.mozilla.com/D21502
--HG--
extra : rebase_source : b78b23ee5edb6121da6884b1bf36336e07ea82ef
Wabt is now supporting funcref exclusively, and with the reftypes
proposal I think there's broad agreement that we will stop using
anyfunc. So let's accept funcref both in the text format and in the
table creation dictionary, and let's use this name as the canonical
name in error messages and similar.
But let's also continue to accept anyfunc, since there may be
in-flight tests and other content that uses it. This includes a
couple of emscripten-compiled benchmarks currently in the repo; I
chose not to change those.
Differential Revision: https://phabricator.services.mozilla.com/D21388
--HG--
extra : rebase_source : 078ffbac2c3d88b2ce74fdcf06493b4db8000dac
StackMapGenerator::createStackMap() creates stack maps in the wasm baseline
compiler. For release builds, it first performs a check to determine whether
the stackmap would describe only non-ref words, and if so, exits without
creating the map, since the map would be useless.
To make the check cheaper, it is inexact but safe, so it sometimes causes a
map to be created even though it is unnecessary. Specifically, the vector
|extras|, which may contain a description of exit stub register save
locations, is regarded as possibly-contributing-refs if it is merely
non-empty. The actual contents are not checked. This causes creation of
33,688 unnecessary stack maps in the Tanks test case, probably one for each
function.
The fix is simple. Actually check every element of |extras| to see if any are
|true|. This makes the test exact, removes all unnecessary map creation, and
reduces the Tanks compile cost from 2.43 billion instructions to 2.39 billion
instructions. That is, the shortcut was overall a loss anyway, presumably due
to the extra costs incurred by the pointless stackmap creation.
--HG--
extra : rebase_source : 4990f28ec6d3d50e289432572c79a6ca105aecc3
Add an RAII guarded initialization for the IO interposer to the
initialization process for xpc shell tests. This ensures that whenever
an xpcshell tests uses the IOInterposer, that it will correctly
catch all registered threads, and will not miss any.
Differential Revision: https://phabricator.services.mozilla.com/D20736
--HG--
extra : moz-landing-system : lando
We are doing this to:
1) Eliminate (hundreds of) static constructors. These account for a significant
fraction of all remaining static constructors in Gecko.
2) Use constexpr for VMFunction data. This was not possible with the linked list
but the new design stores all data in a constexpr array. This will save a few
KB per process.
3) Make it easier to define a new VMFunction.
4) Coalesce duplicate VMFunction copies in Baseline/Ion/ICs.
5) Get rid of the (read-only) HashMap for the VMFunction => code lookup. We can
use a Vector instead.
6) Make it easier in the future to generate the wrappers at compile time.
This patch will let us incrementally convert the remaining VM functions. The
only thing not handled by this patch is support for the TailCall and
extraValuesToPop fields. We can do this when we convert the Baseline IC code
that uses these fields.
Once all VM functions have been converted we can remove and simplify more code.
Differential Revision: https://phabricator.services.mozilla.com/D21332
--HG--
extra : moz-landing-system : lando
This was useful when we had ExclusiveContext and PJS ThreadSafeContext but now we
only use JSContext* so it's simpler to just use that.
Differential Revision: https://phabricator.services.mozilla.com/D21331
--HG--
extra : moz-landing-system : lando