There was some case that IsIdentifier check is missing after readIdentifierName.
Moved the check to readIdentifierName itself.
Differential Revision: https://phabricator.services.mozilla.com/D22647
--HG--
extra : moz-landing-system : lando
This also changes a few functions to follow the `unwrapped` convention.
This does not do the job thoroughly for our whole implementation of promises
and async generators; but the patch casts enough light that I can see what I'm
doing in part 2.
Differential Revision: https://phabricator.services.mozilla.com/D21815
--HG--
extra : moz-landing-system : lando
This adds an overload of GetInitialHeap that takes an ObjectGroup* instead of a Class* and also takes into account whether the group's shouldPreTenure flag is set. I moved this to JSObject-inl.h too.
I removed the heap parameter in a few places, in particular in NewDenseCopyOnWriteArray which required a bunch of changes elsewhere including the JITs. I left the heap parameter intact for environment objects where we may have reason prefer these objects to be allocated in the tenure heap. It's possible we should just remove all these parameters too and make allocation more uniform.
Differential Revision: https://phabricator.services.mozilla.com/D22324
--HG--
extra : source : 1b4fd78107e2bcf7fe0f44038176ca745b07cd88
`CompartmentPrivate::GetScope()` was added so callers don't have to do `scope.get()`
manually. The `scope` field is now private and was renamed to `mScope`.
Also replaces some `CompartmentPrivate::Get(obj)->scope` instances with
`ObjectScope(obj)`. It's equivalent but shorter.
Differential Revision: https://phabricator.services.mozilla.com/D22664
--HG--
extra : moz-landing-system : lando
And add more assertions to document implicit requirements about opcode lengths.
Depends on D22670
Differential Revision: https://phabricator.services.mozilla.com/D22671
--HG--
extra : moz-landing-system : lando
This introduces features in the jsrust crate, so we can enable/disable
compilation for a specific platform at compile-time. It also does only select
the architecture targeted by the JIT, which should result in slightly lower
compilation times on every platform, and lower binary sizes too.
Differential Revision: https://phabricator.services.mozilla.com/D22280
--HG--
extra : moz-landing-system : lando
This adds the basic infrastructure and uses it for some Math natives and the
Array constructor.
Differential Revision: https://phabricator.services.mozilla.com/D20340
--HG--
extra : moz-landing-system : lando
This patch attempts to make things clearer by renaming the functions used for allocating objects and strings to AllocateObject and AllocateString, rather than having everything be called Allocate. Allocate is still used for atoms though which is a little strange but was hard to change.
Differential Revision: https://phabricator.services.mozilla.com/D22275
--HG--
extra : moz-landing-system : lando
This patch ensures that resetOsiPointRegs will not be called on safepoints
associated with Wasm code, in CodeGenerator::generateBody.
--HG--
extra : rebase_source : adba60818120db23026be1e63fb1a808d28c4af1
This also makes sure that ValueType::PrivateGCThing isn't used, similar to ValueType::Magic.
Differential Revision: https://phabricator.services.mozilla.com/D22007
--HG--
extra : moz-landing-system : lando
This introduces features in the jsrust crate, so we can enable/disable
compilation for a specific platform at compile-time. It also does only select
the architecture targeted by the JIT, which should result in slightly lower
compilation times on every platform, and lower binary sizes too.
Differential Revision: https://phabricator.services.mozilla.com/D22280
--HG--
extra : moz-landing-system : lando
* Moves NewArrayWithGroup from CodeGenerator.cpp to builtin/Array.cpp
* GetProperty has various overloads so I added GetValueProperty. I considered
*renaming* that GetProperty overload to GetValueProperty but there are quite
a lot of callers in VM code where GetProperty is probably closer to the spec
language.
* Ion called js::GetElement and js::CallElement which forwarded to GetElementOperation.
This was changed to call GetElementOperation directly (eliminates a VM wrapper).
Depends on D22677
Differential Revision: https://phabricator.services.mozilla.com/D22678
--HG--
extra : moz-landing-system : lando
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