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

74029 Коммитов

Автор SHA1 Сообщение Дата
Jon Coppeard 0d49238f2b Bug 1577825 - Refactor zone memory tracker to allow tracking non-GC thing pointers apart from ZoneAllocPolicy r=sfink
This makes the hash table used for tracking ZoneAllocPolicy generic and able to track memory owned by other non-GC things.  The idea is to use this for tracking the memory associated with shared array buffers in the next patch.

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

--HG--
extra : moz-landing-system : lando
2019-12-03 13:26:02 +00:00
Tooru Fujisawa 9b19b41385 Bug 1561911 - Part 3: Set closedPromise.[[PromiseIsHandled]] to true in ReadableStreamError. r=jwalden
Implemented 3.5.6. ReadableStreamError step 10.

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

--HG--
extra : moz-landing-system : lando
2019-12-04 09:47:07 +00:00
Tooru Fujisawa cf2d7b5216 Bug 1561911 - Part 2: Add SetPromiseIsHandled. r=jwalden
`SetPromiseIsHandled` performs "Set promise.[[PromiseIsHandled]] to true.", with
removing unhandled rejection.

Fixed the following steps to use `SetPromiseIsHandled`:

  * 3.8.4. ReadableStreamReaderGenericInitialize Step 6.c
  * 3.8.5. ReadableStreamReaderGenericRelease step 5
  * 4.4.13. WritableStreamRejectCloseAndClosedPromiseIfNeeded step 4.b
  * 4.5.3. new WritableStreamDefaultWriter step 7.b
  * 4.5.3. new WritableStreamDefaultWriter step 9.d
  * 4.5.3. new WritableStreamDefaultWriter step 9.f
  * 4.6.5. WritableStreamDefaultWriterEnsureClosedPromiseRejected step 3
  * 4.6.6. WritableStreamDefaultWriterEnsureReadyPromiseRejected step 3

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

--HG--
extra : moz-landing-system : lando
2019-12-04 09:46:58 +00:00
Tooru Fujisawa a1b7e30531 Bug 1561911 - Part 1: Update ReadableStreamReaderGenericInitialize steps. r=jwalden
Differential Revision: https://phabricator.services.mozilla.com/D55613

--HG--
extra : moz-landing-system : lando
2019-12-04 09:46:53 +00:00
Jim Blandy c811575ba6 Bug 1601088: Fix DebugAPI::slowPathTraceGeneratorFrame's justification for calling TraceCrossCompartmentEdge. r=loganfsmyth
Differential Revision: https://phabricator.services.mozilla.com/D55737

