gecko-dev/js/public
Ioanna Dimitriou 1872e216d0 Bug 1695778 - (Core-Wasm-EH-Ion) part 1: try-catch/throw without reftypes. r=rhunt
Adds basic support for the WebAssembly Exception Handling proposal.
In particular this implements the instructions `try-catch/catch_all` and `throw`
for exceptions carrying values of non reference type.

Spec for try-catch:
https://github.com/WebAssembly/exception-handling/blob/master/proposals/exception-handling/Exceptions.md#try-catch-blocks

Spec for throw:
https://github.com/WebAssembly/exception-handling/blob/master/proposals/exception-handling/Exceptions.md#throwing-an-exception

Comments:

- Adds [SMDOC] documentation for WebAssembly Exception Handling in Ion.
- Does not add support for WebAssembly values of type reftype inside exceptions.
- Does not implement the instructions `rethrow` or `try-delegate`.
- Due to the above, the tests that contain `rethrow`, `try-delegate`, or involve
  exceptions carrying reftype values, are made conditional on the test being run
  with the baseline compiler.
- There are tests added:
  + Tests ensuring that side effects in try blocks are tracked correctly in the
    handlers (side-effects.js).
  + Tests with complex control flow, and with exceptions being thrown by direct
    and by indirect function calls (calls.js).
  + The single memory test in instructions.js is moved to memory.js, where it is
    generalised.
  + Some very basic tests related to Simd128 values (Wasm vectype) are added in
    validation.js, instructions.js, side-effects-in-try.js, and calls.js.

