Commit Graph

72144 Commits

Author SHA1 Message Date
Ryan Hunt
79bfc8c3be Bug 1559963 - Wasm: Update spec tests for bulk-memory#98. r=bbouvier
As the following commit explained, this change isn't backwards compatible with
the existing implementation and the spec tests needed to be modified.

I've written a stub commit to the spec interpreter to encode/decode element
segments well enough to pass the current spec tests, and did another
import of the tests. The commit can be found here [1] [2].

[1] https://github.com/eqrion/spec/tree/spidermonkey-tree-tests
[2] d81e3cfe6e

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

--HG--
extra : moz-landing-system : lando
2019-08-12 22:30:15 +00:00
Ryan Hunt
563bbf7b09 Bug 1559963 - Wasm: Update in-tree tests for bulk-memory#98. r=bbouvier
The element segment changes are backwards compatible with the MVP, but not the
existing implementation. Some tests needed to update their expectations or
binary encoding.

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

--HG--
extra : moz-landing-system : lando
2019-08-12 22:21:21 +00:00
Ryan Hunt
f6fe16593e Bug 1559963 - Wasm: Update wasmTextToBinary for bulk-memory#98. r=bbouvier
Issue: https://github.com/WebAssembly/bulk-memory-operations/issues/98

This commit updates the encoding of element segments to the latest bulk-memory
proposal. This is backwards compatible with the MVP, but a breaking change from
the previously implemented bulk-memory spec.

The following semantic differences are made with the new encoding.
  1. The introduction of 'Declared' segments
    * Declared segments allow a Wasm module to forward declare which
      functions are aliasable by ref.func. See reference-types#31 for more
      information.
  2. Whether an element expression or function indices are encoded now depends
     on an independent flag from the 'kind' of an element segment.
  3. The definition kind or element expression type is now explicitly encoded
     in the element segment.

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

--HG--
extra : moz-landing-system : lando
2019-08-12 22:31:17 +00:00
Ryan Hunt
da9af79283 Bug 1559963 - Wasm: Update decoding of element segments for bulk-memory#98. r=bbouvier
Issue: https://github.com/WebAssembly/bulk-memory-operations/issues/98

This commit updates the decoding of element segments to the latest bulk-memory
proposal. This is backwards compatible with the MVP, but a breaking change from
the previously implemented bulk-memory spec.

The following semantic differences are made with the new encoding.
  1. The introduction of 'Declared' segments
    * Declared segments allow a Wasm module to forward declare which
      functions are aliasable by ref.func. See reference-types#31 for more
      information.
  2. Whether an element expression or function indices are encoded now depends
     on an independent flag from the 'kind' of an element segment.
  3. The definition kind or element expression type is now explicitly encoded
     in the element segment.

A following commit will update the in-tree wat2wasm encoder.

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

--HG--
extra : moz-landing-system : lando
2019-08-12 22:37:15 +00:00
Steve Fink
e1bc970332 Bug 1572065 - Avoid assertion when OOMing with test mark queue, r=jonco
Differential Revision: https://phabricator.services.mozilla.com/D41460

--HG--
extra : moz-landing-system : lando
2019-08-10 07:44:04 +00:00
Steve Fink
a1032d4fd8 Bug 1570161 - do not attempt to mark things gray if they cannot be marked gray r=jonco
Differential Revision: https://phabricator.services.mozilla.com/D41468

--HG--
extra : moz-landing-system : lando
2019-08-10 07:48:51 +00:00
André Bargull
268981bb20 Bug 1539780: Remove "--with-intl-api=build" build config option. r=jwalden
There are about the same number of occurrences of "ENABLE_INTL_API" and "EXPOSE_INTL_API"
in the tree, so preferring one over the other doesn't lead to fewer changes. Therefore
I went with "ENABLE_INTL_API", because "ENABLE_" (resp. "MOZ_ENABLE") is already used as
the prefix for other preprocessor ifdef's.

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

