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

81751 Коммитов

Автор SHA1 Сообщение Дата
Iain Ireland b8f20f5b00 Bug 1691184: Recompile if necessary before retrying interrupted regexp r=mgaudet
If an interrupt occurs during regexp execution, we return up the stack to RegExpShared::execute to handle it, then try again. Normally it's safe (if slow) to GC and discard jitcode at this point, because we can fall back to interpreted bytecode (which is not discarded). However, if the input string is long enough, then we [jump straight to compilation without producing bytecode](https://searchfox.org/mozilla-central/rev/7067bbd8194f4346ec59d77c33cd88f06763e090/js/src/vm/RegExpObject.cpp#590-596). In that case, when we resume, we will have neither bytecode nor jitcode, and end up dereferencing a null pointer.

The fix is to recompile after handling the interrupt. In addition to fixing the crash, forcing compilation here should improve our chance of eventual success (compared to resuming in the regexp interpreter).

Differential Revision: https://phabricator.services.mozilla.com/D104479
2021-03-09 18:34:43 +00:00
Jan de Mooij 0ddf1b7480 Bug 1696861 part 6 - Rename Delegate flag to IsUsedAsPrototype. r=tcampbell
Differential Revision: https://phabricator.services.mozilla.com/D107421
2021-03-09 14:28:24 +00:00
Jan de Mooij b5e10bfb9d Bug 1696861 part 5 - Remove UncacheableProtoOnChain. r=tcampbell
This was used to ensure no cross-compartment objects were embedded by
ShapeGuardProtoChain (used for the property-not-found case) but that's no longer
an issue because ShapeGuardProtoChain only does shape guards now.

Note: for the property-found case, the cross-compartment issue still applies but
that's handled by SlotReadType::CrossCompartment.

Differential Revision: https://phabricator.services.mozilla.com/D107420
2021-03-09 14:28:24 +00:00
Jan de Mooij 8aafc73201 Bug 1696861 part 4 - Simplify some code in GeneratePrototypeGuards. r=tcampbell
We already peeled off the receiver for non-delegates (= most objects) but we can
do this for delegates too.

Depends on D107418

Differential Revision: https://phabricator.services.mozilla.com/D107419
2021-03-09 14:28:23 +00:00
Jan de Mooij 31e7d2a0d5 Bug 1696861 part 3 - Stop eagerly marking prototypes as delegate. r=tcampbell
Eagerly marking prototypes as delegate resulted in a lot of unnecessary shadowing
checks and reshaping when initializing the properties of those objects. This is
a regression from bug 724768.

It's more efficient, simpler, and consistent with JS-defined objects to mark
objects as delegate when they become the prototype of another object.

This removes the check for delegates in EmptyShape::ensureInitialCustomShape. That
should be fine because the only object it applies to is String.prototype and it
doesn't affect correctness. (RegExp and Error prototypes are plain objects since
bug 1213341 and bug 1192038 so don't show up there anyway.)

Depends on D107417

Differential Revision: https://phabricator.services.mozilla.com/D107418
2021-03-09 14:28:23 +00:00
Jan de Mooij 67c550e55b Bug 1696861 part 2 - Stop marking CCW's dynamic prototype as delegate. r=tcampbell
This goes back to bug 787856 but dynamic prototypes don't need to be marked as
delegate, because shape teleporting and JITs don't optimize those prototype chains.

Other proxy handlers such as ScriptedProxyHandler, ForwardingProxyHandler, Xrays
don't do this so this is also more consistent.

Depends on D107416

Differential Revision: https://phabricator.services.mozilla.com/D107417
2021-03-09 14:28:23 +00:00
Jan de Mooij 9bb055742b Bug 1696861 part 1 - Stop marking the global object as delegate. r=tcampbell
This goes back to when shape teleporting was used for environment chains too.
See also bug 1608034 where we made this change for (other) environment objects.

The global has a lot of properties and this avoids doing unnecessary work to
invalidate teleporting.

Add Object.prototype to the test-JSObject GDB test so that we still have a test for
the delegate flag.

Differential Revision: https://phabricator.services.mozilla.com/D107416
2021-03-09 14:28:22 +00:00
André Bargull 1379469ec9 Bug 1696643 - Part 6: Move js_fgets next to its sole caller. r=mgaudet
This function is only used for the shell, so we might as well move it there.

Depends on D107332

