diff options
| author | ArielG-NV <159081215+ArielG-NV@users.noreply.github.com> | 2025-08-14 14:43:42 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-08-14 21:43:42 +0000 |
| commit | cfd08da1036cf72b8e6c6f661260b968f79667e7 (patch) | |
| tree | f4f02a97a2499eb11254869f37c77e3d674673d2 /source | |
| parent | dd06524f523cdac9c753801ce9c3992f66ae5576 (diff) | |
Clean up `natvis` and use fiddle to generate info needed for `.natvis` debugging (#8192)
fixes: #8188
Changes:
* Fix Indentation
* Add a visualizer for `NodeBase` based on changes to `slang-fiddle`
---------
Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com>
Diffstat (limited to 'source')
| -rw-r--r-- | source/slang/slang-ast-boilerplate.cpp | 1 | ||||
| -rw-r--r-- | source/slang/slang-ast-support-types.h | 12 | ||||
| -rw-r--r-- | source/slang/slang.natvis | 456 |
3 files changed, 235 insertions, 234 deletions
diff --git a/source/slang/slang-ast-boilerplate.cpp b/source/slang/slang-ast-boilerplate.cpp index 0313d4411..54f5f9bb1 100644 --- a/source/slang/slang-ast-boilerplate.cpp +++ b/source/slang/slang-ast-boilerplate.cpp @@ -18,6 +18,7 @@ struct Helper %for _,T in ipairs(Slang.NodeBase.subclasses) do const SyntaxClassInfo $T::kSyntaxClassInfo = { "$T", + $(T.getDebugVisType), ASTNodeType::$T, $(#T.subclasses), % if T.isAbstract then diff --git a/source/slang/slang-ast-support-types.h b/source/slang/slang-ast-support-types.h index 9ad58c776..b69c76307 100644 --- a/source/slang/slang-ast-support-types.h +++ b/source/slang/slang-ast-support-types.h @@ -624,10 +624,22 @@ FIDDLE() namespace Slang typedef SyntaxClassBase ReflectClassInfo; typedef SyntaxClassBase ASTClassInfo; + enum class SyntaxClassInfoDebugVisType + { + Decl, + Expr, + Modifier, + Stmt, + Val, + Scope, + Unknown, + }; + struct SyntaxClassInfo { public: char const* name; + SyntaxClassInfoDebugVisType debugVisType; ASTNodeType firstTag; Count tagCount; void* (*createFunc)(ASTBuilder*); diff --git a/source/slang/slang.natvis b/source/slang/slang.natvis index 3dd3ef1af..edd34f456 100644 --- a/source/slang/slang.natvis +++ b/source/slang/slang.natvis @@ -1,30 +1,39 @@ -<?xml version="1.0" encoding="utf-8"?> +<?xml version="1.0" encoding="utf-8"?> <AutoVisualizer xmlns="http://schemas.microsoft.com/vstudio/debugger/natvis/2010"> - - <Type Name="Slang::BCPtr<*>"> - <SmartPointer Usage="Minimal">rawVal ? ($T1*)((char*)this + rawVal) : ($T1*)0</SmartPointer> - <DisplayString Condition="rawVal == 0">BCPtr nullptr</DisplayString> - <DisplayString Condition="rawVal != 0">BCPtr {*($T1*)((char*)this + rawVal)}</DisplayString> - <Expand> - <ExpandedItem>rawVal ? ($T1*)((char*)this + rawVal) : ($T1*)0</ExpandedItem> - </Expand> - </Type> - <Type Name="Slang::ValNodeOperand"> - <DisplayString Condition="kind == Slang::ValNodeOperandKind::ConstantValue">Constant {intOperand}</DisplayString> - <DisplayString Condition="kind == Slang::ValNodeOperandKind::ValNode">{(Slang::Val*)nodeOperand}</DisplayString> - <DisplayString Condition="kind == Slang::ValNodeOperandKind::ASTNode">{nodeOperand}</DisplayString> - <Expand> - <ExpandedItem>*(Slang::Val*)nodeOperand</ExpandedItem> - </Expand> - </Type> - <Type Name="Slang::DeclRef<*>"> - <DisplayString Condition="declRefBase == 0">DeclRef nullptr</DisplayString> - - <DisplayString Condition="declRefBase != 0">{*declRefBase}</DisplayString> - <Expand> - <ExpandedItem>declRefBase</ExpandedItem> - </Expand> - </Type> + <Type Name="Slang::BCPtr<*>"> + <SmartPointer Usage="Minimal">rawVal ? ($T1*)((char*)this + rawVal) : ($T1*)0</SmartPointer> + <DisplayString Condition="rawVal == 0">BCPtr nullptr</DisplayString> + <DisplayString Condition="rawVal != 0">BCPtr {*($T1*)((char*)this + rawVal)}</DisplayString> + <Expand> + <ExpandedItem>rawVal ? ($T1*)((char*)this + rawVal) : ($T1*)0</ExpandedItem> + </Expand> + </Type> + <Type Name="Slang::NodeBase" Inheritable="false"> + <DisplayString>{astNodeType}</DisplayString> + <Expand> + <Item Condition="kAllSyntaxClasses[astNodeType]->debugVisType == Slang::SyntaxClassInfoDebugVisType::Decl" Name="Decl">(Slang::Decl*)this</Item> + <Item Condition="kAllSyntaxClasses[astNodeType]->debugVisType == Slang::SyntaxClassInfoDebugVisType::Expr" Name="Expr">(Slang::Expr*)this</Item> + <Item Condition="kAllSyntaxClasses[astNodeType]->debugVisType == Slang::SyntaxClassInfoDebugVisType::Modifier" Name="Modifier">(Slang::Modifier*)this</Item> + <Item Condition="kAllSyntaxClasses[astNodeType]->debugVisType == Slang::SyntaxClassInfoDebugVisType::Stmt" Name="Stmt">(Slang::Stmt*)this</Item> + <Item Condition="kAllSyntaxClasses[astNodeType]->debugVisType == Slang::SyntaxClassInfoDebugVisType::Val" Name="Val">(Slang::Val*)this</Item> + <Item Condition="kAllSyntaxClasses[astNodeType]->debugVisType == Slang::SyntaxClassInfoDebugVisType::Scope" Name="Scope">(Slang::Scope*)this</Item> + </Expand> + </Type> + <Type Name="Slang::ValNodeOperand"> + <DisplayString Condition="kind == Slang::ValNodeOperandKind::ConstantValue">Constant {intOperand}</DisplayString> + <DisplayString Condition="kind == Slang::ValNodeOperandKind::ValNode">{(Slang::Val*)nodeOperand}</DisplayString> + <DisplayString Condition="kind == Slang::ValNodeOperandKind::ASTNode">{nodeOperand}</DisplayString> + <Expand> + <ExpandedItem>*(Slang::Val*)nodeOperand</ExpandedItem> + </Expand> + </Type> + <Type Name="Slang::DeclRef<*>"> + <DisplayString Condition="declRefBase == 0">DeclRef nullptr</DisplayString> + <DisplayString Condition="declRefBase != 0">{*declRefBase}</DisplayString> + <Expand> + <ExpandedItem>declRefBase</ExpandedItem> + </Expand> + </Type> <Type Name="Slang::DeclRefBase"> <DisplayString Optional="true" Condition="m_operands.m_buffer[0].values.nodeOperand != 0">{astNodeType,en}#{_debugUID}({(Decl*)m_operands.m_buffer[0].values.nodeOperand}) </DisplayString> <DisplayString Condition="m_operands.m_buffer[0].values.nodeOperand != 0">{astNodeType,en}({(Decl*)m_operands.m_buffer[0].values.nodeOperand})</DisplayString> @@ -69,140 +78,138 @@ </CustomListItems> </Expand> </Type> - <Type Name="Slang::DeclRefType"> - <DisplayString Optional="true">{astNodeType,en}#{_debugUID} {*(DeclRefBase*)m_operands.m_buffer[0].values.nodeOperand} </DisplayString> - - <DisplayString>{astNodeType,en} {*(DeclRefBase*)m_operands.m_buffer[0].values.nodeOperand}</DisplayString> - <Expand> - <Synthetic Name="DeclRefType"> - <DisplayString Optional="true">{astNodeType,en}#{_debugUID} {m_operands.m_buffer[0].values.nodeOperand->astNodeType, en}#{m_operands.m_buffer[0].values.nodeOperand->_debugUID}</DisplayString> - <DisplayString>{astNodeType,en} {m_operands.m_buffer[0].values.nodeOperand->astNodeType, en}</DisplayString> - </Synthetic> - <ExpandedItem>*(DeclRefBase*)m_operands.m_buffer[0].values.nodeOperand</ExpandedItem> - </Expand> - </Type> + <Type Name="Slang::DeclRefType"> + <DisplayString Optional="true">{astNodeType,en}#{_debugUID} {*(DeclRefBase*)m_operands.m_buffer[0].values.nodeOperand} </DisplayString> + <DisplayString>{astNodeType,en} {*(DeclRefBase*)m_operands.m_buffer[0].values.nodeOperand}</DisplayString> + <Expand> + <Synthetic Name="DeclRefType"> + <DisplayString Optional="true">{astNodeType,en}#{_debugUID} {m_operands.m_buffer[0].values.nodeOperand->astNodeType, en}#{m_operands.m_buffer[0].values.nodeOperand->_debugUID}</DisplayString> + <DisplayString>{astNodeType,en} {m_operands.m_buffer[0].values.nodeOperand->astNodeType, en}</DisplayString> + </Synthetic> + <ExpandedItem>*(DeclRefBase*)m_operands.m_buffer[0].values.nodeOperand</ExpandedItem> + </Expand> + </Type> <Type Name="Slang::FuncDecl"> <DisplayString>FuncDecl {nameAndLoc}</DisplayString> </Type> - <Type Name="Slang::Name"> - <DisplayString>{{name={(char*)(text.m_buffer.pointer+1), s}}}</DisplayString> - </Type> - <Type Name="Slang::NameLoc"> - <DisplayString>{{name={(char*)((*name).text.m_buffer.pointer+1), s} loc={loc.raw}}}</DisplayString> - </Type> - <Type Name="Slang::IRWitnessTableEntry"> - <Expand> - <Item Name="[Key]">requirementKey</Item> - <Item Name="[Val]">satisfyingVal</Item> - </Expand> - </Type> - <Type Name="Slang::IRInst"> - <DisplayString>{{{m_op} {(uint32_t)(void*)this, x}}}</DisplayString> - <DisplayString Optional="true">{{{m_op} #{_debugUID}}}</DisplayString> - <Expand> - <Item Name="[op]">m_op</Item> - <Item Name="[UID]" Optional="true">_debugUID</Item> - <Item Name="[type]">typeUse.usedValue</Item> - <CustomListItems MaxItemsPerView="3"> - <Variable Name="child" InitialValue="m_decorationsAndChildren.first"/> - <Loop> - <If Condition="child == 0"> - <Break/> - </If> - <If Condition="child->m_op == kIROp_ExportDecoration"> - <Item Name="[exportName]">((Slang::IRStringLit*)(((Slang::IRUse*)(child + 1))->usedValue))->value.stringVal.chars,[((Slang::IRStringLit*)(((Slang::IRUse*)(child + 1))->usedValue))->value.stringVal.numChars]s8</Item> - </If> - <If Condition="child->m_op == kIROp_ImportDecoration"> - <Item Name="[importName]">((Slang::IRStringLit*)(((Slang::IRUse*)(child + 1))->usedValue))->value.stringVal.chars,[((Slang::IRStringLit*)(((Slang::IRUse*)(child + 1))->usedValue))->value.stringVal.numChars]s8</Item> - </If> - <If Condition="child->m_op == kIROp_NameHintDecoration"> - <Item Name="[name]">((Slang::IRStringLit*)(((Slang::IRUse*)(child + 1))->usedValue))->value.stringVal.chars,[((Slang::IRStringLit*)(((Slang::IRUse*)(child + 1))->usedValue))->value.stringVal.numChars]s8</Item> - </If> - <Exec>child = child->next</Exec> - </Loop> - </CustomListItems> - <Item Name="[value]" Condition="m_op == kIROp_StringLit">((IRStringLit*)this)->value.stringVal.chars,[((IRStringLit*)this)->value.stringVal.numChars]s8</Item> - <Item Name="[value]" Condition="m_op == kIROp_IntLit">((IRIntLit*)this)->value.intVal</Item> - <CustomListItems MaxItemsPerView="10"> - <Variable Name="index" InitialValue="0"/> - <Variable Name="nameDecoration" InitialValue="(IRInst*)nullptr"/> - <Variable Name="child" InitialValue="(IRInst*)nullptr"/> - <Variable Name="pOperandInst" InitialValue="(IRInst*)nullptr"/> - <Loop Condition="index < operandCount"> - <Exec>pOperandInst = ((IRUse*)(&(typeUse) + 1 + index))->usedValue </Exec> - <Item Condition="pOperandInst == 0" Name="[operand{index}]">pOperandInst</Item> - <If Condition="pOperandInst != 0"> - <Exec>child = pOperandInst->m_decorationsAndChildren.first</Exec> - <Exec>nameDecoration = 0</Exec> - <Loop Condition="child != 0"> - <If Condition="child->m_op == kIROp_NameHintDecoration"> - <Exec>nameDecoration = child</Exec> - <Break/> - </If> - <If Condition="child->m_op == kIROp_ExportDecoration && (nameDecoration == 0 || nameDecoration->m_op != kIROp_NameHintDecoration)"> - <Exec>nameDecoration = child</Exec> - </If> - <If Condition="child->m_op == kIROp_ImportDecoration && (nameDecoration == 0 || nameDecoration->m_op != kIROp_NameHintDecoration)"> - <Exec>nameDecoration = child</Exec> - </If> - <Exec>child = child->next</Exec> - </Loop> - <Item Condition="nameDecoration != 0" Name="[operand{index}] : {((Slang::IRStringLit*)(((Slang::IRUse*)(nameDecoration + 1))->usedValue))->value.stringVal.chars,[((Slang::IRStringLit*)(((Slang::IRUse*)(nameDecoration + 1))->usedValue))->value.stringVal.numChars]s8}">*pOperandInst</Item> - <Item Condition="nameDecoration == 0" Name="[operand{index}]">*pOperandInst</Item> - </If> - <Exec>index = index + 1</Exec> - </Loop> - </CustomListItems> - <Synthetic Name="[decorations/children]"> - <Expand> - <CustomListItems MaxItemsPerView="5000"> - <Variable Name="pItem" InitialValue="m_decorationsAndChildren.first"/> - <Variable Name="nameDecoration" InitialValue="(IRInst*)nullptr"/> - <Variable Name="child" InitialValue="(IRInst*)nullptr"/> - <Variable Name="index" InitialValue="0"/> - <Loop Condition="pItem != 0"> - <Exec>child = pItem->m_decorationsAndChildren.first </Exec> - <Exec>nameDecoration = 0</Exec> - <Loop Condition="child != 0"> - <If Condition="child->m_op == kIROp_NameHintDecoration"> - <Exec>nameDecoration = child</Exec> - <Break/> - </If> - <If Condition="child->m_op == kIROp_ExportDecoration && (nameDecoration == 0 || nameDecoration->m_op != kIROp_NameHintDecoration)"> - <Exec>nameDecoration = child</Exec> - </If> - <If Condition="child->m_op == kIROp_ImportDecoration && (nameDecoration == 0 || nameDecoration->m_op != kIROp_NameHintDecoration)"> - <Exec>nameDecoration = child</Exec> - </If> - <Exec>child = child->next</Exec> - </Loop> - <Item Condition="nameDecoration != 0" Name="[{index}] : {((Slang::IRStringLit*)(((Slang::IRUse*)(nameDecoration + 1))->usedValue))->value.stringVal.chars,[((Slang::IRStringLit*)(((Slang::IRUse*)(nameDecoration + 1))->usedValue))->value.stringVal.numChars]s8}">*pItem</Item> - <Item Condition="nameDecoration == 0">*pItem</Item> - <Exec>pItem = pItem->next</Exec> - <Exec>index = index + 1</Exec> - </Loop> - </CustomListItems> - </Expand> - </Synthetic> - <Item Name="[parent]">parent</Item> - <Synthetic Name="[uses]"> - <Expand> - <LinkedListItems> - <HeadPointer>firstUse</HeadPointer> - <NextPointer>nextUse</NextPointer> - <ValueNode>user</ValueNode> - </LinkedListItems> - </Expand> - </Synthetic> - </Expand> - </Type> - <Type Name="Slang::IRUse"> - <DisplayString>{{IRUse {usedValue}}}</DisplayString> - <Expand> - <ExpandedItem>usedValue</ExpandedItem> - </Expand> - </Type> - + <Type Name="Slang::Name"> + <DisplayString>{{name={(char*)(text.m_buffer.pointer+1), s}}}</DisplayString> + </Type> + <Type Name="Slang::NameLoc"> + <DisplayString>{{name={(char*)((*name).text.m_buffer.pointer+1), s} loc={loc.raw}}}</DisplayString> + </Type> + <Type Name="Slang::IRWitnessTableEntry"> + <Expand> + <Item Name="[Key]">requirementKey</Item> + <Item Name="[Val]">satisfyingVal</Item> + </Expand> + </Type> + <Type Name="Slang::IRInst"> + <DisplayString>{{{m_op} {(uint32_t)(void*)this, x}}}</DisplayString> + <DisplayString Optional="true">{{{m_op} #{_debugUID}}}</DisplayString> + <Expand> + <Item Name="[op]">m_op</Item> + <Item Name="[UID]" Optional="true">_debugUID</Item> + <Item Name="[type]">typeUse.usedValue</Item> + <CustomListItems MaxItemsPerView="3"> + <Variable Name="child" InitialValue="m_decorationsAndChildren.first"/> + <Loop> + <If Condition="child == 0"> + <Break/> + </If> + <If Condition="child->m_op == kIROp_ExportDecoration"> + <Item Name="[exportName]">((Slang::IRStringLit*)(((Slang::IRUse*)(child + 1))->usedValue))->value.stringVal.chars,[((Slang::IRStringLit*)(((Slang::IRUse*)(child + 1))->usedValue))->value.stringVal.numChars]s8</Item> + </If> + <If Condition="child->m_op == kIROp_ImportDecoration"> + <Item Name="[importName]">((Slang::IRStringLit*)(((Slang::IRUse*)(child + 1))->usedValue))->value.stringVal.chars,[((Slang::IRStringLit*)(((Slang::IRUse*)(child + 1))->usedValue))->value.stringVal.numChars]s8</Item> + </If> + <If Condition="child->m_op == kIROp_NameHintDecoration"> + <Item Name="[name]">((Slang::IRStringLit*)(((Slang::IRUse*)(child + 1))->usedValue))->value.stringVal.chars,[((Slang::IRStringLit*)(((Slang::IRUse*)(child + 1))->usedValue))->value.stringVal.numChars]s8</Item> + </If> + <Exec>child = child->next</Exec> + </Loop> + </CustomListItems> + <Item Name="[value]" Condition="m_op == kIROp_StringLit">((IRStringLit*)this)->value.stringVal.chars,[((IRStringLit*)this)->value.stringVal.numChars]s8</Item> + <Item Name="[value]" Condition="m_op == kIROp_IntLit">((IRIntLit*)this)->value.intVal</Item> + <CustomListItems MaxItemsPerView="10"> + <Variable Name="index" InitialValue="0"/> + <Variable Name="nameDecoration" InitialValue="(IRInst*)nullptr"/> + <Variable Name="child" InitialValue="(IRInst*)nullptr"/> + <Variable Name="pOperandInst" InitialValue="(IRInst*)nullptr"/> + <Loop Condition="index < operandCount"> + <Exec>pOperandInst = ((IRUse*)(&(typeUse) + 1 + index))->usedValue </Exec> + <Item Condition="pOperandInst == 0" Name="[operand{index}]">pOperandInst</Item> + <If Condition="pOperandInst != 0"> + <Exec>child = pOperandInst->m_decorationsAndChildren.first</Exec> + <Exec>nameDecoration = 0</Exec> + <Loop Condition="child != 0"> + <If Condition="child->m_op == kIROp_NameHintDecoration"> + <Exec>nameDecoration = child</Exec> + <Break/> + </If> + <If Condition="child->m_op == kIROp_ExportDecoration && (nameDecoration == 0 || nameDecoration->m_op != kIROp_NameHintDecoration)"> + <Exec>nameDecoration = child</Exec> + </If> + <If Condition="child->m_op == kIROp_ImportDecoration && (nameDecoration == 0 || nameDecoration->m_op != kIROp_NameHintDecoration)"> + <Exec>nameDecoration = child</Exec> + </If> + <Exec>child = child->next</Exec> + </Loop> + <Item Condition="nameDecoration != 0" Name="[operand{index}] : {((Slang::IRStringLit*)(((Slang::IRUse*)(nameDecoration + 1))->usedValue))->value.stringVal.chars,[((Slang::IRStringLit*)(((Slang::IRUse*)(nameDecoration + 1))->usedValue))->value.stringVal.numChars]s8}">*pOperandInst</Item> + <Item Condition="nameDecoration == 0" Name="[operand{index}]">*pOperandInst</Item> + </If> + <Exec>index = index + 1</Exec> + </Loop> + </CustomListItems> + <Synthetic Name="[decorations/children]"> + <Expand> + <CustomListItems MaxItemsPerView="5000"> + <Variable Name="pItem" InitialValue="m_decorationsAndChildren.first"/> + <Variable Name="nameDecoration" InitialValue="(IRInst*)nullptr"/> + <Variable Name="child" InitialValue="(IRInst*)nullptr"/> + <Variable Name="index" InitialValue="0"/> + <Loop Condition="pItem != 0"> + <Exec>child = pItem->m_decorationsAndChildren.first </Exec> + <Exec>nameDecoration = 0</Exec> + <Loop Condition="child != 0"> + <If Condition="child->m_op == kIROp_NameHintDecoration"> + <Exec>nameDecoration = child</Exec> + <Break/> + </If> + <If Condition="child->m_op == kIROp_ExportDecoration && (nameDecoration == 0 || nameDecoration->m_op != kIROp_NameHintDecoration)"> + <Exec>nameDecoration = child</Exec> + </If> + <If Condition="child->m_op == kIROp_ImportDecoration && (nameDecoration == 0 || nameDecoration->m_op != kIROp_NameHintDecoration)"> + <Exec>nameDecoration = child</Exec> + </If> + <Exec>child = child->next</Exec> + </Loop> + <Item Condition="nameDecoration != 0" Name="[{index}] : {((Slang::IRStringLit*)(((Slang::IRUse*)(nameDecoration + 1))->usedValue))->value.stringVal.chars,[((Slang::IRStringLit*)(((Slang::IRUse*)(nameDecoration + 1))->usedValue))->value.stringVal.numChars]s8}">*pItem</Item> + <Item Condition="nameDecoration == 0">*pItem</Item> + <Exec>pItem = pItem->next</Exec> + <Exec>index = index + 1</Exec> + </Loop> + </CustomListItems> + </Expand> + </Synthetic> + <Item Name="[parent]">parent</Item> + <Synthetic Name="[uses]"> + <Expand> + <LinkedListItems> + <HeadPointer>firstUse</HeadPointer> + <NextPointer>nextUse</NextPointer> + <ValueNode>user</ValueNode> + </LinkedListItems> + </Expand> + </Synthetic> + </Expand> + </Type> + <Type Name="Slang::IRUse"> + <DisplayString>{{IRUse {usedValue}}}</DisplayString> + <Expand> + <ExpandedItem>usedValue</ExpandedItem> + </Expand> + </Type> <Type Name="Slang::Expr" Inheritable="false"> <DisplayString>{astNodeType,en}</DisplayString> <Expand> @@ -286,8 +293,8 @@ <ExpandedItem Condition="astNodeType == Slang::ASTNodeType::ContinueStmt">(Slang::ContinueStmt*)&astNodeType</ExpandedItem> <ExpandedItem Condition="astNodeType == Slang::ASTNodeType::ReturnStmt">(Slang::ReturnStmt*)&astNodeType</ExpandedItem> <ExpandedItem Condition="astNodeType == Slang::ASTNodeType::ExpressionStmt">(Slang::ExpressionStmt*)&astNodeType</ExpandedItem> - <ExpandedItem Condition="astNodeType == Slang::ASTNodeType::TargetSwitchStmt">(Slang::TargetSwitchStmt*)&astNodeType</ExpandedItem> - <Item Name="[Stmt]">(Slang::Stmt*)this,!</Item> + <ExpandedItem Condition="astNodeType == Slang::ASTNodeType::TargetSwitchStmt">(Slang::TargetSwitchStmt*)&astNodeType</ExpandedItem> + <Item Name="[Stmt]">(Slang::Stmt*)this,!</Item> </Expand> </Type> <Type Name="Slang::Name"> @@ -300,6 +307,7 @@ <Item Name="[Name]" Condition="nameAndLoc.name!=0">nameAndLoc.name->text</Item> <Item Name="[Parent]">parentDecl</Item> <Item Name="[CheckState]">Slang::DeclCheckState(checkState.m_raw & ~Slang::DeclCheckStateExt::kBeingCheckedBit)</Item> + <Item Name="[Capabilities]">inferredCapabilityRequirements</Item> <ExpandedItem Condition="astNodeType == Slang::ASTNodeType::ContainerDecl">(Slang::ContainerDecl*)&astNodeType</ExpandedItem> <ExpandedItem Condition="astNodeType == Slang::ASTNodeType::ExtensionDecl">(Slang::ExtensionDecl*)&astNodeType</ExpandedItem> <ExpandedItem Condition="astNodeType == Slang::ASTNodeType::StructDecl">(Slang::StructDecl*)&astNodeType</ExpandedItem> @@ -340,11 +348,9 @@ <ExpandedItem Condition="astNodeType == Slang::ASTNodeType::EmptyDecl">(Slang::EmptyDecl*)&astNodeType</ExpandedItem> <ExpandedItem Condition="astNodeType == Slang::ASTNodeType::SyntaxDecl">(Slang::SyntaxDecl*)&astNodeType</ExpandedItem> <ExpandedItem Condition="astNodeType == Slang::ASTNodeType::DeclGroup">(Slang::DeclGroup*)&astNodeType</ExpandedItem> - <Item Name="Decl">(Slang::DeclBase*)this,!</Item> </Expand> </Type> - <Type Name="Slang::DeclBase" Inheritable="false"> <DisplayString>{astNodeType,en}</DisplayString> <Expand> @@ -422,25 +428,21 @@ </Expand> </Synthetic> </Expand> - </Type> <Type Name="Slang::Val" Inheritable="true"> - <DisplayString Optional="true" Condition="astNodeType == Slang::ASTNodeType::DeclRefType">DeclRefType#{_debugUID} {*(Val*)(((Slang::DeclRefType*)this)->m_operands.m_buffer[0].values.nodeOperand)}</DisplayString> - <DisplayString Condition="astNodeType == Slang::ASTNodeType::DeclRefType">DeclRefType {*(Val*)(((Slang::DeclRefType*)this)->m_operands.m_buffer[0].values.nodeOperand)}</DisplayString> - <DisplayString Optional="true" Condition="astNodeType == Slang::ASTNodeType::DirectDeclRef">DirectRef#{_debugUID} {*(Decl*)m_operands.m_buffer[0].values.nodeOperand}</DisplayString> - <DisplayString Condition="astNodeType == Slang::ASTNodeType::DirectDeclRef">DirectRef {*(Decl*)m_operands.m_buffer[0].values.nodeOperand}</DisplayString> - <DisplayString Optional="true">{astNodeType,en} #{_debugUID}</DisplayString> - <DisplayString>{astNodeType,en}</DisplayString> - + <DisplayString Optional="true" Condition="astNodeType == Slang::ASTNodeType::DeclRefType">DeclRefType#{_debugUID} {*(Val*)(((Slang::DeclRefType*)this)->m_operands.m_buffer[0].values.nodeOperand)}</DisplayString> + <DisplayString Condition="astNodeType == Slang::ASTNodeType::DeclRefType">DeclRefType {*(Val*)(((Slang::DeclRefType*)this)->m_operands.m_buffer[0].values.nodeOperand)}</DisplayString> + <DisplayString Optional="true" Condition="astNodeType == Slang::ASTNodeType::DirectDeclRef">DirectRef#{_debugUID} {*(Decl*)m_operands.m_buffer[0].values.nodeOperand}</DisplayString> + <DisplayString Condition="astNodeType == Slang::ASTNodeType::DirectDeclRef">DirectRef {*(Decl*)m_operands.m_buffer[0].values.nodeOperand}</DisplayString> + <DisplayString Optional="true">{astNodeType,en} #{_debugUID}</DisplayString> + <DisplayString>{astNodeType,en}</DisplayString> <Expand> <Synthetic Name = "[Kind]"> <DisplayString>{astNodeType}</DisplayString> </Synthetic> - <ExpandedItem>m_operands</ExpandedItem> </Expand> </Type> - <Type Name="Slang::SubstitutionSet"> <DisplayString>SubstitutionSet{declRef,en}</DisplayString> <Expand> @@ -452,7 +454,6 @@ <Loop Condition="subst != 0"> <Exec>substType = subst->astNodeType </Exec> <Exec>shouldBreak = 1 </Exec> - <If Condition="substType == Slang::ASTNodeType::DirectDeclRef"> <Break/> </If> @@ -491,7 +492,6 @@ <ExpandedItem Condition="kind==Slang::ValNodeOperandKind::ASTNode">*(Decl*)values.nodeOperand</ExpandedItem> </Expand> </Type> - <Type Name="Slang::Facet"> <SmartPointer Usage="Minimal">_impl</SmartPointer> <DisplayString Condition="_impl == 0">nullptr</DisplayString> @@ -507,21 +507,20 @@ </LinkedListItems> </Expand> </Type> - <Type Name="Slang::SharedSemanticsContext::DirectBaseList"> - <DisplayString Condition="_head == 0">empty</DisplayString> - <Expand> - <LinkedListItems> - <HeadPointer>_head != 0 ? _head : 0</HeadPointer> - <NextPointer>next != 0 ? next : 0</NextPointer> - <ValueNode>*this</ValueNode> - </LinkedListItems> - </Expand> - </Type> - <Type Name="Slang::ConstantIntVal"> + <Type Name="Slang::SharedSemanticsContext::DirectBaseList"> + <DisplayString Condition="_head == 0">empty</DisplayString> + <Expand> + <LinkedListItems> + <HeadPointer>_head != 0 ? _head : 0</HeadPointer> + <NextPointer>next != 0 ? next : 0</NextPointer> + <ValueNode>*this</ValueNode> + </LinkedListItems> + </Expand> + </Type> + <Type Name="Slang::ConstantIntVal"> <DisplayString Optional="true">{astNodeType,en}#{_debugUID} ({m_operands.m_buffer[1].values.intOperand} : {*(Type*)m_operands.m_buffer[0].values.nodeOperand}) </DisplayString> <DisplayString>ConstantIntVal ({m_operands.m_buffer[1].values.intOperand} : {*(Type*)m_operands.m_buffer[0].values.nodeOperand})</DisplayString> </Type> - <Type Name="Slang::PolynomialIntVal"> <DisplayString Optional="true">{astNodeType,en}#{_debugUID} </DisplayString> <DisplayString>{astNodeType,en}</DisplayString> @@ -532,7 +531,6 @@ </ArrayItems> </Expand> </Type> - <Type Name="Slang::PolynomialIntValTerm"> <DisplayString Optional="true">{astNodeType,en}#{_debugUID} </DisplayString> <DisplayString>{astNodeType,en}</DisplayString> @@ -543,7 +541,6 @@ </ArrayItems> </Expand> </Type> - <Type Name="Slang::PolynomialIntValFactor"> <DisplayString Optional="true">{astNodeType,en}#{_debugUID} </DisplayString> <DisplayString>{astNodeType,en}</DisplayString> @@ -554,11 +551,9 @@ </ArrayItems> </Expand> </Type> - <Type Name="Slang::BasicExpressionType"> <DisplayString>BasicExpressionType ({*(DeclRefBase*)m_operands.m_buffer[0].values.nodeOperand})</DisplayString> </Type> - <Type Name="Slang::CapabilitySet"> <DisplayString>{m_targetSets.map.m_values}</DisplayString> <Expand> @@ -587,7 +582,6 @@ </CustomListItems> </Expand> </Type> - <!--UIntSet--> <Type Name="Slang::UIntSet"> <DisplayString>{{max_size={m_buffer.m_count*Slang::UIntSet::kElementSize}}}</DisplayString> @@ -668,55 +662,49 @@ </Expand> </Type> <!--~UIntSet--> - - <Type Name="Slang::FossilizedPtr<*>"> - <SmartPointer Usage="Minimal">_offset == 0 ? nullptr : ($T1*)((char*)this + _offset)</SmartPointer> - <DisplayString Condition="_offset == 0">{($T1*)0}</DisplayString> - <DisplayString Condition="_offset != 0">{($T1*)((char*)this + _offset)}</DisplayString> - <Expand> - <ExpandedItem>_offset == 0 ? nullptr : ($T1*)((char*)this + _offset)</ExpandedItem> - </Expand> - </Type> - - - <Type Name="Slang::FossilizedString"> - <DisplayString Condition="_obj._offset == 0">""</DisplayString> - <DisplayString Condition="_obj._offset != 0">{((char*)this + _obj._offset),s8}</DisplayString> - <!-- + <Type Name="Slang::FossilizedPtr<*>"> + <SmartPointer Usage="Minimal">_offset == 0 ? nullptr : ($T1*)((char*)this + _offset)</SmartPointer> + <DisplayString Condition="_offset == 0">{($T1*)0}</DisplayString> + <DisplayString Condition="_offset != 0">{($T1*)((char*)this + _offset)}</DisplayString> + <Expand> + <ExpandedItem>_offset == 0 ? nullptr : ($T1*)((char*)this + _offset)</ExpandedItem> + </Expand> + </Type> + <Type Name="Slang::FossilizedString"> + <DisplayString Condition="_obj._offset == 0">""</DisplayString> + <DisplayString Condition="_obj._offset != 0">{((char*)this + _obj._offset),s8}</DisplayString> + <!-- <Expand> <ExpandedItem>(_text._offset == 0 ? "" : ((char*)this + _text._offset)),s8</ExpandedItem> </Expand> --> - </Type> - - <Type Name="Slang::FossilizedArray<*>"> - <DisplayString Condition="_obj._offset == 0">{{ count = 0 }}</DisplayString> - <DisplayString Condition="_obj._offset != 0">{{ count = {*((UInt32*)this - 1)} }}</DisplayString> - <Expand> - <Item Name="[count]">*((UInt32*)this - 1)</Item> - <ArrayItems> - <Size>*((UInt32*)this - 1)</Size> - <ValuePointer>($T1*)((char*)this + _obj._offset)</ValuePointer> - </ArrayItems> - </Expand> - </Type> - - <Type Name="Slang::FossilizedDictionary<*,*>"> - <DisplayString Condition="_obj._offset == 0">{{ count = 0 }}</DisplayString> - <DisplayString Condition="_obj._offset != 0">{{ count = {*((UInt32*)this - 1)} }}</DisplayString> - <Expand> - <Item Name="[count]">*((UInt32*)this - 1)</Item> - <ArrayItems> - <Size>*((UInt32*)this - 1)</Size> - <!-- + </Type> + <Type Name="Slang::FossilizedArray<*>"> + <DisplayString Condition="_obj._offset == 0">{{ count = 0 }}</DisplayString> + <DisplayString Condition="_obj._offset != 0">{{ count = {*((UInt32*)this - 1)} }}</DisplayString> + <Expand> + <Item Name="[count]">*((UInt32*)this - 1)</Item> + <ArrayItems> + <Size>*((UInt32*)this - 1)</Size> + <ValuePointer>($T1*)((char*)this + _obj._offset)</ValuePointer> + </ArrayItems> + </Expand> + </Type> + <Type Name="Slang::FossilizedDictionary<*,*>"> + <DisplayString Condition="_obj._offset == 0">{{ count = 0 }}</DisplayString> + <DisplayString Condition="_obj._offset != 0">{{ count = {*((UInt32*)this - 1)} }}</DisplayString> + <Expand> + <Item Name="[count]">*((UInt32*)this - 1)</Item> + <ArrayItems> + <Size>*((UInt32*)this - 1)</Size> + <!-- <ValuePointer>($T1*)((char*)this + _elements._offset)</ValuePointer> --> - <ValuePointer>(Slang::KeyValuePair<$T1,$T2> *) ((char*)this + _obj._offset)</ValuePointer> - <!-- + <ValuePointer>(Slang::KeyValuePair<$T1,$T2> *) ((char*)this + _obj._offset)</ValuePointer> + <!-- <ValuePointer>(Slang::KeyValuePair<$T1,$T2>*)((char*)this + _elements._offset)</ValuePointer> --> - </ArrayItems> - </Expand> - </Type> - -</AutoVisualizer> + </ArrayItems> + </Expand> + </Type> +</AutoVisualizer>
\ No newline at end of file |
