Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: b7b433a1d53eeeba1bd4d97e27c5084595db579c https://github.com/WebKit/WebKit/commit/b7b433a1d53eeeba1bd4d97e27c5084595db579c Author: Keith Miller <keith_mil...@apple.com> Date: 2025-03-04 (Tue, 04 Mar 2025)
Changed paths: M Source/JavaScriptCore/wasm/WasmFormat.cpp M Source/JavaScriptCore/wasm/WasmFormat.h M Source/JavaScriptCore/wasm/WasmOMGIRGenerator.cpp M Source/JavaScriptCore/wasm/WasmOMGIRGenerator32_64.cpp M Source/JavaScriptCore/wasm/WasmOperations.cpp M Source/JavaScriptCore/wasm/WasmOperations.h M Source/JavaScriptCore/wasm/WasmTypeDefinition.cpp M Source/JavaScriptCore/wasm/WasmTypeDefinition.h M Source/JavaScriptCore/wasm/js/JSWebAssemblyStruct.cpp Log Message: ----------- [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 To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications _______________________________________________ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes