Commit Graph

700198 Commits

Author SHA1 Message Date
Andreas Farre
36eaf82163 Bug 1620594 - Part 2: Use SchedulerGroup::Dispatch instead of SystemGroup::Dispatch. r=nika
Depends on D67631

Differential Revision: https://phabricator.services.mozilla.com/D67632

--HG--
extra : moz-landing-system : lando
2020-04-07 15:16:33 +00:00
Andreas Farre
63e21eec70 Bug 1620594 - Part 1: Rework NS_ReleaseOnMainThreadSystemGroup. r=nika
To be able to remove SystemGroup, NS_ReleaseOnMainThreadSystemGroup
needs to have its dependency on SystemGroup removed. Since all
releases using SystemGroup would've released on the main thread anyway
we can safely replace NS_ReleaseOnMainThreadSystemGroup with
NS_ReleaseOnMainThread.

Depends on D64390

Differential Revision: https://phabricator.services.mozilla.com/D67631

--HG--
extra : moz-landing-system : lando
2020-04-07 15:16:23 +00:00
Andreas Farre
3b813ea957 Bug 1618236 - Make CollectPerformanceInfo use BrowsingContextGroup to find DocGroups. r=tarek,peterv
By having CollectPerformanceInfo traverse the BrowsingContextGroup and
tree of BrowsingContexts we can hide the task of getting the DocGroups
befind an API in BrowsingContextGroup and ease the removal of
TabGroups.

Differential Revision: https://phabricator.services.mozilla.com/D64390

--HG--
extra : moz-landing-system : lando
2020-04-07 15:16:13 +00:00
Geoff Brown
18161bb12a Bug 1627992 - Convert some print statements to log calls; r=bc
Use self.log more consistently in runxpcshelltests.py (print is still used in main()).

Differential Revision: https://phabricator.services.mozilla.com/D70037

--HG--
extra : moz-landing-system : lando
2020-04-07 15:19:37 +00:00
Jason Laster
2c9d174131 Bug 1627108 - Worker threads are accidentally selected at startup. r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D69457

--HG--
extra : moz-landing-system : lando
2020-04-07 08:36:21 +00:00
Daosheng Mu
c56864f05a Bug 1627753 - Using signed long for index attribute in Gamepad. r=baku
Differential Revision: https://phabricator.services.mozilla.com/D69854

--HG--
extra : moz-landing-system : lando
2020-04-07 09:13:50 +00:00
Daniel Varga
2617f15d0c Backed out 8 changesets (bug 1603974) for causing build bustage
CLOSED TREE

Backed out changeset ee3fb8271709 (bug 1603974)
Backed out changeset 28ef741f8f65 (bug 1603974)
Backed out changeset 631725404fb8 (bug 1603974)
Backed out changeset 484a45d16149 (bug 1603974)
Backed out changeset 5d4cd3237ec0 (bug 1603974)
Backed out changeset c2601b5bdd3e (bug 1603974)
Backed out changeset fe96d48d5b14 (bug 1603974)
Backed out changeset 9467dffe8d04 (bug 1603974)
2020-04-07 18:35:04 +03:00
David Walsh
64d557e45a Bug 1626992 - Improve debugger flow coverage r=loganfsmyth
Differential Revision: https://phabricator.services.mozilla.com/D69236

--HG--
extra : moz-landing-system : lando
2020-04-07 13:25:23 +00:00
Jan de Mooij
6f5ae737ef Bug 1627255 part 2 - Rename the --enable-ion configure option to --enable-jit. r=glandium
For many years now this has covered all our JIT codegen, not just Ion, so this is
a lot less confusing. Using --enable-ion/--disable-ion now results in an error that
suggests the new name.

Differential Revision: https://phabricator.services.mozilla.com/D69579

--HG--
extra : moz-landing-system : lando
2020-04-07 14:52:33 +00:00
Jan de Mooij
7977c543bd Bug 1627255 part 1 - Remove the ENABLE_ION config item. r=glandium
These days we can get the same information by checking JS_CODEGEN_NONE, so let's
do that.

Differential Revision: https://phabricator.services.mozilla.com/D69578