Differential Revision: https://phabricator.services.mozilla.com/D107333
2021-03-09 10:51:42 +00:00
André Bargull 14a2a7e31d Bug 1696643 - Part 5: Remove unused TokenStream functions. r=mgaudet
Depends on D107331

Differential Revision: https://phabricator.services.mozilla.com/D107332
2021-03-09 10:51:41 +00:00
André Bargull 578dfe2d3d Bug 1696643 - Part 4: Remove unused parse handler methods. r=mgaudet
Removes parse handler methods which are never called and were only defined in
one but not the other parse handler.

Depends on D107330

Differential Revision: https://phabricator.services.mozilla.com/D107331
2021-03-09 10:51:41 +00:00
André Bargull 9175c7e0a2 Bug 1696643 - Part 3: Remove unused JSContext argument. r=mgaudet
Depends on D107329

Differential Revision: https://phabricator.services.mozilla.com/D107330
2021-03-09 10:51:40 +00:00
André Bargull 7da3642c79 Bug 1696643 - Part 2: Remove ListNode::appendWithoutOrderAssumption. r=mgaudet
Part 1 removed the only other caller to this method.

Depends on D107328

Differential Revision: https://phabricator.services.mozilla.com/D107329
2021-03-09 10:51:40 +00:00
André Bargull adcfd6fc0e Bug 1696643 - Part 1: Remove SourceKind. r=mgaudet
Differential Revision: https://phabricator.services.mozilla.com/D107328
2021-03-09 10:51:40 +00:00
André Bargull da4fb52095 Bug 1696920 - Part 7: Remove unused GlobalObject methods. r=jandem
Depends on D107477

Differential Revision: https://phabricator.services.mozilla.com/D107478
2021-03-09 10:07:59 +00:00
André Bargull c9561fec2b Bug 1696920 - Part 6: Remove unused JSFunction methods. r=jandem
Depends on D107475

Differential Revision: https://phabricator.services.mozilla.com/D107477
2021-03-09 10:07:59 +00:00
André Bargull e06483376a Bug 1696920 - Part 5: Remove unused FrameIter methods. r=jandem
Depends on D107474

Differential Revision: https://phabricator.services.mozilla.com/D107475
2021-03-09 10:07:58 +00:00
André Bargull a8fd7d4d4e Bug 1696920 - Part 4: Require non-nullptr JSContext in CharsToNewUTF8CharsZ. r=jandem
Support for `nullptr` context was added in bug 1229642 for the SPSProfiler. This
code is no longer present, so we can require a non-nullptr context in
CharsToNewUTF8CharsZ again.

Depends on D107473

Differential Revision: https://phabricator.services.mozilla.com/D107474
2021-03-09 10:07:58 +00:00
André Bargull 4e035f1f4e Bug 1696920 - Part 3: Remove unused BytecodeUtil functions. r=jandem
Depends on D107472

Differential Revision: https://phabricator.services.mozilla.com/D107473
2021-03-09 10:07:58 +00:00
André Bargull 0a85a97970 Bug 1696920 - Part 2: Remove unused Activation methods. r=jandem
Depends on D107471

Differential Revision: https://phabricator.services.mozilla.com/D107472
2021-03-09 10:07:57 +00:00
André Bargull de9f14690f Bug 1696920 - Part 1: Remove unused DataViewObject methods. r=jandem
Differential Revision: https://phabricator.services.mozilla.com/D107471
2021-03-09 10:07:57 +00:00
Tooru Fujisawa b0ed95452a Bug 1693184 - Add marker between each CompilationStencil field in XDR. r=mgaudet
Differential Revision: https://phabricator.services.mozilla.com/D105925
2021-03-09 04:57:33 +00:00
Tooru Fujisawa a0032f398b Bug 1693625 - Use soft-error for out-of-bound ParserAtomSpan index while decoding. r=mgaudet
Differential Revision: https://phabricator.services.mozilla.com/D105924
2021-03-09 04:57:32 +00:00
Tooru Fujisawa fc8c2ce2b7 Bug 1693611 - Part 12: Use XDRStencilEncoder from XDRIncrementalStencilEncoder. r=mgaudet
Differential Revision: https://phabricator.services.mozilla.com/D105923
2021-03-09 04:57:32 +00:00
Tooru Fujisawa e6416b3f50 Bug 1693611 - Part 11: Remove XDRStencilDecoder::{hasOptions,options}. r=mgaudet
Differential Revision: https://phabricator.services.mozilla.com/D105922
2021-03-09 04:57:32 +00:00
Tooru Fujisawa 4bb3f669ea Bug 1693611 - Part 10: Remove XDRStencilDecoder::stencilAlloc_. r=mgaudet
Differential Revision: https://phabricator.services.mozilla.com/D105921
2021-03-09 04:57:31 +00:00
Tooru Fujisawa 2b5c9dac1d Bug 1693611 - Part 9: Remove unnecessary alignment padding between header and CompilationStencil. r=mgaudet
Now the header and CompilationStencil are encoded into the same buffer,
and the alignment padding isn't necessary.

