Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: dc1ef6a78206884b6ef022cc4e71497e4cb9e8d2
https://github.com/WebKit/WebKit/commit/dc1ef6a78206884b6ef022cc4e71497e4cb9e8d2
Author: Yusuke Suzuki <[email protected]>
Date: 2025-08-14 (Thu, 14 Aug 2025)
Changed paths:
M
Source/JavaScriptCore/SaferCPPExpectations/UncountedCallArgsCheckerExpectations
M Source/JavaScriptCore/runtime/IteratorOperations.h
M Source/JavaScriptCore/wasm/WasmCallingConvention.h
M Source/JavaScriptCore/wasm/WasmOMGIRGenerator.cpp
M Source/JavaScriptCore/wasm/WasmOperations.cpp
M Source/JavaScriptCore/wasm/WasmTypeDefinition.cpp
M Source/JavaScriptCore/wasm/WasmTypeDefinition.h
M Source/JavaScriptCore/wasm/js/JSWebAssemblyException.cpp
M Source/JavaScriptCore/wasm/js/JSWebAssemblyStruct.cpp
M Source/JavaScriptCore/wasm/js/WebAssemblyCompileOptions.cpp
M Source/JavaScriptCore/wasm/js/WebAssemblyExceptionConstructor.cpp
M Source/JavaScriptCore/wasm/js/WebAssemblyModuleConstructor.cpp
M Source/JavaScriptCore/wasm/js/WebAssemblyWrapperFunction.cpp
Log Message:
-----------
[JSC] Do not use Variant for each of TypeDefinition kind
https://bugs.webkit.org/show_bug.cgi?id=297407
rdar://158334942
Reviewed by Justin Michaud and Keith Miller.
FunctionSignature etc. must be just a derived type of TypeDefinition.
There is no reason having Variant and making code much more unsafe and
complicated. This patch just makes FunctionSignature, StructType etc. as
a derived type of TypeDefinition. We can do further more clean up in
various places. But this patch starts doing this clean up in WasmTypeDefinition.
*
Source/JavaScriptCore/SaferCPPExpectations/UncountedCallArgsCheckerExpectations:
* Source/JavaScriptCore/runtime/IteratorOperations.h:
(JSC::forEachInFastArray):
(JSC::forEachInIterationRecord):
(JSC::forEachInIterable):
(JSC::forEachInIteratorProtocol):
* Source/JavaScriptCore/wasm/WasmCallingConvention.h:
(JSC::Wasm::WasmCallingConvention::callInformationFor const):
(JSC::Wasm::JSCallingConvention::callInformationFor const):
* Source/JavaScriptCore/wasm/WasmOMGIRGenerator.cpp:
(JSC::Wasm::OMGIRGenerator::addArguments):
* Source/JavaScriptCore/wasm/WasmOperations.cpp:
(JSC::Wasm::JSC_DEFINE_NOEXCEPT_JIT_OPERATION):
* Source/JavaScriptCore/wasm/WasmTypeDefinition.cpp:
(JSC::Wasm::TypeDefinition::dump const):
(JSC::Wasm::FunctionSignature::FunctionSignature):
(JSC::Wasm::StructType::StructType):
(JSC::Wasm::ArrayType::ArrayType):
(JSC::Wasm::RecursionGroup::RecursionGroup):
(JSC::Wasm::Projection::Projection):
(JSC::Wasm::Projection::dump const):
(JSC::Wasm::Subtype::Subtype):
(JSC::Wasm::Subtype::cleanup):
(JSC::Wasm::RecursionGroup::cleanup):
(JSC::Wasm::computeStructTypeHash):
(JSC::Wasm::computeRecursionGroupHash):
(JSC::Wasm::computeProjectionHash):
(JSC::Wasm::computeSubtypeHash):
(JSC::Wasm::TypeDefinition::hash const):
(JSC::Wasm::FunctionSignature::tryCreate):
(JSC::Wasm::StructType::tryCreate):
(JSC::Wasm::ArrayType::tryCreate):
(JSC::Wasm::RecursionGroup::tryCreate):
(JSC::Wasm::Projection::tryCreate):
(JSC::Wasm::Subtype::tryCreate):
(JSC::Wasm::TypeDefinition::substitute):
(JSC::Wasm::substituteParent):
(JSC::Wasm::TypeDefinition::replacePlaceholders const):
(JSC::Wasm::TypeDefinition::unrollSlow const):
(JSC::Wasm::RTT::tryCreate):
(JSC::Wasm::TypeInformation::signatureForJSException):
(JSC::Wasm::FunctionParameterTypes::translate):
(JSC::Wasm::StructParameterTypes::hash):
(JSC::Wasm::StructParameterTypes::equal):
(JSC::Wasm::StructParameterTypes::translate):
(JSC::Wasm::ArrayParameterTypes::translate):
(JSC::Wasm::RecursionGroupParameterTypes::hash):
(JSC::Wasm::RecursionGroupParameterTypes::translate):
(JSC::Wasm::ProjectionParameterTypes::hash):
(JSC::Wasm::ProjectionParameterTypes::equal):
(JSC::Wasm::ProjectionParameterTypes::translate):
(JSC::Wasm::SubtypeParameterTypes::hash):
(JSC::Wasm::SubtypeParameterTypes::translate):
(JSC::Wasm::TypeInformation::TypeInformation):
(JSC::Wasm::TypeInformation::typeDefinitionForFunction):
(JSC::Wasm::TypeInformation::typeDefinitionForStruct):
(JSC::Wasm::TypeInformation::typeDefinitionForArray):
(JSC::Wasm::TypeInformation::typeDefinitionForRecursionGroup):
(JSC::Wasm::TypeInformation::typeDefinitionForProjection):
(JSC::Wasm::TypeInformation::typeDefinitionForSubtype):
(JSC::Wasm::TypeInformation::getPlaceholderProjection):
(JSC::Wasm::TypeInformation::canonicalRTTForType):
(JSC::Wasm::TypeDefinition::tryCreateFunctionSignature): Deleted.
(JSC::Wasm::TypeDefinition::tryCreateStructType): Deleted.
(JSC::Wasm::TypeDefinition::tryCreateArrayType): Deleted.
(JSC::Wasm::TypeDefinition::tryCreateRecursionGroup): Deleted.
(JSC::Wasm::TypeDefinition::tryCreateProjection): Deleted.
(JSC::Wasm::TypeDefinition::tryCreateSubtype): Deleted.
(JSC::Wasm::RTT::tryCreateRTT): Deleted.
* Source/JavaScriptCore/wasm/WasmTypeDefinition.h:
(JSC::Wasm::TypeDefinition::is const):
(JSC::Wasm::TypeDefinition::as):
(JSC::Wasm::TypeDefinition::as const):
(JSC::Wasm::TypeDefinition::operator== const):
(JSC::Wasm::TypeDefinition::unroll const):
(JSC::Wasm::TypeDefinition::unownedIndex const):
(JSC::Wasm::TypeDefinition::TypeDefinition):
(JSC::Wasm:: const):
(JSC::Wasm::FunctionSignature::argumentCount const): Deleted.
(JSC::Wasm::FunctionSignature::returnCount const): Deleted.
(JSC::Wasm::FunctionSignature::hasRecursiveReference const): Deleted.
(JSC::Wasm::FunctionSignature::setHasRecursiveReference): Deleted.
(JSC::Wasm::FunctionSignature::returnType const): Deleted.
(JSC::Wasm::FunctionSignature::returnsVoid const): Deleted.
(JSC::Wasm::FunctionSignature::argumentType const): Deleted.
(JSC::Wasm::FunctionSignature::argumentsOrResultsIncludeI64 const): Deleted.
(JSC::Wasm::FunctionSignature::setArgumentsOrResultsIncludeI64): Deleted.
(JSC::Wasm::FunctionSignature::argumentsOrResultsIncludeV128 const): Deleted.
(JSC::Wasm::FunctionSignature::setArgumentsOrResultsIncludeV128): Deleted.
(JSC::Wasm::FunctionSignature::argumentsOrResultsIncludeExnref const): Deleted.
(JSC::Wasm::FunctionSignature::setArgumentsOrResultsIncludeExnref): Deleted.
(JSC::Wasm::FunctionSignature::numVectors const): Deleted.
(JSC::Wasm::FunctionSignature::numReturnVectors const): Deleted.
(JSC::Wasm::FunctionSignature::hasReturnVector const): Deleted.
(JSC::Wasm::FunctionSignature::operator== const): Deleted.
(JSC::Wasm::FunctionSignature::getReturnType): Deleted.
(JSC::Wasm::FunctionSignature::getArgumentType): Deleted.
(JSC::Wasm::FunctionSignature::storage): Deleted.
(JSC::Wasm::FunctionSignature::storage const): Deleted.
(JSC::Wasm::StructType::fieldCount const): Deleted.
(JSC::Wasm::StructType::field const): Deleted.
(JSC::Wasm::StructType::hasRefFieldTypes const): Deleted.
(JSC::Wasm::StructType::hasRecursiveReference const): Deleted.
(JSC::Wasm::StructType::setHasRecursiveReference): Deleted.
(JSC::Wasm::StructType::getField): Deleted.
(JSC::Wasm::StructType::storage): Deleted.
(JSC::Wasm::StructType::storage const): Deleted.
(JSC::Wasm::StructType::offsetOfFieldInPayload const): Deleted.
(JSC::Wasm::StructType::instancePayloadSize const): Deleted.
(JSC::Wasm::StructType::fieldOffsetFromInstancePayload): Deleted.
(JSC::Wasm::ArrayType::ArrayType): Deleted.
(JSC::Wasm::ArrayType::elementType const): Deleted.
(JSC::Wasm::ArrayType::hasRecursiveReference const): Deleted.
(JSC::Wasm::ArrayType::setHasRecursiveReference): Deleted.
(JSC::Wasm::ArrayType::getElementType): Deleted.
(JSC::Wasm::ArrayType::storage): Deleted.
(JSC::Wasm::ArrayType::storage const): Deleted.
(JSC::Wasm::RecursionGroup::RecursionGroup): Deleted.
(JSC::Wasm::RecursionGroup::typeCount const): Deleted.
(JSC::Wasm::RecursionGroup::type const): Deleted.
(JSC::Wasm::RecursionGroup::getType): Deleted.
(JSC::Wasm::RecursionGroup::storage): Deleted.
(JSC::Wasm::RecursionGroup::storage const): Deleted.
(JSC::Wasm::Projection::Projection): Deleted.
(JSC::Wasm::Projection::recursionGroup const): Deleted.
(JSC::Wasm::Projection::index const): Deleted.
(JSC::Wasm::Projection::getRecursionGroup): Deleted.
(JSC::Wasm::Projection::getIndex): Deleted.
(JSC::Wasm::Projection::storage): Deleted.
(JSC::Wasm::Projection::storage const): Deleted.
(JSC::Wasm::Projection::isPlaceholder const): Deleted.
(JSC::Wasm::Subtype::Subtype): Deleted.
(JSC::Wasm::Subtype::supertypeCount const): Deleted.
(JSC::Wasm::Subtype::isFinal const): Deleted.
(JSC::Wasm::Subtype::firstSuperType const): Deleted.
(JSC::Wasm::Subtype::superType const): Deleted.
(JSC::Wasm::Subtype::underlyingType const): Deleted.
(JSC::Wasm::Subtype::getSuperType): Deleted.
(JSC::Wasm::Subtype::getUnderlyingType): Deleted.
(JSC::Wasm::Subtype::storage): Deleted.
(JSC::Wasm::Subtype::storage const): Deleted.
(JSC::Wasm::TypeDefinition::payload): Deleted.
(JSC::Wasm::TypeDefinition::allocatedFunctionSize): Deleted.
(JSC::Wasm::TypeDefinition::allocatedStructSize): Deleted.
(JSC::Wasm::TypeDefinition::allocatedArraySize): Deleted.
(JSC::Wasm::TypeDefinition::allocatedRecursionGroupSize): Deleted.
(JSC::Wasm::TypeDefinition::allocatedProjectionSize): Deleted.
(JSC::Wasm::TypeDefinition::allocatedSubtypeSize): Deleted.
* Source/JavaScriptCore/wasm/js/JSWebAssemblyException.cpp:
(JSC::JSWebAssemblyException::visitChildrenImpl):
(JSC::JSWebAssemblyException::getArg const):
* Source/JavaScriptCore/wasm/js/JSWebAssemblyStruct.cpp:
(JSC::JSWebAssemblyStruct::tryCreate):
* Source/JavaScriptCore/wasm/js/WebAssemblyCompileOptions.cpp:
(JSC::WebAssemblyCompileOptions::validateImportForBuiltinSetNames const):
* Source/JavaScriptCore/wasm/js/WebAssemblyExceptionConstructor.cpp:
(JSC::JSC_DEFINE_HOST_FUNCTION):
* Source/JavaScriptCore/wasm/js/WebAssemblyModuleConstructor.cpp:
(JSC::createTypeReflectionObject):
* Source/JavaScriptCore/wasm/js/WebAssemblyWrapperFunction.cpp:
(JSC::WebAssemblyWrapperFunction::create):
Canonical link: https://commits.webkit.org/298730@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes