Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 14eaa7f48f80bc914663fc48ad85bdcbb42688ff
      
https://github.com/WebKit/WebKit/commit/14eaa7f48f80bc914663fc48ad85bdcbb42688ff
  Author: Daniel Liu <danl...@umich.edu>
  Date:   2024-09-19 (Thu, 19 Sep 2024)

  Changed paths:
    M JSTests/wasm/spec-harness/sync_index.js
    M JSTests/wasm/spec-harness/wasm-constants.js
    A JSTests/wasm/spec-tests/throw_ref.wast.js
    A JSTests/wasm/spec-tests/try_table.wast.js
    A JSTests/wasm/stress/throw-null-ref.js
    A JSTests/wasm/stress/try-table-all-ref-simple.js
    A JSTests/wasm/stress/try-table-all-simple.js
    A JSTests/wasm/stress/try-table-argument.js
    A JSTests/wasm/stress/try-table-call.js
    A JSTests/wasm/stress/try-table-complexcatch1.js
    A JSTests/wasm/stress/try-table-complexcatch2.js
    A JSTests/wasm/stress/try-table-f32-argument.js
    A JSTests/wasm/stress/try-table-f64-argument.js
    A JSTests/wasm/stress/try-table-i64-argument.js
    A JSTests/wasm/stress/try-table-multicatch.js
    A JSTests/wasm/stress/try-table-ref-simple.js
    A JSTests/wasm/stress/try-table-simple.js
    A JSTests/wasm/stress/try-table-unwind.js
    M Source/JavaScriptCore/assembler/JITOperationList.cpp
    M Source/JavaScriptCore/bytecode/BytecodeList.rb
    M Source/JavaScriptCore/llint/LLIntExceptions.cpp
    M Source/JavaScriptCore/llint/LLIntExceptions.h
    M Source/JavaScriptCore/llint/LLIntThunks.cpp
    M Source/JavaScriptCore/llint/LLIntThunks.h
    M Source/JavaScriptCore/llint/WebAssembly.asm
    M Source/JavaScriptCore/wasm/WasmBBQJIT.cpp
    M Source/JavaScriptCore/wasm/WasmBBQJIT.h
    M Source/JavaScriptCore/wasm/WasmBBQJIT32_64.cpp
    M Source/JavaScriptCore/wasm/WasmBBQJIT32_64.h
    M Source/JavaScriptCore/wasm/WasmBBQJIT64.cpp
    M Source/JavaScriptCore/wasm/WasmBBQJIT64.h
    M Source/JavaScriptCore/wasm/WasmCallee.cpp
    M Source/JavaScriptCore/wasm/WasmCallingConvention.h
    M Source/JavaScriptCore/wasm/WasmConstExprGenerator.cpp
    M Source/JavaScriptCore/wasm/WasmExceptionType.h
    M Source/JavaScriptCore/wasm/WasmFormat.h
    M Source/JavaScriptCore/wasm/WasmFunctionParser.h
    M Source/JavaScriptCore/wasm/WasmHandlerInfo.cpp
    M Source/JavaScriptCore/wasm/WasmHandlerInfo.h
    M Source/JavaScriptCore/wasm/WasmIPIntGenerator.cpp
    M Source/JavaScriptCore/wasm/WasmIRGeneratorHelpers.h
    M Source/JavaScriptCore/wasm/WasmLLIntGenerator.cpp
    M Source/JavaScriptCore/wasm/WasmOMGIRGenerator.cpp
    M Source/JavaScriptCore/wasm/WasmOMGIRGenerator32_64.cpp
    M Source/JavaScriptCore/wasm/WasmOperations.cpp
    M Source/JavaScriptCore/wasm/WasmSlowPaths.cpp
    M Source/JavaScriptCore/wasm/WasmSlowPaths.h
    M Source/JavaScriptCore/wasm/WasmTypeDefinition.h
    M Source/JavaScriptCore/wasm/generateWasmOpsHeader.py
    M Source/JavaScriptCore/wasm/js/JSWebAssemblyStruct.cpp
    M Source/JavaScriptCore/wasm/js/WasmToJS.cpp
    M Source/JavaScriptCore/wasm/wasm.json

  Log Message:
  -----------
  Implement new Wasm exception spec
https://bugs.webkit.org/show_bug.cgi?id=277547
rdar://131409318

Reviewed by Yusuke Suzuki.

This patch implements the new WebAssembly Exceptions proposal (with exnref).

https://github.com/WebAssembly/exception-handling/blob/main/proposals/exception-handling/Exceptions.md

The parser now handles `try_table` and `throw_ref`, as well as `exnref`
types, in LLInt, BBQ, and OMG.

