[webkit-changes] [WebKit/WebKit] 8e237a: Implement table instructions, f64 arithmetic, and ...

Daniel Liu noreply at github.com
Thu Jul 27 16:02:42 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 8e237a17b93c448615544a93160b779c8220f68d
      https://github.com/WebKit/WebKit/commit/8e237a17b93c448615544a93160b779c8220f68d
  Author: Daniel Liu <danlliu at umich.edu>
  Date:   2023-07-27 (Thu, 27 Jul 2023)

  Changed paths:
    A JSTests/wasm/ipint-tests/ipint-error-check-call-null.js
    A JSTests/wasm/ipint-tests/ipint-error-check-call-sig.js
    A JSTests/wasm/ipint-tests/ipint-error-check-mem-outofbounds.js
    A JSTests/wasm/ipint-tests/ipint-error-check-trunc-outofbounds.js
    M JSTests/wasm/ipint-tests/ipint-test-f64-ops.js
    A JSTests/wasm/ipint-tests/ipint-test-table-read.js
    A JSTests/wasm/ipint-tests/ipint-test-type-conversion.js
    M Source/JavaScriptCore/llint/InPlaceInterpreter.asm
    M Source/JavaScriptCore/llint/InPlaceInterpreter.cpp
    M Source/JavaScriptCore/llint/InPlaceInterpreter.h
    M Source/JavaScriptCore/llint/LowLevelInterpreter.asm
    M Source/JavaScriptCore/runtime/OptionsList.h
    M Source/JavaScriptCore/wasm/WasmCallee.cpp
    M Source/JavaScriptCore/wasm/WasmCallee.h
    M Source/JavaScriptCore/wasm/WasmFunctionIPIntMetadataGenerator.cpp
    M Source/JavaScriptCore/wasm/WasmFunctionIPIntMetadataGenerator.h
    M Source/JavaScriptCore/wasm/WasmIPIntGenerator.cpp
    M Source/JavaScriptCore/wasm/WasmSlowPaths.cpp
    M Source/JavaScriptCore/wasm/WasmSlowPaths.h

  Log Message:
  -----------
  Implement table instructions, f64 arithmetic, and type conversions
https://bugs.webkit.org/show_bug.cgi?id=259510
rdar://112869717

Reviewed by Yusuke Suzuki.

Added implementations for table.get, table.set, ref.null, ref.is_null, call_indirect, f64 arithmetic operations, and type conversions; this includes exception handling. Additionally, fix build errors for cloop build.