--HG--
extra : moz-landing-system : lando
2019-08-09 19:43:19 +00:00
Andy Wingo
706d0e26b7 Bug 1572714 - Fix TypedObject/bigint test when TypedObject unavailable r=jandem
Differential Revision: https://phabricator.services.mozilla.com/D41569

--HG--
extra : moz-landing-system : lando
2019-08-12 15:31:42 +00:00
Benjamin Bouvier
344a794265 Bug 1571464: Only display the function's IR in info level when Cranelift fails; r=jseward
The gczeal test change was added because to make it more deterministic, after
it started failing in automation following this change.

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

--HG--
extra : moz-landing-system : lando
2019-08-12 15:47:53 +00:00
Jon Coppeard
d21beb7f9e Bug 1572782 - Remove unused js::FreeOp alias and remaining references r=tcampbell?
Differential Revision: https://phabricator.services.mozilla.com/D41413

--HG--
extra : moz-landing-system : lando
2019-08-12 12:35:11 +00:00
Jon Coppeard
6c416aec4d Bug 1572782 - Replace internal use of js::FreeOp with JSFreeOp r=tcampbell?
Sorry for the huge patch.  This is pretty much a search and replace of all uses of js::FreeOp.

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

--HG--
extra : moz-landing-system : lando
2019-08-12 10:43:51 +00:00
Jon Coppeard
4f45eff7cc Bug 1572782 - Remove external references to js::FreeOp r=mccr8?
Replace external use of js::FreeOp with JSFreeOp.

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

--HG--
extra : moz-landing-system : lando
2019-08-12 10:43:32 +00:00
Jon Coppeard
a00726d223 Bug 1572782 - Remove js::FreeOp and make JSFreeOp opaque in public API r=tcampbell?
Merge js::FreeOp and JSFreeOp, but alias the former to the latter while we fix uses.

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

--HG--
extra : moz-landing-system : lando
2019-08-12 10:43:32 +00:00
Oana Pop Rus
44aafcc0d0 Backed out 4 changesets (bug 1572782) for build bustages at build/src/obj-firefox/dist/include/nsIXPCScriptable.h on a CLOSED TREE
Backed out changeset ec9d15c69bc8 (bug 1572782)
Backed out changeset 8239e4baa0f4 (bug 1572782)
Backed out changeset 9fd7bea2b512 (bug 1572782)
Backed out changeset 11d750555fe1 (bug 1572782)
2019-08-12 13:37:03 +03:00
Jon Coppeard
fa84e34044 Bug 1572782 - Remove unused js::FreeOp alias r=tcampbell?
Differential Revision: https://phabricator.services.mozilla.com/D41413

--HG--
extra : moz-landing-system : lando
2019-08-12 10:16:04 +00:00
Jon Coppeard
8186c345e2 Bug 1572782 - Replace internal use of js::FreeOp with JSFreeOp r=tcampbell?
Sorry for the huge patch.  This is pretty much a search and replace of all uses of js::FreeOp.

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

--HG--
extra : moz-landing-system : lando
2019-08-12 10:16:02 +00:00
Jon Coppeard
68fef4ffb0 Bug 1572782 - Remove external references to js::FreeOp r=mccr8?
Replace external use of js::FreeOp with JSFreeOp.

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

--HG--
extra : moz-landing-system : lando
2019-08-12 10:16:00 +00:00
Jon Coppeard
9d51a35e93 Bug 1572782 - Remove js::FreeOp and make JSFreeOp opaque in public API r=tcampbell?
Merge js::FreeOp and JSFreeOp, but alias the former to the latter while we fix uses.

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

--HG--
extra : moz-landing-system : lando
2019-08-12 10:15:57 +00:00
Henri Sivonen
ed1e9fd632 Bug 1572364 - Make jsrust_shared a non-optional dependency of gkrust-shared. r=bbouvier
Differential Revision: https://phabricator.services.mozilla.com/D41163

