Commit Graph

75062 Commits

Author SHA1 Message Date
Csoregi Natalia
6360b24e80 Backed out 2 changesets (bug 1616630) for Android bustage. CLOSED TREE
Backed out changeset 15016546c954 (bug 1616630)
Backed out changeset dcb7dc51633b (bug 1616630)
2020-02-20 21:24:11 +02:00
Steve Fink
f8716a1bc0 Bug 1614518 - Quote shell commands properly r=ahal
Differential Revision: https://phabricator.services.mozilla.com/D62386

--HG--
extra : moz-landing-system : lando
2020-02-13 02:25:24 +00:00
Steve Fink
f30d0d3f35 Bug 1614518 - Allow using declaration order for listing subcommands in help output, and allow commands to be hidden. r=ahal
Differential Revision: https://phabricator.services.mozilla.com/D62385

--HG--
extra : moz-landing-system : lando
2020-02-20 18:28:26 +00:00
Steve Fink
6c335b53f8 Bug 1614518 - Implement mach hazards command set for running the GC rooting hazard analysis. r=ahal,jonco,froydnj
Differential Revision: https://phabricator.services.mozilla.com/D62384

--HG--
extra : moz-landing-system : lando
2020-02-20 18:27:50 +00:00
Matthew Gaudet
8f0a2c316b Bug 1616909 - Return a copy of SourceExtent, not a reference r=djvj
Differential Revision: https://phabricator.services.mozilla.com/D63518

--HG--
extra : moz-landing-system : lando
2020-02-20 18:03:52 +00:00
Mike Shal
39492660f4 Bug 1616630 - Use py3_action for GENERATED_FILES that already support it; r=firefox-build-system-reviewers,kvark,rstewart
Depends on D63437

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

--HG--
extra : moz-landing-system : lando
2020-02-20 16:21:55 +00:00
Simon Giesecke
9350e6b741 Bug 1613985 - Use MOZ_COUNTED_DEFAULT_CTOR_*/MOZ_COUNTED_DTOR_* macros. r=froydnj
This removes the need for explicit #ifdef NS_BUILD_REFCNT_LOGGING without
introducing user-defined destructors when it is not defined.

Also, some uses of virtual for declaring destructors are replaced by the
appropriate override declaration through these changes.

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

--HG--
extra : moz-landing-system : lando
2020-02-20 11:40:14 +00:00
Jon Coppeard
21292e4991 Bug 1616230 - Enable weakref JS reftests in the browser r=jandem
This implements the special clearKeptObjects() function for the browser and turns on the pref to allow the tests to run.

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

--HG--
extra : moz-landing-system : lando
2020-02-20 10:41:27 +00:00
Jon Coppeard
6218dfbbcd Bug 1616230 - Make clearKeptObjects a testing function rather than shell only so we can use it for test262 tests r=sfink
Differential Revision: https://phabricator.services.mozilla.com/D63221

--HG--
extra : moz-landing-system : lando
2020-02-20 10:41:27 +00:00
Jon Coppeard
2370379a75 Bug 1616277 - Avoid unintentially changing the contents of the weak ref map while sweeping r=sfink
Depends on D63188

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

--HG--
extra : moz-landing-system : lando
2020-02-18 19:16:20 +00:00
Jon Coppeard
aacd2f0563 Bug 1616272 - Assert that HeapPtr::init is only called to initialize uninitialized HeapPtrs r=jandem
Added assertion and removed unnecessary (and incorrect) use of this via ObjectGroup's finalizer.

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

--HG--
extra : moz-landing-system : lando
2020-02-19 16:37:09 +00:00
Tooru Fujisawa
ef9bcd5079 Bug 1616221 - Align some BinAST classes to pointer. r=Yoric
Differential Revision: https://phabricator.services.mozilla.com/D63180

--HG--
extra : moz-landing-system : lando
2020-02-18 17:58:11 +00:00
Jan de Mooij
873d792d37 Bug 1616188 part 4 - Add a --no-ti shell flag. r=iain
For now this is Nightly-only so that IsTypeInferenceEnabled() shouldn't
impact performance for our non-Nightly users.

Depends on D63143

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

--HG--
extra : moz-landing-system : lando
2020-02-19 04:13:25 +00:00
Jan de Mooij
60ca7892a4 Bug 1616188 part 3 - Add isTypeInferenceEnabled() function, use it to disable some jit-tests. r=iain
Also fix the getWaitForAllPromise testing function to not use IsPackedArray
because that depends on type information and caused test failures.

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

--HG--
extra : moz-landing-system : lando
2020-02-19 04:13:25 +00:00
Jan de Mooij
f7c7509bbd Bug 1616188 part 2 - Use IsTypeInferenceEnabled to disable parts of heap TI. r=iain
Unlike stack type monitoring, heap TI is much harder to disable completely
because it's intertwined with a lot of other things. This patch does the
following:

