Ran across this while adding `--feature-args`. jstests.py and jit_test.py both
accept `--args`, but with slightly different behavior. The two test runners
should behave the same, as much as reasonably possible. In this case
jit_test.py is doing it right; parsing a string of command-line arguments by
splitting on spaces is not the best idea.
(Alas, this does not fix the ludicrous restriction that `skip-if` expressions
can't have spaces in them.)
Differential Revision: https://phabricator.services.mozilla.com/D25858
--HG--
extra : moz-landing-system : lando
Regular `--args` are ignored when running a `skip-if` or `slow-if` test; these are not.
Differential Revision: https://phabricator.services.mozilla.com/D25856
--HG--
extra : moz-landing-system : lando
The JSOP_NEWTARGET code for non-arrow functions now uses cmov instead of an if-else. This is
a bit simpler (especially for the interpreter) and shorter and I didn't see any difference
in performance in some Baseline new.target micro-benchmarks.
Differential Revision: https://phabricator.services.mozilla.com/D22971
--HG--
extra : moz-landing-system : lando
We might uplift these patches to beta. Having a JitOption makes it easier to
turn this off if needed.
Differential Revision: https://phabricator.services.mozilla.com/D25754
--HG--
extra : moz-landing-system : lando
For Baldr and Rabaldr, bug 1528983 moved some way towards centralising
information about argument and return types of instance-function calls, with
the aim of having a single point-of-truth for such information.
Unfortunately the functions in Baldr that create instance function calls (in
WasmIonCompile.cpp) still state explicitly the type of each argument, despite
having to hand the relevant SymbolicAddressSignature. Hence they state these
types redundantly and potentially in conflict with the single-point-of-truth
version.
This patch changes all relevant calls to passArg() so that they pull the
argument type out of the SymbolicAddressSignature rather than pass it ad-hoc.
It also changes passInstance() to take the first argument type, for
assertional purposes only.
Differential Revision: https://phabricator.services.mozilla.com/D25805
--HG--
extra : moz-landing-system : lando
The nursery uses capacity_ == 0 to determine if it is disabled. This patch
avoids setting the capacity to zero by requring the minimum size to be at
least ArenaSize (usually 1 page).
Differential Revision: https://phabricator.services.mozilla.com/D25717
--HG--
extra : moz-landing-system : lando
Mechanical change from Matcher::match(...) to Matcher::operator()(...).
This will now permit the use of generic lambdas, and facilitate the
implementation of multi-lambda match.
Differential Revision: https://phabricator.services.mozilla.com/D24889
--HG--
extra : moz-landing-system : lando
Fallback code is now generated (as a single JitCode instance) when we create the
JitRuntime.
In ICScript::Create we can now allocate the fallback stubs directly (we no
longer need a Compiler class for each fallback stub) because we no longer have
to handle the compile-code case.
Differential Revision: https://phabricator.services.mozilla.com/D24360
--HG--
extra : moz-landing-system : lando
The text format of the instructions wrap, extend, trunc, convert, demote,
promote, and reinterpret was changed recently to make them more consistent.
Signedness now appears after the type; e.g. trunc_f32_s instead of trunc_s/f32.
Also, local.tee can now be used besides tee_local.
See https://github.com/WebAssembly/wabt/issues/933 for reference.
Differential Revision: https://phabricator.services.mozilla.com/D25540
--HG--
extra : moz-landing-system : lando
1. Adding a new attribute chromeContext in ConsoleEvent
2. Adding a new boolean attribute isFromChromeContext in nsIConsoleMessage
3. Sending IsFromChromeContext to the parent process
Differential Revision: https://phabricator.services.mozilla.com/D23330
--HG--
extra : moz-landing-system : lando
Record the size of allocation in crashreporter to determine if these are
genuine small OOM or if something problematic has happened.
Differential Revision: https://phabricator.services.mozilla.com/D25152
--HG--
extra : moz-landing-system : lando
Using the same flags as JSScript gives a consistent story of how to
handle flag preservation (in XDR and other cases). This also provides
consistent naming of flags which cover the same concept and will make it
simpler to inherit flags in de-lazification.
The LazyScript::packedFieldsForXDR concept exactly matches immutable
flags behaviour (which is on purpose). As a result of the split we don't
need to manually reset runtime flags in LazyScript::CreateRaw.
Differential Revision: https://phabricator.services.mozilla.com/D23402
--HG--
extra : moz-landing-system : lando
The Span abstraction lets us use range-based iteration and simplifies
changes if we move where the underlying data is stored.
Differential Revision: https://phabricator.services.mozilla.com/D23403
--HG--
extra : moz-landing-system : lando
The ARM64 Simulator can take upwards of 6 minutes to execute this test, causing intermittent timeouts.
Differential Revision: https://phabricator.services.mozilla.com/D25391
--HG--
extra : moz-landing-system : lando
This removes a couple of unnecessary uses of Prebarriered<> and improves comments in places where it is required. I removed a bunch of unused typesdefs from Barrier.h and tidied up.
Left shifts exhibit undefined behavior if the sign bit changes, which
would happen in this code for indices that are 31 mod 32. Fix this by
always making sure the shifted value is an unsigned integer.
Differential Revision: https://phabricator.services.mozilla.com/D25476
--HG--
extra : moz-landing-system : lando
This ensures the JS shell and browser behave the same way and it's nice for fuzzing.
Differential Revision: https://phabricator.services.mozilla.com/D25204
--HG--
extra : moz-landing-system : lando
1. If an object needs a custom function to |write|, it will be added to |memory|
in |JSStructuredCloneWriter| before calling the custom function. But in
JSStructuredCloneReader::startRead we did the opposite. This will cause
out-of-order if the custom function also writes some objects (e.g.
WriteStructuredCloneImageData). We fix this by keeping the same order in
|startRead|.
2. |JS_WriteTypedArray| should not call |writeTypedArray| directly, because it
will miss an entry in |memory| for the typed array itself. We fix this by calling
|startWrite| instead.
Differential Revision: https://phabricator.services.mozilla.com/D24670
--HG--
extra : moz-landing-system : lando
This was causing test failures in some uncommon try configurations like fuzzing.
Depends on D24208
Differential Revision: https://phabricator.services.mozilla.com/D25253
--HG--
extra : moz-landing-system : lando
Replacing values defined as constants in Unicode.h in the CharacterEncoding.cpp file
Differential Revision: https://phabricator.services.mozilla.com/D24601
--HG--
extra : moz-landing-system : lando
Ion can do aggressive inlining, but inlining a lot of code has a negative
effect on compilation time and memory usage. It also means we spend more time
in the slower Baseline code while compiling the Ion code off-thread or after an
invalidation.
To address this, Ion now consists of two tiers:
* Normal: the first tier (warm-up threshold of 1,000) only inlines small
functions one level deep. This tier also has recompile checks to
recompile the script when it becomes very hot.
* Full: the second tier (warm-up threshold of 100,000) is only used for very
hot code so we can afford inlining a lot more code.
This improves Speedometer and GDocs by more than 5%.
Differential Revision: https://phabricator.services.mozilla.com/D24159
--HG--
extra : moz-landing-system : lando
The old code would assert because we needed too many scratch registers, but it
was dead code until this patch.
Differential Revision: https://phabricator.services.mozilla.com/D24158
--HG--
extra : moz-landing-system : lando
We want this to be more than 100 for the full-optimizations tier. Making this
relative also works better for tests that set a small Ion warm-up threshold.
Also disables OSR in some tests depending on the old behavior.
Differential Revision: https://phabricator.services.mozilla.com/D24157
--HG--
extra : moz-landing-system : lando
Also adds a javascript.options.ion.full.threshold browser pref and similar shell
flags.
This doesn't rename the existing prefs yet.
Differential Revision: https://phabricator.services.mozilla.com/D24156
--HG--
extra : moz-landing-system : lando
In bug 256180, the size of the stack on 64-bit Windows was changed from 2MB to
8MB, and on 32-bit Windows, from 1MB to 1.5MB. This is so large that it takes
significantly longer for a runaway recursive function to throw "too much
recursion", which causes terrible performance in scripts obfuscated using
obfuscator.io.
This patch leaves the actual stack size as-is, but changes the
JS-engine-specific stack quota back to 2MB on 64-bit Windows (6MB if ASAN is
enabled). 32-bit Windows is unaffected by the new cap.
Differential Revision: https://phabricator.services.mozilla.com/D24597
--HG--
extra : moz-landing-system : lando
There's a lot of complexity around setting/unsetting the eagerCompilation flag.
It's simpler to determine this based on the warm-up threshold being 0.
The patch also fixes some jit-tests where this patch would result in a change in
behavior.
Differential Revision: https://phabricator.services.mozilla.com/D24155
--HG--
extra : moz-landing-system : lando
Storing this also in IonOptimizationLevels.h/cpp is more complicated than
necessary.
Differential Revision: https://phabricator.services.mozilla.com/D24154
--HG--
extra : moz-landing-system : lando
We used to have a different threshold for small functions but now they're both
set to 1000 so there's no need to special-case small functions.
Differential Revision: https://phabricator.services.mozilla.com/D24153
--HG--
extra : moz-landing-system : lando
Since this mode covers both incremental and zonal GC, let's rename it to
reflect that. JSGC_MODE_ZONE_INCREMENTAL.
Differential Revision: https://phabricator.services.mozilla.com/D24849
--HG--
extra : moz-landing-system : lando