--HG--
extra : moz-landing-system : lando
2020-04-07 08:34:27 +00:00
Toshihito Kikuchi
bf6e25daaa Bug 1603974 - Part 8: Use RedirectToNoOpEntryPoint for dgapi[64].dll. r=mhowell
Differential Revision: https://phabricator.services.mozilla.com/D68349

--HG--
extra : moz-landing-system : lando
2020-04-07 14:39:47 +00:00
Toshihito Kikuchi
c92df182f4 Bug 1603974 - Part 7: Introduce a new blocklist type RedirectToNoOpEntryPoint. r=mhowell
This patch introduces a new DLL blocklist type `RedirectToNoOpEntryPoint`
which hooks a DLL's entrypoint into a no-op function.  With this technique,
we give the injected DLL no chance to run its code though we allow it to be
loaded into the process.

This new blocklist type is intended to block a DLL which is injected by IAT
patching which was planted by a kernel callback routine for LoadImage.  It's
because blocking such a DLL makes a new process fail to launch.

Differential Revision: https://phabricator.services.mozilla.com/D68348

--HG--
extra : moz-landing-system : lando
2020-04-07 14:39:49 +00:00
Toshihito Kikuchi
f30b012bd4 Bug 1603974 - Part 6: Introduce Kernel32ExportsSolver. r=mhowell
This patch introduces `Kernel32ExportsSolver` which calculates RVAs of
kernel32's functions and transfers them to a target process, where the
transferred RVAs are resolved into function addresses.

Depends on D68346

Differential Revision: https://phabricator.services.mozilla.com/D68347

--HG--
extra : moz-landing-system : lando
2020-04-07 14:39:51 +00:00
Toshihito Kikuchi
9fe11cf59a Bug 1603974 - Part 5: Introduce WindowsDllEntryPointInterceptor. r=mhowell
This patch introduces a new DLL interceptor `WindowsDllEntryPointInterceptor`
which applies a hook to a target function without backing up the original
function code.

Depends on D68345

Differential Revision: https://phabricator.services.mozilla.com/D68346

--HG--
extra : moz-landing-system : lando
2020-04-07 14:39:54 +00:00
Toshihito Kikuchi
8219a28c40 Bug 1603974 - Part 4: Introduce MMPolicyInProcessEarlyStage. r=mhowell
This patch introduces a new policy `MMPolicyInProcessEarlyStage` which does
not consume any functions imported from kernel32.dll so that we can use it
in a process's early stage i.e. before IAT is resolved.

Depends on D68344

Differential Revision: https://phabricator.services.mozilla.com/D68345

--HG--
extra : moz-landing-system : lando
2020-04-07 14:39:56 +00:00
Toshihito Kikuchi
55af68b7d2 Bug 1603974 - Part 3: Extract a patching operation from CreateTrampoline. r=mhowell
`WindowsDllDetourPatcher::CreateTrampoline` does not only create a trampoline
region but also applies a patch on an original function.  This patch extracts
the patching part as separate functions.

Depends on D68343

Differential Revision: https://phabricator.services.mozilla.com/D68344

--HG--
extra : moz-landing-system : lando
2020-04-07 14:40:04 +00:00
Toshihito Kikuchi
b5969e8a0f Bug 1603974 - Part 2: Move PEHeaders from CheckBlockInfo to IsDllAllowed. r=mhowell
This patch moves the instantiation of `PEHeaders` from `CheckBlockInfo` to
`IsDllAllowed` so that `IsDllAllowed` can use an instance of `PEHeaders`.

Depends on D68342

Differential Revision: https://phabricator.services.mozilla.com/D68343

--HG--
extra : moz-landing-system : lando
2020-04-07 14:40:07 +00:00
Toshihito Kikuchi
18f97f01b8 Bug 1603974 - Part 1: Implement nt::VirtualQuery consuming only ntdll.dll. r=mhowell
This patch introduces `nt::VirtualQuery` which consumes only ntdll's functions
to reduce dependency in `MMPolicy` on kernel32.dll.  With this, `MMPolicy` still
depends on kernel32.dll, that will be solved by a coming patch.

Differential Revision: https://phabricator.services.mozilla.com/D68342

--HG--
extra : moz-landing-system : lando
2020-04-07 14:40:14 +00:00
Dave Townsend
2bdbc2936b Bug 1621116: Make the version and build ID of the previous instance of Firefox to use the current profile available. r=froydnj,glandium
We cache this information in compatibility.ini so we can just expose it on
nsIXULRuntime.