* JSTests/wasm/spec-tests/throw_ref.wast.js: Added.
(hostref):
(eq_ref):
(let.handler.get target):
(register):
(module):
(instance):
(call):
(get instance):
(exports):
(run):
(assert_malformed):
(assert_malformed_custom):
(assert_invalid):
(assert_invalid_custom):
(assert_unlinkable):
(assert_uninstantiable):
(assert_trap):
(assert_exception):
(try.f):
(catch):
(assert_exhaustion):
(assert_return):
* JSTests/wasm/spec-tests/try_table.wast.js: Added.
(hostref):
(eq_ref):
(let.handler.get target):
(register):
(module):
(instance):
(call):
(get instance):
(exports):
(run):
(assert_malformed):
(assert_malformed_custom):
(assert_invalid):
(assert_invalid_custom):
(assert_unlinkable):
(assert_uninstantiable):
(assert_trap):
(assert_exception):
(try.f):
(catch):
(assert_exhaustion):
(assert_return):
* JSTests/wasm/stress/try-table-all-ref-simple.js: Added.
(instance.exports):
* JSTests/wasm/stress/try-table-all-simple.js: Added.
(instance.exports):
* JSTests/wasm/stress/try-table-argument.js: Added.
(instance.exports):
* JSTests/wasm/stress/try-table-call.js: Added.
(instance.exports):
* JSTests/wasm/stress/try-table-complexcatch1.js: Added.
(instance.exports):
* JSTests/wasm/stress/try-table-complexcatch2.js: Added.
(instance.exports):
* JSTests/wasm/stress/try-table-f32-argument.js: Added.
(instance.exports):
* JSTests/wasm/stress/try-table-f64-argument.js: Added.
(instance.exports):
* JSTests/wasm/stress/try-table-i64-argument.js: Added.
(instance.exports):
* JSTests/wasm/stress/try-table-multicatch.js: Added.
(instance.exports):
* JSTests/wasm/stress/try-table-ref-simple.js: Added.
(instance.exports):
* JSTests/wasm/stress/try-table-simple.js: Added.
(instance.exports):
* JSTests/wasm/stress/try-table-unwind.js: Added.
(instance.exports):
* Source/JavaScriptCore/assembler/JITOperationList.cpp:
(JSC::llintOperations):
* Source/JavaScriptCore/bytecode/BytecodeList.rb:
* Source/JavaScriptCore/llint/LLIntExceptions.cpp:
(JSC::LLInt::handleWasmTryTable):
* Source/JavaScriptCore/llint/LLIntExceptions.h:
* Source/JavaScriptCore/llint/LLIntThunks.cpp:
(JSC::LLInt::handleWasmCatchAllThunk):
(JSC::LLInt::handleWasmTryTableThunk):
* Source/JavaScriptCore/llint/LLIntThunks.h:
* Source/JavaScriptCore/llint/WebAssembly.asm:
* Source/JavaScriptCore/wasm/WasmBBQJIT.cpp:
(JSC::Wasm::BBQJITImpl::BBQJIT::toValueKind):
(JSC::Wasm::BBQJITImpl::BBQJIT::addConstant):
(JSC::Wasm::BBQJITImpl::BBQJIT::addTopLevel):
(JSC::Wasm::BBQJITImpl::BBQJIT::toB3Type):
(JSC::Wasm::BBQJITImpl::BBQJIT::addTryTable):
(JSC::Wasm::BBQJITImpl::BBQJIT::addThrowRef):
(JSC::Wasm::BBQJITImpl::BBQJIT::addEndToUnreachable):
* Source/JavaScriptCore/wasm/WasmBBQJIT.h:
* Source/JavaScriptCore/wasm/WasmBBQJIT32_64.cpp:
(JSC::Wasm::BBQJITImpl::BBQJIT::sizeOfType):
(JSC::Wasm::BBQJITImpl::BBQJIT::getGlobal):
(JSC::Wasm::BBQJITImpl::BBQJIT::setGlobal):
(JSC::Wasm::BBQJITImpl::BBQJIT::emitCatchImpl):
(JSC::Wasm::BBQJITImpl::BBQJIT::emitStoreConst):
(JSC::Wasm::BBQJITImpl::BBQJIT::emitMoveConst):
(JSC::Wasm::BBQJITImpl::BBQJIT::emitStore):
(JSC::Wasm::BBQJITImpl::BBQJIT::emitMoveMemory):
(JSC::Wasm::BBQJITImpl::BBQJIT::emitMoveRegister):
(JSC::Wasm::BBQJITImpl::BBQJIT::emitLoad):
* Source/JavaScriptCore/wasm/WasmBBQJIT32_64.h:
(JSC::Wasm::BBQJITImpl::BBQJIT::emitCCall):
* Source/JavaScriptCore/wasm/WasmBBQJIT64.cpp:
(JSC::Wasm::BBQJITImpl::BBQJIT::sizeOfType):
(JSC::Wasm::BBQJITImpl::BBQJIT::getGlobal):
(JSC::Wasm::BBQJITImpl::BBQJIT::setGlobal):
(JSC::Wasm::BBQJITImpl::BBQJIT::emitCatchImpl):
(JSC::Wasm::BBQJITImpl::BBQJIT::emitCatchTableImpl):
(JSC::Wasm::BBQJITImpl::BBQJIT::emitStoreConst):
(JSC::Wasm::BBQJITImpl::BBQJIT::emitMoveConst):
(JSC::Wasm::BBQJITImpl::BBQJIT::emitStore):
(JSC::Wasm::BBQJITImpl::BBQJIT::emitMoveMemory):
(JSC::Wasm::BBQJITImpl::BBQJIT::emitMoveRegister):
(JSC::Wasm::BBQJITImpl::BBQJIT::emitLoad):
* Source/JavaScriptCore/wasm/WasmBBQJIT64.h:
(JSC::Wasm::BBQJITImpl::BBQJIT::emitCCall):
* Source/JavaScriptCore/wasm/WasmCallee.cpp:
(JSC::Wasm::LLIntCallee::LLIntCallee):
* Source/JavaScriptCore/wasm/WasmCallingConvention.h:
(JSC::Wasm::WasmCallingConvention::marshallLocation const):
(JSC::Wasm::WasmCallingConvention::numberOfStackResults const):
(JSC::Wasm::WasmCallingConvention::numberOfStackArguments const):
(JSC::Wasm::JSCallingConvention::marshallLocation const):
(JSC::Wasm::CCallingConventionArmThumb2::marshallLocation const):
(JSC::Wasm::CCallingConventionArmThumb2::numberOfStackResults const):
(JSC::Wasm::CCallingConventionArmThumb2::numberOfStackArguments const):
* Source/JavaScriptCore/wasm/WasmConstExprGenerator.cpp:
(JSC::Wasm::ConstExprGenerator::addConstant):
* Source/JavaScriptCore/wasm/WasmExceptionType.h:
(JSC::Wasm::isTypeErrorExceptionType):
* Source/JavaScriptCore/wasm/WasmFormat.h:
(JSC::Wasm::isValidHeapTypeKind):
(JSC::Wasm::heapTypeKindAsString):
* Source/JavaScriptCore/wasm/WasmFunctionParser.h:
(JSC::Wasm::FunctionParser<Context>::parseExpression):
(JSC::Wasm::FunctionParser<Context>::parseUnreachableExpression):
* Source/JavaScriptCore/wasm/WasmHandlerInfo.cpp:
(JSC::Wasm::HandlerInfo::initialize):
(JSC::Wasm::HandlerInfo::handlerForIndex):
* Source/JavaScriptCore/wasm/WasmHandlerInfo.h:
(JSC::Wasm::UnlinkedHandlerInfo::typeName const):
* Source/JavaScriptCore/wasm/WasmIPIntGenerator.cpp:
(JSC::Wasm::IPIntGenerator::addTryTable):
(JSC::Wasm::IPIntGenerator::addThrowRef):
* Source/JavaScriptCore/wasm/WasmLLIntGenerator.cpp:
(JSC::Wasm::LLIntGenerator::ControlType::createTryTable):
(JSC::Wasm::LLIntGenerator::ControlType::isTryTable):
(JSC::Wasm::LLIntGenerator::callInformationForCaller):
(JSC::Wasm::LLIntGenerator::callInformationForCallee):
(JSC::Wasm::LLIntGenerator::addArguments):
(JSC::Wasm::LLIntGenerator::addTryTable):
(JSC::Wasm::LLIntGenerator::addThrowRef):
(JSC::Wasm::LLIntGenerator::endTryTable):
(JSC::Wasm::LLIntGenerator::addEndToUnreachable):
* Source/JavaScriptCore/wasm/WasmOMGIRGenerator.cpp:
(JSC::Wasm::OMGIRGenerator::ControlData::ControlData):
(JSC::Wasm::OMGIRGenerator::ControlData::isTryTable):
(JSC::Wasm::OMGIRGenerator::ControlData::dump const):
(JSC::Wasm::OMGIRGenerator::ControlData::endTryTable):
(JSC::Wasm::OMGIRGenerator::ControlData::tryStart const):
(JSC::Wasm::OMGIRGenerator::ControlData::tryEnd const):
(JSC::Wasm::OMGIRGenerator::ControlData::tryDepth const):
(JSC::Wasm::OMGIRGenerator::ControlData::exception const):
(JSC::Wasm::OMGIRGenerator::addTryTable):
(JSC::Wasm::OMGIRGenerator::emitCatchTableImpl):
(JSC::Wasm::OMGIRGenerator::addThrowRef):
(JSC::Wasm::OMGIRGenerator::addEndToUnreachable):
* Source/JavaScriptCore/wasm/WasmOperations.cpp:
(JSC::Wasm::JSC_DEFINE_JIT_OPERATION):
* Source/JavaScriptCore/wasm/WasmSlowPaths.cpp:
(JSC::LLInt::WASM_SLOW_PATH_DECL):
* Source/JavaScriptCore/wasm/WasmSlowPaths.h:
* Source/JavaScriptCore/wasm/WasmTypeDefinition.h:
(JSC::Wasm::typeKindSizeInBytes):
* Source/JavaScriptCore/wasm/generateWasmOpsHeader.py:
* Source/JavaScriptCore/wasm/js/JSWebAssemblyStruct.cpp:
(JSC::JSWebAssemblyStruct::set):
* Source/JavaScriptCore/wasm/js/WasmToJS.cpp:
(JSC::Wasm::wasmToJS):
* Source/JavaScriptCore/wasm/wasm.json:

Canonical link: https://commits.webkit.org/283954@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to