From 3b62addd84d785484186cb988f388c4eff2f5668 Mon Sep 17 00:00:00 2001 From: CyrilFerlicot Date: Tue, 24 Sep 2024 14:37:25 +0200 Subject: [PATCH] Update classes of extensions --- src/Sindarin/ASTAssignmentNode.extension.st | 7 +++++++ ...ckNode.extension.st => ASTBlockNode.extension.st} | 12 ++++++------ src/Sindarin/ASTMessageNode.extension.st | 7 +++++++ ...dNode.extension.st => ASTMethodNode.extension.st} | 12 ++++++------ ...Node.extension.st => ASTProgramNode.extension.st} | 6 +++--- src/Sindarin/ASTReturnNode.extension.st | 7 +++++++ src/Sindarin/RBAssignmentNode.extension.st | 7 ------- .../RBBlockDefinitionSearchingVisitor.class.st | 2 +- src/Sindarin/RBMessageNode.extension.st | 7 ------- src/Sindarin/RBReturnNode.extension.st | 7 ------- 10 files changed, 37 insertions(+), 37 deletions(-) create mode 100644 src/Sindarin/ASTAssignmentNode.extension.st rename src/Sindarin/{RBBlockNode.extension.st => ASTBlockNode.extension.st} (79%) create mode 100644 src/Sindarin/ASTMessageNode.extension.st rename src/Sindarin/{RBMethodNode.extension.st => ASTMethodNode.extension.st} (84%) rename src/Sindarin/{RBProgramNode.extension.st => ASTProgramNode.extension.st} (67%) create mode 100644 src/Sindarin/ASTReturnNode.extension.st delete mode 100644 src/Sindarin/RBAssignmentNode.extension.st delete mode 100644 src/Sindarin/RBMessageNode.extension.st delete mode 100644 src/Sindarin/RBReturnNode.extension.st diff --git a/src/Sindarin/ASTAssignmentNode.extension.st b/src/Sindarin/ASTAssignmentNode.extension.st new file mode 100644 index 0000000..21f576f --- /dev/null +++ b/src/Sindarin/ASTAssignmentNode.extension.st @@ -0,0 +1,7 @@ +Extension { #name : 'ASTAssignmentNode' } + +{ #category : '*Sindarin' } +ASTAssignmentNode >> skipWithDebugger: aSindarinDebugger [ + + aSindarinDebugger skipAssignmentNodeCompletely +] diff --git a/src/Sindarin/RBBlockNode.extension.st b/src/Sindarin/ASTBlockNode.extension.st similarity index 79% rename from src/Sindarin/RBBlockNode.extension.st rename to src/Sindarin/ASTBlockNode.extension.st index c386df0..bc5d4c4 100644 --- a/src/Sindarin/RBBlockNode.extension.st +++ b/src/Sindarin/ASTBlockNode.extension.st @@ -1,7 +1,7 @@ -Extension { #name : 'RBBlockNode' } +Extension { #name : 'ASTBlockNode' } { #category : '*Sindarin' } -RBBlockNode >> executedNodesAfter: aNode [ +ASTBlockNode >> executedNodesAfter: aNode [ "Gives all nodes that are executed after aNode. Assuming that aNode is a recursive child, then all nodes executed after it are all nodes after it in allChildrenPostOrder" @@ -14,13 +14,13 @@ RBBlockNode >> executedNodesAfter: aNode [ ] { #category : '*Sindarin' } -RBBlockNode >> firstPCOfStatement: aStatementNode [ +ASTBlockNode >> firstPCOfStatement: aStatementNode [ ^ self bcToASTCache firstRecursiveBcOffsetForStatementNode: aStatementNode ] { #category : '*Sindarin' } -RBBlockNode >> nextExecutedNodeAfter: aNode [ +ASTBlockNode >> nextExecutedNodeAfter: aNode [ "Find first node that is after aNode that has an associated pc in method node all children (post-order)" @@ -32,7 +32,7 @@ RBBlockNode >> nextExecutedNodeAfter: aNode [ ] { #category : '*Sindarin' } -RBBlockNode >> parentOfIdenticalSubtree: subtree [ +ASTBlockNode >> parentOfIdenticalSubtree: subtree [ ^ self allChildren reversed detect: [ :e | e == subtree ] @@ -41,7 +41,7 @@ RBBlockNode >> parentOfIdenticalSubtree: subtree [ ] { #category : '*Sindarin' } -RBBlockNode >> skipWithDebugger: aSindarinDebugger [ +ASTBlockNode >> skipWithDebugger: aSindarinDebugger [ aSindarinDebugger skipBlockNode ] diff --git a/src/Sindarin/ASTMessageNode.extension.st b/src/Sindarin/ASTMessageNode.extension.st new file mode 100644 index 0000000..f097bca --- /dev/null +++ b/src/Sindarin/ASTMessageNode.extension.st @@ -0,0 +1,7 @@ +Extension { #name : 'ASTMessageNode' } + +{ #category : '*Sindarin' } +ASTMessageNode >> skipWithDebugger: aSindarinDebugger [ + + aSindarinDebugger skipMessageNode +] diff --git a/src/Sindarin/RBMethodNode.extension.st b/src/Sindarin/ASTMethodNode.extension.st similarity index 84% rename from src/Sindarin/RBMethodNode.extension.st rename to src/Sindarin/ASTMethodNode.extension.st index ab20951..f9da520 100644 --- a/src/Sindarin/RBMethodNode.extension.st +++ b/src/Sindarin/ASTMethodNode.extension.st @@ -1,7 +1,7 @@ -Extension { #name : 'RBMethodNode' } +Extension { #name : 'ASTMethodNode' } { #category : '*Sindarin' } -RBMethodNode >> executedNodesAfter: aNode [ +ASTMethodNode >> executedNodesAfter: aNode [ "Gives all nodes that are executed after aNode. Assuming that aNode is a recursive child, then all nodes executed after it are all nodes after it in allChildrenPostOrder" @@ -14,13 +14,13 @@ RBMethodNode >> executedNodesAfter: aNode [ ] { #category : '*Sindarin' } -RBMethodNode >> firstPCOfStatement: aStatementNode [ +ASTMethodNode >> firstPCOfStatement: aStatementNode [ ^ self bcToASTCache firstRecursiveBcOffsetForStatementNode: aStatementNode ] { #category : '*Sindarin' } -RBMethodNode >> nextExecutedNodeAfter: aNode [ +ASTMethodNode >> nextExecutedNodeAfter: aNode [ "Find first node that is after aNode that has an associated pc in method node all children (post-order)" @@ -32,7 +32,7 @@ RBMethodNode >> nextExecutedNodeAfter: aNode [ ] { #category : '*Sindarin' } -RBMethodNode >> parentOfIdenticalSubtree: subtree [ +ASTMethodNode >> parentOfIdenticalSubtree: subtree [ ^ self allChildren reversed detect: [ :e | e == subtree ] @@ -41,7 +41,7 @@ RBMethodNode >> parentOfIdenticalSubtree: subtree [ ] { #category : '*Sindarin' } -RBMethodNode >> statementNodeContaining: aNode [ +ASTMethodNode >> statementNodeContaining: aNode [ | statementNode parentOfStatementNode | statementNode := aNode. diff --git a/src/Sindarin/RBProgramNode.extension.st b/src/Sindarin/ASTProgramNode.extension.st similarity index 67% rename from src/Sindarin/RBProgramNode.extension.st rename to src/Sindarin/ASTProgramNode.extension.st index 719379d..22a6243 100644 --- a/src/Sindarin/RBProgramNode.extension.st +++ b/src/Sindarin/ASTProgramNode.extension.st @@ -1,7 +1,7 @@ -Extension { #name : 'RBProgramNode' } +Extension { #name : 'ASTProgramNode' } { #category : '*Sindarin' } -RBProgramNode >> allChildrenPostOrder [ +ASTProgramNode >> allChildrenPostOrder [ | children | children := OrderedCollection new. @@ -12,7 +12,7 @@ RBProgramNode >> allChildrenPostOrder [ ] { #category : '*Sindarin' } -RBProgramNode >> skipWithDebugger: aSindarinDebugger [ +ASTProgramNode >> skipWithDebugger: aSindarinDebugger [ aSindarinDebugger step ] diff --git a/src/Sindarin/ASTReturnNode.extension.st b/src/Sindarin/ASTReturnNode.extension.st new file mode 100644 index 0000000..4d6b4a9 --- /dev/null +++ b/src/Sindarin/ASTReturnNode.extension.st @@ -0,0 +1,7 @@ +Extension { #name : 'ASTReturnNode' } + +{ #category : '*Sindarin' } +ASTReturnNode >> skipWithDebugger: aSindarinDebugger [ + + aSindarinDebugger skipReturnNode +] diff --git a/src/Sindarin/RBAssignmentNode.extension.st b/src/Sindarin/RBAssignmentNode.extension.st deleted file mode 100644 index faa0dc9..0000000 --- a/src/Sindarin/RBAssignmentNode.extension.st +++ /dev/null @@ -1,7 +0,0 @@ -Extension { #name : 'RBAssignmentNode' } - -{ #category : '*Sindarin' } -RBAssignmentNode >> skipWithDebugger: aSindarinDebugger [ - - aSindarinDebugger skipAssignmentNodeCompletely -] diff --git a/src/Sindarin/RBBlockDefinitionSearchingVisitor.class.st b/src/Sindarin/RBBlockDefinitionSearchingVisitor.class.st index e94aa95..79deac6 100644 --- a/src/Sindarin/RBBlockDefinitionSearchingVisitor.class.st +++ b/src/Sindarin/RBBlockDefinitionSearchingVisitor.class.st @@ -1,6 +1,6 @@ Class { #name : 'RBBlockDefinitionSearchingVisitor', - #superclass : 'RBProgramNodeVisitor', + #superclass : 'ASTProgramNodeVisitor', #instVars : [ 'blockToSearch', 'isBlockFound' diff --git a/src/Sindarin/RBMessageNode.extension.st b/src/Sindarin/RBMessageNode.extension.st deleted file mode 100644 index 85adff8..0000000 --- a/src/Sindarin/RBMessageNode.extension.st +++ /dev/null @@ -1,7 +0,0 @@ -Extension { #name : 'RBMessageNode' } - -{ #category : '*Sindarin' } -RBMessageNode >> skipWithDebugger: aSindarinDebugger [ - - aSindarinDebugger skipMessageNode -] diff --git a/src/Sindarin/RBReturnNode.extension.st b/src/Sindarin/RBReturnNode.extension.st deleted file mode 100644 index f5f04c1..0000000 --- a/src/Sindarin/RBReturnNode.extension.st +++ /dev/null @@ -1,7 +0,0 @@ -Extension { #name : 'RBReturnNode' } - -{ #category : '*Sindarin' } -RBReturnNode >> skipWithDebugger: aSindarinDebugger [ - - aSindarinDebugger skipReturnNode -]