You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit b7b433a
Browse filesBrowse the repository at this point in the historyBrowse files
[Wasm] GC structs shouldn't need to visit fields if there's no ref fields
https://bugs.webkit.org/show_bug.cgi?id=289112
rdar://146141202
Reviewed by Yusuke Suzuki.
There's a couple of changes in this PR that didn't make it into 291579@main:
1) GC structs shouldn't walk the fields looking for ref type fields unless there's at least
one field with a ref type. In Dart-flutter-wasm a decent number of the structs have no outgoing
pointers, which also seems likely to be the case in general. In the future we could also cache
the offsets of outgoing pointers in the `Wasm::StructType` but since this didn't show any progression
we should make sure it's worthwhile to use the extra memory.
2) Make `RTT` a `TrailingArray` subclass.
3) Rename `RTT::isSubRTT` to `RTT::isStrictSubRTT` and `RTT::isSubRTTWithEquality` to `RTT::isSubRTT`,
which better matches the general programming language parlance.
As mentioned above this didn't seem to improve the benchmark but doesn't cost us any memory so it seems
worthwhile to just land.
* Source/JavaScriptCore/wasm/WasmFormat.cpp:
(JSC::Wasm::validateWasmValue):
* Source/JavaScriptCore/wasm/WasmFormat.h:
(JSC::Wasm::isSubtypeIndex):
* Source/JavaScriptCore/wasm/WasmOMGIRGenerator.cpp:
(JSC::Wasm::OMGIRGenerator::emitRefTestOrCast):
* Source/JavaScriptCore/wasm/WasmOMGIRGenerator32_64.cpp:
(JSC::Wasm::OMGIRGenerator::emitRefTestOrCast):
* Source/JavaScriptCore/wasm/WasmOperations.cpp:
(JSC::Wasm::JSC_DEFINE_NOEXCEPT_JIT_OPERATION):
* Source/JavaScriptCore/wasm/WasmOperations.h:
* Source/JavaScriptCore/wasm/WasmTypeDefinition.cpp:
(JSC::Wasm::StructType::StructType):
(JSC::Wasm::RTT::isStrictSubRTT const):
(JSC::Wasm::TypeInformation::castReference):
(JSC::Wasm::RTT::isSubRTT const): Deleted.
* Source/JavaScriptCore/wasm/WasmTypeDefinition.h:
(JSC::Wasm::StructType::field const):
(JSC::Wasm::StructType::hasRefFieldTypes const):
(JSC::Wasm::StructType::setHasRecursiveReference):
(JSC::Wasm:: const):
* Source/JavaScriptCore/wasm/js/JSWebAssemblyStruct.cpp:
(JSC::JSWebAssemblyStruct::visitChildrenImpl):
Canonical link: https://commits.webkit.org/291603@main
0 commit comments