--HG--
extra : moz-landing-system : lando
2019-08-09 17:32:29 +00:00
Paul Bone
b7a967139e Bug 1569924 - Run ./mach clang-format -p js/src r=sfink
# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2019-08-12 03:27:23 +00:00
Jan de Mooij
4d5c0d5eb6 Bug 1570259 part 5 - Remove AutoSetHelperThreadContext from off-thread Ion and Wasm tasks. r=tcampbell,luke
Off-thread tasks now use a pool of JSContexts (for compatibility with the XPCOM thread pool).
Tasks that don't need a JSContext can run without one (nullptr TlsContext). We can now do this
for Ion and Wasm tasks too.

Depends on D41380

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

--HG--
extra : moz-landing-system : lando
2019-08-09 15:27:10 +00:00
Jan de Mooij
23cbbf5845 Bug 1570259 part 4 - Make AutoUnsafeCallWithABI work without a TlsContext. r=tcampbell
Some functions that are called from the Ion backend use AutoUnsafeCallWithABI.

Initially I wanted to fix this by splitting these functions in two separate
functions, but this doesn't work well for all the Math builtins that are called
by GVN.

Depends on D41379

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

--HG--
extra : moz-landing-system : lando
2019-08-09 14:41:27 +00:00
Jan de Mooij
3fd18f4434 Bug 1570259 part 3 - Move some fields from JSContext to JitContext. r=tcampbell
This will allow us to run off-thread Ion tasks without a JSContext.

I renamed IonCompiling and IonCompilation to IonBackend to make it
clearer that this doesn't include IonBuilder time.

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

--HG--
extra : moz-landing-system : lando
2019-08-11 09:05:23 +00:00
Jan de Mooij
93adc5cc85 Bug 1570259 part 2 - Group JitContext fields and use new initializer syntax. r=luke
Depends on D41377

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

--HG--
extra : moz-landing-system : lando
2019-08-09 15:26:35 +00:00
Jan de Mooij
883264b018 Bug 1570259 part 1 - Document and clean up JitContext constructors. r=luke
The next patch will simplify the constructor code a bit more.

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

--HG--
extra : moz-landing-system : lando
2019-08-09 15:26:03 +00:00
Jan de Mooij
541cfda7f5 Bug 1552154 part 6 - Remove BaselineScript's pc-to-native map. r=tcampbell
Differential Revision: https://phabricator.services.mozilla.com/D40949

--HG--
extra : moz-landing-system : lando
2019-08-10 10:21:34 +00:00
Jan de Mooij
85db9b40c2 Bug 1552154 part 5 - Stop using pc-to-native map for BaselineScript::toggleDebugTraps. r=tcampbell
Because DebugTrapEntries are only present if the script has debugger instrumentation
it should be fine to store this as a simple list of entries.

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

--HG--
extra : moz-landing-system : lando
2019-08-10 10:21:20 +00:00
Jan de Mooij
e6fbf15029 Bug 1552154 part 4 - Stop using pc-to-native map for BaselineScript::approximatePcForNativeAddress. r=tcampbell
Differential Revision: https://phabricator.services.mozilla.com/D40947

--HG--
extra : moz-landing-system : lando
2019-08-10 10:21:00 +00:00
Jan de Mooij
99451ccd92 Bug 1552154 part 3 - Stop using pc-to-native map for BaselineScript::computeResumeNativeOffsets. r=tcampbell
Differential Revision: https://phabricator.services.mozilla.com/D40946

--HG--
extra : moz-landing-system : lando
2019-08-10 10:20:41 +00:00
Jan de Mooij
d69bf865df Bug 1552154 part 2 - Stop using pc-to-native map for OSR into Baseline JIT. r=tcampbell
Differential Revision: https://phabricator.services.mozilla.com/D40945

--HG--
extra : moz-landing-system : lando
2019-08-10 10:20:27 +00:00
Jan de Mooij
d870ef9328 Bug 1552154 part 1 - Use mozilla::Span<> in BaselineScript, clean up RetAddrEntry code a bit. r=tcampbell
Differential Revision: https://phabricator.services.mozilla.com/D40944

