Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: d02c68d04f969b9c0cb8103abf7c80c860fb2181
      
https://github.com/WebKit/WebKit/commit/d02c68d04f969b9c0cb8103abf7c80c860fb2181
  Author: Yusuke Suzuki <[email protected]>
  Date:   2026-08-09 (Sun, 09 Aug 2026)

  Changed paths:
    A JSTests/wasm/stress/memory-size-grow-non-minimal-memory-index.js
    M Source/JavaScriptCore/llint/InPlaceInterpreter64.asm
    M Source/JavaScriptCore/wasm/WasmFunctionIPIntMetadataGenerator.cpp
    M Source/JavaScriptCore/wasm/WasmFunctionIPIntMetadataGenerator.h
    M Source/JavaScriptCore/wasm/WasmFunctionParser.h
    M Source/JavaScriptCore/wasm/WasmIPIntGenerator.cpp
    M Source/JavaScriptCore/wasm/WasmIPIntGenerator.h
    M Source/JavaScriptCore/wasm/WasmSectionParser.cpp

  Log Message:
  -----------
  [JSC] Fix memory related wasm parsing
https://bugs.webkit.org/show_bug.cgi?id=321366
rdar://184418597

Reviewed by Sosuke Suzuki.

This patch fixes wasm memory related operations.

1. Remove parseMemoryIndexForBulkOp and just use parseMemoryIndex. The
   spec test is already fixed, so we no longer need this hack.
2. IPInt popMemoryIndex is renamed to popMemoryAddress as what it is
   actually popping is memory address, not memory index.
3. memory.size and memory.grow should record length in the metadata.

Test: JSTests/wasm/stress/memory-size-grow-non-minimal-memory-index.js

* JSTests/wasm/stress/memory-size-grow-non-minimal-memory-index.js: Added.
(leb):
(build):
* Source/JavaScriptCore/llint/InPlaceInterpreter64.asm:
* Source/JavaScriptCore/wasm/WasmFunctionIPIntMetadataGenerator.cpp:
(JSC::Wasm::FunctionIPIntMetadataGenerator::addMemorySize):
(JSC::Wasm::FunctionIPIntMetadataGenerator::addMemoryGrow):
* Source/JavaScriptCore/wasm/WasmFunctionIPIntMetadataGenerator.h:
* Source/JavaScriptCore/wasm/WasmFunctionParser.h:
(JSC::Wasm::FunctionParser<Context>::parseExpression):
(JSC::Wasm::FunctionParser<Context>::parseUnreachableExpression):
(JSC::Wasm::FunctionParser<Context>::parseMemoryIndexForBulkOp): Deleted.
* Source/JavaScriptCore/wasm/WasmIPIntGenerator.cpp:
(JSC::Wasm::IPIntGenerator::addGrowMemory):
(JSC::Wasm::IPIntGenerator::addCurrentMemory):
* Source/JavaScriptCore/wasm/WasmIPIntGenerator.h:
* Source/JavaScriptCore/wasm/WasmSectionParser.cpp:
(JSC::Wasm::SectionParser::parseMemoryHelper):

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



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

Reply via email to