* Don't track type information for any ObjectGroups (in ObjectGroupRealm::makeGroup).

* Turn off heuristics for singletons, allocation-site groups, function groups.

* Turn off type update ICs in Baseline.

* Add early returns to some hot functions.

Depends on D63140

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

--HG--
extra : moz-landing-system : lando
2020-02-19 09:33:56 +00:00
Jan de Mooij
5d67f5573d Bug 1616188 part 1 - Add IsTypeInferenceEnabled and use it for type monitoring code. r=iain
If TI is disabled we don't allocate any StackTypeSets in JitScript and we don't
allocate/use type monitor ICs.

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

--HG--
extra : moz-landing-system : lando
2020-02-19 17:37:06 +00:00
Matthew Gaudet
ce89df8306 Bug 1615728 - Use SourceExtent instead of passing around long arg lists r=djvj
Differential Revision: https://phabricator.services.mozilla.com/D63272

--HG--
extra : moz-landing-system : lando
2020-02-19 23:03:12 +00:00
Matthew Gaudet
6efd509896 Bug 1615728 - Move SourceExtent outside of JSScript r=djvj
Differential Revision: https://phabricator.services.mozilla.com/D63271

--HG--
extra : moz-landing-system : lando
2020-02-19 23:02:39 +00:00
Matthew Gaudet
582499a40a Bug 1615728 - Create SourceExtent struct for JSScript r=djvj
Differential Revision: https://phabricator.services.mozilla.com/D63270

--HG--
extra : moz-landing-system : lando
2020-02-19 23:02:35 +00:00
Iain Ireland
e8c2dabed9 Bug 1616374: Update comment DONTBUILD r=jwalden
Differential Revision: https://phabricator.services.mozilla.com/D63244

--HG--
extra : moz-landing-system : lando
2020-02-19 22:40:14 +00:00
Jeff Walden
04ea63a633 Bug 1615600 - Use a better error message for when an attempt is made to convert a non-integer number to a BigInt. r=wingo
Differential Revision: https://phabricator.services.mozilla.com/D63282

--HG--
extra : moz-landing-system : lando
2020-02-19 10:33:17 +00:00
Dorel Luca
d5f9df8ee1 Backed out 2 changesets (bug 1613985) for Build bustage on Windows2012. CLOSED TREE
Backed out changeset fd177b40b561 (bug 1613985)
Backed out changeset fb6d62b7f28d (bug 1613985)
2020-02-19 22:22:41 +02:00
Simon Giesecke
59b23375c0 Bug 1613985 - Use MOZ_COUNTED_DEFAULT_CTOR_*/MOZ_COUNTED_DTOR_* macros. r=froydnj
This removes the need for explicit #ifdef NS_BUILD_REFCNT_LOGGING without
introducing user-defined destructors when it is not defined.

Also, some uses of virtual for declaring destructors are replaced by the
appropriate override declaration through these changes.

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

--HG--
extra : moz-landing-system : lando
2020-02-19 18:05:38 +00:00
Tooru Fujisawa
611da7b1e3 Bug 1614261 - Add -g option to JS shell dis() to dump GC things. r=jorendorff
Differential Revision: https://phabricator.services.mozilla.com/D62188

--HG--
extra : moz-landing-system : lando
2020-02-19 15:49:01 +00:00
André Bargull
4b5a502154 Bug 1616057: Remove no longer used self-hosted intrinsics and definitions. r=mgaudet
Differential Revision: https://phabricator.services.mozilla.com/D63080

--HG--
extra : moz-landing-system : lando
2020-02-19 10:16:35 +00:00
Lars T Hansen
5dd2428621 Bug 1609916 - Callback from SC to DOM on SAB cloning. r=luke
When structured clone reads a SAB and creates a new SAB object, or
when it serializes a SAB onto a channel, call a callback that lets the
embedder know.  The embedder can then adjust its policy.  Concretely,
we want to allow the browser to serialize threads in a process that
uses JS shared memory.

Note, for WebAssembly.Memory, reading and writing are delegated to the
cloning operations for SAB, so no special handling is needed.

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

--HG--
extra : moz-landing-system : lando
2020-02-19 09:25:52 +00:00
Logan Smyth
0e86789568 Bug 1601171 - Part 4: Run all debugger hooks, even if some return resumption values. r=jimb
We do not want explicitly-returned completion values to cause later hooks
to be skipped, because consumers of the Debugger API need to be confident that
their code will not be silently skipped because some entirely unrelated
code instructed the debuggee to throw/return/terminate.

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