--HG--
extra : moz-landing-system : lando
2019-08-10 10:20:08 +00:00
Steve Fink
e79384d24c Bug 1572207 - Update AutoStableStringChars comment, r=jonco
Differential Revision: https://phabricator.services.mozilla.com/D41421

--HG--
extra : moz-landing-system : lando
2019-08-09 20:41:12 +00:00
Andrew McCreight
9550144327 Bug 1572781 - Stop doing cross-origin navigation in XPConnect browser tests. r=kmag
These tests both load a page, create some chrome reference to it, then
navigate to another page to cause a window close on the original page,
then check to make sure the references to the original page have gone
away.

With Fission, if the navigation is cross-process, then the message
manager gets torn down in the original process where the browser test
is running, and the sendAsyncMessage call in content-task.js fails
with the cryptic error NS_ERROR_ILLEGAL_VALUE.

This can be fixed by making the navigation not be cross-origin. The
test only wants the original pages to be torn down. The origin of the
new page doesn't matter.

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

--HG--
extra : moz-landing-system : lando
2019-08-09 20:08:08 +00:00
Jim Blandy
715bf97a70 Bug 1569080: Correct #includes in js/src/debugger. r=jorendorff
These changes were produced using the Include What You Use tool, which uses the
Clang front end to figure out which headers actually declare the identifiers
you're using.

These changes aren't exactly the ones IWYU suggests. The tool has some odd false
positives, even when you use its 'pragmas' to tell it about headers like
jsapi.h, which is supposed to gather up other headers for you. And there are
some cases where I could get away with a forward declaration (say, for Maybe),
but I really just want to #include the full header because it seems better. But
overall this patch has only minor deviations from IWYU's suggestions.

No intended change in execution or visible behavior.

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

--HG--
extra : moz-landing-system : lando
2019-08-08 23:20:21 +00:00
Jim Blandy
1ff16f50ee Bug 1567245: Have Debugger::wrapVariantReferent obtain the wrapper and referent types from the DebuggerWeakMap. r=jorendorff
Finally, once we know the type of the map we're consulting, that tells us all
the other types we need to know: certainly the referent and wrapper types, but
also the referent variant type, via the wrapper.

DebuggerWeakMap does need new member types to tell us what its Referent and
Wrapper types are. Rename the type parameters to avoid shadowing.

Since the map type can be inferred from the call, we no longer need to pass any
type parameters at all when we call the innermost wrapVariantReferent overload.

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

--HG--
extra : moz-landing-system : lando
2019-08-08 23:55:29 +00:00
Jim Blandy
a8ab5bb0ed Bug 1567245: Tighten type of Debugger::generatorFrames and Debugger::sources. r=jorendorff
For generatorFrames, this doesn't matter, but for sources, subsequent patches
need a more precise Referent type than simply 'JSObject'.

Any type used as a weak map key needs a MovableCellHasher instantiation, so add
the necessary ones to Barrier.cpp. Since the list is getting long, sort it.

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

--HG--
extra : moz-landing-system : lando
2019-08-08 23:20:13 +00:00
Jim Blandy
2670cfec30 Bug 1567245: Factor out pointer from DebuggerWeakMap Referent type parameter. r=jorendorff
It's more convenient for a DebuggerWeakMap's Wrapper type parameter to be the
pointed-to type, not the pointer type, since we'll be consulting its member
types. Then, it's a bit more consistent to also use the pointed-to type for
Referent.

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

--HG--
extra : moz-landing-system : lando
2019-08-08 23:20:09 +00:00
Jim Blandy
6475ea735f Bug 1567245: Let Debugger::wrapVariantReferent consult DebuggerScript and DebuggerSource for their referent variant types. r=jorendorff
Give DebuggerScript and DebuggerSource a member type that spells out the variant
type appropriate for their referents. This allows wrapVariantReferent to simply
consult the wrapper for the referent variant type instead of demanding it as a
type parameter.

No intended change in visible behavior.

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

