Parent
Scope
Implement the 18 shared pinned exception/termination imports:
- all six
TopExceptionScope__*operations; JSGlobalObject__clearExceptionExceptTermination,clearTerminationException,createOutOfMemoryError,requestTermination,throwOutOfMemoryError, andthrowStackOverflow;JSC__VM__clearHasTerminationRequest,executionForbidden,hasTerminationRequest,notifyNeedTermination,setExecutionForbidden;JSC__JSValue__isTerminationException.
Acceptance criteria
- The caller-provided 8/56-byte, 8-aligned TopExceptionScope storage retains exact VM identity, supports pure vs trap-aware exception reads, unconditional clear, assertion checking, and safe destruction without escaping stack storage.
- Termination requests are VM-shared and thread-safe; trap-aware scope lookup materializes one stable termination exception, while pure lookup does not process a pending request.
- Normal exceptions clear through
clearExceptionExceptTermination; termination remains and returns false untilclearTerminationExceptionclears both the request and thrown termination exception. - VM request and execution-forbidden controls preserve the pinned behavior, including the source contract where
setExecutionForbiddenmakes execution forbidden regardless of the boolean argument. - OOM creation returns a selected-realm Error without throwing; OOM and stack-overflow throw operations publish exact Error kinds while preserving the first pending exception.
- Focused coverage includes 8- and 56-byte scope buffers, sibling realms/VM identity, normal and primitive exceptions, pending requests, materialization order, stable exception identity, classification, clearing/resumption, foreign/invalid pointers, forbidden state, OOM/stack errors, and first-exception preservation.
- Inventories, README/API evidence, and parent trackers are regenerated from checked-in results.