Differential Revision: https://phabricator.services.mozilla.com/D118283
2021-12-21 02:28:47 +00:00
..
experimental Bug 1745351 - Remove JS::StencilCanLazilyParse. r=nbp 2021-12-10 11:27:23 +00:00
friend Bug 1730843 - Part 7 - Implement bytecode/interpreter for record literals r=mgaudet 2021-12-20 15:17:19 +00:00
shadow Bug 1740745 - Part 1: Make needs barrier state atomic r=sfink 2021-11-19 15:42:02 +00:00
AllocPolicy.h Bug 1716147 - Mark TempAllocPolicy as JS_PUBLIC_API. r=sfink 2021-07-08 23:48:21 +00:00
AllocationLogging.h Bug 1678374 - Fix includes in js/public. r=jandem 2021-03-12 10:42:21 +00:00
AllocationRecording.h Bug 1716250 - Remove JS_FRIEND_API. r=jandem,sfink 2021-06-16 19:38:10 +00:00
Array.h Bug 1704042 part 9 - Report an exception for large lengths from JS::GetArrayLength API. r=lth 2021-04-09 13:20:48 +00:00
ArrayBuffer.h Bug 1738712 - Add JS::ArrayBufferCopyData to JSAPI r=sfink 2021-11-15 22:01:48 +00:00
ArrayBufferMaybeShared.h Bug 1716250 - Remove JS_FRIEND_API. r=jandem,sfink 2021-06-16 19:38:10 +00:00
BigInt.h Bug 1706866 - Fix up various details of existing BigInt public API. r=jandem 2021-06-15 08:16:17 +00:00
BuildId.h Bug 1684092 - Part 3: Remove unnecessary #includes of Attributes.h for MOZ_MUST_USE in js/src/. r=jandem 2021-02-12 04:09:24 +00:00
CallAndConstruct.h Bug 1708450 - Move call and construct functions into js/public/CallAndConstruct.h. r=nbp 2021-07-13 11:52:43 +00:00
CallArgs.h
CallNonGenericMethod.h
CharacterEncoding.h Bug 1678374 - Fix includes in js/public. r=jandem 2021-03-12 10:42:21 +00:00
Class.h Bug 1730843 - Part 1 - Add support for empty R&T based on objects r=jandem 2021-12-20 15:17:16 +00:00
ComparisonOperators.h
CompilationAndEvaluation.h Bug 1720619 - Part 2: Add JS::InstantiateOptions. r=tcampbell 2021-10-18 17:08:06 +00:00
CompileOptions.h Bug 1734098 - Part 11: Add JS::DecodeStencilOffThread. r=tcampbell 2021-12-10 04:28:29 +00:00
Context.h Bug 1458339 part 1 - Add an API to set self-hosted XDR content. r=tcampbell 2021-05-12 13:57:55 +00:00
ContextOptions.h Bug 1736060 - Part 1: Add option for import assertions. r=mgaudet,arai 2021-12-01 18:26:08 +00:00
Conversions.h Bug 1730843 - Part 8 - Add support for spread in records r=jandem 2021-12-20 15:17:20 +00:00
Date.h Bug 1678374 - Fix includes in js/public. r=jandem 2021-03-12 10:42:21 +00:00
Debug.h Bug 1736737 - Move SafelyInitialized into a struct to allow partial specialization. r=jonco 2021-10-25 21:18:56 +00:00
Equality.h Bug 1678374 - Fix includes in js/public. r=jandem 2021-03-12 10:42:21 +00:00
ErrorInterceptor.h Bug 1726737 - Part 4: Add public header for JSErrorInterceptor. r=arai 2021-08-20 18:10:34 +00:00
ErrorReport.h Bug 1711878 - Remove unused JSContext arguments from PrintErrorImpl and PrintSingleError. r=mgaudet 2021-06-01 13:56:19 +00:00
Exception.h Bug 1730426 - Add OutOfMemory to JS::ExceptionStatus. r=jandem 2021-09-15 17:34:23 +00:00
ForOfIterator.h Bug 1684092 - Part 3: Remove unnecessary #includes of Attributes.h for MOZ_MUST_USE in js/src/. r=jandem 2021-02-12 04:09:24 +00:00
GCAPI.h Backed out 5 changesets (bug 1672121) for various crashes on mozalloc_handle_oom. CLOSED TREE 2021-11-30 02:59:20 +02:00
GCAnnotations.h Bug 1727374 - Implement a JS_HAZ_VALUE_IS_GC_SAFE annotation, saying that *at the time of the annotation*, the given variable does not contain any GC-invalidatable pointers r=jonco 2021-09-01 17:19:08 +00:00
GCHashTable.h Bug 1736604 - Part 3: Rename MapSweepPolicy to MapEntryGCPolicy r=sfink 2021-11-09 09:17:35 +00:00
GCPolicyAPI.h Bug 1744059 - Rename UnsafeTraceRoot to TraceRoot as it is not unsafe to use r=sfink,mccr8 2021-12-07 09:02:36 +00:00
GCTypeMacros.h
GCVariant.h Bug 1678374 - Fix includes in js/public. r=jandem 2021-03-12 10:42:21 +00:00
GCVector.h Bug 1736604 - Part 2: Remove GCPolicy and container needsSweep and sweep methods r=sfink 2021-11-09 09:17:34 +00:00
GlobalObject.h Bug 1726737 - Part 14: Add public header for global object functions. r=arai 2021-08-20 18:10:37 +00:00
HashTable.h
HeapAPI.h Bug 1744770 - Part 2: Don't immediately decommit new chunks when we are allocating quickly r=sfink 2021-12-08 08:34:59 +00:00
HelperThreadAPI.h Bug 1716940 - Pass external thread stack size through to the JS engine r=sfink,bas 2021-06-17 16:14:19 +00:00
Id.h Bug 1744059 - Rename UnsafeTraceRoot to TraceRoot as it is not unsafe to use r=sfink,mccr8 2021-12-07 09:02:36 +00:00
Initialization.h Bug 1709135 - XDR: Make decoded content immutable. r=arai 2021-05-12 13:57:56 +00:00
Interrupt.h Bug 1726737 - Part 10: Add public header for interrupt functions. r=arai 2021-08-20 18:10:36 +00:00
JSON.h Bug 1678374 - Fix includes in js/public. r=jandem 2021-03-12 10:42:21 +00:00
LocaleSensitive.h
MapAndSet.h Bug 1708739 - Move Map and Set APIs to new public header r=yulia 2021-05-01 12:10:15 +00:00
MemoryCallbacks.h Bug 1726737 - Part 6: Add public header for out-of-memory callbacks. r=arai 2021-08-20 18:10:34 +00:00
MemoryFunctions.h Bug 1693257 - Remove unused JS::MemoryUse::PerfMeasurement r=tcampbell 2021-05-28 17:41:06 +00:00
MemoryMetrics.h Bug 1615988 - Fix memory reporting of wasm memory. r=sfink 2021-09-07 21:03:48 +00:00
Modules.h Bug 1736060 - Part 4: Implement HostGetSupportedImportAssertions. r=mgaudet,arai 2021-12-01 18:26:09 +00:00
Object.h Bug 1719457 - Remove support for JSObject private slots. r=jonco 2021-07-30 12:43:17 +00:00
OffThreadScriptCompilation.h Bug 1734098 - Part 15: Use consistent name for decode multi stencils API. r=tcampbell 2021-12-10 04:28:31 +00:00
Principals.h Bug 1678374 - Fix includes in js/public. r=jandem 2021-03-12 10:42:21 +00:00
Printf.h
ProfilingCategory.h Bug 1716250 - Remove JS_FRIEND_API. r=jandem,sfink 2021-06-16 19:38:10 +00:00
ProfilingFrameIterator.h Bug 1716250 - Remove JS_FRIEND_API. r=jandem,sfink 2021-06-16 19:38:10 +00:00
ProfilingStack.h Bug 1724187 - Change the category of the ChromeUtils.addProfilerMarker label frame to PROFILER so that this code is ignored in stacks captured for profiler markers, r=gerald. 2021-08-06 20:24:42 +00:00
Promise.h Bug 1732953 - Do not optimize out the Promise.prototype.{then,catch} return value if user-interaction flag is set. r=yulia 2021-10-04 17:54:28 +00:00
PropertyAndElement.h Bug 1708448 - Move property and element functions into js/public/PropertyAndElement.h. r=nbp 2021-07-13 11:52:42 +00:00
PropertyDescriptor.h Bug 1708432 - Move JS_Get*PropertyDescriptor* to js/public/PropertyDescriptor.h. r=nbp 2021-07-13 11:52:41 +00:00
PropertySpec.h Bug 1713083 part 2 - Remove JSPROP_GETTER and JSPROP_SETTER. r=evilpie 2021-05-27 15:03:38 +00:00
ProtoKey.h Bug 1730843 - Part 1 - Add support for empty R&T based on objects r=jandem 2021-12-20 15:17:16 +00:00
Proxy.h Bug 1716250 - Remove JS_FRIEND_API. r=jandem,sfink 2021-06-16 19:38:10 +00:00
Realm.h Bug 1589066 - Part 2: Remove unused RealmNeedsSweep API and implementation r=sfink 2021-10-14 10:52:27 +00:00
RealmIterators.h Bug 1708441 - Create js/public/RealmIterators.h and move some functions from jsapi.h in it. r=jonco 2021-04-30 16:30:45 +00:00
RealmOptions.h Bug 1566146 - Implement Set methods union, intersection, difference, symmetricDifference, isSubsetOf, isSuperSetOf, isDisjointFrom as per https://tc39.es/proposal-set-methods/ r=arai 2021-11-30 03:40:50 +00:00
RefCounted.h
RegExp.h Bug 1730992: Add comment to ExecuteRegExp and ExecuteRegExpNoStatics r=sfink DONTBUILD 2021-09-17 19:05:31 +00:00
RegExpFlags.h Bug 1519483: Add hasIndices to RegExpFlags r=mgaudet 2021-03-10 22:10:14 +00:00
Result.h
RootingAPI.h Bug 1736737 - Implement Heap<ArrayBufferOrView> (for all subtypes) r=jonco 2021-10-25 21:18:57 +00:00
SavedFrameAPI.h Bug 1716250 - Remove JS_FRIEND_API. r=jandem,sfink 2021-06-16 19:38:10 +00:00
ScalarType.h Bug 1720422 - Move js::Scalar -> JS::Scalar for public API, but alias it as js::Scalar r=jonco 2021-09-08 23:47:00 +00:00
ScriptPrivate.h Bug 1726737 - Part 3: Add public header for ScriptPrivate functions. r=arai 2021-08-20 18:10:33 +00:00
SharedArrayBuffer.h Bug 1678374 - Fix includes in js/public. r=jandem 2021-03-12 10:42:21 +00:00
SliceBudget.h Backed out 5 changesets (bug 1672121) for various crashes on mozalloc_handle_oom. CLOSED TREE 2021-11-30 02:59:20 +02:00
SourceText.h Bug 1678374 - Fix includes in js/public. r=jandem 2021-03-12 10:42:21 +00:00
StableStringChars.h Bug 1716250 - Remove JS_FRIEND_API. r=jandem,sfink 2021-06-16 19:38:10 +00:00
Stack.h Bug 1726737 - Part 1: Add public header for stack operations. r=arai 2021-08-20 18:10:32 +00:00
Stream.h
StreamConsumer.h Bug 1545131 - compress wasm alt data entries (r=jandem) 2021-10-21 22:08:14 +00:00
String.h Bug 1724553 - Fix include files in js/public/String.h. r=tcampbell 2021-08-10 14:40:35 +00:00
StructuredClone.h Bug 1644600 - Move JSStructuredCloneData destructor into private impl r=sfink 2021-05-04 14:05:08 +00:00
SweepingAPI.h Bug 1736397 - Part 6: Use tracing for the incremental read barrier on WeakCached maps and sets r=sfink 2021-10-19 14:43:32 +00:00
Symbol.h
TelemetryTimers.h Bug 1726737 - Part 12: Add public header for telemetry timers. r=arai 2021-08-20 18:10:37 +00:00
TraceKind.h Bug 1715512 part 2 - Add PropMap GC thing. r=jonco 2021-06-17 16:51:40 +00:00
TraceLoggerAPI.h Bug 1678374 - Fix includes in js/public. r=jandem 2021-03-12 10:42:21 +00:00
TracingAPI.h Bug 1744059 - Rename UnsafeTraceRoot to TraceRoot as it is not unsafe to use r=sfink,mccr8 2021-12-07 09:02:36 +00:00
Transcoding.h Bug 1734098 - Part 15: Use consistent name for decode multi stencils API. r=tcampbell 2021-12-10 04:28:31 +00:00
TypeDecls.h Bug 1730843 - Part 1 - Add support for empty R&T based on objects r=jandem 2021-12-20 15:17:16 +00:00
UbiNode.h Bug 1693775 - Change remaining uses to pass GCCellPtr by value r=sfink 2021-11-16 09:09:38 +00:00
UbiNodeBreadthFirst.h Bug 1678374 - Fix includes in js/public. r=jandem 2021-03-12 10:42:21 +00:00
UbiNodeCensus.h Bug 1726123 - Part 1: Remove unnecessary includes to jsapi.h and jsfriendapi.h. r=arai 2021-08-17 15:45:37 +00:00
UbiNodeDominatorTree.h Bug 1684092 - Part 2: Move [[nodiscard]] to the head of function declarations in js/src/. r=jandem 2021-02-12 04:09:23 +00:00
UbiNodePostOrder.h Bug 1678374 - Fix includes in js/public. r=jandem 2021-03-12 10:42:21 +00:00
UbiNodeShortestPaths.h Bug 1684092 - Part 1: Replace MOZ_MUST_USE with [[nodiscard]] in js/src/. r=jandem 2021-02-12 04:09:22 +00:00
UbiNodeUtils.h
UniquePtr.h
Utility.h Bug 1716250 - Remove JS_FRIEND_API. r=jandem,sfink 2021-06-16 19:38:10 +00:00
Value.h Bug 1730843 - Part 19 - Fix IsExtendedPrimitive check for forwarded objects r=jandem 2021-12-20 15:17:24 +00:00
ValueArray.h
Vector.h
WaitCallbacks.h Bug 1726737 - Part 8: Add public header for wait callbacks. r=arai 2021-08-20 18:10:35 +00:00
Warnings.h
WasmFeatures.h Bug 1695778 - (Core-Wasm-EH-Ion) part 1: try-catch/throw without reftypes. r=rhunt 2021-12-21 02:28:47 +00:00
WasmModule.h
WeakMap.h Bug 1708739 - Move WeakMap APIs to new public header r=yulia 2021-05-01 12:10:14 +00:00
WeakMapPtr.h
Wrapper.h Bug 1716250 - Remove JS_FRIEND_API. r=jandem,sfink 2021-06-16 19:38:10 +00:00
WrapperCallbacks.h Bug 1726737 - Part 7: Add public header for wrapper callbacks. r=arai 2021-08-20 18:10:35 +00:00
Zone.h Bug 1708469 - Split realms, compartments, zones, context and runtime from JSApi; r=jonco 2021-05-04 16:53:05 +00:00