43 lines
869 B
Smalltalk
43 lines
869 B
Smalltalk
"
|
|
I do literally nothing, just visiting :)
|
|
|
|
Be carefull, I do not keep the close set, only open set, so that it might take time for me to go through all the possible paths in a graph.
|
|
"
|
|
Class {
|
|
#name : 'PPCNilVisitor',
|
|
#superclass : 'PPCNodeVisitor',
|
|
#instVars : [
|
|
'visitCount'
|
|
],
|
|
#category : 'PetitCompiler-Visitors'
|
|
}
|
|
|
|
{ #category : 'as yet unclassified' }
|
|
PPCNilVisitor >> afterAccept: node retval: retval [
|
|
"do not cache the result"
|
|
^ retval
|
|
]
|
|
|
|
{ #category : 'as yet unclassified' }
|
|
PPCNilVisitor >> initialize [
|
|
super initialize.
|
|
|
|
visitCount := 0.
|
|
]
|
|
|
|
{ #category : 'accessing' }
|
|
PPCNilVisitor >> visitCount [
|
|
^ visitCount
|
|
]
|
|
|
|
{ #category : 'accessing' }
|
|
PPCNilVisitor >> visitCount: anObject [
|
|
visitCount := anObject
|
|
]
|
|
|
|
{ #category : 'as yet unclassified' }
|
|
PPCNilVisitor >> visitNode: node [
|
|
visitCount := visitCount + 1.
|
|
^ super visitNode: node
|
|
]
|