Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 9f221020aa88928636be08e34139c47a803f08af
      
https://github.com/WebKit/WebKit/commit/9f221020aa88928636be08e34139c47a803f08af
  Author: Cole Carley <[email protected]>
  Date:   2026-07-20 (Mon, 20 Jul 2026)

  Changed paths:
    A JSTests/wasm/stress/table64-bulk.js
    A JSTests/wasm/stress/table64-call-indirect.js
    A JSTests/wasm/stress/table64-get-and-set.js
    A JSTests/wasm/stress/table64-grow-and-size.js
    A JSTests/wasm/stress/table64-overflow.js
    M 
LayoutTests/imported/w3c/web-platform-tests/wasm/core/js/memory64/table64.wast.js
    M 
LayoutTests/imported/w3c/web-platform-tests/wasm/core/js/memory64/table_copy64.wast.js
    M 
LayoutTests/imported/w3c/web-platform-tests/wasm/core/js/memory64/table_fill64.wast.js
    M 
LayoutTests/imported/w3c/web-platform-tests/wasm/core/js/memory64/table_get64.wast.js
    M 
LayoutTests/imported/w3c/web-platform-tests/wasm/core/js/memory64/table_grow64.wast.js
    M 
LayoutTests/imported/w3c/web-platform-tests/wasm/core/js/memory64/table_init64.wast.js
    M 
LayoutTests/imported/w3c/web-platform-tests/wasm/core/js/memory64/table_set64.wast.js
    M 
LayoutTests/imported/w3c/web-platform-tests/wasm/core/js/memory64/table_size64.wast.js
    M 
LayoutTests/imported/w3c/web-platform-tests/wasm/core/memory64/address64.wast.js.html
    M 
LayoutTests/imported/w3c/web-platform-tests/wasm/core/memory64/align64.wast.js.html
    M 
LayoutTests/imported/w3c/web-platform-tests/wasm/core/memory64/binary_leb128_64.wast.js.html
    M 
LayoutTests/imported/w3c/web-platform-tests/wasm/core/memory64/bulk64.wast.js.html
    M 
LayoutTests/imported/w3c/web-platform-tests/wasm/core/memory64/call_indirect64.wast.js-expected.txt
    M 
LayoutTests/imported/w3c/web-platform-tests/wasm/core/memory64/call_indirect64.wast.js.html
    M 
LayoutTests/imported/w3c/web-platform-tests/wasm/core/memory64/endianness64.wast.js.html
    M 
LayoutTests/imported/w3c/web-platform-tests/wasm/core/memory64/float_memory64.wast.js.html
    M 
LayoutTests/imported/w3c/web-platform-tests/wasm/core/memory64/load64.wast.js.html
    M 
LayoutTests/imported/w3c/web-platform-tests/wasm/core/memory64/memory64-imports.wast.js.html
    M 
LayoutTests/imported/w3c/web-platform-tests/wasm/core/memory64/memory64.wast.js.html
    M 
LayoutTests/imported/w3c/web-platform-tests/wasm/core/memory64/memory_copy64.wast.js.html
    M 
LayoutTests/imported/w3c/web-platform-tests/wasm/core/memory64/memory_fill64.wast.js.html
    M 
LayoutTests/imported/w3c/web-platform-tests/wasm/core/memory64/memory_grow64.wast.js.html
    M 
LayoutTests/imported/w3c/web-platform-tests/wasm/core/memory64/memory_init64.wast.js.html
    M 
LayoutTests/imported/w3c/web-platform-tests/wasm/core/memory64/memory_redundancy64.wast.js.html
    M 
LayoutTests/imported/w3c/web-platform-tests/wasm/core/memory64/memory_trap64.wast.js.html
    M 
LayoutTests/imported/w3c/web-platform-tests/wasm/core/memory64/table64.wast.js.html
    M 
LayoutTests/imported/w3c/web-platform-tests/wasm/core/memory64/table_copy64.wast.js-expected.txt
    M 
LayoutTests/imported/w3c/web-platform-tests/wasm/core/memory64/table_copy64.wast.js.html
    M 
LayoutTests/imported/w3c/web-platform-tests/wasm/core/memory64/table_copy_mixed.wast.js-expected.txt
    M 
LayoutTests/imported/w3c/web-platform-tests/wasm/core/memory64/table_copy_mixed.wast.js.html
    M 
LayoutTests/imported/w3c/web-platform-tests/wasm/core/memory64/table_fill64.wast.js-expected.txt
    M 
LayoutTests/imported/w3c/web-platform-tests/wasm/core/memory64/table_fill64.wast.js.html
    M 
LayoutTests/imported/w3c/web-platform-tests/wasm/core/memory64/table_get64.wast.js-expected.txt
    M 
LayoutTests/imported/w3c/web-platform-tests/wasm/core/memory64/table_get64.wast.js.html
    M 
LayoutTests/imported/w3c/web-platform-tests/wasm/core/memory64/table_grow64.wast.js-expected.txt
    M 
LayoutTests/imported/w3c/web-platform-tests/wasm/core/memory64/table_grow64.wast.js.html
    M 
LayoutTests/imported/w3c/web-platform-tests/wasm/core/memory64/table_init64.wast.js-expected.txt
    M 
LayoutTests/imported/w3c/web-platform-tests/wasm/core/memory64/table_init64.wast.js.html
    M 
LayoutTests/imported/w3c/web-platform-tests/wasm/core/memory64/table_set64.wast.js-expected.txt
    M 
LayoutTests/imported/w3c/web-platform-tests/wasm/core/memory64/table_set64.wast.js.html
    M 
LayoutTests/imported/w3c/web-platform-tests/wasm/core/memory64/table_size64.wast.js-expected.txt
    M 
LayoutTests/imported/w3c/web-platform-tests/wasm/core/memory64/table_size64.wast.js.html
    M Source/JavaScriptCore/wasm/WasmAddressType.cpp
    M Source/JavaScriptCore/wasm/WasmAddressType.h
    M Source/JavaScriptCore/wasm/WasmFunctionParser.h
    M Source/JavaScriptCore/wasm/WasmIPIntSlowPaths.cpp
    M Source/JavaScriptCore/wasm/WasmIPIntSlowPaths.h
    M Source/JavaScriptCore/wasm/WasmSectionParser.cpp
    M Source/JavaScriptCore/wasm/WasmSectionParser.h

  Log Message:
  -----------
  Implement Table64 in the parser and IPInt tier
https://bugs.webkit.org/show_bug.cgi?id=316710
rdar://179159629

Reviewed by Keith Miller.

In this patch, I allow parsing of the Table64 functions for tables with i64
address types and ensure that the functions work in the IPInt tier.

InPlaceInterpreter64.asm already passes the values as i64, but they
were being truncated in the slow path functions. To fix this, I read the
values as i64s in the table64 case. I also added overflow checks.

Test: JSTests/wasm/stress/table64-get-and-set.js

* JSTests/wasm/stress/table64-bulk.js: Added.
(1.table.tbl):
(10.funcref.table.tbl2):
(10.funcref.func.f1.result.i32.i32.const.42.func.f2.result.i32.i32.const.43.elem.element.funcref.ref.func.f1.ref.func.f2.func.tableInit.export.string_appeared_here):
(count.table.init.tbl.element.func.tableFill.export.string_appeared_here):
(destination.ref.func.f1):
(length.table.fill.tbl.func.tableCopy.export.string_appeared_here):
(length.table.copy.tbl2.tbl.func.resetTables.export.string_appeared_here):
(const.0.ref.null.func):
(const.10.table.fill.tbl):
(test):
(string_appeared_here.const.instance.await.instantiate.wat):
* JSTests/wasm/stress/table64-call-indirect.js: Added.
(const.0.addIndirect.subIndirect.func.add.export.string_appeared_here.param.lhs.i32.param.rhs.i32.result.i32.local.lhs.local.rhs):
(const.0.call_indirect.tbl.type.func_type.func.sub.export.string_appeared_here.param.lhs.i32.param.rhs.i32.result.i32.local.lhs.local.rhs):
(test):
(string_appeared_here.const.instance.await.instantiate.wat):
* JSTests/wasm/stress/table64-get-and-set.js: Added.
(test):
(string_appeared_here.const.instance.await.instantiate.wat):
* JSTests/wasm/stress/table64-grow-and-size.js: Added.
(test):
(string_appeared_here.const.instance.await.instantiate.wat):
* JSTests/wasm/stress/table64-overflow.js: Added.
(test):
* Source/JavaScriptCore/wasm/WasmFunctionParser.h:
(JSC::Wasm::FunctionParser<Context>::parseExpression):
* Source/JavaScriptCore/wasm/WasmIPIntSlowPaths.cpp:
(JSC::IPInt::WASM_IPINT_EXTERN_CPP_DECL):
* Source/JavaScriptCore/wasm/WasmIPIntSlowPaths.h:
* Source/JavaScriptCore/wasm/WasmSectionParser.cpp:
(JSC::Wasm::SectionParser::parseTableHelper):
(JSC::Wasm::SectionParser::parseElement):
(JSC::Wasm::SectionParser::parseI64InitExprForElementSection):
* Source/JavaScriptCore/wasm/WasmSectionParser.h:

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to