--HG--
extra : moz-landing-system : lando
2020-02-19 09:12:21 +00:00
Logan Smyth
2753b9102b Bug 1601171 - Part 3: Run all debugger hooks, even if some throw uncaught exceptions. r=jimb
We want each hook to run in sequence, and we do not want the failure of one
hook to cause later hooks to skip execution. Doing so would make it difficult
for consumers of the Debugger API to be confident that their hooks will be
consistently executed, since entirely independent code could otherwise cause
their logic to be silently skipped.

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

--HG--
extra : moz-landing-system : lando
2020-02-19 08:45:11 +00:00
Logan Smyth
707ba2147c Bug 1601171 - Part 2: Do not use previous onPop completion to update the value passed to the next hook. r=jimb
Our goal is to guarantee that each hook observes the same state of the
debuggee itself unless explicit action is taken to change debugee state.
By passing this value along as we have been doing until now, we make it
impossible for later hooks to see the actual return value that the debuggee
code returned, which could be quite frustrating for debugger.

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

--HG--
extra : moz-landing-system : lando
2020-02-19 08:44:06 +00:00
Logan Smyth
6c1abe76e4 Bug 1601171 - Part 1: Pull the frame's generator from the frame directly. r=jimb
Just a quick cleanup. There's no reason for this value to be pulled into the
completion and then back out again right away. It is much simplier to access
the generator directly.

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

--HG--
extra : moz-landing-system : lando
2020-02-19 08:43:07 +00:00
Logan Smyth
da250a6456 Bug 1602429 - Part 6: Centralize debugger hook realm enter and error reporting. r=jimb
Switching the hook-dispatching logic to use the common bool-returning result
value allows us to easily centralize error reporting and debugger-realm-enter
such that we don't need to worry so much about how the error is handled.

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

--HG--
extra : moz-landing-system : lando
2020-02-19 09:04:47 +00:00
Logan Smyth
4843a6453f Bug 1602429 - Part 5: Wait to wrap debugger resumption values. r=jimb
Moving the location that the values are wrapped allows us to remove the need
for Maybe<AutoRealm> in favor of a normal RAII AutoRealm, which makes it much
easier to follow what realm is currently active.

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

--HG--
extra : moz-landing-system : lando
2020-02-19 08:41:30 +00:00
Logan Smyth
873c7e6275 Bug 1602429 - Part 4: Reimplement processParsedHandlerResult with less ResumeMode. r=jimb
This changes processHandlerResult to use the common bool-returning approach
used elsewhere in the codebase, which helps to simplify a lot of the code
because we can cleanly separate errors from explicitly-requested ResumeMode
values.

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

--HG--
extra : moz-landing-system : lando
2020-02-19 08:55:16 +00:00
Logan Smyth
2387883131 Bug 1602429 - Part 3: Centralize leaveDebugger calls. r=jimb
This avoids duplicating logic between processParsedHandlerResult and
processHandlerResult since both are quite similar.

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

--HG--
extra : moz-landing-system : lando
2020-02-19 08:39:45 +00:00
Logan Smyth
dc44f791f1 Bug 1602429 - Part 2: Merge GetThisValueForCheck into CheckResumptionValue. r=jimb
Merging these the logic to fetch the `this` value and validate it into the same
function makes all of this code much more readable. We get to keep the frame
and pc values as a neater pair this way, and avoid needing a hard-to-follow
Maybe<T> value propagating through our functions.

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

--HG--
extra : moz-landing-system : lando
2020-02-19 08:38:57 +00:00
Logan Smyth
006bff7790 Bug 1602429 - Part 1: Split up hook dispatch so we can validate debuggee state before dispatching. r=jimb
These changes make fireNativeCall and fireExceptionUnwind more consistent
by removing logic from them that doesn't really need to happen per-debugger.
It is also logic that breaks if the the fireXX functions are called after
the AutoRealm moved us into the debugger compartment, which is something
we'll be doing later to centralize more of the hook dispatch logic.

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

--HG--
extra : moz-landing-system : lando
2020-02-19 08:38:11 +00:00
Logan Smyth
83a2bfa773 Bug 1595980 - Move return value adjustment into the debuggee scope. r=jimb
We move adjustment of the return value until the very last step before applying
the value itself, because it is important that any adjustments performed take
place while inside the debuggee's context, and most importantly in the
context of this but, inside the debuggee's microtask queue.

AutoDebuggerJobQueueInterruption swaps out the microtask queue for one
specific to the debugger, and this bug happened because we were queuing
debuggee promise jobs in the debugger's microtask queue.

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

--HG--
extra : moz-landing-system : lando
2020-02-19 08:37:22 +00:00
Mike Shal
d8e4653d19 Bug 1611326 - Default to py3_action, and add a py2 attribute to GENERATED_FILES; r=firefox-build-system-reviewers,rstewart
GENERATED_FILES now defaults to python3 unless py2=True is specified as
an argument. All existing GENERATED_FILES scripts and GeneratedFile
templates have the py2=True attribute added, so this patch should
effectively be a no-op.

