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

78667 Коммитов

Автор SHA1 Сообщение Дата
Sylvestre Ledru c320561565 Bug 1519636 - Reformat recent changes to the Google coding style r=andi
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D89392
2020-09-08 04:32:00 +00:00
Tom Schuster e703e7e06b Bug 1663260 - Support primitive Number toString in CacheIR. r=anba
Depends on D89307

Differential Revision: https://phabricator.services.mozilla.com/D89308
2020-09-07 06:46:50 +00:00
Tom Schuster 982321bc49 Bug 1663260 - Support primitive String toString and valueOf in CacheIR. r=anba
Differential Revision: https://phabricator.services.mozilla.com/D89307
2020-09-07 06:46:43 +00:00
Benjamin Bouvier 30820e3a4b Bug 1661016: aarch64: slightly refactor the check that membarrier is available; r=lth
Depends on D89366

Differential Revision: https://phabricator.services.mozilla.com/D89367
2020-09-07 12:21:02 +00:00
Benjamin Bouvier 49433c644a Bug 1663030: include unistd.h in MozCpu-vixl.cpp on Android too; r=lth
This includes the declaration of the syscall(2) function.

Differential Revision: https://phabricator.services.mozilla.com/D89366
2020-09-07 12:19:10 +00:00
Jan de Mooij 43d1e791ad Bug 1663401 - Add ARM64 implementation of Pop(FloatRegister). r=evilpie
We were hitting the MOZ_CRASH when running jit-tests or Fenix with Warp enabled.

Differential Revision: https://phabricator.services.mozilla.com/D89356
2020-09-07 11:09:01 +00:00
Mihai Alexandru Michis c3eb196d93 Backed out changeset abee121f64e7 (bug 1662404) for causing lint failures in MozCachingDecoder.h
CLOSED TREE
2020-09-07 13:41:49 +03:00
Benjamin Bouvier 93dfd9ae85 Bug 1662404: arm64 simulator: move mozilla-specific files in arm64/ and clang-format them; r=nbp
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D88977
2020-09-07 10:29:29 +00:00
Jon Coppeard fb11d9f496 Bug 1662502 - Rename some methods on GC wrapped pointers to 'unbarriered' rather than 'unsafe' r=sfink
This should clarify why they are unsafe.

Also rename the overlong 'unsafeUnbarrieredForTracing' to 'unbarrieredAddress'
to be more like Rooted::address and since it is used outside of tracing in a
couple of places.

Differential Revision: https://phabricator.services.mozilla.com/D89012
2020-09-02 19:32:25 +00:00
Jon Coppeard 49959262e5 Bug 1662502 - Refactor barrier implemenations r=sfink
This moves the default barrier implementations for the pre and read barriers to
the Cell base class and combines the existing post barrier implemenations in to
a single function.

Differential Revision: https://phabricator.services.mozilla.com/D89011
2020-09-02 19:30:23 +00:00
Kannan Vijayan bc06456993 Bug 1662260 - OOM check in parser. r=mgaudet
Differential Revision: https://phabricator.services.mozilla.com/D89071
2020-09-03 15:35:39 +00:00
Iain Ireland 4e76abb6ce Bug 1661728: Add testcase r=jandem
This testcase is a bit fragile to changes in warmup thresholds. It might be nice if we added a testing function to trial-inline a function on-demand.

Differential Revision: https://phabricator.services.mozilla.com/D89215
2020-09-03 07:41:38 +00:00
Simon Giesecke 5cacc3e1dc Bug 1661502 - Make Result move-only. r=froydnj,jandem
Differential Revision: https://phabricator.services.mozilla.com/D88443
2020-09-02 17:56:23 +00:00
Tom Schuster 0786bf636a Bug 1662852 - Fix crash in CacheIRSpewer when writing failed. r=caroline
This happens when using the logger on youtube.com.
The written CacheIR code is not actually valid when writing failed, so we crash.

Differential Revision: https://phabricator.services.mozilla.com/D89195
2020-09-02 21:11:46 +00:00
Jan de Mooij 4832e93faf Bug 1662645 - Don't emit Baseline OOL post-barrier code if it's not used. r=iain
Differential Revision: https://phabricator.services.mozilla.com/D89097
2020-09-02 14:51:16 +00:00
Iain Ireland d12c86aa57 Bug 1661728: Remove ICScript::jitScript_ r=jandem
The bug here occurs when we:
a) Trial-inline A into B, creating an ICScript owned by B with a pointer to A's JitScript.
b) Perform a compacting GC, discarding the JitScript for A, but preserving the JitScript for B (because it is on the stack).
c) Create a new JitScript for A.
d) Warp-compile B, without hitting the B->A trial-inlined call IC.

In this case, the `JitScript*` stored in the ICScript created in `a)` is dangling, and does not match the JitScript created in `c)`.

The easy way to fix this is to not store a `JitScript*` here in the first place. We only use `ICScript::jitScript_` to:
a) Tell whether the ICScript is inlined, which can be done more easily by looking at the depth.
b) Find the `FallbackICStubSpace` for non-inlined ICScripts.

If we use the depth to tell when an ICScript is inlined, then we don't need a pointer to find the owning JitScript (and therefore its stub space) for non-inlined ICScripts. Non-inlined ICScripts are embedded inside a JitScript, so we can compute the offset directly.

Differential Revision: https://phabricator.services.mozilla.com/D88690
2020-08-31 12:52:47 +00:00
Steve Fink 98eb6c1864 Bug 1661410 - Post-barrier writes to TypedObject string references r=jandem
Differential Revision: https://phabricator.services.mozilla.com/D88466
2020-09-02 19:25:03 +00:00
Nathan Froyd cfb8fb313f Bug 1662251 - stop assigning from NS_Convert* values, mostly; r=sg
This patch was generated by running:

```
perl -p -i \
     -e 's/^(\s+)([a-zA-Z0-9.]+) = NS_ConvertUTF8toUTF16\((.*)\);/\1CopyUTF8toUTF16(\3, \2);/;' \
     -e 's/^(\s+)([a-zA-Z0-9.]+) = NS_ConvertUTF16toUTF8\((.*)\);/\1CopyUTF16toUTF8(\3, \2);/;' \
     $FILE
```

against every .cpp and .h in mozilla-central, and then fixing up the
inevitable errors that happen as a result of matching C++ expressions with
regexes.  The errors fell into three categories:

1. Calling the convert functions with `std::string::c_str()`; these were
   changed to simply pass the string instead, relying on implicit conversion
   to `mozilla::Span`.
2. Calling the convert functions with raw pointers, which is not permitted
   with the copy functions; these were changed to invoke `MakeStringSpan` first.
3. Other miscellaneous errors resulting from over-eager regexes and/or the
   replacement not being type-aware.  These changes were reverted.

Differential Revision: https://phabricator.services.mozilla.com/D88903
2020-09-02 09:54:37 +00:00
Razvan Maries eae150a880 Backed out 5 changesets (bug 1661457, bug 1661428, bug 1661497, bug 1661502) for build bustages on Result.h. CLOSED TREE
Backed out changeset fbf42b3b51f3 (bug 1661428)
Backed out changeset 83f3f36d540f (bug 1661457)
Backed out changeset 8a9dce0d08ce (bug 1661502)
Backed out changeset 733df139089a (bug 1661497)
Backed out changeset fca770fc0956 (bug 1661428)
2020-09-02 19:44:47 +03:00
Jon Coppeard d11d13b94c Bug 1661766 - Simplify representation of slots/element ranges on the mark stack r=sfink. CLOSED TREE
This stores slots/element ranges as object and start index rather than having
two separate representations (one used during marking, one when we yield to the
mutator during marking). It's possible that this could affect marking
performance but we'll catch that by checking the mark rate telemetry. This
should also reduce the size needed for the mark stack a little.

Differential Revision: https://phabricator.services.mozilla.com/D88723
2020-09-02 08:47:52 +00:00
Simon Giesecke d4179392a0 Bug 1661502 - Make Result move-only. r=froydnj,jandem
Differential Revision: https://phabricator.services.mozilla.com/D88443
2020-09-02 16:23:01 +00:00
Razvan Maries 31e4fc673b Backed out changeset f90f01b99ece (bug 1662260) for build bustages on bug-1662260.js. CLOSED TREE 2020-09-02 18:09:48 +03:00
Kannan Vijayan 46acd070ab Bug 1662260 - OOM check in parser. r=mgaudet DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D89071
2020-09-01 23:50:15 +00:00
Benjamin Bouvier 219501d3c5 Bug 1662705: Add an `--help` dependency to the JS simulator option; r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D89126
2020-09-02 12:37:33 +00:00
Gurzau Raul d5ffb485ad Backed out changeset da45331c242c (bug 1661766) for wpt failure on timestamp.html on a CLOSED TREE. 2020-09-02 15:24:53 +03:00
Benjamin Bouvier 557609e365 Bug 1662668: Test for the presence of a simulator when enabling Cranelift; r=lth
Differential Revision: https://phabricator.services.mozilla.com/D89109
2020-09-02 09:02:46 +00:00
Jon Coppeard f23e218e38 Bug 1661766 - Simplify representation of slots/element ranges on the mark stack r=sfink
This stores slots/element ranges as object and start index rather than having
two separate representations (one used during marking, one when we yield to the
mutator during marking). It's possible that this could affect marking
performance but we'll catch that by checking the mark rate telemetry. This
should also reduce the size needed for the mark stack a little.

Differential Revision: https://phabricator.services.mozilla.com/D88723
2020-09-02 08:47:52 +00:00
Benjamin Bouvier a976c16222 Bug 1660944: Use Cranelift by default for wasm compilation on aarch64; r=lth
Differential Revision: https://phabricator.services.mozilla.com/D88396
2020-09-02 08:17:36 +00:00
Benjamin Bouvier e16e5f0a18 Bug 1661016: aarch64: Invalidate icache when compiling on a background thread; r=nbp,lth
On real hardware, when a background thread finishes compilation, it must signal
to the other executing threads that they need to reload a new version of the
code. Ideally, each executing thread would run an ISB instruction to do so. We
hereby use a system call membarrier that interrupts every other running thread,
and will cause the same effect as a local ISB would. It is heavyweight, so we
make sure to only run it in the case where we're on a background thread.

In the simulator, pending icache flushing requests were never satisfied before
this patch, when the request was emitted from a thread other than the main
thread. Similar behavior as above is emulated.

Differential Revision: https://phabricator.services.mozilla.com/D88395
2020-09-02 08:17:33 +00:00
Jan de Mooij cbc5eb3bd9 Bug 1662366 part 7 - Some MBoxNonStrictThis optimizations. r=anba
This adds an OOL path to handle null/undefined => globalThis without a VM call.
IonBuilder optimizes that case based on TI and this ensures we're not a lot slower
for that.

Also give the MIR instruction an empty AliasSet so we can optimize it better in
inlined functions. We no longer have the thisValue hook mentioned in the comment.

Differential Revision: https://phabricator.services.mozilla.com/D88974
2020-09-02 07:39:37 +00:00
Jan de Mooij 287b183550 Bug 1662366 part 6 - Trace cloned CacheIR stub data. r=iain
Initially the plan was to reuse TraceCacheIRStub but this patch adds the tracing
code for Warp separately because:

* CacheIR stub data in Warp contains nursery indexes. It's nice to keep that out of the IC-tracing code.
* We can use WarpGCPtr similar to other snapshotted GC pointers. It asserts GC things are not moved.

Differential Revision: https://phabricator.services.mozilla.com/D88965
2020-09-02 07:35:15 +00:00
Jan de Mooij 70f4e1f948 Bug 1662366 part 5 - Print CompileInfo pointer in WarpCacheIR::dumpData. r=iain
Longer-term more CompileInfo fields should be moved into WarpSnapshot, we can
then dump these fields.

Depends on D88963

Differential Revision: https://phabricator.services.mozilla.com/D88964
2020-09-01 15:35:38 +00:00
Jan de Mooij 26af3accda Bug 1662366 part 4 - Rename some TODOs to TODO(post-Warp). r=iain
Depends on D88962

Differential Revision: https://phabricator.services.mozilla.com/D88963
2020-09-01 15:35:05 +00:00
Jan de Mooij 61e6f7db24 Bug 1662366 part 3 - Remove/rename some TODOs in WarpBuilder. r=iain
Use TODO(post-Warp) for TODOs that can only be addressed when IonBuilder is gone.

Remove some TODOs that are no longer relevant or don't need to be addressed
short-term.

Depends on D88961

Differential Revision: https://phabricator.services.mozilla.com/D88962
2020-09-02 07:30:34 +00:00
Jan de Mooij cc3e1eb429 Bug 1662366 part 2 - Call setImplicitlyUsedUnchecked for JSOp::ToString. r=iain
Allowlisting this op in the checker is wrong because we don't want a
MagicValue to show up for JSOp::ToString in Baseline.

Depends on D88960