Differential Revision: https://phabricator.services.mozilla.com/D105920
2021-03-09 04:57:31 +00:00
Tooru Fujisawa 7453ed6861 Bug 1693611 - Part 8: Move XDRCompilationStencil to StencilXDR. r=mgaudet
Differential Revision: https://phabricator.services.mozilla.com/D105919
2021-03-09 04:57:30 +00:00
Tooru Fujisawa 3d3f8f96bf Bug 1693611 - Part 7: Move XDRCheckCompilationStencil to StencilXDR. r=mgaudet
Differential Revision: https://phabricator.services.mozilla.com/D105918
2021-03-09 04:57:30 +00:00
Tooru Fujisawa 5f06fb1b56 Bug 1693611 - Part 6: Move StencilModuleMetadata XDR functions to StencilXDR. r=mgaudet
Differential Revision: https://phabricator.services.mozilla.com/D105917
2021-03-09 04:57:30 +00:00
Tooru Fujisawa 7cff1daa31 Bug 1693611 - Part 5: Move ParserAtom XDR functions to StencilXDR. r=mgaudet
Differential Revision: https://phabricator.services.mozilla.com/D105916
2021-03-09 04:57:29 +00:00
Tooru Fujisawa 603fc44eb1 Bug 1693611 - Part 4: Rename StencilXDR::SharedData to StencilXDR::codeSharedData. r=mgaudet
Differential Revision: https://phabricator.services.mozilla.com/D105915
2021-03-09 04:57:29 +00:00
Tooru Fujisawa c793b3ad95 Bug 1693611 - Part 3: Rename StencilXDR::ScopeData to StencilXDR::codeScopeData. r=mgaudet
Differential Revision: https://phabricator.services.mozilla.com/D105914
2021-03-09 04:57:28 +00:00
Tooru Fujisawa 9a9c4f82f9 Bug 1693611 - Part 2: Rename StencilXDR::ObjLiteral to StencilXDR::codeObjLiteral. r=mgaudet
Differential Revision: https://phabricator.services.mozilla.com/D105913
2021-03-09 04:57:28 +00:00
Tooru Fujisawa 3609f4323e Bug 1693611 - Part 1: Rename StencilXDR::BigInt to StencilXDR::codeBigInt. r=mgaudet
Subsequent patches move other XDR functions into StencilXDR.
To avoid name collision between method and type name, prepend `code` to method.

Also reorder to match the field order.

Differential Revision: https://phabricator.services.mozilla.com/D105912
2021-03-09 04:57:28 +00:00
Iain Ireland 3505b7d66e Bug 1688033: Support trivial unboxing r=jandem
If we use `arguments` in a loop, the transpiled `GuardToObject` sees a value-typed phi node and emits an MUnbox. GVN eventually cleans it up, but not before it blocks scalar replacement of arguments.

(Something similar seems to be happening in escape analysis for arrays and objects. I'm going to do a more systematic investigation of whether/how Warp broke escape analysis for objects and arrays once I'm done with arguments.)

Depends on D107304

Differential Revision: https://phabricator.services.mozilla.com/D107305
2021-03-09 01:35:24 +00:00
Iain Ireland b8426383cf Bug 1688033: Scalar replace arguments.callee r=jandem
Depends on D107303

Differential Revision: https://phabricator.services.mozilla.com/D107304
2021-03-09 01:35:23 +00:00
Iain Ireland b04b3212cb Bug 1688033: Optimize arguments.callee in CacheIR r=jandem
Differential Revision: https://phabricator.services.mozilla.com/D107303
2021-03-09 01:35:23 +00:00
Doug Thayer d9e6ea9ffe Bug 1696978 - Require user input for slow extension warning r=smaug,extension-reviewers,kmag
Per conversations with Bas, we want the behavior for slow extensions to match
that of slow content scripts WRT requiring user input. The test change is less
than great, but I don't think we have the ability to simulate input in
mochitests without running JS in the content process? But correct me if I'm
wrong.