--HG--
extra : moz-landing-system : lando
2019-12-04 05:00:04 +00:00
Bogdan Tara 2449adc92a Backed out 3 changesets (bug 1561911) for /streams/readable-streams/* failures
Backed out changeset 38d79445e3c1 (bug 1561911)
Backed out changeset 885ddf6cbc22 (bug 1561911)
Backed out changeset b4e45bf8c0c4 (bug 1561911)
2019-12-04 05:33:29 +02:00
Tooru Fujisawa d514f1eca9 Bug 1561911 - Part 3: Set closedPromise.[[PromiseIsHandled]] to true in ReadableStreamError. r=jwalden
Implemented 3.5.6. ReadableStreamError step 10.

Depends on D55614

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

--HG--
extra : moz-landing-system : lando
2019-12-03 23:19:07 +00:00
Tooru Fujisawa cca12b6b29 Bug 1561911 - Part 2: Add SetPromiseIsHandled. r=jwalden
`SetPromiseIsHandled` performs "Set promise.[[PromiseIsHandled]] to true.", with
removing unhandled rejection.

Fixed the following steps to use `SetPromiseIsHandled`:

  * 3.8.4. ReadableStreamReaderGenericInitialize Step 6.c
  * 3.8.5. ReadableStreamReaderGenericRelease step 5
  * 4.4.13. WritableStreamRejectCloseAndClosedPromiseIfNeeded step 4.b
  * 4.5.3. new WritableStreamDefaultWriter step 7.b
  * 4.5.3. new WritableStreamDefaultWriter step 9.d
  * 4.5.3. new WritableStreamDefaultWriter step 9.f
  * 4.6.5. WritableStreamDefaultWriterEnsureClosedPromiseRejected step 3
  * 4.6.6. WritableStreamDefaultWriterEnsureReadyPromiseRejected step 3

Depends on D55613

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

--HG--
extra : moz-landing-system : lando
2019-12-03 22:27:26 +00:00
Tooru Fujisawa 30a1e09849 Bug 1561911 - Part 1: Update ReadableStreamReaderGenericInitialize steps. r=jwalden
Differential Revision: https://phabricator.services.mozilla.com/D55613

--HG--
extra : moz-landing-system : lando
2019-12-03 22:25:23 +00:00
Iain Ireland 19c2279381 Bug 1592302: Part 3: Update #includes in new regexp files r=mgaudet
This patch adds a python script to update #includes from V8 to SM, and runs the script over each of the V8 source files. This automates 90%+ of the changes that are necessary to prepare V8 source for inclusion in SM. The remaining changes will come in a subsequent patch. Almost all of those changes simply involve adding a shim #include in the right place.

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

--HG--
extra : moz-landing-system : lando
2019-11-15 16:55:17 +00:00
Iain Ireland e0d1887eb7 Bug 1592302: Part 2: Add new regexp files to build behind config option r=mgaudet
Differential Revision: https://phabricator.services.mozilla.com/D51929

--HG--
extra : moz-landing-system : lando
2019-12-02 16:13:05 +00:00
Iain Ireland 000d0e94d5 Bug 1592302: Part 1: Import regexp directory from v8 r=mgaudet,mhoye
Irregexp is the V8 regular expression engine. SpiderMonkey contains a heavily modified copy of a previous version of irregexp (under js/src/irregexp). The modifications make it very difficult to incorporate upstream changes. To catch up on webcompat, we are re-importing a fresh copy of irregexp, with the intent of tracking upstream more closely.

This patch imports the source files that can be found here:

2599d3cc20/src/regexp

... with the following files removed:

regexp/OWNERS
regexp/regexp.cc
regexp/regexp-utils.cc
regexp/regexp-utils.h
regexp/regexp-macro-assembler-arch.h
regexp/ia32/*
regexp/x64/*
regexp/mips/*
regexp/mips64/*
regexp/arm/*
regexp/arm64/*
regexp/s390/*
regexp/ppc/*

In addition, a VERSION file has been added pointing to the most recently imported V8 github revision, and js/src/new-regexp has been added to the list of directories covered by the V8 license in licenses.html.

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

--HG--
extra : moz-landing-system : lando
2019-11-28 18:48:23 +00:00
Deian Stefan d67c183b5b Bug 1595329 - Math.ceil range analysis should set canBeNegativeZero flag for ]-1,-0] r=tcampbell
Differential Revision: https://phabricator.services.mozilla.com/D55698

--HG--
extra : moz-landing-system : lando
2019-12-03 17:46:56 +00:00
Tom Ritter 8d421d92dc Bug 1582512 - Disable script filename validation in Browser Toolbox console debugging r=jimb
Differential Revision: https://phabricator.services.mozilla.com/D53234

--HG--
extra : moz-landing-system : lando
2019-12-02 17:27:14 +00:00
Tom Ritter 1f3b68b54b Bug 1582512 - Disable script filename restrictions in Marionette r=jandem,marionette-reviewers,whimboo
Differential Revision: https://phabricator.services.mozilla.com/D51676

--HG--
extra : moz-landing-system : lando
2019-12-02 17:27:18 +00:00
Tom Ritter 7e5d343146 Bug 1582512 - Disable javascript filename validation on all entry points from xpcshell r=jandem
Differential Revision: https://phabricator.services.mozilla.com/D51336

--HG--
extra : moz-landing-system : lando
2019-12-02 17:27:22 +00:00
Tom Ritter 4f9313ba4e Bug 1582512 - Register a ScriptValidationCallback to examine script loads in the parent process r=Gijs,ckerschb
Additionally, we disable validation on PAC scripts.

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

--HG--
extra : moz-landing-system : lando
2019-12-02 17:27:09 +00:00
Benjamin Bouvier 91cf2432af Bug 1597989: Tweak eager segments bound checks behavior for Cranelift; r=rhunt
The eagerBoundsCheck variable was desynchronized from compiler feature support
for bulk memory operations, namely for Cranelift. This manually checks for
Cranelift usage, and this will need to be reverted once bulk memory opcodes
support land in Cranelift.

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

--HG--
extra : moz-landing-system : lando
2019-12-03 15:31:39 +00:00
Benjamin Bouvier 3d32aa6717 Bug 1597989: Bump cranelift to 152e317969702620; r=rhunt
Differential Revision: https://phabricator.services.mozilla.com/D53963

--HG--
extra : moz-landing-system : lando
2019-12-02 16:27:30 +00:00
Jon Coppeard 82d4bd1aeb Bug 1600238 - Finalize FinalizationGroup objects in the foreground to avoid depdendency on when holdings objects are finalized r=sfink
The holdings objects can be foreground or background finalized, but HeapPtr's destructor depends on the referent's arena to have not been released. Making FinalizationGroups foreground finalized achieves this.

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

--HG--
extra : moz-landing-system : lando
2019-12-02 22:33:45 +00:00
Jon Coppeard af9f55e67f Bug 1600018 - Skip processing FinalizationGroups where the CCWs from the target to the FinalizationGroup object have been nuked r=sfink
Where a FinalizationGroup and its target are in different compartments they are linked by a CCW from a map in the target's zone to the FinalizationGroup. This deals with what happens if we nuke the CCWs between these two compartments. I think the sensible thing to do in this case is to not call the FinalizationGroup's callback and effectively forget about the registrations. Nuking CCWs happens when compartments are known to be dead and therefore this is similar to the way don't call callbacks on shutdown.

Depends on D55114

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

--HG--
extra : moz-landing-system : lando
2019-12-02 20:18:23 +00:00
Edgar Chen fa196a13e6 Bug 1600608 - Remove duplicated declaration of JS_IsArrayBufferViewObject; r=sfink
Differential Revision: https://phabricator.services.mozilla.com/D55447

--HG--
extra : moz-landing-system : lando
2019-12-02 22:34:46 +00:00
Logan Smyth 6e176ae4f7 Bug 1592116 - Mark Debuggers with hooks by tracing from the Realm. r=jimb
Differential Revision: https://phabricator.services.mozilla.com/D51226

--HG--
extra : moz-landing-system : lando
2019-11-27 00:48:00 +00:00
Coroiu Cristina 71c9b69680 Backed out changeset 1bd1069fa2b2 (bug 1566466) on request by tcampbell for causing ccov Jit6 permafails on a CLOSED TREE
--HG--
extra : histedit_source : 36b1957c9dffe9638634d89dab93b96eba43f293
2019-12-03 00:38:53 +02:00
Matthew Gaudet d0751bba57 Bug 1588158 - Add FunctionFlags member to FunctionBox, and delegate relevant queries to it r=tcampbell
Differential Revision: https://phabricator.services.mozilla.com/D55315

--HG--
extra : moz-landing-system : lando
2019-12-02 20:26:39 +00:00
Ted Campbell e91b3c8dd0 Bug 1566466 - Clean up relazification conditions. r=jandem
Move the relazification decisions to JSScript since the check is made after
delazification happens. The JSScript::isRelazifiable check inspects
characteristics of the script itself, while JSScript::canRelazify includes
additional checks for runtime conditions outside the script.

Depends on D55362

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

--HG--
extra : moz-landing-system : lando
2019-12-02 19:38:17 +00:00
Ted Campbell 442b6dd6c3 Bug 1600439 - Move the PrivateScriptData pointer to js::BaseScript. r=jandem
Now that both LazyScript and JSScript have the same pointer field, we can
move to the BaseScript class. The inner-function pointers in the gcthings
array will have the same meaning for both LazyScript and JSScript, but the
other members of gcthings may have different interpretations.

This adds poisoning of the PrivateScriptData in the LazyScript case for
consistency.

Depends on D55361

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

--HG--
extra : moz-landing-system : lando
2019-12-02 19:38:19 +00:00
Ted Campbell aca8ac0477 Bug 1600439 - Move js::PrivateScriptData before js::BaseScript. r=jandem
Reorder the classes in JSScript.h so that we can use PrivateScriptData from
within BaseScript.

Depends on D55360

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

--HG--
extra : moz-landing-system : lando
2019-12-02 19:38:22 +00:00
Ted Campbell ab9e3e595a Bug 1600439 - Replace LazyScriptData with PrivateScriptData. r=jandem
It it straight-foward for users of LazyScriptData to support a single array
for closedOverBindings and innerFunctions. As a result, we can use
PrivateScriptData as the implementation and eliminate the LazyScriptData type
altogether.

Depends on D55035

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

--HG--
extra : moz-landing-system : lando
2019-12-02 20:18:04 +00:00
Ted Campbell 67a59d854f Bug 1591598 - Move 'warmUpData_' field to js::BaseScript. r=jandem
Unify the JSScript::warmUpData_ and LazyScript::enclosingLazyScriptOrScope_
fields into BaseScript. As a script progresses from lazy up to being JIT-ed
it the type stored in this field will change. If a script is in a compiled
state, the enclosingLazyScriptOrScope_ value can always be reconstructed
during relazification.

Depends on D55034

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

--HG--
extra : moz-landing-system : lando
2019-12-02 19:38:26 +00:00
Ted Campbell 271e720c33 Bug 1591598 - Support storing LazyScript/Scope in ScriptWarmUpData. r=jandem,jonco
Allow storing manually-barriered GC pointers in ScriptWarmUpData. This
updates the 'trace' method as needed. When switching types, the user must
first 'clear' the old type and then 'init' the new type. We continue to use
WarmUpCount(0) as the default safe state.

Depends on D55033

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

--HG--
extra : moz-landing-system : lando
2019-12-02 19:38:28 +00:00
Ted Campbell 5be6b5d9e8 Bug 1591598 - Move js::ScriptWarmUpData before js::BaseScript. r=jandem
Prepare to move the warmUpData field to BaseScript by first moving the type
definition earlier in the file.

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

--HG--
extra : moz-landing-system : lando
2019-12-02 19:38:30 +00:00
Coroiu Cristina fb0cdfff2e Backed out 7 changesets (bug 1600439, bug 1566466, bug 1591598) for raptor crashes on a CLOSED TREE
Backed out changeset 14f33b78f0eb (bug 1566466)
Backed out changeset 617ce539db70 (bug 1600439)
Backed out changeset 47f84263339e (bug 1600439)
Backed out changeset 07471e96b2d8 (bug 1600439)
Backed out changeset 5163670bfede (bug 1591598)
Backed out changeset 5ea098cc9ef0 (bug 1591598)
Backed out changeset 42ca239ee6a6 (bug 1591598)
2019-12-02 21:27:55 +02:00
Steve Fink a9b75a63bb Bug 1597206 - Do not populate weak keys during RegularMarking yet, and allow aborting weak marking during RegularMarking r=jonco
Differential Revision: https://phabricator.services.mozilla.com/D54580

--HG--
extra : moz-landing-system : lando
2019-11-28 05:51:09 +00:00
Steve Fink be9b7d8e1a Bug 1597206 - Refactor GCMarker state management r=jonco
Differential Revision: https://phabricator.services.mozilla.com/D54579

--HG--
extra : moz-landing-system : lando
2019-12-02 18:25:14 +00:00
Steve Fink 94503e692b Bug 1597206 - Refactor enterWeakMarkingMode slightly r=jonco
Differential Revision: https://phabricator.services.mozilla.com/D54564

--HG--
extra : moz-landing-system : lando
2019-11-28 05:51:06 +00:00
André Bargull 33766e4d76 Bug 1600596: Remove unused functions UninlinedIsInsideNursery and PushArena. r=jonco
Differential Revision: https://phabricator.services.mozilla.com/D55435

--HG--
extra : moz-landing-system : lando
2019-12-02 17:18:03 +00:00
André Bargull 2f552606a6 Bug 1599465 - Part 12: Remove extra rooting. r=jwalden
Removes rooting when the allocation isn't followed by any operation which can
GC resp. takes a `JSContext` argument.

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

--HG--
extra : moz-landing-system : lando
2019-12-02 17:37:08 +00:00
André Bargull bf1723827b Bug 1599465 - Part 11: Add fast path for BigInt subtraction with uint64 magnitude. r=jwalden
Subtraction doesn't have the same unused malloc memory problem which was present
for addition and subtraction, so the relative speed-up when adding a uint64
fast-path is less prominent (only about 10%), but it still seems worthwhile to
provide a fast-path, too.

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

--HG--
extra : moz-landing-system : lando
2019-12-02 17:37:08 +00:00
André Bargull a3067a0c3b Bug 1599465 - Part 10: Avoid calling absoluteCompare() twice in BigInt subtraction. r=jwalden
`absoluteCompare()` is currently called twice when subtracting two BigInts,
avoiding the second call gives a slight speed-up.

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

--HG--
extra : moz-landing-system : lando
2019-12-02 17:37:08 +00:00
André Bargull 28319c9e07 Bug 1599465 - Part 9: Add 'const' modifier to hash() and dump() methods. r=jwalden
An earlier part changed the `digit` function to be `const`, so we can now make
these two functions `const`, too.

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

--HG--
extra : moz-landing-system : lando
2019-12-02 17:37:07 +00:00
André Bargull c206352de3 Bug 1599465 - Part 8: Remove function call indirection when calling BigInt operations from jit-code. r=jandem
Differential Revision: https://phabricator.services.mozilla.com/D54764

--HG--
extra : moz-landing-system : lando
2019-12-02 17:37:07 +00:00
André Bargull 6c0ebea0c8 Bug 1599465 - Part 7: Add "Value" suffix to BigInt operations on Values types. r=jandem
Add the suffix in preparation for part 8.

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

--HG--
extra : moz-landing-system : lando
2019-12-02 17:37:07 +00:00
André Bargull 98cd310eca Bug 1599465 - Part 6: Change test to check if uint128 types are available. r=jwalden
We never define `HAVE_INT128_SUPPORT`, so the uint128 code path is never
enabled. Change the test to use `__SIZEOF_INT128__` to enable it on
applicable platforms.

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

--HG--
extra : moz-landing-system : lando
2019-12-02 17:37:06 +00:00
André Bargull ccaf2a12e3 Bug 1599465 - Part 5: Add fast path for BigInt multiplication with uint64 magnitude. r=jwalden
Similar to the previous part, also add a fast-path when multiplying two Bigints
which fit into uint64_t. When the result also fits into uint64_t, this approach
avoids allocating unused malloc memory.

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

--HG--
extra : moz-landing-system : lando
2019-12-02 17:37:06 +00:00
André Bargull 0903f6d258 Bug 1599465 - Part 4: Add fast path for BigInt addition with uint64 magnitude. r=jwalden
Add a fast path for uint64 BigInts to `BigInt::absoluteAdd`. This fast path
gives a substantial speed-up, because addition for uint64 BigInts no longer
needs allocate malloc memory when the result also fits into uint64_t.

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

--HG--
extra : moz-landing-system : lando
2019-12-02 17:37:06 +00:00
André Bargull 3af8368be7 Bug 1599465 - Part 3: Add fitsInUint64 and uint64FromNonZero to BigInt. r=jwalden
Adds `fitsInUint64` to check if a BigInt fits into uint64_t and `uint64FromNonZero`
to extract an uint64_t value from a non-zero BigInt. Boths function are inline
because the next patches will use them in fast-paths.

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

--HG--
extra : moz-landing-system : lando
2019-12-02 17:37:06 +00:00
André Bargull 5987154aca Bug 1599465 - Part 2: Implement in-place modification in destructivelyTrimHighZeroDigits. r=jwalden
Resolves the TODO in `destructivelyTrimHighZeroDigits` and additionally removes
`trimHighZeroDigits`, because it is no longer used. This change is especially
beneficial for functions which are most of the time over-estimating the result
digit length, like for example `BigInt::absoluteAdd`.

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

--HG--
extra : moz-landing-system : lando
2019-12-02 17:37:06 +00:00
André Bargull 175986d76a Bug 1599465 - Part 1: Move checked arithmetic functions into their own header. r=jwalden
This allows to use these functions without pulling in the complete `jsnum.h` header.

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

--HG--
rename : js/src/jsnum.h => js/src/util/CheckedArithmetic.h
extra : moz-landing-system : lando
2019-12-02 17:37:05 +00:00
Chris Fallin 68ac49527e Bug 1598347, part 2: pass "inner singleton" to NEWOBJECT group logic. r=djvj,iain
This change passes through the "inner singleton" status of a particular
object literal to the group-assignment logic for JSOP_NEWOBJECT by
instead using a variant opcode, JSOP_NEWOBJECT_WITHGROUP.  "Inner
singleton" status is meant to emulate old behavior (prior to ObjLiteral)
in which the frontend built an entire tree of objects/arrays with a
top-level singleton. In the old world, these objects were allocated by
ParseNode::getConstantValue() in the frontend and built by
ObjectGroup::newPlainObject, which looked up an object group by property
names. In the new world, the default NEWOBJECT logic uses a separate
test for whether an allocation site should have a singleton group, and
even after we carefully emulate the old group behavior in the frontend,
the new-object allocation itself will decide to allocate singleton
groups. In the particular regression case motivating this change, these
singleton groups break the TI information for a singleton array (typeset
for all elems no longer has a single group) and as a result, a simple
property access can no longer be inlined. This patch matches the old
behavior and allows the inlining to occur.

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

--HG--
extra : moz-landing-system : lando
2019-11-27 22:49:33 +00:00