--HG--
extra : moz-landing-system : lando
2019-08-08 23:49:40 +00:00
Jim Blandy
301b3b222f Bug 1567245: Rename DebuggerWeakMap type parameter 'UnbarrieredKey' to 'Referent'. r=jorendorff
Technically, DebuggerWeakMap could be used for any sort of cross-compartment
mapping. But we actually only use it for looking up Debugger reflection objects,
so it is more informative to call the key and value types 'referent' and
'wrapper'.

No intended change in visible behavior.

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

--HG--
extra : moz-landing-system : lando
2019-08-08 23:20:02 +00:00
Jim Blandy
e09dbb9496 Bug 1567245: Tighten value types for DebuggerWeakMap. r=jorendorff
Give DebuggerWeakMap a `Wrapper` type parameter to use as the WeakMap value type
instead of plain JSObject*. Then, supply a specific wrapper class type for each
DebuggerWeakMap instantiation.

No intended change in visible behavior.

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

--HG--
extra : moz-landing-system : lando
2019-08-08 23:43:41 +00:00
Jim Blandy
299e8fcf1b Bug 1564164: Move DebuggerSource into its own file. r=jorendorff
This adds js/src/dbg/Source.{cpp,h}, and moves DebuggerSource's definition
there. No intended change in implementation or visible behavior.

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

--HG--
extra : moz-landing-system : lando
2019-08-08 23:37:46 +00:00
Jim Blandy
dd256ecc20 Bug 1564170: Give Debugger.Source instances their own NativeObject subclass, DebuggerSource. r=jorendorff
Differential Revision: https://phabricator.services.mozilla.com/D38268

--HG--
extra : moz-landing-system : lando
2019-08-08 23:37:54 +00:00
Steve Fink
c48c9c7b7d Bug 1570465 - Postpone switching to gray as long as black is on the mark stack r=jonco
Differential Revision: https://phabricator.services.mozilla.com/D40122

--HG--
extra : moz-landing-system : lando
2019-08-07 09:53:55 +00:00
Will Hawkins
618bfdcbb6 Bug 1571124: Calculate the data size of a JSScript dynamically. r=tcampbell
Differential Revision: https://phabricator.services.mozilla.com/D41325

--HG--
extra : moz-landing-system : lando
2019-08-09 16:38:08 +00:00
Jon Coppeard
d74716c7d8 Bug 1560375 - Share string wrappers between all comparments in a zone r=jandem?
This moves the string wrapper map to the zone where it's shared by all compartments in the zone.

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

--HG--
extra : moz-landing-system : lando
2019-08-09 14:55:30 +00:00
kellykc72
aa38026df8 Bug 1531480 - Replace uses of jsbytecode* with BytecodeLocation and BytecodeIterator inside RemoveReferenceNames r=nbp
Encapsulate manipulation of bytecode within RemoveReferenceNames method using accessor classes BytecodeLocation and BytecodeIterator

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

--HG--
extra : moz-landing-system : lando
2019-08-09 14:33:56 +00:00
Benjamin Bouvier
d56c1b818d Bug 1571230: Accept "inf" for infinity in wasmTextToBinary; r=jseward
Differential Revision: https://phabricator.services.mozilla.com/D40624

--HG--
extra : moz-landing-system : lando
2019-08-09 10:35:12 +00:00
Jon Coppeard
9987f93cc0 Bug 1571021 - Change the wrapper value type to that of the key r=jandem?
Differential Revision: https://phabricator.services.mozilla.com/D41186

--HG--
extra : moz-landing-system : lando
2019-08-09 10:05:52 +00:00
Jon Coppeard
3fb04aa631 Bug 1571021 - Key wrapper maps by wrapped type directly and remove CrossCompartmentKey class r=jandem?
Differential Revision: https://phabricator.services.mozilla.com/D41184

--HG--
extra : moz-landing-system : lando
2019-08-09 10:05:45 +00:00
Jon Coppeard
a4a756e0e6 Bug 1571021 - Store string wrappers separately to object wrappers r=jandem?
This splits off string wrappers into a separate table with a different type (because we don't need to keep a separate sub table per compartment).

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

--HG--
extra : moz-landing-system : lando
2019-08-09 10:05:35 +00:00