WebKit Bugzilla
Attachment 359215 Details for
Bug 193469
: [WHLSL] Delete the 'restricted' keyword
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-193469-20190115155251.patch (text/plain), 25.13 KB, created by
Myles C. Maxfield
on 2019-01-15 15:52:52 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Myles C. Maxfield
Created:
2019-01-15 15:52:52 PST
Size:
25.13 KB
patch
obsolete
>Subversion Revision: 240001 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index f876754980037a20d88f1f1e1d3265f4b9d8ec82..cbac110db53cfab014d029fe163fea73daa6cbb4 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,37 @@ >+2019-01-15 Myles C. Maxfield <mmaxfield@apple.com> >+ >+ [WHLSL] Delete the 'restricted' keyword >+ https://bugs.webkit.org/show_bug.cgi?id=193469 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ This change mirrors https://github.com/gpuweb/WHLSL/pull/304 in the reference implementation. >+ >+ No new tests because it isn't hooked up yet. Not enough of the compiler exists to have any meaningful sort >+ of test. When enough of the compiler is present, I'll port the reference implementation's test suite. >+ >+ * Modules/webgpu/WHLSL/AST/WHLSLFunctionDefinition.h: >+ (WebCore::WHLSL::AST::FunctionDefinition::FunctionDefinition): >+ (WebCore::WHLSL::AST::FunctionDefinition::block): >+ (WebCore::WHLSL::AST::FunctionDefinition::restricted const): Deleted. >+ * Modules/webgpu/WHLSL/AST/WHLSLNativeFunctionDeclaration.h: >+ (WebCore::WHLSL::AST::NativeFunctionDeclaration::NativeFunctionDeclaration): >+ (WebCore::WHLSL::AST::NativeFunctionDeclaration::restricted const): Deleted. >+ * Modules/webgpu/WHLSL/WHLSLChecker.cpp: >+ (WebCore::WHLSL::resolveWithOperatorAnderIndexer): >+ (WebCore::WHLSL::resolveWithOperatorLength): >+ (WebCore::WHLSL::resolveWithReferenceComparator): >+ * Modules/webgpu/WHLSL/WHLSLResolveOverloadImpl.cpp: >+ (WebCore::WHLSL::resolveFunctionOverloadImpl): >+ * Modules/webgpu/WHLSL/WHLSLSynthesizeArrayOperatorLength.cpp: >+ (WebCore::WHLSL::synthesizeArrayOperatorLength): >+ * Modules/webgpu/WHLSL/WHLSLSynthesizeConstructors.cpp: >+ (WebCore::WHLSL::synthesizeConstructors): >+ * Modules/webgpu/WHLSL/WHLSLSynthesizeEnumerationFunctions.cpp: >+ (WebCore::WHLSL::synthesizeEnumerationFunctions): >+ * Modules/webgpu/WHLSL/WHLSLSynthesizeStructureAccessors.cpp: >+ (WebCore::WHLSL::synthesizeStructureAccessors): >+ > 2019-01-15 Youenn Fablet <youenn@apple.com> > > Correctly handle rotation for local video playback >diff --git a/Source/WebCore/Modules/webgpu/WHLSL/AST/WHLSLFunctionDefinition.h b/Source/WebCore/Modules/webgpu/WHLSL/AST/WHLSLFunctionDefinition.h >index ce58b6a7f98965e2065c342be4478e5e0a6ea27e..79abd9e527b0f763ad85cbcd5dc9fd14da53a931 100644 >--- a/Source/WebCore/Modules/webgpu/WHLSL/AST/WHLSLFunctionDefinition.h >+++ b/Source/WebCore/Modules/webgpu/WHLSL/AST/WHLSLFunctionDefinition.h >@@ -38,10 +38,9 @@ namespace AST { > > class FunctionDefinition : public FunctionDeclaration { > public: >- FunctionDefinition(FunctionDeclaration&& functionDeclaration, Block&& block, bool restricted) >+ FunctionDefinition(FunctionDeclaration&& functionDeclaration, Block&& block) > : FunctionDeclaration(WTFMove(functionDeclaration)) > , m_block(WTFMove(block)) >- , m_restricted(restricted) > { > } > >@@ -53,11 +52,9 @@ public: > bool isFunctionDefinition() const override { return true; } > > Block& block() { return m_block; } >- bool restricted() const { return m_restricted; } > > private: > Block m_block; >- bool m_restricted; > }; > > } // namespace AST >diff --git a/Source/WebCore/Modules/webgpu/WHLSL/AST/WHLSLNativeFunctionDeclaration.h b/Source/WebCore/Modules/webgpu/WHLSL/AST/WHLSLNativeFunctionDeclaration.h >index d81a38c28f84b3913a49556a365a3dd9798ada38..8827623fc561d639e2d1f9773ce420c8af74627f 100644 >--- a/Source/WebCore/Modules/webgpu/WHLSL/AST/WHLSLNativeFunctionDeclaration.h >+++ b/Source/WebCore/Modules/webgpu/WHLSL/AST/WHLSLNativeFunctionDeclaration.h >@@ -37,9 +37,8 @@ namespace AST { > > class NativeFunctionDeclaration : public FunctionDeclaration { > public: >- NativeFunctionDeclaration(FunctionDeclaration&& functionDeclaration, bool restricted) >+ NativeFunctionDeclaration(FunctionDeclaration&& functionDeclaration) > : FunctionDeclaration(WTFMove(functionDeclaration)) >- , m_restricted(restricted) > { > } > >@@ -50,10 +49,7 @@ public: > > bool isNativeFunctionDeclaration() const override { return true; } > >- bool restricted() const { return m_restricted; } >- > private: >- bool m_restricted; > }; > > } // namespace AST >diff --git a/Source/WebCore/Modules/webgpu/WHLSL/WHLSLChecker.cpp b/Source/WebCore/Modules/webgpu/WHLSL/WHLSLChecker.cpp >index 9f59089467337cdf6b231f0325d374128c3c5a78..f3a86db83d1655c6f1e385a1bd049b1413e14499 100644 >--- a/Source/WebCore/Modules/webgpu/WHLSL/WHLSLChecker.cpp >+++ b/Source/WebCore/Modules/webgpu/WHLSL/WHLSLChecker.cpp >@@ -119,28 +119,25 @@ public: > > static AST::NativeFunctionDeclaration resolveWithOperatorAnderIndexer(AST::CallExpression& callExpression, AST::ArrayReferenceType& firstArgument, const Intrinsics& intrinsics) > { >- const bool isRestricted = false; > const bool isOperator = true; > auto returnType = makeUniqueRef<AST::PointerType>(Lexer::Token(callExpression.origin()), firstArgument.addressSpace(), firstArgument.elementType().clone()); > AST::VariableDeclarations parameters; > parameters.append(AST::VariableDeclaration(Lexer::Token(callExpression.origin()), AST::Qualifiers(), { firstArgument.clone() }, String(), WTF::nullopt, WTF::nullopt)); > parameters.append(AST::VariableDeclaration(Lexer::Token(callExpression.origin()), AST::Qualifiers(), { AST::TypeReference::wrap(Lexer::Token(callExpression.origin()), intrinsics.uintType()) }, String(), WTF::nullopt, WTF::nullopt)); >- return AST::NativeFunctionDeclaration(AST::FunctionDeclaration(Lexer::Token(callExpression.origin()), AST::AttributeBlock(), WTF::nullopt, WTFMove(returnType), String("operator&[]", String::ConstructFromLiteral), WTFMove(parameters), WTF::nullopt, isOperator), isRestricted); >+ return AST::NativeFunctionDeclaration(AST::FunctionDeclaration(Lexer::Token(callExpression.origin()), AST::AttributeBlock(), WTF::nullopt, WTFMove(returnType), String("operator&[]", String::ConstructFromLiteral), WTFMove(parameters), WTF::nullopt, isOperator)); > } > > static AST::NativeFunctionDeclaration resolveWithOperatorLength(AST::CallExpression& callExpression, AST::UnnamedType& firstArgument, const Intrinsics& intrinsics) > { >- const bool isRestricted = false; > const bool isOperator = true; > auto returnType = AST::TypeReference::wrap(Lexer::Token(callExpression.origin()), intrinsics.uintType()); > AST::VariableDeclarations parameters; > parameters.append(AST::VariableDeclaration(Lexer::Token(callExpression.origin()), AST::Qualifiers(), { firstArgument.clone() }, String(), WTF::nullopt, WTF::nullopt)); >- return AST::NativeFunctionDeclaration(AST::FunctionDeclaration(Lexer::Token(callExpression.origin()), AST::AttributeBlock(), WTF::nullopt, WTFMove(returnType), String("operator.length", String::ConstructFromLiteral), WTFMove(parameters), WTF::nullopt, isOperator), isRestricted); >+ return AST::NativeFunctionDeclaration(AST::FunctionDeclaration(Lexer::Token(callExpression.origin()), AST::AttributeBlock(), WTF::nullopt, WTFMove(returnType), String("operator.length", String::ConstructFromLiteral), WTFMove(parameters), WTF::nullopt, isOperator)); > } > > static AST::NativeFunctionDeclaration resolveWithReferenceComparator(AST::CallExpression& callExpression, ResolvingType& firstArgument, ResolvingType& secondArgument, const Intrinsics& intrinsics) > { >- const bool isRestricted = false; > const bool isOperator = true; > auto returnType = AST::TypeReference::wrap(Lexer::Token(callExpression.origin()), intrinsics.boolType()); > auto argumentType = WTF::visit(WTF::makeVisitor([](UniqueRef<AST::UnnamedType>& unnamedType) -> UniqueRef<AST::UnnamedType> { >@@ -158,7 +155,7 @@ static AST::NativeFunctionDeclaration resolveWithReferenceComparator(AST::CallEx > AST::VariableDeclarations parameters; > parameters.append(AST::VariableDeclaration(Lexer::Token(callExpression.origin()), AST::Qualifiers(), { argumentType->clone() }, String(), WTF::nullopt, WTF::nullopt)); > parameters.append(AST::VariableDeclaration(Lexer::Token(callExpression.origin()), AST::Qualifiers(), { WTFMove(argumentType) }, String(), WTF::nullopt, WTF::nullopt)); >- return AST::NativeFunctionDeclaration(AST::FunctionDeclaration(Lexer::Token(callExpression.origin()), AST::AttributeBlock(), WTF::nullopt, WTFMove(returnType), String("operator==", String::ConstructFromLiteral), WTFMove(parameters), WTF::nullopt, isOperator), isRestricted); >+ return AST::NativeFunctionDeclaration(AST::FunctionDeclaration(Lexer::Token(callExpression.origin()), AST::AttributeBlock(), WTF::nullopt, WTFMove(returnType), String("operator==", String::ConstructFromLiteral), WTFMove(parameters), WTF::nullopt, isOperator)); > } > > static Optional<AST::NativeFunctionDeclaration> resolveByInstantiation(AST::CallExpression& callExpression, const Vector<std::reference_wrapper<ResolvingType>>& types, const Intrinsics& intrinsics) >diff --git a/Source/WebCore/Modules/webgpu/WHLSL/WHLSLResolveOverloadImpl.cpp b/Source/WebCore/Modules/webgpu/WHLSL/WHLSLResolveOverloadImpl.cpp >index ea1833d8d9aca4ae3ca0e9cd70283cf39c24436a..31f00878214cd81bdf14bc4d183c1f56ebafc82b 100644 >--- a/Source/WebCore/Modules/webgpu/WHLSL/WHLSLResolveOverloadImpl.cpp >+++ b/Source/WebCore/Modules/webgpu/WHLSL/WHLSLResolveOverloadImpl.cpp >@@ -71,25 +71,8 @@ AST::FunctionDeclaration* resolveFunctionOverloadImpl(Vector<std::reference_wrap > minimumCostCandidates.append(candidate); > } > >- bool restrictedCandidateExists = false; >- for (auto& candidate : minimumCostCandidates) { >- if (is<AST::FunctionDefinition>(candidate.get()) && downcast<AST::FunctionDefinition>(candidate.get()).restricted()) { >- restrictedCandidateExists = true; >- break; >- } >- } >- >- candidates.clear(); >- if (restrictedCandidateExists) { >- for (auto& candidate : minimumCostCandidates) { >- if (is<AST::FunctionDefinition>(candidate.get()) && downcast<AST::FunctionDefinition>(candidate.get()).restricted()) >- candidates.append(candidate.get()); >- } >- } else >- candidates = minimumCostCandidates; >- >- if (candidates.size() == 1) >- return &candidates[0].get(); >+ if (minimumCostCandidates.size() == 1) >+ return &minimumCostCandidates[0].get(); > return nullptr; > } > >diff --git a/Source/WebCore/Modules/webgpu/WHLSL/WHLSLSynthesizeArrayOperatorLength.cpp b/Source/WebCore/Modules/webgpu/WHLSL/WHLSLSynthesizeArrayOperatorLength.cpp >index 9d620fa11a7072f86b0e83db333b21db7eca1051..d904ef0f5dfba6b56e5fff33680e2ac14d52a787 100644 >--- a/Source/WebCore/Modules/webgpu/WHLSL/WHLSLSynthesizeArrayOperatorLength.cpp >+++ b/Source/WebCore/Modules/webgpu/WHLSL/WHLSLSynthesizeArrayOperatorLength.cpp >@@ -63,13 +63,12 @@ void synthesizeArrayOperatorLength(Program& program) > auto arrayTypes = findArrayTypes.takeArrayTypes(); > > bool isOperator = true; >- bool isRestricted = false; > > for (auto& arrayType : arrayTypes) { > AST::VariableDeclaration variableDeclaration(Lexer::Token(arrayType.get().origin()), AST::Qualifiers(), { arrayType.get().clone() }, String(), WTF::nullopt, WTF::nullopt); > AST::VariableDeclarations parameters; > parameters.append(WTFMove(variableDeclaration)); >- AST::NativeFunctionDeclaration nativeFunctionDeclaration(AST::FunctionDeclaration(Lexer::Token(arrayType.get().origin()), AST::AttributeBlock(), WTF::nullopt, AST::TypeReference::wrap(Lexer::Token(arrayType.get().origin()), program.intrinsics().uintType()), "operator.length"_str, WTFMove(parameters), WTF::nullopt, isOperator), isRestricted); >+ AST::NativeFunctionDeclaration nativeFunctionDeclaration(AST::FunctionDeclaration(Lexer::Token(arrayType.get().origin()), AST::AttributeBlock(), WTF::nullopt, AST::TypeReference::wrap(Lexer::Token(arrayType.get().origin()), program.intrinsics().uintType()), "operator.length"_str, WTFMove(parameters), WTF::nullopt, isOperator)); > program.append(WTFMove(nativeFunctionDeclaration)); > } > } >diff --git a/Source/WebCore/Modules/webgpu/WHLSL/WHLSLSynthesizeConstructors.cpp b/Source/WebCore/Modules/webgpu/WHLSL/WHLSLSynthesizeConstructors.cpp >index 85e2b881d9b40a3885e2930cc8cd71bb39d9c206..e28fd57b21927a9f3677842bae4eb70bd961f7de 100644 >--- a/Source/WebCore/Modules/webgpu/WHLSL/WHLSLSynthesizeConstructors.cpp >+++ b/Source/WebCore/Modules/webgpu/WHLSL/WHLSLSynthesizeConstructors.cpp >@@ -101,16 +101,15 @@ void synthesizeConstructors(Program& program) > auto m_namedTypes = findAllTypes.takeNamedTypes(); > > bool isOperator = true; >- bool isRestricted = false; > > for (auto& unnamedType : m_unnamedTypes) { > AST::VariableDeclaration variableDeclaration(Lexer::Token(unnamedType.get().origin()), AST::Qualifiers(), { unnamedType.get().clone() }, String(), WTF::nullopt, WTF::nullopt); > AST::VariableDeclarations parameters; > parameters.append(WTFMove(variableDeclaration)); >- AST::NativeFunctionDeclaration copyConstructor(AST::FunctionDeclaration(Lexer::Token(unnamedType.get().origin()), AST::AttributeBlock(), WTF::nullopt, unnamedType.get().clone(), "operator cast"_str, WTFMove(parameters), WTF::nullopt, isOperator), isRestricted); >+ AST::NativeFunctionDeclaration copyConstructor(AST::FunctionDeclaration(Lexer::Token(unnamedType.get().origin()), AST::AttributeBlock(), WTF::nullopt, unnamedType.get().clone(), "operator cast"_str, WTFMove(parameters), WTF::nullopt, isOperator)); > program.append(WTFMove(copyConstructor)); > >- AST::NativeFunctionDeclaration defaultConstructor(AST::FunctionDeclaration(Lexer::Token(unnamedType.get().origin()), AST::AttributeBlock(), WTF::nullopt, unnamedType.get().clone(), "operator cast"_str, AST::VariableDeclarations(), WTF::nullopt, isOperator), isRestricted); >+ AST::NativeFunctionDeclaration defaultConstructor(AST::FunctionDeclaration(Lexer::Token(unnamedType.get().origin()), AST::AttributeBlock(), WTF::nullopt, unnamedType.get().clone(), "operator cast"_str, AST::VariableDeclarations(), WTF::nullopt, isOperator)); > program.append(WTFMove(defaultConstructor)); > } > >@@ -118,10 +117,10 @@ void synthesizeConstructors(Program& program) > AST::VariableDeclaration variableDeclaration(Lexer::Token(namedType.get().origin()), AST::Qualifiers(), { AST::TypeReference::wrap(Lexer::Token(namedType.get().origin()), namedType.get()) }, String(), WTF::nullopt, WTF::nullopt); > AST::VariableDeclarations parameters; > parameters.append(WTFMove(variableDeclaration)); >- AST::NativeFunctionDeclaration copyConstructor(AST::FunctionDeclaration(Lexer::Token(namedType.get().origin()), AST::AttributeBlock(), WTF::nullopt, AST::TypeReference::wrap(Lexer::Token(namedType.get().origin()), namedType.get()), "operator cast"_str, WTFMove(parameters), WTF::nullopt, isOperator), isRestricted); >+ AST::NativeFunctionDeclaration copyConstructor(AST::FunctionDeclaration(Lexer::Token(namedType.get().origin()), AST::AttributeBlock(), WTF::nullopt, AST::TypeReference::wrap(Lexer::Token(namedType.get().origin()), namedType.get()), "operator cast"_str, WTFMove(parameters), WTF::nullopt, isOperator)); > program.append(WTFMove(copyConstructor)); > >- AST::NativeFunctionDeclaration defaultConstructor(AST::FunctionDeclaration(Lexer::Token(namedType.get().origin()), AST::AttributeBlock(), WTF::nullopt, AST::TypeReference::wrap(Lexer::Token(namedType.get().origin()), namedType.get()), "operator cast"_str, AST::VariableDeclarations(), WTF::nullopt, isOperator), isRestricted); >+ AST::NativeFunctionDeclaration defaultConstructor(AST::FunctionDeclaration(Lexer::Token(namedType.get().origin()), AST::AttributeBlock(), WTF::nullopt, AST::TypeReference::wrap(Lexer::Token(namedType.get().origin()), namedType.get()), "operator cast"_str, AST::VariableDeclarations(), WTF::nullopt, isOperator)); > program.append(WTFMove(defaultConstructor)); > } > } >diff --git a/Source/WebCore/Modules/webgpu/WHLSL/WHLSLSynthesizeEnumerationFunctions.cpp b/Source/WebCore/Modules/webgpu/WHLSL/WHLSLSynthesizeEnumerationFunctions.cpp >index 83454834f920fd31b384393790e6160ca7c35b73..f40e1a9e620719d5c97dff94096f0b9cb6641979 100644 >--- a/Source/WebCore/Modules/webgpu/WHLSL/WHLSLSynthesizeEnumerationFunctions.cpp >+++ b/Source/WebCore/Modules/webgpu/WHLSL/WHLSLSynthesizeEnumerationFunctions.cpp >@@ -39,7 +39,6 @@ namespace WHLSL { > void synthesizeEnumerationFunctions(Program& program) > { > bool isOperator = true; >- bool isRestricted = false; > for (auto& enumerationDefinition : program.enumerationDefinitions()) { > { > AST::VariableDeclaration variableDeclaration1(Lexer::Token(enumerationDefinition->origin()), AST::Qualifiers(), { AST::TypeReference::wrap(Lexer::Token(enumerationDefinition->origin()), enumerationDefinition) }, String(), WTF::nullopt, WTF::nullopt); >@@ -47,7 +46,7 @@ void synthesizeEnumerationFunctions(Program& program) > AST::VariableDeclarations parameters; > parameters.append(WTFMove(variableDeclaration1)); > parameters.append(WTFMove(variableDeclaration2)); >- AST::NativeFunctionDeclaration nativeFunctionDeclaration(AST::FunctionDeclaration(Lexer::Token(enumerationDefinition->origin()), AST::AttributeBlock(), WTF::nullopt, AST::TypeReference::wrap(Lexer::Token(enumerationDefinition->origin()), program.intrinsics().boolType()), "operator=="_str, WTFMove(parameters), WTF::nullopt, isOperator), isRestricted); >+ AST::NativeFunctionDeclaration nativeFunctionDeclaration(AST::FunctionDeclaration(Lexer::Token(enumerationDefinition->origin()), AST::AttributeBlock(), WTF::nullopt, AST::TypeReference::wrap(Lexer::Token(enumerationDefinition->origin()), program.intrinsics().boolType()), "operator=="_str, WTFMove(parameters), WTF::nullopt, isOperator)); > program.append(WTFMove(nativeFunctionDeclaration)); > } > >@@ -55,7 +54,7 @@ void synthesizeEnumerationFunctions(Program& program) > AST::VariableDeclaration variableDeclaration(Lexer::Token(enumerationDefinition->origin()), AST::Qualifiers(), { AST::TypeReference::wrap(Lexer::Token(enumerationDefinition->origin()), enumerationDefinition) }, String(), WTF::nullopt, WTF::nullopt); > AST::VariableDeclarations parameters; > parameters.append(WTFMove(variableDeclaration)); >- AST::NativeFunctionDeclaration nativeFunctionDeclaration(AST::FunctionDeclaration(Lexer::Token(enumerationDefinition->origin()), AST::AttributeBlock(), WTF::nullopt, enumerationDefinition->type().clone(), "operator.value"_str, WTFMove(parameters), WTF::nullopt, isOperator), isRestricted); >+ AST::NativeFunctionDeclaration nativeFunctionDeclaration(AST::FunctionDeclaration(Lexer::Token(enumerationDefinition->origin()), AST::AttributeBlock(), WTF::nullopt, enumerationDefinition->type().clone(), "operator.value"_str, WTFMove(parameters), WTF::nullopt, isOperator)); > program.append(WTFMove(nativeFunctionDeclaration)); > } > >@@ -63,7 +62,7 @@ void synthesizeEnumerationFunctions(Program& program) > AST::VariableDeclaration variableDeclaration(Lexer::Token(enumerationDefinition->origin()), AST::Qualifiers(), { AST::TypeReference::wrap(Lexer::Token(enumerationDefinition->origin()), enumerationDefinition) }, String(), WTF::nullopt, WTF::nullopt); > AST::VariableDeclarations parameters; > parameters.append(WTFMove(variableDeclaration)); >- AST::NativeFunctionDeclaration nativeFunctionDeclaration(AST::FunctionDeclaration(Lexer::Token(enumerationDefinition->origin()), AST::AttributeBlock(), WTF::nullopt, enumerationDefinition->type().clone(), "operator cast"_str, WTFMove(parameters), WTF::nullopt, isOperator), isRestricted); >+ AST::NativeFunctionDeclaration nativeFunctionDeclaration(AST::FunctionDeclaration(Lexer::Token(enumerationDefinition->origin()), AST::AttributeBlock(), WTF::nullopt, enumerationDefinition->type().clone(), "operator cast"_str, WTFMove(parameters), WTF::nullopt, isOperator)); > program.append(WTFMove(nativeFunctionDeclaration)); > } > >@@ -71,7 +70,7 @@ void synthesizeEnumerationFunctions(Program& program) > AST::VariableDeclaration variableDeclaration(Lexer::Token(enumerationDefinition->origin()), AST::Qualifiers(), enumerationDefinition->type().clone(), String(), WTF::nullopt, WTF::nullopt); > AST::VariableDeclarations parameters; > parameters.append(WTFMove(variableDeclaration)); >- AST::NativeFunctionDeclaration nativeFunctionDeclaration(AST::FunctionDeclaration(Lexer::Token(enumerationDefinition->origin()), AST::AttributeBlock(), WTF::nullopt, { AST::TypeReference::wrap(Lexer::Token(enumerationDefinition->origin()), enumerationDefinition) }, "operator cast"_str, WTFMove(parameters), WTF::nullopt, isOperator), isRestricted); >+ AST::NativeFunctionDeclaration nativeFunctionDeclaration(AST::FunctionDeclaration(Lexer::Token(enumerationDefinition->origin()), AST::AttributeBlock(), WTF::nullopt, { AST::TypeReference::wrap(Lexer::Token(enumerationDefinition->origin()), enumerationDefinition) }, "operator cast"_str, WTFMove(parameters), WTF::nullopt, isOperator)); > program.append(WTFMove(nativeFunctionDeclaration)); > } > } >diff --git a/Source/WebCore/Modules/webgpu/WHLSL/WHLSLSynthesizeStructureAccessors.cpp b/Source/WebCore/Modules/webgpu/WHLSL/WHLSLSynthesizeStructureAccessors.cpp >index b99dc770b5dfcb40a5605cedfb13443dfddbda9e..d04036e2395a813d63077676ec6bf67769d634aa 100644 >--- a/Source/WebCore/Modules/webgpu/WHLSL/WHLSLSynthesizeStructureAccessors.cpp >+++ b/Source/WebCore/Modules/webgpu/WHLSL/WHLSLSynthesizeStructureAccessors.cpp >@@ -42,7 +42,6 @@ namespace WHLSL { > void synthesizeStructureAccessors(Program& program) > { > bool isOperator = true; >- bool isRestricted = false; > for (auto& structureDefinition : program.structureDefinitions()) { > for (auto& structureElement : structureDefinition->structureElements()) { > { >@@ -50,7 +49,7 @@ void synthesizeStructureAccessors(Program& program) > AST::VariableDeclaration variableDeclaration(Lexer::Token(structureElement.origin()), AST::Qualifiers(), { AST::TypeReference::wrap(Lexer::Token(structureElement.origin()), structureDefinition) }, String(), WTF::nullopt, WTF::nullopt); > AST::VariableDeclarations parameters; > parameters.append(WTFMove(variableDeclaration)); >- AST::NativeFunctionDeclaration nativeFunctionDeclaration(AST::FunctionDeclaration(Lexer::Token(structureElement.origin()), AST::AttributeBlock(), WTF::nullopt, structureElement.type().clone(), String::format("operator.%s", structureElement.name().utf8().data()), WTFMove(parameters), WTF::nullopt, isOperator), isRestricted); >+ AST::NativeFunctionDeclaration nativeFunctionDeclaration(AST::FunctionDeclaration(Lexer::Token(structureElement.origin()), AST::AttributeBlock(), WTF::nullopt, structureElement.type().clone(), String::format("operator.%s", structureElement.name().utf8().data()), WTFMove(parameters), WTF::nullopt, isOperator)); > program.append(WTFMove(nativeFunctionDeclaration)); > } > >@@ -61,7 +60,7 @@ void synthesizeStructureAccessors(Program& program) > AST::VariableDeclarations parameters; > parameters.append(WTFMove(variableDeclaration1)); > parameters.append(WTFMove(variableDeclaration2)); >- AST::NativeFunctionDeclaration nativeFunctionDeclaration(AST::FunctionDeclaration(Lexer::Token(structureElement.origin()), AST::AttributeBlock(), WTF::nullopt, AST::TypeReference::wrap(Lexer::Token(structureElement.origin()), structureDefinition), String::format("operator.%s=", structureElement.name().utf8().data()), WTFMove(parameters), WTF::nullopt, isOperator), isRestricted); >+ AST::NativeFunctionDeclaration nativeFunctionDeclaration(AST::FunctionDeclaration(Lexer::Token(structureElement.origin()), AST::AttributeBlock(), WTF::nullopt, AST::TypeReference::wrap(Lexer::Token(structureElement.origin()), structureDefinition), String::format("operator.%s=", structureElement.name().utf8().data()), WTFMove(parameters), WTF::nullopt, isOperator)); > program.append(WTFMove(nativeFunctionDeclaration)); > } > >@@ -72,7 +71,7 @@ void synthesizeStructureAccessors(Program& program) > AST::VariableDeclarations parameters; > parameters.append(WTFMove(variableDeclaration)); > auto returnType = makeUniqueRef<AST::PointerType>(Lexer::Token(structureElement.origin()), addressSpace, structureElement.type().clone()); >- AST::NativeFunctionDeclaration nativeFunctionDeclaration(AST::FunctionDeclaration(Lexer::Token(structureElement.origin()), AST::AttributeBlock(), WTF::nullopt, WTFMove(returnType), String::format("operator&.%s", structureElement.name().utf8().data()), WTFMove(parameters), WTF::nullopt, isOperator), isRestricted); >+ AST::NativeFunctionDeclaration nativeFunctionDeclaration(AST::FunctionDeclaration(Lexer::Token(structureElement.origin()), AST::AttributeBlock(), WTF::nullopt, WTFMove(returnType), String::format("operator&.%s", structureElement.name().utf8().data()), WTFMove(parameters), WTF::nullopt, isOperator)); > return nativeFunctionDeclaration; > }; > program.append(createAnder(AST::AddressSpace::Constant));
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
rmorisset
:
review+
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 193469
: 359215