* JSTests/wasm/ipint-tests/ipint-test-f64-ops.js:
(from.string_appeared_here.import.as.assert.from.string_appeared_here.let.wat.module.func.export.string_appeared_here.param.f64.result.f64.local.0.f64.abs.return.func.export.string_appeared_here.param.f64.result.f64.local.0.f64.neg.return.func.export.string_appeared_here.param.f64.result.f64.local.0.f64.ceil.return.func.export.string_appeared_here.param.f64.result.f64.local.0.f64.floor.return.func.export.string_appeared_here.param.f64.result.f64.local.0.f64.trunc.return.func.export.string_appeared_here.param.f64.result.f64.local.0.f64.nearest.return.func.export.string_appeared_here.param.f64.result.f64.local.0.f64.sqrt.return.func.export.string_appeared_here.param.f64.f64.result.f64.local.0.local.1.f64.add.return.func.export.string_appeared_here.param.f64.f64.result.f64.local.0.local.1.f64.sub.return.func.export.string_appeared_here.param.f64.f64.result.f64.local.0.local.1.f64.mul.return.func.export.string_appeared_here.param.f64.f64.result.f64.local.0.local.1.f64.div.return.func.export.string_appeared_here.param.f64.f64.result.f64.local.0.local.1.f64.min.return.func.export.string_appeared_here.param.f64.f64.result.f64.local.0.local.1.f64.max.return.func.export.string_appeared_here.param.f64.f64.result.f64.local.0.local.1.f64.copysign.return.close):
(y.async test):
(from.string_appeared_here.import.as.assert.from.string_appeared_here.let.wat.module.func.export.string_appeared_here.param.i32.result.i32.local.0.i32.clz.return.func.export.string_appeared_here.param.i32.result.i32.local.0.i32.ctz.return.func.export.string_appeared_here.param.i32.i32.result.i32.local.0.local.1.i32.add.return.func.export.string_appeared_here.param.i32.i32.result.i32.local.0.local.1.i32.sub.return.func.export.string_appeared_here.param.i32.i32.result.i32.local.0.local.1.i32.mul.return.func.export.string_appeared_here.param.i32.i32.result.i32.local.0.local.1.i32.div_s.return.func.export.string_appeared_here.param.i32.i32.result.i32.local.0.local.1.i32.div_u.return.func.export.string_appeared_here.param.i32.i32.result.i32.local.0.local.1.i32.and.return.func.export.string_appeared_here.param.i32.i32.result.i32.local.0.local.1.i32.or.return.func.export.string_appeared_here.param.i32.i32.result.i32.local.0.local.1.i32.xor.return.async test): Deleted.
* JSTests/wasm/ipint-tests/ipint-test-table-read.js: Added.
(from.string_appeared_here.import.as.assert.from.string_appeared_here.let.wat.module.type.i2i.func.param.i32.result.i32.table.table.export.string_appeared_here.3.funcref.func.export.string_appeared_here.result.i32.i32.const.0.table.table.ref.is_null.func.export.string_appeared_here.i32.const.0.ref.null.func.table.table.func.export.string_appeared_here.i32.const.0.ref.func.inc.table.table.func.export.string_appeared_here.param.i32.result.i32.local.0.i32.const.0.call_indirect.table.type.i2i.func.inc.export.string_appeared_here.param.i32.result.i32.local.0.i32.const.1.i32.add.async test):
* JSTests/wasm/ipint-tests/ipint-test-type-conversion.js: Added.
(from.string_appeared_here.import.as.assert.from.string_appeared_here.let.wat.module.func.export.string_appeared_here.param.i64.result.i32.local.0.i32.wrap_i64.func.export.string_appeared_here.param.f32.result.i32.local.0.i32.trunc_f32_s.func.export.string_appeared_here.param.f32.result.i32.local.0.i32.trunc_f32_u.func.export.string_appeared_here.param.f64.result.i32.local.0.i32.trunc_f64_s.func.export.string_appeared_here.param.f64.result.i32.local.0.i32.trunc_f64_u.func.export.string_appeared_here.param.i32.result.i64.local.0.i64.extend_i32_s.func.export.string_appeared_here.param.i32.result.i64.local.0.i64.extend_i32_u.func.export.string_appeared_here.param.f32.result.i64.local.0.i64.trunc_f32_s.func.export.string_appeared_here.param.f32.result.i64.local.0.i64.trunc_f32_u.func.export.string_appeared_here.param.f64.result.i64.local.0.i64.trunc_f64_s.func.export.string_appeared_here.param.f64.result.i64.local.0.i64.trunc_f64_u.func.export.string_appeared_here.param.i32.result.f32.local.0.f32.convert_i32_s.func.export.string_appeared_here.param.i32.result.f32.local.0.f32.convert_i32_u.func.export.string_appeared_here.param.i64.result.f32.local.0.f32.convert_i64_s.func.export.string_appeared_here.param.i64.result.f32.local.0.f32.convert_i64_u.func.export.string_appeared_here.param.f64.result.f32.local.0.f32.demote_f64.func.export.string_appeared_here.param.i32.result.f64.local.0.f64.convert_i32_s.func.export.string_appeared_here.param.i32.result.f64.local.0.f64.convert_i32_u.func.export.string_appeared_here.param.i64.result.f64.local.0.f64.convert_i64_s.func.export.string_appeared_here.param.i64.result.f64.local.0.f64.convert_i64_u.func.export.string_appeared_here.param.f32.result.f64.local.0.f64.promote_f32.func.export.string_appeared_here.param.f32.result.i32.local.0.i32.reinterpret_f32.func.export.string_appeared_here.param.f64.result.i64.local.0.i64.reinterpret_f64.func.export.string_appeared_here.param.i32.result.f32.local.0.f32.reinterpret_i32.func.export.string_appeared_here.param.i64.result.f64.local.0.f64.reinterpret_i64.func.export.string_appeared_here.param.i32.result.i32.local.0.i32.extend8_s.func.export.string_appeared_here.param.i32.result.i32.local.0.i32.extend16_s.func.export.string_appeared_here.param.i64.result.i64.local.0.i64.extend8_s.func.export.string_appeared_here.param.i64.result.i64.local.0.i64.extend16_s.func.export.string_appeared_here.param.i64.result.i64.local.0.i64.extend32_s.close):
(y.async test):
* Source/JavaScriptCore/llint/InPlaceInterpreter.asm:
* Source/JavaScriptCore/wasm/WasmCallee.cpp:
(JSC::Wasm::IPIntCallee::IPIntCallee):
* Source/JavaScriptCore/wasm/WasmCallee.h:
* Source/JavaScriptCore/wasm/WasmFunctionIPIntMetadataGenerator.cpp:
(JSC::Wasm::FunctionIPIntMetadataGenerator::addSignature):
(JSC::Wasm::FunctionIPIntMetadataGenerator::addLEB128ConstantAndLengthForType):
* Source/JavaScriptCore/wasm/WasmFunctionIPIntMetadataGenerator.h:
* Source/JavaScriptCore/wasm/WasmIPIntGenerator.cpp:
(JSC::Wasm::IPIntGenerator::addRefFunc):
(JSC::Wasm::IPIntGenerator::addTableGet):
(JSC::Wasm::IPIntGenerator::addTableSet):
(JSC::Wasm::IPIntGenerator::addCallCommonData):
(JSC::Wasm::IPIntGenerator::addCall):
(JSC::Wasm::IPIntGenerator::addCallIndirect):
* Source/JavaScriptCore/wasm/WasmSlowPaths.cpp:
(JSC::LLInt::WASM_IPINT_EXTERN_CPP_DECL):
* Source/JavaScriptCore/wasm/WasmSlowPaths.h:

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




More information about the webkit-changes mailing list