Differential Revision: https://phabricator.services.mozilla.com/D88961
2020-09-01 15:25:18 +00:00
Jan de Mooij 3f78c1c5fd Bug 1662366 part 1 - Remove some TODOs in WarpOracle. r=iain
The ones in maybeInlineIC have been addressed. The one about extra var environments
isn't really a TODO for Warp specifically.

Also change the stub data copying to just use nullptr if there's no stub data.
This is fairly common for simpler IC stubs.

Differential Revision: https://phabricator.services.mozilla.com/D88960
2020-09-01 15:23:01 +00:00
Tooru Fujisawa 3478b236f8 Bug 1658971 - Part 13: Remove JSContext* field from CompilationInfo. r=tcampbell
Differential Revision: https://phabricator.services.mozilla.com/D88613
2020-09-01 23:52:42 +00:00
Tooru Fujisawa 8334256472 Bug 1658971 - Part 12: Add JSContext* parameter to RealmInstrumentation::getInstrumentationKindName. r=tcampbell
Differential Revision: https://phabricator.services.mozilla.com/D88612
2020-09-01 23:52:35 +00:00
Tooru Fujisawa 527c5a4c08 Bug 1658971 - Part 11: Add JSContext* parameter to ParserAtomToResumeKind. r=tcampbell
Differential Revision: https://phabricator.services.mozilla.com/D88611
2020-09-01 23:52:27 +00:00
Tooru Fujisawa e82ab62e18 Bug 1658971 - Part 10: Add JSContext* parameter to Int32ToParserAtom and NumberToParserAtom. r=tcampbell
Differential Revision: https://phabricator.services.mozilla.com/D88610
2020-09-01 23:52:19 +00:00
Tooru Fujisawa c0365679aa Bug 1658971 - Part 9: Add JSContext* field to FoldVisitor and FoldInfo. r=tcampbell
Differential Revision: https://phabricator.services.mozilla.com/D88609
2020-09-01 23:52:10 +00:00
Tooru Fujisawa 4e8d257ace Bug 1658971 - Part 8: Add JSContext* parameter to liftParserAtomToJSAtom and lowerJSAtomToParserAtom. r=tcampbell
Differential Revision: https://phabricator.services.mozilla.com/D88608
2020-09-01 23:52:02 +00:00
Tooru Fujisawa 7b926b0020 Bug 1658971 - Part 7: Use CompilationInput.enclosingScope in GCThingList::getScope. r=tcampbell
Differential Revision: https://phabricator.services.mozilla.com/D88607
2020-09-01 23:51:54 +00:00
Tooru Fujisawa cbf462e163 Bug 1658971 - Part 6: Add JSContext* parameter to Smoosh::compileGlobalScript*. r=tcampbell
Differential Revision: https://phabricator.services.mozilla.com/D88606
2020-09-01 23:51:47 +00:00
Tooru Fujisawa 2289962f8e Bug 1658971 - Part 5: Add JSContext* field to TokenStreamAnyChars. r=tcampbell
Differential Revision: https://phabricator.services.mozilla.com/D88605
2020-09-01 23:51:44 +00:00
Tooru Fujisawa 0cf72ff50b Bug 1658971 - Part 4: Add JSContext* parameter to SourceAwareCompiler and subclasses methods. r=tcampbell
Differential Revision: https://phabricator.services.mozilla.com/D88604
2020-09-01 23:51:37 +00:00
Tooru Fujisawa e603770e80 Bug 1658971 - Part 3: Add JSContext* parameter to ParseModuleToStencil. r=tcampbell
Differential Revision: https://phabricator.services.mozilla.com/D88603
2020-09-01 23:51:29 +00:00
Tooru Fujisawa 038fa9f061 Bug 1658971 - Part 2: Add JSContext* parameter to CompileGlobalScript* and InstantiateStencils. r=tcampbell
Differential Revision: https://phabricator.services.mozilla.com/D88602
2020-09-01 23:51:22 +00:00
Tooru Fujisawa fbd7e031b2 Bug 1658971 - Part 1: Store self-hosting global scope in CompilationInput.enclosingScope. r=tcampbell
Differential Revision: https://phabricator.services.mozilla.com/D88601
2020-09-02 01:39:25 +00:00
Tooru Fujisawa cdda495ffc Bug 1658631 - Part 11: Perform ModuleObject::Freeze in CompilationInfo::instantiateStencils if instantiating on main thread. r=tcampbell
Differential Revision: https://phabricator.services.mozilla.com/D88600
2020-09-01 23:51:12 +00:00