summaryrefslogtreecommitdiffstats
path: root/source/slang/type-layout.cpp
diff options
context:
space:
mode:
authorTim Foley <tfoley@nvidia.com>2017-08-09 10:13:40 -0700
committerTim Foley <tfoley@nvidia.com>2017-08-09 10:23:09 -0700
commit695c2700de54a5fec72ce7214c137a1dc3a02d7b (patch)
tree4f549da8c05be186f12442565389d9f3df44c6d7 /source/slang/type-layout.cpp
parenta728612771cdaed66a0bdbfd25f8f250920f0f11 (diff)
Major naming overhaul:
- `ExpressionSyntaxNode` becomes `Expr` - `StatementSyntaxNode` becomes `Stmt` - `StructSyntaxNode` becomes `StructDecl` - `ProgramSyntaxNode` becomes `ModuleDecl` - `ExpressionType` becomes `Type` - Existing fields names `Type` become `type` - There might be some collateral damage here if there were, e.g., `enum`s named `Type`, but I can live with that for now and fix those up as a I see them
Diffstat (limited to 'source/slang/type-layout.cpp')
-rw-r--r--source/slang/type-layout.cpp26
1 files changed, 13 insertions, 13 deletions
diff --git a/source/slang/type-layout.cpp b/source/slang/type-layout.cpp
index 245993881..544071b84 100644
--- a/source/slang/type-layout.cpp
+++ b/source/slang/type-layout.cpp
@@ -624,7 +624,7 @@ bool IsResourceKind(LayoutResourceKind kind)
SimpleLayoutInfo GetSimpleLayoutImpl(
SimpleLayoutInfo info,
- RefPtr<ExpressionType> type,
+ RefPtr<Type> type,
LayoutRulesImpl* rules,
RefPtr<TypeLayout>* outTypeLayout)
{
@@ -740,7 +740,7 @@ RefPtr<ParameterBlockTypeLayout>
createParameterBlockTypeLayout(
RefPtr<ParameterBlockType> parameterBlockType,
LayoutRulesImpl* parameterBlockRules,
- RefPtr<ExpressionType> elementType,
+ RefPtr<Type> elementType,
LayoutRulesImpl* elementTypeRules)
{
// First compute resource usage of the block itself.
@@ -832,7 +832,7 @@ createParameterBlockTypeLayout(
RefPtr<StructuredBufferTypeLayout>
createStructuredBufferTypeLayout(
ShaderParameterKind kind,
- RefPtr<ExpressionType> structuredBufferType,
+ RefPtr<Type> structuredBufferType,
RefPtr<TypeLayout> elementTypeLayout,
LayoutRulesImpl* rules)
{
@@ -865,8 +865,8 @@ createStructuredBufferTypeLayout(
RefPtr<StructuredBufferTypeLayout>
createStructuredBufferTypeLayout(
ShaderParameterKind kind,
- RefPtr<ExpressionType> structuredBufferType,
- RefPtr<ExpressionType> elementType,
+ RefPtr<Type> structuredBufferType,
+ RefPtr<Type> elementType,
LayoutRulesImpl* rules)
{
// TODO(tfoley): need to compute the layout for the constant
@@ -888,13 +888,13 @@ createStructuredBufferTypeLayout(
}
SimpleLayoutInfo GetLayoutImpl(
- ExpressionType* type,
+ Type* type,
LayoutRulesImpl* rules,
RefPtr<TypeLayout>* outTypeLayout,
SimpleLayoutInfo offset);
SimpleLayoutInfo GetLayoutImpl(
- ExpressionType* type,
+ Type* type,
LayoutRulesImpl* rules,
RefPtr<TypeLayout>* outTypeLayout)
{
@@ -902,7 +902,7 @@ SimpleLayoutInfo GetLayoutImpl(
}
SimpleLayoutInfo GetLayoutImpl(
- ExpressionType* type,
+ Type* type,
LayoutRulesImpl* rules,
RefPtr<TypeLayout>* outTypeLayout,
SimpleLayoutInfo offset)
@@ -1154,7 +1154,7 @@ SimpleLayoutInfo GetLayoutImpl(
{
auto declRef = declRefType->declRef;
- if (auto structDeclRef = declRef.As<StructSyntaxNode>())
+ if (auto structDeclRef = declRef.As<StructDecl>())
{
RefPtr<StructTypeLayout> typeLayout;
if (outTypeLayout)
@@ -1270,24 +1270,24 @@ SimpleLayoutInfo GetLayoutImpl(
outTypeLayout);
}
-SimpleLayoutInfo GetLayout(ExpressionType* inType, LayoutRulesImpl* rules)
+SimpleLayoutInfo GetLayout(Type* inType, LayoutRulesImpl* rules)
{
return GetLayoutImpl(inType, rules, nullptr);
}
-RefPtr<TypeLayout> CreateTypeLayout(ExpressionType* type, LayoutRulesImpl* rules, SimpleLayoutInfo offset)
+RefPtr<TypeLayout> CreateTypeLayout(Type* type, LayoutRulesImpl* rules, SimpleLayoutInfo offset)
{
RefPtr<TypeLayout> typeLayout;
GetLayoutImpl(type, rules, &typeLayout, offset);
return typeLayout;
}
-RefPtr<TypeLayout> CreateTypeLayout(ExpressionType* type, LayoutRulesImpl* rules)
+RefPtr<TypeLayout> CreateTypeLayout(Type* type, LayoutRulesImpl* rules)
{
return CreateTypeLayout(type, rules, SimpleLayoutInfo());
}
-SimpleLayoutInfo GetLayout(ExpressionType* type, LayoutRule rule)
+SimpleLayoutInfo GetLayout(Type* type, LayoutRule rule)
{
LayoutRulesImpl* rulesImpl = GetLayoutRulesImpl(rule);
return GetLayout(type, rulesImpl);