[webkit-changes] [WebKit/WebKit] 3dcbd2: [JSC] Avoid Vector allocation if possible for Type...
Yusuke Suzuki
noreply at github.com
Thu Aug 10 23:33:23 PDT 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 3dcbd27bc35924ca17a4d5c3211d2f99a7f4669c
https://github.com/WebKit/WebKit/commit/3dcbd27bc35924ca17a4d5c3211d2f99a7f4669c
Author: Yusuke Suzuki <ysuzuki at apple.com>
Date: 2023-08-10 (Thu, 10 Aug 2023)
Changed paths:
M Source/JavaScriptCore/wasm/WasmBBQJIT.cpp
M Source/JavaScriptCore/wasm/WasmFunctionIPIntMetadataGenerator.cpp
M Source/JavaScriptCore/wasm/WasmFunctionIPIntMetadataGenerator.h
M Source/JavaScriptCore/wasm/WasmIPIntGenerator.cpp
M Source/JavaScriptCore/wasm/WasmSectionParser.cpp
M Source/JavaScriptCore/wasm/WasmTypeDefinition.cpp
M Source/JavaScriptCore/wasm/WasmTypeDefinition.h
M Source/JavaScriptCore/wasm/js/WebAssemblyTagConstructor.cpp
Log Message:
-----------
[JSC] Avoid Vector allocation if possible for Types etc. in Wasm parsers
https://bugs.webkit.org/show_bug.cgi?id=260061
rdar://113733001
Reviewed by Alex Christensen.
We should use Vector<Type, 16> to avoid frequent allocation and deallocation of memory.
And we also use uncheckedAppend for pre-allocated Vector.
* Source/JavaScriptCore/wasm/WasmBBQJIT.cpp:
(JSC::Wasm::BBQJIT::emitCCall):
* Source/JavaScriptCore/wasm/WasmFunctionIPIntMetadataGenerator.cpp:
(JSC::Wasm::FunctionIPIntMetadataGenerator::addReturnData):
* Source/JavaScriptCore/wasm/WasmFunctionIPIntMetadataGenerator.h:
* Source/JavaScriptCore/wasm/WasmIPIntGenerator.cpp:
(JSC::Wasm::IPIntGenerator::addEndToUnreachable):
(JSC::Wasm::IPIntGenerator::addCallCommonData):
* Source/JavaScriptCore/wasm/WasmSectionParser.cpp:
(JSC::Wasm::SectionParser::parseFunctionType):
* Source/JavaScriptCore/wasm/WasmTypeDefinition.cpp:
(JSC::Wasm::TypeDefinition::replacePlaceholders const):
(JSC::Wasm::TypeInformation::typeDefinitionForFunction):
* Source/JavaScriptCore/wasm/WasmTypeDefinition.h:
* Source/JavaScriptCore/wasm/js/WebAssemblyTagConstructor.cpp:
(JSC::JSC_DEFINE_HOST_FUNCTION):
Canonical link: https://commits.webkit.org/266812@main
More information about the webkit-changes
mailing list