Skip to content

[WASM] Default-initialized fields of WASM GC struct should use Const32 if appropriate for storage type#37347

Merged
webkit-commit-queue merged 1 commit intoWebKit:mainfrom
ddegazio:eng/WASM-Default-initialized-fields-of-WASM-GC-structs-should-use-Const32-if-appropriate-for-storage-type
Dec 3, 2024
Merged

[WASM] Default-initialized fields of WASM GC struct should use Const32 if appropriate for storage type#37347
webkit-commit-queue merged 1 commit intoWebKit:mainfrom
ddegazio:eng/WASM-Default-initialized-fields-of-WASM-GC-structs-should-use-Const32-if-appropriate-for-storage-type

Conversation

@ddegazio
Copy link
Copy Markdown
Contributor

@ddegazio ddegazio commented Dec 2, 2024

a9abb74

[WASM] Default-initialized fields of WASM GC struct should use Const32 if appropriate for storage type
https://bugs.webkit.org/show_bug.cgi?id=283941
rdar://140773922

Reviewed by Yusuke Suzuki and Keith Miller.

Generates a Const32Value in OMG instead of a Const64Value when
zero-initializing fields in struct.new_default when the field
storage types are 32-bit or smaller. This satisfies the B3
validator which expects an Int32 input for Stores of 32 bits or
smaller.

* JSTests/wasm/stress/struct-new_default-small-members.js: Added.
* Source/JavaScriptCore/wasm/WasmOMGIRGenerator.cpp:
(JSC::Wasm::OMGIRGenerator::addStructNewDefault):
* Source/JavaScriptCore/wasm/WasmOMGIRGenerator32_64.cpp:
(JSC::Wasm::OMGIRGenerator::addStructNewDefault):

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

5340f32

Misc iOS, visionOS, tvOS & watchOS macOS Linux Windows
✅ 🧪 style ✅ 🛠 ios ✅ 🛠 mac ✅ 🛠 wpe ✅ 🛠 win
✅ 🛠 ios-sim ✅ 🛠 mac-AS-debug ✅ 🧪 wpe-wk2 ✅ 🧪 win-tests
✅ 🧪 webkitperl ✅ 🧪 ios-wk2 ✅ 🧪 api-mac ✅ 🧪 api-wpe
✅ 🧪 ios-wk2-wpt ✅ 🧪 mac-wk1 ✅ 🛠 wpe-cairo
✅ 🛠 🧪 jsc ✅ 🧪 api-ios ✅ 🧪 mac-wk2 ✅ 🛠 gtk
✅ 🛠 🧪 jsc-arm64 ✅ 🛠 vision ✅ 🧪 mac-AS-debug-wk2 ✅ 🧪 gtk-wk2
✅ 🛠 vision-sim ✅ 🧪 mac-wk2-stress ✅ 🧪 api-gtk
✅ 🛠 🧪 merge ✅ 🧪 vision-wk2 ✅ 🧪 mac-intel-wk2 ✅ 🛠 jsc-armv7
✅ 🛠 tv ✅ 🧪 jsc-armv7-tests
✅ 🛠 tv-sim
✅ 🛠 watch
✅ 🛠 watch-sim

@ddegazio ddegazio requested a review from a team as a code owner December 2, 2024 23:17
@ddegazio ddegazio self-assigned this Dec 2, 2024
@ddegazio ddegazio added the WebAssembly For bugs in JavaScript WebAssembly label Dec 2, 2024
Copy link
Copy Markdown
Member

@Constellation Constellation left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

r=me

Copy link
Copy Markdown
Contributor

@danlliu danlliu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Copy Markdown
Contributor

@kmiller68 kmiller68 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

r=me too.

@ddegazio ddegazio added the merge-queue Applied to send a pull request to merge-queue label Dec 3, 2024
…2 if appropriate for storage type

https://bugs.webkit.org/show_bug.cgi?id=283941
rdar://140773922

Reviewed by Yusuke Suzuki and Keith Miller.

Generates a Const32Value in OMG instead of a Const64Value when
zero-initializing fields in struct.new_default when the field
storage types are 32-bit or smaller. This satisfies the B3
validator which expects an Int32 input for Stores of 32 bits or
smaller.

* JSTests/wasm/stress/struct-new_default-small-members.js: Added.
* Source/JavaScriptCore/wasm/WasmOMGIRGenerator.cpp:
(JSC::Wasm::OMGIRGenerator::addStructNewDefault):
* Source/JavaScriptCore/wasm/WasmOMGIRGenerator32_64.cpp:
(JSC::Wasm::OMGIRGenerator::addStructNewDefault):

Canonical link: https://commits.webkit.org/287295@main
@webkit-commit-queue webkit-commit-queue force-pushed the eng/WASM-Default-initialized-fields-of-WASM-GC-structs-should-use-Const32-if-appropriate-for-storage-type branch from 5340f32 to a9abb74 Compare December 3, 2024 19:17
@webkit-commit-queue
Copy link
Copy Markdown
Collaborator

Committed 287295@main (a9abb74): https://commits.webkit.org/287295@main

Reviewed commits have been landed. Closing PR #37347 and removing active labels.

@webkit-commit-queue webkit-commit-queue merged commit a9abb74 into WebKit:main Dec 3, 2024
@webkit-commit-queue webkit-commit-queue removed the merge-queue Applied to send a pull request to merge-queue label Dec 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

WebAssembly For bugs in JavaScript WebAssembly

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants