Bug 1843499 - Part 4: Add JSOp::AsyncReject. r=iain
commita355b68cf74f2b7c8f7b8abfa5405379dbe0c2cc
authorAndré Bargull <andre.bargull@gmail.com>
Mon, 22 Jan 2024 14:29:42 +0000 (22 14:29 +0000)
committerAndré Bargull <andre.bargull@gmail.com>
Mon, 22 Jan 2024 14:29:42 +0000 (22 14:29 +0000)
tree61bdb064cafe40ad1a8e5b2032e24054fd5f4f2e
parentb65e00781b544fe17e8cb54978f3e5f7119fdb30
Bug 1843499 - Part 4: Add JSOp::AsyncReject. r=iain

Split rejection handling from `JSOp::AsyncResolve` into a new `JSOp::AsyncReject`
operation. Similar to the last parts, the new `JSOp::AsyncReject` opcode also
keeps the original exception stack trace.

Differential Revision: https://phabricator.services.mozilla.com/D183565
21 files changed:
js/src/builtin/Promise.cpp
js/src/builtin/Promise.h
js/src/debugger/Script.cpp
js/src/frontend/AsyncEmitter.cpp
js/src/jit-test/tests/async/await-exception-stack-in-finally-1.js [new file with mode: 0644]
js/src/jit-test/tests/async/await-exception-stack-in-finally-2.js [new file with mode: 0644]
js/src/jit-test/tests/async/await-exception-stack-in-finally-3.js [new file with mode: 0644]
js/src/jit-test/tests/debug/throw-exception-stack-location-async.js [new file with mode: 0644]
js/src/jit/BaselineCodeGen.cpp
js/src/jit/CodeGenerator.cpp
js/src/jit/LIROps.yaml
js/src/jit/Lowering.cpp
js/src/jit/MIROps.yaml
js/src/jit/VMFunctionList-inl.h
js/src/jit/WarpBuilder.cpp
js/src/jit/WarpOracle.cpp
js/src/vm/AsyncFunction.cpp
js/src/vm/AsyncFunction.h
js/src/vm/BytecodeUtil.cpp
js/src/vm/Interpreter.cpp
js/src/vm/Opcodes.h