Differential Revision: https://phabricator.services.mozilla.com/D107521
2021-03-09 01:35:03 +00:00
Butkovits Atila 81636eb525 Backed out 14 changesets (bug 1693184, bug 1693611, bug 1693625) for causing failures on test_script_loader_js_cache.html.
Backed out changeset 6f384df0be5c (bug 1693184)
Backed out changeset 5353d36c4846 (bug 1693625)
Backed out changeset 0069d43ee2c4 (bug 1693611)
Backed out changeset 8fd50eba1621 (bug 1693611)
Backed out changeset 4928193b996f (bug 1693611)
Backed out changeset 7bf683fab589 (bug 1693611)
Backed out changeset a4ff4b030aaa (bug 1693611)
Backed out changeset 565bee5296ac (bug 1693611)
Backed out changeset faacbf1943b6 (bug 1693611)
Backed out changeset 72fc08b6245d (bug 1693611)
Backed out changeset 6f06ff0ebbc3 (bug 1693611)
Backed out changeset fb2c167165b8 (bug 1693611)
Backed out changeset 0d66ecd8acd4 (bug 1693611)
Backed out changeset 0e435a571803 (bug 1693611)
2021-03-09 02:43:20 +02:00
Tooru Fujisawa 86efebbdaa Bug 1693184 - Add marker between each CompilationStencil field in XDR. r=mgaudet
Differential Revision: https://phabricator.services.mozilla.com/D105925
2021-03-08 23:32:25 +00:00
Tooru Fujisawa 60751bc992 Bug 1693625 - Use soft-error for out-of-bound ParserAtomSpan index while decoding. r=mgaudet
Differential Revision: https://phabricator.services.mozilla.com/D105924
2021-03-08 23:32:25 +00:00
Tooru Fujisawa f181a705b3 Bug 1693611 - Part 12: Use XDRStencilEncoder from XDRIncrementalStencilEncoder. r=mgaudet
Differential Revision: https://phabricator.services.mozilla.com/D105923
2021-03-08 23:32:25 +00:00
Tooru Fujisawa ceede00974 Bug 1693611 - Part 11: Remove XDRStencilDecoder::{hasOptions,options}. r=mgaudet
Differential Revision: https://phabricator.services.mozilla.com/D105922
2021-03-08 23:32:24 +00:00
Tooru Fujisawa 009f823faa Bug 1693611 - Part 10: Remove XDRStencilDecoder::stencilAlloc_. r=mgaudet
Differential Revision: https://phabricator.services.mozilla.com/D105921
2021-03-08 23:32:24 +00:00
Tooru Fujisawa 715303777d Bug 1693611 - Part 9: Remove unnecessary alignment padding between header and CompilationStencil. r=mgaudet
Now the header and CompilationStencil are encoded into the same buffer,
and the alignment padding isn't necessary.

Differential Revision: https://phabricator.services.mozilla.com/D105920
2021-03-08 23:32:23 +00:00
Tooru Fujisawa c61dc1fa35 Bug 1693611 - Part 8: Move XDRCompilationStencil to StencilXDR. r=mgaudet
Differential Revision: https://phabricator.services.mozilla.com/D105919
2021-03-08 23:32:23 +00:00
Tooru Fujisawa 4e7ee70621 Bug 1693611 - Part 7: Move XDRCheckCompilationStencil to StencilXDR. r=mgaudet
Differential Revision: https://phabricator.services.mozilla.com/D105918
2021-03-08 23:32:23 +00:00
Tooru Fujisawa da6009e4f3 Bug 1693611 - Part 6: Move StencilModuleMetadata XDR functions to StencilXDR. r=mgaudet
Differential Revision: https://phabricator.services.mozilla.com/D105917
2021-03-08 23:32:22 +00:00
Tooru Fujisawa d2a7ee183f Bug 1693611 - Part 5: Move ParserAtom XDR functions to StencilXDR. r=mgaudet
Differential Revision: https://phabricator.services.mozilla.com/D105916
2021-03-08 23:32:22 +00:00
Tooru Fujisawa 9f71a9d22f Bug 1693611 - Part 4: Rename StencilXDR::SharedData to StencilXDR::codeSharedData. r=mgaudet
Differential Revision: https://phabricator.services.mozilla.com/D105915
2021-03-08 23:32:22 +00:00