WebKit Bugzilla
Attachment 358022 Details for
Bug 193007
: [WHLSL] Implement the NameResolver
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
file.txt (text/plain), 45.64 KB, created by
Myles C. Maxfield
on 2018-12-22 03:15:59 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Myles C. Maxfield
Created:
2018-12-22 03:15:59 PST
Size:
45.64 KB
patch
obsolete
>commit 88ac891b64aa1f27dfa2da71a2646c0ea41b9ef3 >Author: Myles C. Maxfield <mmaxfield@apple.com> >Date: Sat Dec 22 02:12:02 2018 -0800 > > Name Resolver > >diff --git a/Source/WebCore/Modules/webgpu/WHLSL/AST/WHLSLArrayReferenceType.h b/Source/WebCore/Modules/webgpu/WHLSL/AST/WHLSLArrayReferenceType.h >index 2d567f00e70..c482af8dcc5 100644 >--- a/Source/WebCore/Modules/webgpu/WHLSL/AST/WHLSLArrayReferenceType.h >+++ b/Source/WebCore/Modules/webgpu/WHLSL/AST/WHLSLArrayReferenceType.h >@@ -49,7 +49,7 @@ public: > ArrayReferenceType(const ArrayReferenceType&) = delete; > ArrayReferenceType(ArrayReferenceType&&) = default; > >- bool isArrayReferenceType() const override { return false; } >+ bool isArrayReferenceType() const override { return true; } > > std::unique_ptr<Type> clone() const override > { >diff --git a/Source/WebCore/Modules/webgpu/WHLSL/AST/WHLSLArrayType.h b/Source/WebCore/Modules/webgpu/WHLSL/AST/WHLSLArrayType.h >index 40b5f8df6fe..f70d666260f 100644 >--- a/Source/WebCore/Modules/webgpu/WHLSL/AST/WHLSLArrayType.h >+++ b/Source/WebCore/Modules/webgpu/WHLSL/AST/WHLSLArrayType.h >@@ -52,11 +52,10 @@ public: > ArrayType(const ArrayType&) = delete; > ArrayType(ArrayType&&) = default; > >- unsigned numElements() const { return m_numElements; } >- >- bool isArrayType() const override { return false; } >+ bool isArrayType() const override { return true; } > > Type& type() { return *m_elementType; } >+ unsigned numElements() const { return m_numElements; } > > std::unique_ptr<Type> clone() const override > { >diff --git a/Source/WebCore/Modules/webgpu/WHLSL/AST/WHLSLCallExpression.h b/Source/WebCore/Modules/webgpu/WHLSL/AST/WHLSLCallExpression.h >index 64af713299c..b1ea3b70f2f 100644 >--- a/Source/WebCore/Modules/webgpu/WHLSL/AST/WHLSLCallExpression.h >+++ b/Source/WebCore/Modules/webgpu/WHLSL/AST/WHLSLCallExpression.h >@@ -54,9 +54,36 @@ public: > > Vector<std::unique_ptr<Expression>>& arguments() { return m_arguments; } > >+ String& name() { return m_name; } >+ >+ void setCastData() >+ { >+ // FIXME: Implement this >+ } >+ >+ typedef Variant<std::reference_wrapper<AST::FunctionDefinition>, std::reference_wrapper<AST::NativeFunctionDeclaration>> Overload; >+ bool hasOverloads() const { return static_cast<bool>(m_overloads); } >+ void setOverloads(Vector<Overload, 1>&& overloads) >+ { >+ m_overloads = overloads; >+ } >+ >+ void setFunction(AST::FunctionDefinition& functionDefinition) >+ { >+ function = FunctionReference(functionDefinition); >+ } >+ >+ void setFunction(AST::NativeFunctionDeclaration& nativeFunctionDeclaration) >+ { >+ function = FunctionReference(nativeFunctionDeclaration); >+ } >+ > private: > String m_name; > Vector<std::unique_ptr<Expression>> m_arguments; >+ Optional<Vector<Overload, 1>> m_overloads; >+ typedef Variant<std::reference_wrapper<AST::FunctionDefinition>, std::reference_wrapper<AST::NativeFunctionDeclaration>> FunctionReference; >+ Optional<FunctionReference> function; > }; > > } >diff --git a/Source/WebCore/Modules/webgpu/WHLSL/AST/WHLSLDotExpression.h b/Source/WebCore/Modules/webgpu/WHLSL/AST/WHLSLDotExpression.h >index c43c69ee541..558367151c5 100644 >--- a/Source/WebCore/Modules/webgpu/WHLSL/AST/WHLSLDotExpression.h >+++ b/Source/WebCore/Modules/webgpu/WHLSL/AST/WHLSLDotExpression.h >@@ -49,6 +49,8 @@ public: > DotExpression(const DotExpression&) = delete; > DotExpression(DotExpression&&) = default; > >+ bool isDotExpression() const override { return true; } >+ > private: > String m_fieldName; > }; >@@ -59,4 +61,6 @@ private: > > } > >+SPECIALIZE_TYPE_TRAITS_WHLSL_EXPRESSION(DotExpression, isDotExpression()) >+ > #endif >diff --git a/Source/WebCore/Modules/webgpu/WHLSL/AST/WHLSLEnumerationDefinition.h b/Source/WebCore/Modules/webgpu/WHLSL/AST/WHLSLEnumerationDefinition.h >index 7970b59e54a..b0ff9e1f136 100644 >--- a/Source/WebCore/Modules/webgpu/WHLSL/AST/WHLSLEnumerationDefinition.h >+++ b/Source/WebCore/Modules/webgpu/WHLSL/AST/WHLSLEnumerationDefinition.h >@@ -39,7 +39,7 @@ namespace WHLSL { > > namespace AST { > >-class EnumerationDefinition : public Node { >+class EnumerationDefinition : public Type { > public: > EnumerationDefinition(Lexer::Token&& origin, String&& name, std::unique_ptr<Type>&& type, EnumerationMembers&& members) > : m_origin(WTFMove(origin)) >@@ -54,9 +54,18 @@ public: > EnumerationDefinition(const EnumerationDefinition&) = delete; > EnumerationDefinition(EnumerationDefinition&&) = default; > >+ bool isEnumerationDefinition() const override { return true; } >+ >+ String& name() { return m_name; } > Type& type() { return *m_type; } > EnumerationMembers& enumerationMembers() { return m_members; } > >+ std::unique_ptr<Type> clone() const override >+ { >+ ASSERT_NOT_REACHED(); >+ return nullptr; >+ } >+ > private: > Lexer::Token m_origin; > String m_name; >diff --git a/Source/WebCore/Modules/webgpu/WHLSL/AST/WHLSLExpression.h b/Source/WebCore/Modules/webgpu/WHLSL/AST/WHLSLExpression.h >index e368383646d..235f05490b1 100644 >--- a/Source/WebCore/Modules/webgpu/WHLSL/AST/WHLSLExpression.h >+++ b/Source/WebCore/Modules/webgpu/WHLSL/AST/WHLSLExpression.h >@@ -55,7 +55,9 @@ public: > virtual bool isCallExpression() const { return false; } > virtual bool isCommaExpression() const { return false; } > virtual bool isDereferenceExpression() const { return false; } >+ virtual bool isDotExpression() const { return false; } > virtual bool isFloatLiteral() const { return false; } >+ virtual bool isIndexExpression() const { return false; } > virtual bool isIntegerLiteral() const { return false; } > virtual bool isLogicalExpression() const { return false; } > virtual bool isLogicalNotExpression() const { return false; } >diff --git a/Source/WebCore/Modules/webgpu/WHLSL/AST/WHLSLFunctionDeclaration.h b/Source/WebCore/Modules/webgpu/WHLSL/AST/WHLSLFunctionDeclaration.h >index 7a7e0a0656c..7de953cbb6f 100644 >--- a/Source/WebCore/Modules/webgpu/WHLSL/AST/WHLSLFunctionDeclaration.h >+++ b/Source/WebCore/Modules/webgpu/WHLSL/AST/WHLSLFunctionDeclaration.h >@@ -67,6 +67,7 @@ public: > > AttributeBlock& attributeBlock() { return m_attributeBlock; } > AST::Type& type() { return *m_type; } >+ String& name() { return m_name; } > Parameters& parameters() { return m_parameters; } > Optional<AST::Semantic>& semantic() { return m_semantic; } > >diff --git a/Source/WebCore/Modules/webgpu/WHLSL/AST/WHLSLIndexExpression.h b/Source/WebCore/Modules/webgpu/WHLSL/AST/WHLSLIndexExpression.h >index 6bb6a0f0dab..e9496a34281 100644 >--- a/Source/WebCore/Modules/webgpu/WHLSL/AST/WHLSLIndexExpression.h >+++ b/Source/WebCore/Modules/webgpu/WHLSL/AST/WHLSLIndexExpression.h >@@ -49,6 +49,10 @@ public: > IndexExpression(const IndexExpression&) = delete; > IndexExpression(IndexExpression&&) = default; > >+ bool isIndexExpression() const override { return true; } >+ >+ Expression& indexExpression() { return *m_index; } >+ > private: > std::unique_ptr<Expression> m_index; > }; >@@ -59,4 +63,6 @@ private: > > } > >+SPECIALIZE_TYPE_TRAITS_WHLSL_EXPRESSION(IndexExpression, isIndexExpression()) >+ > #endif >diff --git a/Source/WebCore/Modules/webgpu/WHLSL/AST/WHLSLNativeTypeDeclaration.h b/Source/WebCore/Modules/webgpu/WHLSL/AST/WHLSLNativeTypeDeclaration.h >index 320abc3c475..29ded1f427c 100644 >--- a/Source/WebCore/Modules/webgpu/WHLSL/AST/WHLSLNativeTypeDeclaration.h >+++ b/Source/WebCore/Modules/webgpu/WHLSL/AST/WHLSLNativeTypeDeclaration.h >@@ -52,6 +52,9 @@ public: > NativeTypeDeclaration(const NativeTypeDeclaration&) = delete; > NativeTypeDeclaration(NativeTypeDeclaration&&) = default; > >+ bool isNativeTypeDeclaration() const override { return true; } >+ >+ String& name() { return m_name; } > TypeArguments& typeArguments() { return m_typeArguments; } > > std::unique_ptr<Type> clone() const override >diff --git a/Source/WebCore/Modules/webgpu/WHLSL/AST/WHLSLParameter.h b/Source/WebCore/Modules/webgpu/WHLSL/AST/WHLSLParameter.h >index 92586f8691f..c7aec0f151f 100644 >--- a/Source/WebCore/Modules/webgpu/WHLSL/AST/WHLSLParameter.h >+++ b/Source/WebCore/Modules/webgpu/WHLSL/AST/WHLSLParameter.h >@@ -57,6 +57,8 @@ public: > Parameter(const Parameter&) = delete; > Parameter(Parameter&&) = default; > >+ Optional<String>& name() { return m_name; } >+ > Type& type() { return *m_type; } > Optional<AST::Semantic>& semantic() { return m_semantic; } > >diff --git a/Source/WebCore/Modules/webgpu/WHLSL/AST/WHLSLPointerType.h b/Source/WebCore/Modules/webgpu/WHLSL/AST/WHLSLPointerType.h >index 1529426a2ed..22f77aea9ba 100644 >--- a/Source/WebCore/Modules/webgpu/WHLSL/AST/WHLSLPointerType.h >+++ b/Source/WebCore/Modules/webgpu/WHLSL/AST/WHLSLPointerType.h >@@ -49,7 +49,7 @@ public: > PointerType(const PointerType&) = delete; > PointerType(PointerType&&) = default; > >- bool isPointerType() const override { return false; } >+ bool isPointerType() const override { return true; } > > std::unique_ptr<Type> clone() const override > { >diff --git a/Source/WebCore/Modules/webgpu/WHLSL/AST/WHLSLReturn.h b/Source/WebCore/Modules/webgpu/WHLSL/AST/WHLSLReturn.h >index c5bfc9e4286..ac9323d2419 100644 >--- a/Source/WebCore/Modules/webgpu/WHLSL/AST/WHLSLReturn.h >+++ b/Source/WebCore/Modules/webgpu/WHLSL/AST/WHLSLReturn.h >@@ -54,8 +54,11 @@ public: > > Expression* value() { return m_value.get(); } > >+ void setFunction(FunctionDefinition* functionDefinition) { m_function = functionDefinition; } >+ > private: > std::unique_ptr<Expression> m_value; // nullable >+ FunctionDefinition* m_function; > }; > > } >diff --git a/Source/WebCore/Modules/webgpu/WHLSL/AST/WHLSLStructureDefinition.h b/Source/WebCore/Modules/webgpu/WHLSL/AST/WHLSLStructureDefinition.h >index 87cc62f2356..09c4006c065 100644 >--- a/Source/WebCore/Modules/webgpu/WHLSL/AST/WHLSLStructureDefinition.h >+++ b/Source/WebCore/Modules/webgpu/WHLSL/AST/WHLSLStructureDefinition.h >@@ -53,6 +53,9 @@ public: > StructureDefinition(const StructureDefinition&) = delete; > StructureDefinition(StructureDefinition&&) = default; > >+ bool isStructureDefinition() const override { return true; } >+ >+ String& name() { return m_name; } > StructureElements& structureElements() { return m_structureElements; } > > std::unique_ptr<Type> clone() const override >diff --git a/Source/WebCore/Modules/webgpu/WHLSL/AST/WHLSLType.h b/Source/WebCore/Modules/webgpu/WHLSL/AST/WHLSLType.h >index cf4cbc88790..eb4cd8b829a 100644 >--- a/Source/WebCore/Modules/webgpu/WHLSL/AST/WHLSLType.h >+++ b/Source/WebCore/Modules/webgpu/WHLSL/AST/WHLSLType.h >@@ -49,6 +49,10 @@ public: > virtual bool isPointerType() const { return false; } > virtual bool isArrayReferenceType() const { return false; } > virtual bool isArrayType() const { return false; } >+ virtual bool isTypeDefinition() const { return false; } >+ virtual bool isStructureDefinition() const { return false; } >+ virtual bool isEnumerationDefinition() const { return false; } >+ virtual bool isNativeTypeDeclaration() const { return false; } > > virtual std::unique_ptr<Type> clone() const = 0; > >diff --git a/Source/WebCore/Modules/webgpu/WHLSL/AST/WHLSLTypeDefinition.h b/Source/WebCore/Modules/webgpu/WHLSL/AST/WHLSLTypeDefinition.h >index f73629e29b1..4be3afdcefe 100644 >--- a/Source/WebCore/Modules/webgpu/WHLSL/AST/WHLSLTypeDefinition.h >+++ b/Source/WebCore/Modules/webgpu/WHLSL/AST/WHLSLTypeDefinition.h >@@ -52,6 +52,9 @@ public: > TypeDefinition(const TypeDefinition&) = delete; > TypeDefinition(TypeDefinition&&) = default; > >+ bool isTypeDefinition() const override { return true; } >+ >+ String& name() { return m_name; } > AST::Type& type() { return *m_type; } > > std::unique_ptr<Type> clone() const override >diff --git a/Source/WebCore/Modules/webgpu/WHLSL/AST/WHLSLTypeReference.h b/Source/WebCore/Modules/webgpu/WHLSL/AST/WHLSLTypeReference.h >index 49441d8b5c7..ed744c17667 100644 >--- a/Source/WebCore/Modules/webgpu/WHLSL/AST/WHLSLTypeReference.h >+++ b/Source/WebCore/Modules/webgpu/WHLSL/AST/WHLSLTypeReference.h >@@ -54,7 +54,9 @@ public: > > bool isTypeReference() const override { return true; } > >+ String& name() { return m_name; } > TypeArguments& typeArguments() { return m_typeArguments; } >+ Type*& type() { return m_type; } > > std::unique_ptr<TypeReference> cloneTypeReference() const > { >@@ -70,6 +72,7 @@ private: > Lexer::Token m_origin; > String m_name; > TypeArguments m_typeArguments; >+ Type* m_type { nullptr }; > }; > > } >diff --git a/Source/WebCore/Modules/webgpu/WHLSL/AST/WHLSLVariableDeclaration.h b/Source/WebCore/Modules/webgpu/WHLSL/AST/WHLSLVariableDeclaration.h >index ff0368193bd..a1d1a404526 100644 >--- a/Source/WebCore/Modules/webgpu/WHLSL/AST/WHLSLVariableDeclaration.h >+++ b/Source/WebCore/Modules/webgpu/WHLSL/AST/WHLSLVariableDeclaration.h >@@ -60,6 +60,7 @@ public: > VariableDeclaration(VariableDeclaration&&) = default; > > Lexer::Token origin() const { return m_origin; } >+ String& name() { return m_name; } > > Type& type() { return *m_type; } > Optional<Semantic>& semantic() { return m_semantic; } >diff --git a/Source/WebCore/Modules/webgpu/WHLSL/AST/WHLSLVariableReference.h b/Source/WebCore/Modules/webgpu/WHLSL/AST/WHLSLVariableReference.h >index 2ae828d5295..343e7b6dd7d 100644 >--- a/Source/WebCore/Modules/webgpu/WHLSL/AST/WHLSLVariableReference.h >+++ b/Source/WebCore/Modules/webgpu/WHLSL/AST/WHLSLVariableReference.h >@@ -55,19 +55,39 @@ public: > static VariableReference wrap(VariableDeclaration& variableDeclaration) > { > VariableReference result(Lexer::Token(variableDeclaration.origin())); >- result.m_variable = { &variableDeclaration }; >+ result.m_variable = VariableType(std::reference_wrapper<VariableDeclaration>(variableDeclaration)); > return result; > } > > static VariableReference wrap(AnonymousVariableDeclaration& anonymousVariableDeclaration) > { > VariableReference result(Lexer::Token(anonymousVariableDeclaration.origin())); >- result.m_variable = { &anonymousVariableDeclaration }; >+ result.m_variable = VariableType(std::reference_wrapper<AnonymousVariableDeclaration>(anonymousVariableDeclaration)); > return result; > } > > bool isVariableReference() const override { return true; } > >+ String& name() { return m_name; } >+ >+ typedef Variant<std::reference_wrapper<VariableDeclaration>, std::reference_wrapper<AnonymousVariableDeclaration>, std::reference_wrapper<Parameter>> VariableType; >+ Optional<VariableType>& variable() { return m_variable; } >+ >+ void setVariable(VariableDeclaration& variableDeclaration) >+ { >+ m_variable = VariableType(std::reference_wrapper<VariableDeclaration>(variableDeclaration)); >+ } >+ >+ void setVariable(AnonymousVariableDeclaration& anonymousVariableDeclaration) >+ { >+ m_variable = VariableType(std::reference_wrapper<AnonymousVariableDeclaration>(anonymousVariableDeclaration)); >+ } >+ >+ void setVariable(Parameter& parameter) >+ { >+ m_variable = VariableType(std::reference_wrapper<Parameter>(parameter)); >+ } >+ > private: > VariableReference(Lexer::Token&& origin) > : Expression(WTFMove(origin)) >@@ -75,7 +95,7 @@ private: > } > > String m_name; >- Optional<Variant<VariableDeclaration*, AnonymousVariableDeclaration*>> m_variable; >+ Optional<VariableType> m_variable; > }; > > } >diff --git a/Source/WebCore/Modules/webgpu/WHLSL/WHLSLNameContext.h b/Source/WebCore/Modules/webgpu/WHLSL/WHLSLNameContext.h >new file mode 100644 >index 00000000000..acbcc1e0963 >--- /dev/null >+++ b/Source/WebCore/Modules/webgpu/WHLSL/WHLSLNameContext.h >@@ -0,0 +1,194 @@ >+/* >+ * Copyright (C) 2018 Apple Inc. All rights reserved. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' >+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, >+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS >+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR >+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF >+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS >+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN >+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) >+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF >+ * THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#pragma once >+ >+#if ENABLE(WEBGPU) >+ >+#include "WHLSLTypeDefinition.h" >+#include "WHLSLStructureDefinition.h" >+#include "WHLSLEnumerationDefinition.h" >+#include "WHLSLFunctionDefinition.h" >+#include "WHLSLNativeFunctionDeclaration.h" >+#include "WHLSLNativeTypeDeclaration.h" >+#include "WHLSLParameter.h" >+#include "WHLSLVariableDeclaration.h" >+#include <functional> >+#include <wtf/HashMap.h> >+#include <wtf/Variant.h> >+#include <wtf/Vector.h> >+#include <wtf/text/WTFString.h> >+ >+namespace WebCore { >+ >+namespace WHLSL { >+ >+class NameContext { >+public: >+ NameContext(NameContext* parent = nullptr) >+ : m_parent(parent) >+ { >+ } >+ >+ bool add(AST::TypeDefinition& typeDefinition) >+ { >+ if (exists(typeDefinition.name())) >+ return false; >+ auto result = m_types.add(typeDefinition.name(), Vector<Type, 1>()); >+ if (!result.isNewEntry) >+ return false; >+ result.iterator->value.append(typeDefinition); >+ return true; >+ } >+ >+ bool add(AST::StructureDefinition& structureDefinition) >+ { >+ if (exists(structureDefinition.name())) >+ return false; >+ auto result = m_types.add(structureDefinition.name(), Vector<Type, 1>()); >+ if (!result.isNewEntry) >+ return false; >+ result.iterator->value.append(structureDefinition); >+ return true; >+ } >+ >+ bool add(AST::EnumerationDefinition& enumerationDefinition) >+ { >+ if (exists(enumerationDefinition.name())) >+ return false; >+ auto result = m_types.add(enumerationDefinition.name(), Vector<Type, 1>()); >+ if (!result.isNewEntry) >+ return false; >+ result.iterator->value.append(enumerationDefinition); >+ return true; >+ } >+ >+ bool add(AST::FunctionDefinition& functionDefinition) >+ { >+ if (m_types.find(functionDefinition.name()) != m_types.end() >+ || m_variables.find(functionDefinition.name()) != m_variables.end()) >+ return false; >+ auto result = m_functions.add(functionDefinition.name(), Vector<Function, 1>()); >+ result.iterator->value.append(functionDefinition); >+ return true; >+ } >+ >+ bool add(AST::NativeFunctionDeclaration& nativeFunctionDeclaration) >+ { >+ if (m_types.find(nativeFunctionDeclaration.name()) != m_types.end() >+ || m_variables.find(nativeFunctionDeclaration.name()) != m_variables.end()) >+ return false; >+ auto result = m_functions.add(nativeFunctionDeclaration.name(), Vector<Function, 1>()); >+ result.iterator->value.append(nativeFunctionDeclaration); >+ return true; >+ } >+ >+ bool add(AST::NativeTypeDeclaration& nativeTypeDeclaration) >+ { >+ if (m_functions.find(nativeTypeDeclaration.name()) != m_functions.end() >+ || m_variables.find(nativeTypeDeclaration.name()) != m_variables.end()) >+ return false; >+ auto result = m_types.add(nativeTypeDeclaration.name(), Vector<Type, 1>()); >+ result.iterator->value.append(nativeTypeDeclaration); >+ return true; >+ } >+ >+ bool add(AST::Parameter& parameter) >+ { >+ if (parameter.name()) { >+ if (exists(*parameter.name())) >+ return false; >+ auto result = m_variables.add(*parameter.name(), parameter); >+ return result.isNewEntry; >+ } >+ return true; >+ } >+ >+ bool add(AST::VariableDeclaration& variableDeclaration) >+ { >+ if (exists(variableDeclaration.name())) >+ return false; >+ auto result = m_variables.add(variableDeclaration.name(), variableDeclaration); >+ return result.isNewEntry; >+ } >+ >+ typedef Variant<std::reference_wrapper<AST::TypeDefinition>, >+ std::reference_wrapper<AST::StructureDefinition>, >+ std::reference_wrapper<AST::EnumerationDefinition>, >+ std::reference_wrapper<AST::NativeTypeDeclaration>> Type; >+ Vector<Type, 1>* getType(String& name) >+ { >+ auto iterator = m_types.find(name); >+ if (iterator == m_types.end()) { >+ if (m_parent) >+ return m_parent->getType(name); >+ return nullptr; >+ } >+ return &iterator->value; >+ } >+ >+ typedef Variant<std::reference_wrapper<AST::FunctionDefinition>, std::reference_wrapper<AST::NativeFunctionDeclaration>> Function; >+ Vector<Function, 1>* getFunctions(String& name) >+ { >+ auto iterator = m_functions.find(name); >+ if (iterator == m_functions.end()) { >+ if (m_parent) >+ return m_parent->getFunctions(name); >+ return nullptr; >+ } >+ return &iterator->value; >+ } >+ >+ typedef Variant<std::reference_wrapper<AST::Parameter>, std::reference_wrapper<AST::VariableDeclaration>> Variable; >+ Variable* getVariable(String& name) >+ { >+ auto iterator = m_variables.find(name); >+ if (iterator == m_variables.end()) { >+ if (m_parent) >+ return m_parent->getVariable(name); >+ return nullptr; >+ } >+ return &iterator->value; >+ } >+ >+private: >+ bool exists(String& name) >+ { >+ return m_types.find(name) != m_types.end() >+ || m_functions.find(name) != m_functions.end() >+ || m_variables.find(name) != m_variables.end(); >+ } >+ >+ HashMap<String, Vector<Type, 1>> m_types; >+ HashMap<String, Vector<Function, 1>> m_functions; >+ HashMap<String, Variable> m_variables; >+ NameContext* m_parent; >+}; >+ >+} >+ >+} >+ >+#endif >diff --git a/Source/WebCore/Modules/webgpu/WHLSL/WHLSLNameResolver.cpp b/Source/WebCore/Modules/webgpu/WHLSL/WHLSLNameResolver.cpp >index 780d5c5425a..d9c6034be83 100644 >--- a/Source/WebCore/Modules/webgpu/WHLSL/WHLSLNameResolver.cpp >+++ b/Source/WebCore/Modules/webgpu/WHLSL/WHLSLNameResolver.cpp >@@ -34,15 +34,6 @@ namespace WebCore { > > namespace WHLSL { > >-class NameResolver : public Visitor { >- ~NameResolver() = default; >-}; >- >-void resolveNamesInTypes(Program&) >-{ >- >-} >- > } > > } >diff --git a/Source/WebCore/Modules/webgpu/WHLSL/WHLSLNameResolver.h b/Source/WebCore/Modules/webgpu/WHLSL/WHLSLNameResolver.h >index 47d4d6a5793..42f8bc157cd 100644 >--- a/Source/WebCore/Modules/webgpu/WHLSL/WHLSLNameResolver.h >+++ b/Source/WebCore/Modules/webgpu/WHLSL/WHLSLNameResolver.h >@@ -28,12 +28,219 @@ > #if ENABLE(WEBGPU) > > #include "WHLSLProgram.h" >+#include "WHLSLVisitor.h" >+#include "WHLSLNameContext.h" >+#include <wtf/Optional.h> >+#include <wtf/Variant.h> > > namespace WebCore { > > namespace WHLSL { > >-void resolveNamesInTypes(Program& program); >+class NameResolver : public Visitor { >+public: >+ NameResolver(NameContext& nameContext) >+ : m_nameContext(nameContext) >+ { >+ } >+ >+ virtual ~NameResolver() = default; >+ >+ void visit(AST::TypeReference& typeReference) override >+ { >+ if (m_error) >+ return; >+ Visitor::visit(typeReference); >+ if (typeReference.type()) >+ return; >+ auto* candidates = m_nameContext.getType(typeReference.name()); >+ if (candidates == nullptr) { >+ m_error = true; >+ return; >+ } >+ if (candidates->size() == 0) { >+ m_error = true; >+ return; >+ } >+ // FIXME: This should match how function overload resolution works. >+ // However, I haven't implemented that yet, so I'll leave this blank for now. >+ // I'll fill it in as soon as I implement function overload resolution. >+ } >+ >+ void visit(AST::FunctionDefinition& functionDefinition) override >+ { >+ if (m_error) >+ return; >+ >+ NameContext newNameContext(&m_nameContext); >+ NameResolver newNameResolver(newNameContext); >+ visitType(functionDefinition.type()); >+ for (auto& parameter : functionDefinition.parameters()) { >+ newNameResolver.Visitor::visit(parameter); >+ auto success = newNameContext.add(parameter); >+ if (!success) { >+ m_error = true; >+ return; >+ } >+ } >+ newNameResolver.visit(functionDefinition.block()); >+ } >+ >+ void visit(AST::Block& block) override >+ { >+ if (m_error) >+ return; >+ >+ NameContext nameContext(&m_nameContext); >+ NameResolver(nameContext).Visitor::visit(block); >+ } >+ >+ void visit(AST::IfStatement& ifStatement) override >+ { >+ if (m_error) >+ return; >+ >+ Visitor::visit(ifStatement.conditional()); >+ NameContext nameContext(&m_nameContext); >+ NameResolver(nameContext).Visitor::visit(ifStatement.body()); >+ if (ifStatement.elseBody()) { >+ NameContext nameContext(&m_nameContext); >+ NameResolver(nameContext).Visitor::visit(*ifStatement.elseBody()); >+ } >+ } >+ >+ void visit(AST::WhileLoop& whileLoop) override >+ { >+ if (m_error) >+ return; >+ >+ Visitor::visit(whileLoop.conditional()); >+ NameContext nameContext(&m_nameContext); >+ NameResolver(nameContext).Visitor::visit(whileLoop.body()); >+ } >+ >+ void visit(AST::DoWhileLoop& whileLoop) override >+ { >+ if (m_error) >+ return; >+ >+ NameContext nameContext(&m_nameContext); >+ NameResolver(nameContext).Visitor::visit(whileLoop.body()); >+ Visitor::visit(whileLoop.conditional()); >+ } >+ >+ void visit(AST::ForLoop& forLoop) override >+ { >+ if (m_error) >+ return; >+ >+ NameContext nameContext(&m_nameContext); >+ NameResolver(nameContext).Visitor::visit(forLoop); >+ } >+ >+ void visit(AST::VariableDeclaration& variableDeclaration) override >+ { >+ if (m_error) >+ return; >+ >+ m_nameContext.add(variableDeclaration); >+ Visitor::visit(variableDeclaration); >+ } >+ >+ void visit(AST::VariableReference& variableReference) override >+ { >+ if (m_error) >+ return; >+ >+ if (variableReference.variable()) >+ return; >+ if (auto* variable = m_nameContext.getVariable(variableReference.name())) { >+ WTF::visit(WTF::makeVisitor([&](AST::Parameter& parameter) { >+ variableReference.setVariable(parameter); >+ }, [&](AST::VariableDeclaration& variableDeclaration) { >+ variableReference.setVariable(variableDeclaration); >+ }), *variable); >+ } else { >+ m_error = true; >+ return; >+ } >+ } >+ >+ void visit(AST::Return& returnNode) override >+ { >+ if (m_error) >+ return; >+ >+ ASSERT(m_currentFunction); >+ returnNode.setFunction(m_currentFunction); >+ Visitor::visit(returnNode); >+ } >+ >+ void visit(AST::DotExpression&) override >+ { >+ // FIXME: Implement this >+ } >+ >+ void visit(AST::IndexExpression&) override >+ { >+ // FIXME: Implement this >+ } >+ >+ void visit(AST::CallExpression& callExpression) override >+ { >+ if (m_error) >+ return; >+ >+ if (!callExpression.hasOverloads()) { >+ if (auto* functions = m_nameContext.getFunctions(callExpression.name())) >+ callExpression.setOverloads(Vector<AST::CallExpression::Overload, 1>(*functions)); >+ else { >+ callExpression.setCastData(); >+ if (auto* functions = m_nameContext.getFunctions(callExpression.name())) >+ callExpression.setOverloads(Vector<AST::CallExpression::Overload, 1>(*functions)); >+ else { >+ m_error = true; >+ return; >+ } >+ } >+ } >+ Visitor::visit(callExpression); >+ } >+ >+ void setCurrentFunctionDefinition(AST::FunctionDefinition* functionDefinition) >+ { >+ m_currentFunction = functionDefinition; >+ } >+ >+private: >+ NameContext m_nameContext; >+ AST::FunctionDefinition* m_currentFunction { nullptr }; >+ bool m_error { false }; // FIXME: Migrate this to be some sort of descriptive string. >+ // FIXME: Consider moving the error into Visitor >+}; >+ >+inline void resolveNamesInTypes(Program& program, NameResolver& nameResolver) >+{ >+ for (auto& typeDefinition : program.typeDefinitions()) >+ nameResolver.Visitor::visit(*typeDefinition); >+ for (auto& structureDefinition : program.structureDefinitions()) >+ nameResolver.Visitor::visit(*structureDefinition); >+ for (auto& enumerationDefinition : program.enumerationDefinitions()) >+ nameResolver.Visitor::visit(*enumerationDefinition); >+ for (auto& nativeTypeDeclaration : program.nativeTypeDeclarations()) >+ nameResolver.Visitor::visit(*nativeTypeDeclaration); >+} >+ >+inline void resolveNamesInFunctions(Program& program, NameResolver& nameResolver) >+{ >+ for (auto& functionDefinition : program.functionDefinitions()) { >+ nameResolver.setCurrentFunctionDefinition(functionDefinition.get()); >+ nameResolver.visit(*functionDefinition); >+ } >+ nameResolver.setCurrentFunctionDefinition(nullptr); >+ for (auto& nativeFunctionDeclaration : program.nativeFunctionDeclarations()) >+ nameResolver.Visitor::visit(*nativeFunctionDeclaration); >+} > > } > >diff --git a/Source/WebCore/Modules/webgpu/WHLSL/WHLSLParser.cpp b/Source/WebCore/Modules/webgpu/WHLSL/WHLSLParser.cpp >index bc6e73e6a1f..fa076a29734 100644 >--- a/Source/WebCore/Modules/webgpu/WHLSL/WHLSLParser.cpp >+++ b/Source/WebCore/Modules/webgpu/WHLSL/WHLSLParser.cpp >@@ -38,7 +38,8 @@ Parser::Parser() > { > } > >-auto Parser::parse(Program& result, StringView stringView, Mode mode) -> Optional<Error> >+// FIXME: Return a better error code from this, and report it to JavaScript. >+auto Parser::parse(Program& program, StringView stringView, Mode mode) -> Optional<Error> > { > m_lexer = Lexer(stringView); > m_mode = mode; >@@ -54,7 +55,11 @@ auto Parser::parse(Program& result, StringView stringView, Mode mode) -> Optiona > return parseTypeDefinition(); > }); > if (typeDefinition) { >- result.append(WTFMove(*typeDefinition)); >+ auto success = program.append(WTFMove(*typeDefinition)); >+ if (!success) { >+ WTFLogAlways("Name Error! %s", typeDefinition->name().utf8().data()); >+ return WTF::nullopt; >+ } > continue; > } > } >@@ -64,7 +69,11 @@ auto Parser::parse(Program& result, StringView stringView, Mode mode) -> Optiona > return parseStructureDefinition(); > }); > if (structureDefinition) { >- result.append(WTFMove(*structureDefinition)); >+ auto success = program.append(WTFMove(*structureDefinition)); >+ if (!success) { >+ WTFLogAlways("Name Error! %s", structureDefinition->name().utf8().data()); >+ return WTF::nullopt; >+ } > continue; > } > } >@@ -74,7 +83,11 @@ auto Parser::parse(Program& result, StringView stringView, Mode mode) -> Optiona > return parseEnumerationDefinition(); > }); > if (enumerationDefinition) { >- result.append(WTFMove(*enumerationDefinition)); >+ auto success = program.append(WTFMove(*enumerationDefinition)); >+ if (!success) { >+ WTFLogAlways("Name Error! %s", enumerationDefinition->name().utf8().data()); >+ return WTF::nullopt; >+ } > continue; > } > } >@@ -85,7 +98,11 @@ auto Parser::parse(Program& result, StringView stringView, Mode mode) -> Optiona > return parseFunctionDefinition(); > }); > if (functionDefinition) { >- result.append(WTFMove(*functionDefinition)); >+ auto success = program.append(WTFMove(*functionDefinition)); >+ if (!success) { >+ WTFLogAlways("Name Error! %s", functionDefinition->name().utf8().data()); >+ return WTF::nullopt; >+ } > continue; > } > error = functionDefinition.error(); >@@ -96,7 +113,11 @@ auto Parser::parse(Program& result, StringView stringView, Mode mode) -> Optiona > return parseNativeFunctionDeclaration(); > }); > if (nativeFunctionDeclaration) { >- result.append(WTFMove(*nativeFunctionDeclaration)); >+ auto success = program.append(WTFMove(*nativeFunctionDeclaration)); >+ if (!success) { >+ WTFLogAlways("Name Error! %s", nativeFunctionDeclaration->name().utf8().data()); >+ return WTF::nullopt; >+ } > continue; > } > } >@@ -106,7 +127,11 @@ auto Parser::parse(Program& result, StringView stringView, Mode mode) -> Optiona > return parseNativeTypeDeclaration(); > }); > if (nativeTypeDeclaration) { >- result.append(WTFMove(*nativeTypeDeclaration)); >+ auto success = program.append(WTFMove(*nativeTypeDeclaration)); >+ if (!success) { >+ WTFLogAlways("Name Error! %s", nativeTypeDeclaration->name().utf8().data()); >+ return WTF::nullopt; >+ } > continue; > } > } >diff --git a/Source/WebCore/Modules/webgpu/WHLSL/WHLSLPrepare.cpp b/Source/WebCore/Modules/webgpu/WHLSL/WHLSLPrepare.cpp >index 0eb64decd4d..dab1403824b 100644 >--- a/Source/WebCore/Modules/webgpu/WHLSL/WHLSLPrepare.cpp >+++ b/Source/WebCore/Modules/webgpu/WHLSL/WHLSLPrepare.cpp >@@ -50,7 +50,9 @@ Optional<PreparationResult> prepare(StringView source) > if (!success) > return WTF::nullopt; > >- resolveNamesInTypes(program); >+ NameResolver nameResolver(program.nameContext()); >+ resolveNamesInTypes(program, nameResolver); >+ resolveNamesInFunctions(program, nameResolver); > > return PreparationResult(); > } >diff --git a/Source/WebCore/Modules/webgpu/WHLSL/WHLSLProgram.h b/Source/WebCore/Modules/webgpu/WHLSL/WHLSLProgram.h >index 5630fe69ee4..319861550d7 100644 >--- a/Source/WebCore/Modules/webgpu/WHLSL/WHLSLProgram.h >+++ b/Source/WebCore/Modules/webgpu/WHLSL/WHLSLProgram.h >@@ -29,6 +29,7 @@ > > #include "WHLSLEnumerationDefinition.h" > #include "WHLSLFunctionDefinition.h" >+#include "WHLSLNameContext.h" > #include "WHLSLNativeFunctionDeclaration.h" > #include "WHLSLNativeTypeDeclaration.h" > #include "WHLSLStructureDefinition.h" >@@ -44,45 +45,58 @@ public: > Program() = default; > Program(Program&&) = default; > >- void append(AST::TypeDefinition&& typeDefinition) >+ bool append(AST::TypeDefinition&& typeDefinition) > { >- m_typeDefinitions.append(WTFMove(typeDefinition)); >+ m_typeDefinitions.append(std::make_unique<AST::TypeDefinition>(WTFMove(typeDefinition))); >+ return m_nameContext.add(*m_typeDefinitions.last()); > } >- void append(AST::StructureDefinition&& structureDefinition) >+ >+ bool append(AST::StructureDefinition&& structureDefinition) > { >- m_structureDefinitions.append(WTFMove(structureDefinition)); >+ m_structureDefinitions.append(std::make_unique<AST::StructureDefinition>(WTFMove(structureDefinition))); >+ return m_nameContext.add(*m_structureDefinitions.last()); > } >- void append(AST::EnumerationDefinition&& enumerationDefinition) >+ >+ bool append(AST::EnumerationDefinition&& enumerationDefinition) > { >- m_enumerationDefinitions.append(WTFMove(enumerationDefinition)); >+ m_enumerationDefinitions.append(std::make_unique<AST::EnumerationDefinition>(WTFMove(enumerationDefinition))); >+ return m_nameContext.add(*m_enumerationDefinitions.last()); > } >- void append(AST::FunctionDefinition&& functionDefinition) >+ >+ bool append(AST::FunctionDefinition&& functionDefinition) > { >- m_functionDefinitions.append(WTFMove(functionDefinition)); >+ m_functionDefinitions.append(std::make_unique<AST::FunctionDefinition>(WTFMove(functionDefinition))); >+ return m_nameContext.add(*m_functionDefinitions.last()); > } >- void append(AST::NativeFunctionDeclaration&& nativeFunctionDeclaration) >+ >+ bool append(AST::NativeFunctionDeclaration&& nativeFunctionDeclaration) > { >- m_nativeFunctionDeclarations.append(WTFMove(nativeFunctionDeclaration)); >+ m_nativeFunctionDeclarations.append(std::make_unique<AST::NativeFunctionDeclaration>(WTFMove(nativeFunctionDeclaration))); >+ return m_nameContext.add(*m_nativeFunctionDeclarations.last()); > } >- void append(AST::NativeTypeDeclaration&& nativeTypeDeclaration) >+ >+ bool append(AST::NativeTypeDeclaration&& nativeTypeDeclaration) > { >- m_nativeTypeDeclarations.append(WTFMove(nativeTypeDeclaration)); >+ m_nativeTypeDeclarations.append(std::make_unique<AST::NativeTypeDeclaration>(WTFMove(nativeTypeDeclaration))); >+ return m_nameContext.add(*m_nativeTypeDeclarations.last()); > } > >- Vector<AST::TypeDefinition>& typeDefinitions() { return m_typeDefinitions; } >- Vector<AST::StructureDefinition>& structureDefinitions() { return m_structureDefinitions; } >- Vector<AST::EnumerationDefinition>& enumerationDefinitions() { return m_enumerationDefinitions; } >- Vector<AST::FunctionDefinition>& functionDefinitions() { return m_functionDefinitions; } >- Vector<AST::NativeFunctionDeclaration>& nativeFunctionDeclarations() { return m_nativeFunctionDeclarations; } >- Vector<AST::NativeTypeDeclaration>& nativeTypeDeclarations() { return m_nativeTypeDeclarations; } >+ NameContext& nameContext() { return m_nameContext; } >+ Vector<std::unique_ptr<AST::TypeDefinition>>& typeDefinitions() { return m_typeDefinitions; } >+ Vector<std::unique_ptr<AST::StructureDefinition>>& structureDefinitions() { return m_structureDefinitions; } >+ Vector<std::unique_ptr<AST::EnumerationDefinition>>& enumerationDefinitions() { return m_enumerationDefinitions; } >+ Vector<std::unique_ptr<AST::FunctionDefinition>>& functionDefinitions() { return m_functionDefinitions; } >+ Vector<std::unique_ptr<AST::NativeFunctionDeclaration>>& nativeFunctionDeclarations() { return m_nativeFunctionDeclarations; } >+ Vector<std::unique_ptr<AST::NativeTypeDeclaration>>& nativeTypeDeclarations() { return m_nativeTypeDeclarations; } > > private: >- Vector<AST::TypeDefinition> m_typeDefinitions; >- Vector<AST::StructureDefinition> m_structureDefinitions; >- Vector<AST::EnumerationDefinition> m_enumerationDefinitions; >- Vector<AST::FunctionDefinition> m_functionDefinitions; >- Vector<AST::NativeFunctionDeclaration> m_nativeFunctionDeclarations; >- Vector<AST::NativeTypeDeclaration> m_nativeTypeDeclarations; >+ NameContext m_nameContext; >+ Vector<std::unique_ptr<AST::TypeDefinition>> m_typeDefinitions; >+ Vector<std::unique_ptr<AST::StructureDefinition>> m_structureDefinitions; >+ Vector<std::unique_ptr<AST::EnumerationDefinition>> m_enumerationDefinitions; >+ Vector<std::unique_ptr<AST::FunctionDefinition>> m_functionDefinitions; >+ Vector<std::unique_ptr<AST::NativeFunctionDeclaration>> m_nativeFunctionDeclarations; >+ Vector<std::unique_ptr<AST::NativeTypeDeclaration>> m_nativeTypeDeclarations; > }; > > } >diff --git a/Source/WebCore/Modules/webgpu/WHLSL/WHLSLVisitor.h b/Source/WebCore/Modules/webgpu/WHLSL/WHLSLVisitor.h >index 516856e41d0..16c242397a6 100644 >--- a/Source/WebCore/Modules/webgpu/WHLSL/WHLSLVisitor.h >+++ b/Source/WebCore/Modules/webgpu/WHLSL/WHLSLVisitor.h >@@ -103,22 +103,23 @@ namespace WebCore { > namespace WHLSL { > > class Visitor { >- ~Visitor() = default; >+public: >+ virtual ~Visitor() = default; > > virtual void visit(Program& program) > { > for (auto& typeDefinition : program.typeDefinitions()) >- visit(typeDefinition); >+ visit(*typeDefinition); > for (auto& structureDefinition : program.structureDefinitions()) >- visit(structureDefinition); >+ visit(*structureDefinition); > for (auto& enumerationDefinition : program.enumerationDefinitions()) >- visit(enumerationDefinition); >+ visit(*enumerationDefinition); > for (auto& functionDefinition : program.functionDefinitions()) >- visit(functionDefinition); >+ visit(*functionDefinition); > for (auto& nativeFunctionDeclaration : program.nativeFunctionDeclarations()) >- visit(nativeFunctionDeclaration); >+ visit(*nativeFunctionDeclaration); > for (auto& nativeTypeDeclaration : program.nativeTypeDeclarations()) >- visit(nativeTypeDeclaration); >+ visit(*nativeTypeDeclaration); > } > > void visitType(AST::Type& type) >@@ -402,8 +403,10 @@ class Visitor { > visit(downcast<AST::MakePointerExpression>(expression)); > else if (is<AST::NullLiteral>(expression)) > visit(downcast<AST::NullLiteral>(expression)); >- else if (is<AST::PropertyAccessExpression>(expression)) >- visit(downcast<AST::PropertyAccessExpression>(expression)); >+ else if (is<AST::DotExpression>(expression)) >+ visit(downcast<AST::DotExpression>(expression)); >+ else if (is<AST::IndexExpression>(expression)) >+ visit(downcast<AST::IndexExpression>(expression)); > else if (is<AST::ReadModifyWriteExpression>(expression)) > visit(downcast<AST::ReadModifyWriteExpression>(expression)); > else if (is<AST::TernaryExpression>(expression)) >@@ -416,6 +419,22 @@ class Visitor { > } > } > >+ virtual void visit(AST::DotExpression& dotExpression) >+ { >+ visit(static_cast<AST::PropertyAccessExpression&>(dotExpression)); >+ } >+ >+ virtual void visit(AST::IndexExpression& indexExpression) >+ { >+ visit(indexExpression.indexExpression()); >+ visit(static_cast<AST::PropertyAccessExpression&>(indexExpression)); >+ } >+ >+ virtual void visit(AST::PropertyAccessExpression& expression) >+ { >+ visit(expression.base()); >+ } >+ > virtual void visit(AST::EffectfulExpressionStatement& effectfulExpressionStatement) > { > visit(effectfulExpressionStatement.effectfulExpression()); >@@ -536,11 +555,6 @@ class Visitor { > visit(makePointerExpression.lValue()); > } > >- virtual void visit(AST::PropertyAccessExpression& propertyAccessExpression) >- { >- visit(propertyAccessExpression.base()); >- } >- > virtual void visit(AST::ReadModifyWriteExpression& readModifyWriteExpression) > { > visit(readModifyWriteExpression.lValue()); >diff --git a/Source/WebCore/WebCore.xcodeproj/project.pbxproj b/Source/WebCore/WebCore.xcodeproj/project.pbxproj >index 07c16ef1775..24481c02bca 100644 >--- a/Source/WebCore/WebCore.xcodeproj/project.pbxproj >+++ b/Source/WebCore/WebCore.xcodeproj/project.pbxproj >@@ -6406,6 +6406,7 @@ > 1C3969CF1B74211E002BCFA7 /* FontCacheCoreText.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FontCacheCoreText.cpp; sourceTree = "<group>"; }; > 1C66260E1C6E7CA600AB527C /* FontFace.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FontFace.cpp; sourceTree = "<group>"; }; > 1C66260F1C6E7CA600AB527C /* FontFace.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FontFace.h; sourceTree = "<group>"; }; >+ 1C7CC21D21CDE19800C1FA2C /* WHLSLNameContext.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WHLSLNameContext.h; sourceTree = "<group>"; }; > 1C81B9560E97330800266E07 /* InspectorController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InspectorController.h; sourceTree = "<group>"; }; > 1C81B9570E97330800266E07 /* InspectorController.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InspectorController.cpp; sourceTree = "<group>"; }; > 1C81B9580E97330800266E07 /* InspectorClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InspectorClient.h; sourceTree = "<group>"; }; >@@ -25332,11 +25333,12 @@ > C21BF73721CD8A0200227979 /* WHLSLParser.cpp */, > C21BF73821CD8A0300227979 /* WHLSLParser.h */, > C21BF73A21CD8D7000227979 /* WHLSLProgram.h */, >- C288C72721C8C6EF002DF5CA /* WHLSLVisitor.h */, >- C288C72921C8CA50002DF5CA /* WHLSLPrepare.cpp */, >- C288C72A21C8CA50002DF5CA /* WHLSLPrepare.h */, >- C288C72B21C8CCC2002DF5CA /* WHLSLNameResolver.cpp */, >- C288C72C21C8CCC2002DF5CA /* WHLSLNameResolver.h */, >+ C288C72721C8C6EF002DF5CA /* WHLSLVisitor.h */, >+ C288C72921C8CA50002DF5CA /* WHLSLPrepare.cpp */, >+ C288C72A21C8CA50002DF5CA /* WHLSLPrepare.h */, >+ C288C72B21C8CCC2002DF5CA /* WHLSLNameResolver.cpp */, >+ C288C72C21C8CCC2002DF5CA /* WHLSLNameResolver.h */, >+ 1C7CC21D21CDE19800C1FA2C /* WHLSLNameContext.h */, > ); > path = WHLSL; > sourceTree = "<group>"; >@@ -25412,7 +25414,7 @@ > C21BF71421CD89D300227979 /* WHLSLVariableDeclarationsStatement.h */, > C21BF71321CD89D200227979 /* WHLSLVariableReference.h */, > C21BF70421CD89C600227979 /* WHLSLWhileLoop.h */, >- C288C72D21C991DA002DF5CA /* WHLSLTypeArgument.cpp */, >+ C288C72D21C991DA002DF5CA /* WHLSLTypeArgument.cpp */, > ); > path = AST; > sourceTree = "<group>";
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
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 193007
:
358021
|
358022
|
358157
|
358164
|
358167
|
358169
|
358883
|
358908
|
358922
|
358928
|
358977