|
| 1 | +2019-01-14 Myles C. Maxfield < [email protected]> |
| 2 | + |
| 3 | + [WHLSL] Assorted cleanup |
| 4 | + https://bugs.webkit.org/show_bug.cgi?id=193389 |
| 5 | + |
| 6 | + Reviewed by Dean Jackson. |
| 7 | + |
| 8 | + This is a bunch of non-behavior-changing cleanup. |
| 9 | + |
| 10 | + - The compiler uses UniqueRef all over the place, and UniqueRef has an implicit operator T&. Therefore, |
| 11 | + we don't need to static_cast<T&> everywhere. |
| 12 | + - ConstantExpressionEnumerationMemberReference is the exact same thing as EnumerationMemberLiteral, so |
| 13 | + this patch deletes the longer-named class in favor of the shorter-named class. |
| 14 | + - Because of the header dependency tree, this patch moves EntryPointType into its own file so it can be |
| 15 | + used by files that FunctionDeclaration depends on. Same thing for AddressSpace. |
| 16 | + - EnumTypes have to have non-null base types. The parser will make sure this is always true. |
| 17 | + |
| 18 | + No new tests because there is no behavior change. |
| 19 | + |
| 20 | + * Modules/webgpu/WHLSL/AST/WHLSLAddressSpace.h: Copied from Source/WebCore/Modules/webgpu/WHLSL/AST/WHLSLBaseSemantic.h. |
| 21 | + * Modules/webgpu/WHLSL/AST/WHLSLArrayType.h: |
| 22 | + (WebCore::WHLSL::AST::ArrayType::type const): |
| 23 | + (WebCore::WHLSL::AST::ArrayType::type): |
| 24 | + * Modules/webgpu/WHLSL/AST/WHLSLAssignmentExpression.h: |
| 25 | + (WebCore::WHLSL::AST::AssignmentExpression::left): |
| 26 | + (WebCore::WHLSL::AST::AssignmentExpression::right): |
| 27 | + * Modules/webgpu/WHLSL/AST/WHLSLBaseSemantic.h: |
| 28 | + * Modules/webgpu/WHLSL/AST/WHLSLBuiltInSemantic.cpp: |
| 29 | + (WebCore::WHLSL::AST::BuiltInSemantic::isAcceptableForShaderItemDirection const): |
| 30 | + * Modules/webgpu/WHLSL/AST/WHLSLBuiltInSemantic.h: |
| 31 | + * Modules/webgpu/WHLSL/AST/WHLSLConstantExpression.h: |
| 32 | + (WebCore::WHLSL::AST::ConstantExpression::ConstantExpression): |
| 33 | + (WebCore::WHLSL::AST::ConstantExpression::clone const): |
| 34 | + (WebCore::WHLSL::AST::ConstantExpression::matches const): |
| 35 | + * Modules/webgpu/WHLSL/AST/WHLSLConstantExpressionEnumerationMemberReference.h: Removed. |
| 36 | + * Modules/webgpu/WHLSL/AST/WHLSLDereferenceExpression.h: |
| 37 | + (WebCore::WHLSL::AST::DereferenceExpression::pointer): |
| 38 | + * Modules/webgpu/WHLSL/AST/WHLSLDoWhileLoop.h: |
| 39 | + (WebCore::WHLSL::AST::DoWhileLoop::body): |
| 40 | + (WebCore::WHLSL::AST::DoWhileLoop::conditional): |
| 41 | + * Modules/webgpu/WHLSL/AST/WHLSLEffectfulExpressionStatement.h: |
| 42 | + (WebCore::WHLSL::AST::EffectfulExpressionStatement::effectfulExpression): |
| 43 | + * Modules/webgpu/WHLSL/AST/WHLSLEntryPointType.h: Copied from Source/WebCore/Modules/webgpu/WHLSL/AST/WHLSLBaseSemantic.h. |
| 44 | + * Modules/webgpu/WHLSL/AST/WHLSLEnumerationDefinition.h: |
| 45 | + (WebCore::WHLSL::AST::EnumerationDefinition::EnumerationDefinition): |
| 46 | + (WebCore::WHLSL::AST::EnumerationDefinition::type): |
| 47 | + * Modules/webgpu/WHLSL/AST/WHLSLEnumerationMemberLiteral.h: |
| 48 | + (WebCore::WHLSL::AST::EnumerationMemberLiteral::EnumerationMemberLiteral): |
| 49 | + (WebCore::WHLSL::AST::EnumerationMemberLiteral::wrap): |
| 50 | + (WebCore::WHLSL::AST::EnumerationMemberLiteral::left const): |
| 51 | + (WebCore::WHLSL::AST::EnumerationMemberLiteral::right const): |
| 52 | + (WebCore::WHLSL::AST::EnumerationMemberLiteral::clone const): |
| 53 | + (WebCore::WHLSL::AST::EnumerationMemberLiteral::enumerationDefinition): |
| 54 | + (WebCore::WHLSL::AST::EnumerationMemberLiteral::enumerationDefinition const): |
| 55 | + (WebCore::WHLSL::AST::EnumerationMemberLiteral::enumerationMember): |
| 56 | + (WebCore::WHLSL::AST::EnumerationMemberLiteral::enumerationMember const): |
| 57 | + (WebCore::WHLSL::AST::EnumerationMemberLiteral::setEnumerationMember): |
| 58 | + * Modules/webgpu/WHLSL/AST/WHLSLExpression.h: |
| 59 | + (WebCore::WHLSL::AST::Expression::type): |
| 60 | + (WebCore::WHLSL::AST::Expression::setType): |
| 61 | + (WebCore::WHLSL::AST::Expression::addressSpace const): |
| 62 | + (WebCore::WHLSL::AST::Expression::setAddressSpace): |
| 63 | + * Modules/webgpu/WHLSL/AST/WHLSLFloatLiteralType.cpp: |
| 64 | + (WebCore::WHLSL::AST::FloatLiteralType::conversionCost const): |
| 65 | + * Modules/webgpu/WHLSL/AST/WHLSLFloatLiteralType.h: |
| 66 | + (WebCore::WHLSL::AST::FloatLiteralType::preferredType): |
| 67 | + * Modules/webgpu/WHLSL/AST/WHLSLForLoop.h: |
| 68 | + (WebCore::WHLSL::AST::ForLoop::condition): |
| 69 | + (WebCore::WHLSL::AST::ForLoop::increment): |
| 70 | + (WebCore::WHLSL::AST::ForLoop::body): |
| 71 | + * Modules/webgpu/WHLSL/AST/WHLSLFunctionDeclaration.h: |
| 72 | + (WebCore::WHLSL::AST::FunctionDeclaration::type const): |
| 73 | + (WebCore::WHLSL::AST::FunctionDeclaration::type): |
| 74 | + * Modules/webgpu/WHLSL/AST/WHLSLIfStatement.h: |
| 75 | + (WebCore::WHLSL::AST::IfStatement::conditional): |
| 76 | + (WebCore::WHLSL::AST::IfStatement::body): |
| 77 | + (WebCore::WHLSL::AST::IfStatement::elseBody): |
| 78 | + * Modules/webgpu/WHLSL/AST/WHLSLIndexExpression.h: |
| 79 | + (WebCore::WHLSL::AST::IndexExpression::indexExpression): |
| 80 | + * Modules/webgpu/WHLSL/AST/WHLSLIntegerLiteralType.cpp: |
| 81 | + (WebCore::WHLSL::AST::IntegerLiteralType::conversionCost const): |
| 82 | + * Modules/webgpu/WHLSL/AST/WHLSLIntegerLiteralType.h: |
| 83 | + (WebCore::WHLSL::AST::IntegerLiteralType::preferredType): |
| 84 | + * Modules/webgpu/WHLSL/AST/WHLSLLogicalExpression.h: |
| 85 | + (WebCore::WHLSL::AST::LogicalExpression::left): |
| 86 | + (WebCore::WHLSL::AST::LogicalExpression::right): |
| 87 | + * Modules/webgpu/WHLSL/AST/WHLSLLogicalNotExpression.h: |
| 88 | + (WebCore::WHLSL::AST::LogicalNotExpression::operand): |
| 89 | + * Modules/webgpu/WHLSL/AST/WHLSLMakeArrayReferenceExpression.h: |
| 90 | + (WebCore::WHLSL::AST::MakeArrayReferenceExpression::lValue): |
| 91 | + * Modules/webgpu/WHLSL/AST/WHLSLMakePointerExpression.h: |
| 92 | + (WebCore::WHLSL::AST::MakePointerExpression::lValue): |
| 93 | + * Modules/webgpu/WHLSL/AST/WHLSLPropertyAccessExpression.h: |
| 94 | + (WebCore::WHLSL::AST::PropertyAccessExpression::base): |
| 95 | + * Modules/webgpu/WHLSL/AST/WHLSLReadModifyWriteExpression.h: |
| 96 | + (WebCore::WHLSL::AST::ReadModifyWriteExpression::lValue): |
| 97 | + (WebCore::WHLSL::AST::ReadModifyWriteExpression::newValueExpression): |
| 98 | + (WebCore::WHLSL::AST::ReadModifyWriteExpression::resultExpression): |
| 99 | + * Modules/webgpu/WHLSL/AST/WHLSLReferenceType.h: |
| 100 | + (WebCore::WHLSL::AST::ReferenceType::elementType const): |
| 101 | + (WebCore::WHLSL::AST::ReferenceType::elementType): |
| 102 | + * Modules/webgpu/WHLSL/AST/WHLSLResolvableType.h: |
| 103 | + (WebCore::WHLSL::AST::ResolvableType::resolvedType const): |
| 104 | + (WebCore::WHLSL::AST::ResolvableType::resolvedType): |
| 105 | + * Modules/webgpu/WHLSL/AST/WHLSLResourceSemantic.cpp: |
| 106 | + (WebCore::WHLSL::AST::ResourceSemantic::isAcceptableType const): |
| 107 | + (WebCore::WHLSL::AST::ResourceSemantic::isAcceptableForShaderItemDirection const): |
| 108 | + * Modules/webgpu/WHLSL/AST/WHLSLResourceSemantic.h: |
| 109 | + * Modules/webgpu/WHLSL/AST/WHLSLReturn.h: |
| 110 | + (WebCore::WHLSL::AST::Return::value): |
| 111 | + * Modules/webgpu/WHLSL/AST/WHLSLSpecializationConstantSemantic.cpp: |
| 112 | + (WebCore::WHLSL::AST::SpecializationConstantSemantic::isAcceptableForShaderItemDirection const): |
| 113 | + * Modules/webgpu/WHLSL/AST/WHLSLSpecializationConstantSemantic.h: |
| 114 | + * Modules/webgpu/WHLSL/AST/WHLSLStageInOutSemantic.cpp: |
| 115 | + (WebCore::WHLSL::AST::StageInOutSemantic::isAcceptableForShaderItemDirection const): |
| 116 | + * Modules/webgpu/WHLSL/AST/WHLSLStageInOutSemantic.h: |
| 117 | + * Modules/webgpu/WHLSL/AST/WHLSLStructureElement.h: |
| 118 | + (WebCore::WHLSL::AST::StructureElement::type): |
| 119 | + * Modules/webgpu/WHLSL/AST/WHLSLSwitchStatement.h: |
| 120 | + (WebCore::WHLSL::AST::SwitchStatement::value): |
| 121 | + * Modules/webgpu/WHLSL/AST/WHLSLTernaryExpression.h: |
| 122 | + (WebCore::WHLSL::AST::TernaryExpression::predicate): |
| 123 | + (WebCore::WHLSL::AST::TernaryExpression::bodyExpression): |
| 124 | + (WebCore::WHLSL::AST::TernaryExpression::elseExpression): |
| 125 | + * Modules/webgpu/WHLSL/AST/WHLSLTypeDefinition.h: |
| 126 | + (WebCore::WHLSL::AST::TypeDefinition::type): |
| 127 | + * Modules/webgpu/WHLSL/AST/WHLSLUnsignedIntegerLiteralType.cpp: |
| 128 | + (WebCore::WHLSL::AST::UnsignedIntegerLiteralType::conversionCost const): |
| 129 | + * Modules/webgpu/WHLSL/AST/WHLSLUnsignedIntegerLiteralType.h: |
| 130 | + (WebCore::WHLSL::AST::UnsignedIntegerLiteralType::preferredType): |
| 131 | + * Modules/webgpu/WHLSL/AST/WHLSLVariableDeclaration.h: |
| 132 | + (WebCore::WHLSL::AST::VariableDeclaration::type): |
| 133 | + (WebCore::WHLSL::AST::VariableDeclaration::initializer): |
| 134 | + (WebCore::WHLSL::AST::VariableDeclaration::isAnonymous const): |
| 135 | + * Modules/webgpu/WHLSL/AST/WHLSLWhileLoop.h: |
| 136 | + (WebCore::WHLSL::AST::WhileLoop::conditional): |
| 137 | + (WebCore::WHLSL::AST::WhileLoop::body): |
| 138 | + * Modules/webgpu/WHLSL/WHLSLCheckDuplicateFunctions.cpp: |
| 139 | + (WebCore::WHLSL::checkDuplicateFunctions): |
| 140 | + * Modules/webgpu/WHLSL/WHLSLInferTypes.cpp: |
| 141 | + (WebCore::WHLSL::commit): |
| 142 | + (WebCore::WHLSL::inferTypesForTypeArguments): |
| 143 | + (WebCore::WHLSL::inferTypesForCall): |
| 144 | + * Modules/webgpu/WHLSL/WHLSLNameResolver.cpp: |
| 145 | + (WebCore::WHLSL::NameResolver::visit): |
| 146 | + (WebCore::WHLSL::resolveNamesInTypes): |
| 147 | + (WebCore::WHLSL::resolveNamesInFunctions): |
| 148 | + * Modules/webgpu/WHLSL/WHLSLNameResolver.h: |
| 149 | + * Modules/webgpu/WHLSL/WHLSLParser.h: |
| 150 | + * Modules/webgpu/WHLSL/WHLSLProgram.h: |
| 151 | + (WebCore::WHLSL::Program::append): |
| 152 | + * Modules/webgpu/WHLSL/WHLSLSynthesizeEnumerationFunctions.cpp: |
| 153 | + (WebCore::WHLSL::synthesizeEnumerationFunctions): |
| 154 | + * Modules/webgpu/WHLSL/WHLSLSynthesizeStructureAccessors.cpp: |
| 155 | + (WebCore::WHLSL::synthesizeStructureAccessors): |
| 156 | + * Modules/webgpu/WHLSL/WHLSLVisitor.cpp: |
| 157 | + (WebCore::WHLSL::Visitor::visit): |
| 158 | + * Modules/webgpu/WHLSL/WHLSLVisitor.h: |
| 159 | + * WebCore.xcodeproj/project.pbxproj: |
| 160 | + |
1 | 161 | 2019-01-14 Zan Dobersek < [email protected]>
|
2 | 162 |
|
3 | 163 | DOMCacheStorage: use-after-move in doSequentialMatch()
|
|
0 commit comments