Differential Revision: https://phabricator.services.mozilla.com/D66112

--HG--
extra : moz-landing-system : lando
2020-04-07 08:23:32 +00:00
Andrew Swan
d99492aca4 Bug 1625181 Skip over unneeded work when installing system/builtin addons r=zombie
We don't put system addons on the blocklist so there's no need to compute
blocklist state for them.  The immediate motivation for this is to avoid
initializing the blocklist early in startup for the initial startup in a
new profile or after a browser upgrade when we're installing/udpating
system and builtin addons.

Differential Revision: https://phabricator.services.mozilla.com/D68443

--HG--
extra : moz-landing-system : lando
2020-04-07 13:31:29 +00:00
Emilio Cobos Álvarez
0b00e7edf3 Bug 1579824 - Make the cell-highlight colors the same as highlight. r=snorp
They're supposed to be the same, though right now they are black on white
because only highlight was overridden via prefs.

I'll fix the bugs I found yesterday in a separate bug.

Depends on D69939

Differential Revision: https://phabricator.services.mozilla.com/D69940

--HG--
extra : moz-landing-system : lando
2020-04-07 13:54:26 +00:00
Emilio Cobos Álvarez
c5991fc6cc Bug 1579824 - Stop overriding system colors via prefs. r=snorp
Depends on D69938

Differential Revision: https://phabricator.services.mozilla.com/D69939

--HG--
extra : moz-landing-system : lando
2020-04-07 13:54:41 +00:00
Emilio Cobos Álvarez
027067ffbb Bug 1579824 - Hardcode some system colors. r=snorp
This doesn't change behavior, just makes the color return what we set right now
via prefs in mobile/android/app/mobile.js.

Differential Revision: https://phabricator.services.mozilla.com/D69938

--HG--
extra : moz-landing-system : lando
2020-04-07 13:55:01 +00:00
André Bargull
2d970e9c2f Bug 1627618 - Part 20: Change MBitNot to always specialise to Int32. r=jandem
Same deal as with the previous parts, changes `MBitNot` to always specialise as
`Int32` and removes any code which handled non-Int32 specialisation.

Differential Revision: https://phabricator.services.mozilla.com/D69800

--HG--
extra : moz-landing-system : lando
2020-04-07 13:58:36 +00:00
André Bargull
c3c83282da Bug 1627618 - Part 19: Don't call the always-inline UrshOperation in some places. r=jandem
Noticed while working on the previous part:
`js::UrshOperation()` is marked as `MOZ_ALWAYS_INLINE`, but these callers don't
need to use the inlined version and instead should use `js::UrshValues()`.

Differential Revision: https://phabricator.services.mozilla.com/D69799

--HG--
extra : moz-landing-system : lando
2020-04-07 08:43:18 +00:00
André Bargull
5193ad4687 Bug 1627618 - Part 18: Remove no longer used codegen for non-number binary bitwse instructions. r=jandem
Removes the codegen support for non-number binary bitwse instructions.

The if-statements conditions in `Lowering.cpp` were changed to test `ins->type()`
instead of `lhs->type()` to match the binary arithmetic lowering code.

Differential Revision: https://phabricator.services.mozilla.com/D69798

--HG--
extra : moz-landing-system : lando
2020-04-07 08:42:15 +00:00
André Bargull
718cf9edc8 Bug 1627618 - Part 17: Remove MBinaryBitwiseInstruction which handles non-number specialisations. r=jandem
'MBinaryBitwiseInstruction` is now only used for number specialisations, so we
can remove any non-number specialisation code.

Differential Revision: https://phabricator.services.mozilla.com/D69797

--HG--
extra : moz-landing-system : lando
2020-04-07 08:41:47 +00:00
André Bargull
3fb2ff637f Bug 1627618 - Part 16: Remove MBinaryBitwiseInstruction::specializeAs. r=jandem
Remove `MBinaryBitwiseInstruction::specializeAs()` and instead directly set the
specialisation in the `MBinaryBitwiseInstruction` constructor.

For BitAnd, BitOr, and BitXor also set the "commutative" flag in the constructor.

Differential Revision: https://phabricator.services.mozilla.com/D69796

--HG--
extra : moz-landing-system : lando
2020-04-07 08:41:22 +00:00
André Bargull
569eef9d41 Bug 1627618 - Part 15: Set specialisation within MBinaryBitwiseInstruction constructor calls. r=jandem
Similar to the earlier `MBinaryArithInstruction` changes, directly set the number
specialisation when constructing a `MBinaryBitwiseInstruction` node.

That way we no longer have to call `setInt32Specialization()` and
`setCommutative()` manually after constructing a binary bitwise instruction.

Differential Revision: https://phabricator.services.mozilla.com/D69795

--HG--
extra : moz-landing-system : lando
2020-04-07 08:40:57 +00:00
André Bargull
5a1fd8e7e4 Bug 1627618 - Part 14: Add MUrsh::NewWasm for MUrsh users in wasm code. r=jandem
Similar to `MAdd::NewWasm` and `MSub::NewWasm` from earlier patches,
add a separate `MUrsh::NewWasm` function to handle wasm-specific
initialisation for `MUrsh`.

That frees up the `MUrsh(MDefinition, MDefinition, MIRType)` constructor to
only set the specialisation without performing any wasm-specific actions.

Differential Revision: https://phabricator.services.mozilla.com/D69794

--HG--
extra : moz-landing-system : lando
2020-04-07 08:40:27 +00:00
André Bargull
e9cbe2bedf Bug 1627618 - Part 13: Remove MBinaryBitwiseInstruction::infer(). r=jandem
The different `infer()` overrides were all testing that the operands are
"simple bit-operands", but as demonstrated in the last part, we were no longer
calling `infer()` with non-simple bit-operands.

Instead let's effectively inline `infer()` and set the appropriate flags for
the individual MIR nodes:

- BitAnd, BitOr, BitXor: `MBinaryBitwiseInstruction::specializeAs()` isn't a
  public method, so we have to call `setInt32Specialization()` and
  `setCommutative()` separately. (At least for now, later patches will clean
  this up.)
- Lsh and Rsh: Call `setInt32Specialization()` to set the return type and the
  specialisation, similar to what happened in `MShiftInstruction::infer()`.
- Ursh: Add `MUrsh::setDoubleSpecialization()` as a temporary mean to set the
  Double specialisation. Otherwise handle it similar to Lsh and Rsh.

Differential Revision: https://phabricator.services.mozilla.com/D69793

--HG--
extra : moz-landing-system : lando
2020-04-07 08:40:01 +00:00
André Bargull
26a437d723 Bug 1627618 - Part 12: Inline binaryBitOpEmit into its single caller. r=jandem
Inline `binaryBitOpEmit()` into `binaryBitOpTrySpecialized()`. This makes it
easier to see that both operands are "simple bit-operands" when applying this
optimisation.

This change is useful for the next part, which will remove
`MBinaryBitwiseInstruction::infer()`, because `infer()` also tests that the
operands are "simple bit-operands".

Differential Revision: https://phabricator.services.mozilla.com/D69792

--HG--
extra : moz-landing-system : lando
2020-04-07 08:39:31 +00:00
André Bargull
588fa97c72 Bug 1627618 - Part 11: Remove constant argument from IonBuilder::binaryBitOpEmit. r=jandem
`IonBuilder::binaryBitOpEmit()` is always called with `specialization == Int32`,
so we can remove the specialisation parameter and instead directly handle it
within `binaryBitOpEmit()`.

Differential Revision: https://phabricator.services.mozilla.com/D69791

--HG--
extra : moz-landing-system : lando
2020-04-07 08:39:06 +00:00
André Bargull
feda2b8c46 Bug 1627618 - Part 10: Remove no longer used codegen for non-number binary arith instructions. r=jandem
MBinaryArithInstruction no longer uses non-number specialisations, so we can
remove the codegen support for it.

Differential Revision: https://phabricator.services.mozilla.com/D69790

--HG--
extra : moz-landing-system : lando
2020-04-07 08:38:39 +00:00
André Bargull
00146cee44 Bug 1627618 - Part 9: Use setSpecialization when setting MBinaryArithInstruction specialisation. r=jandem
Update callers which modify the MBinaryArithInstruction specialisation to use
`setSpecialization()`, which asserts the new specialisation is definitely a
number type.

Differential Revision: https://phabricator.services.mozilla.com/D69789

--HG--
extra : moz-landing-system : lando
2020-04-07 08:38:11 +00:00
André Bargull
7cfc36ed21 Bug 1627618 - Part 8: Remove MBinaryArithInstruction which handles non-number specialisations. r=jandem
The last part ensures that MBinaryArithInstruction always uses a number
specialisation, so we can now remove any code which handles non-number
specialisations for MBinaryArithInstruction.

Differential Revision: https://phabricator.services.mozilla.com/D69788

--HG--
extra : moz-landing-system : lando
2020-04-07 08:37:56 +00:00
André Bargull
d5ad442497 Bug 1627618 - Part 7: Set MBinaryArithInstruction specialisation in the constructor. r=jandem
Set the specialisation and the return type directly in `MBinaryArithInstruction`.

Also assert that the specialisation is definitely a number type.

Differential Revision: https://phabricator.services.mozilla.com/D69787

--HG--
extra : moz-landing-system : lando
2020-04-07 09:12:42 +00:00
André Bargull
b5dd4e308b Bug 1627618 - Part 6: Remove no longer used MBinaryArithInstruction sub-class constructors without a specialisation type. r=jandem
`MAdd`, `MSub`, `MMul`, `MDiv`, and `MMod` are no longer called without a
number specialisation, so we can remove these constructors.

Differential Revision: https://phabricator.services.mozilla.com/D69785

--HG--
extra : moz-landing-system : lando
2020-04-07 08:37:30 +00:00
André Bargull
dcc49bdb1f Bug 1627618 - Part 5: Directly set specialisation when calling MBinaryArithInstruction::New. r=jandem
Instead of manually adjusting the specialisation in `IonBuilder::binaryArithEmitSpecialized()`,
directly pass it to `MBinaryArithInstruction::New()`.

The constructor changes in the previous parts made it possible to pass `MIRType`
to the `MAdd` and `MSub` constructors.

Differential Revision: https://phabricator.services.mozilla.com/D69783

--HG--
extra : moz-landing-system : lando
2020-04-07 08:37:20 +00:00
André Bargull
dfc520a2f2 Bug 1627618 - Part 4: Replace calls to setInt32Specialization for MAdd. r=jandem
The new `MAdd` and `MSub` constructors with a `MIRType` argument can be used
in these places to directly set the return type and the specialisation. That
way we no longer have to call `setInt32Specialization()` manually.

`MMul` already has a compatible constructor which the desired semantics, so
we can remove the `setInt32Specialization()` call here, too.

Differential Revision: https://phabricator.services.mozilla.com/D69781

--HG--
extra : moz-landing-system : lando
2020-04-07 08:35:58 +00:00
André Bargull
530df1cf02 Bug 1627618 - Part 3: Add MSub::NewWasm for MSub users in wasm code. r=jandem
Similar to the previous part, add `MSub::NewWasm` to handle the wasm-specific
initialisation bits, so that `MSub(MDefinition, MDefinition, MIRType)` only
sets the return type and the specialisation.

Differential Revision: https://phabricator.services.mozilla.com/D69780

--HG--
extra : moz-landing-system : lando
2020-04-07 08:35:32 +00:00
André Bargull
3a85148fe9 Bug 1627618 - Part 2: Add MAdd::NewWasm for MAdd users in wasm code. r=jandem
Add `MAdd::NewWasm` similar to how we have a separate `MMul:NewWasm` function.

For wasm we want to default to `MDefinition::Truncate` and set the "commutative"
flag for Int32 values.

This frees up the `MAdd(MDefinition, MDefinition, MIRType)` to only set the
specialisation and the return type, which will be required for later patches to
work correctly.

Differential Revision: https://phabricator.services.mozilla.com/D69779

--HG--
extra : moz-landing-system : lando
2020-04-07 08:35:07 +00:00
André Bargull
37d0520732 Bug 1627618 - Part 1: Add MAdd with truncate parameter. r=jandem
Later patches will require a constructor with the signature
`MAdd(MDefinition, MDefinition, MIRType)`, which neither sets the truncation
mode nor sets the "commutative" flag. Both things happen with the existing
constructor which has a compatible signature and which is currently called
for the use sites modified in this patch. (The existing constructor is the
one directly appearing before the newly added one.)

The existing constructor defaults to `MDefinition::Truncate` and all callers to
that constructor use the `MIRType::Int32` specialisation. Because all callers
use `MIRType::Int32`, we can omit the type parameter for the new constructor.

The existing constructor is also called from WasmIonCompile, the next part will
handle that caller.

Differential Revision: https://phabricator.services.mozilla.com/D69778

--HG--
extra : moz-landing-system : lando
2020-04-07 08:35:25 +00:00
André Bargull
8346f51250 Bug 1626297 - Part 7: Remove MToNumber. r=jandem
Depends on D69519

Differential Revision: https://phabricator.services.mozilla.com/D69942

--HG--
extra : moz-landing-system : lando
2020-04-07 13:15:27 +00:00
André Bargull
1c9bdaae93 Bug 1626297 - Part 6: Check for string indices in MacroAssembler::convertValueToInt. r=jandem
Ion doesn't use ICs for bit-not `~` with String inputs, which resulted in
`+int32AsString` being noticeably faster than `~~int32AsString`. Handling
string indices makes `~~int32AsString` faster than the IC code, which is what
we'd normally expect.

Drive-by change:
- Reuse `SimpleBitOpOperand()` for `bitnotTrySpecialized()`.

Differential Revision: https://phabricator.services.mozilla.com/D69519

--HG--
extra : moz-landing-system : lando
2020-04-07 08:35:25 +00:00
André Bargull
2d35373468 Bug 1626297 - Part 5: Add CacheIR support for unary operators with string inputs. r=jandem
- `emitGuardAndGetNumberFromString()` was changed to use `ScratchDoubleScope`,
  because `FloatReg0` isn't available for Unary ICs. (Lowering doesn't reserve it.)
- `unaryArithTrySpecializedOnBaselineInspector()` now needs to filter String
  values to avoid bailouts.

Differential Revision: https://phabricator.services.mozilla.com/D69518

--HG--
extra : moz-landing-system : lando
2020-04-07 08:32:52 +00:00
André Bargull
c9b37b5f1a Bug 1626297 - Part 4: Add direct String-to-Int32 CacheIR opcode. r=jandem
Directly convert Strings to Int32 to make `+int32AsString` faster and to be
able to have narrower type information for Ion/Warp. Without this change the
unary String ICs for Int32 results from the next part are actually slower than
the ICs for Double results.

`emitGuardAndGetInt32FromString()` is based on the existing
`emitGuardAndGetNumberFromString()` method.

Differential Revision: https://phabricator.services.mozilla.com/D69517

--HG--
extra : moz-landing-system : lando
2020-04-07 08:32:24 +00:00
André Bargull
62b33a2b61 Bug 1626297 - Part 3: Add IC support for JSOp::Pos. r=jandem
I've went with `LoadInt32Result` and `LoadDoubleResult` to match the existing
`LoadObjectResult` CacheIR opcode.

The arguments `jsop_binary_arith()` in `IonBuilder::jsop_pos()` needed to be
swapped to match the requirements in `arithUnaryBinaryCache()`.

Differential Revision: https://phabricator.services.mozilla.com/D69516

--HG--
extra : moz-landing-system : lando
2020-04-07 09:03:23 +00:00
André Bargull
31ef188cb5 Bug 1626297 - Part 2: Add assertions to unary operator ic-code. r=jandem
`tryAttachNumber()` can actually assert the result is a number when the input
is a number.

Differential Revision: https://phabricator.services.mozilla.com/D69515

--HG--
extra : moz-landing-system : lando
2020-04-07 08:31:34 +00:00
André Bargull
d69eb02954 Bug 1626297 - Part 1: Clean-up unary operator function callers. r=jandem
vm/Interpreter-inl.h:
- `IncOperation()` and `DecOperation()` should use a non-mutable handle for their
  `val` parameter.

vm/Interpreter.cpp:
- It's not necessary to create two mutable handles for the same input value.

jit/BaselineIC.cpp:
jit/IonIC.cpp:
- Only when caling `BitNot()` and `NegOperation()` we need to copy the input value.

Differential Revision: https://phabricator.services.mozilla.com/D69514

--HG--
extra : moz-landing-system : lando
2020-04-07 08:31:26 +00:00