Going forward, individual scripts can be converted to python3 and their
corresponding py2=True attribute can be deleted. In effect, this patch
will be backed out in pieces until all scripts run in python3, at which
point the py2 attribute itself can be removed.

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

--HG--
extra : moz-landing-system : lando
2020-02-14 13:22:46 +00:00
Jed Davis
ee171b6406 Bug 1615155 - Don't generate default Recv__delete__ if there are args. r=nika
The default method implementations cause problems when trying to
override them with different types in a direct call class.

For the `Recv__delete__` case there's a simple solution: omit it if
there are any arguments, because it doesn't make much sense to specify
arguments and then completely ignore them, and the no-arg case isn't a
problem for overriding.

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

--HG--
extra : moz-landing-system : lando
2020-02-18 20:46:21 +00:00
Andrew McCreight
5ccc4cff06 Bug 1616327 - Use fallible SetLength in XPCConvert::JSData2Native. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D63219

--HG--
extra : moz-landing-system : lando
2020-02-18 19:46:14 +00:00
André Bargull
2397c625f5 Bug 1605143 - Part 2: Fold JSOp::SuperFun to ensure inlined class constructors use MCreateThisWithProto. r=jandem
Differential Revision: https://phabricator.services.mozilla.com/D58804

--HG--
extra : moz-landing-system : lando
2020-02-18 15:56:33 +00:00
André Bargull
d46cd57c1f Bug 1605143 - Part 1: Splice prototype to ensure we don't mark the object as having unknown properties. r=jandem
Differential Revision: https://phabricator.services.mozilla.com/D58803

--HG--
extra : moz-landing-system : lando
2020-02-18 15:56:11 +00:00
André Bargull
c0e110567b Bug 1378189 - Part 12: Support JSOp::InitHomerObject in Ion. r=jandem
Baseline code has explicit pre- and post-write barriers, but for Ion we should be
able to reuse the existing `MPostWriteBarrier`. Only pre-write barriers require
an explicit MacroAssembler call when emitting the assembly code.

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

--HG--
extra : moz-landing-system : lando
2020-02-18 17:14:18 +00:00
André Bargull
e0ce758627 Bug 1378189 - Part 11: Support JSOp::DerivedConstructor in Ion. r=jandem
Differential Revision: https://phabricator.services.mozilla.com/D58786

--HG--
extra : moz-landing-system : lando
2020-02-18 15:55:15 +00:00
André Bargull
d86c474b85 Bug 1378189 - Part 10: Inline derived class constructors. r=jandem
Passes the target `JSFunction` through to `patchInlinedReturn`, so we don't
emit `MReturnFromCtor` for derived class constructors. (Using `MReturnFromCtor`
for derived class constructors leads to repeated bailouts, because the computed
this-value is a magic type, which isn't a valid return type for `MReturnFromCtor`.)

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

--HG--
extra : moz-landing-system : lando
2020-02-18 15:54:47 +00:00
André Bargull
61696fcced Bug 1378189 - Part 9: Support JSOp::SuperCall in Ion. r=jandem
The note in `IonBuilder::inspectOpcode()` doesn't seem to apply anymore, probably
when we switched to CacheIR for call opcodes, the bailout issue noted there
doesn't matter anymore.

Inlining derived class constructors is enabled in the next part.

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

--HG--
extra : moz-landing-system : lando
2020-02-18 15:54:45 +00:00
André Bargull
38cba170aa Bug 1378189 - Part 8: Support JSOp::SuperFun in Ion. r=jandem
Differential Revision: https://phabricator.services.mozilla.com/D58783

--HG--
extra : moz-landing-system : lando
2020-02-18 15:53:49 +00:00
André Bargull
7464d5f8da Bug 1378189 - Part 7: Support JSOp::CheckThisReinit in Ion. r=jandem
Counterpart to JSOp::CheckThis with a similar implementation.

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

--HG--
extra : moz-landing-system : lando
2020-02-18 15:53:18 +00:00
André Bargull
65a219f83e Bug 1378189 - Part 6: Support JSOp::CheckThis in Ion. r=jandem
Includes support for `foldsTo`, so we can optimise away the instruction for
known types.

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

--HG--
extra : moz-landing-system : lando
2020-02-18 15:52:43 +00:00
André Bargull
b3dfae9a06 Bug 1378189 - Part 5: Support JSOp::CheckReturn in Ion. r=jandem
Changes the already present `MCheckReturn` class to match the baseline
implementation. `MCheckReturn::foldsTo` didn't fold away known types, so some
basic folding was directly added to `IonBuilder::jsop_checkreturn()`.

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

--HG--
extra : moz-landing-system : lando
2020-02-18 15:52:10 +00:00