|
Class: CascadeNode
Object
|
+--ParseNode
|
+--MessageNode
|
+--CascadeNode
- Package:
- stx:libcomp
- Category:
- System-Compiler-Support
- Version:
- rev:
1.37
date: 2021/01/20 10:29:24
- user: cg
- file: CascadeNode.st directory: libcomp
- module: stx stc-classLibrary: libcomp
node for parse-trees, representing cascade message sends
This is a helper class for the compiler.
copyrightCOPYRIGHT (c) 1989 by Claus Gittinger
All Rights Reserved
This software is furnished under a license and may be used
only in accordance with the terms of that license and with the
inclusion of the above copyright notice. This software may not
be provided or otherwise made available to, or used by, any
other person. No title to or ownership of the software is
hereby transferred.
*VMMaker-C translation
-
asTranslatorNodeIn: aTMethod
-
make a CCodeGenerator equivalent of me
-
realReceiver
-
return the real receiver
(sigh; ST/X encodes things differently)
code generation
-
codeForCascadeOn: aStream inBlock: b for: aCompiler
-
the old code could lead to a recursion error with
long cascades;
the new code does not.
Usage example(s):
receiver codeForCascadeOn:aStream inBlock:b for:aCompiler.
|
-
codeOn: aStream inBlock: b valueNeeded: valueNeeded for: aCompiler
-
(comment from inherited method)
most work is in checking for inlinable code here.
enumerating
-
messages
-
helper for parse tree walking
-
nodeDo: anEnumerator
-
helper for parse tree walking
evaluation
-
evaluateForCascadeIn: anEnvironment
-
new code: avoids recursion error for long cascades
Usage example(s):
t := receiver evaluateForCascadeIn:anEnvironment.
|
-
evaluateIn: anEnvironment
-
t perform:selector. ^ t
printing & storing
-
printMessagePartOn: aStream indent: i
-
-
printOn: aStream indent: i
-
new code:
Usage example(s):
receiver printOn:aStream indent:i.
|
testing
-
isCascade
-
visiting
-
acceptVisitor: aVisitor
-
Double dispatch back to the visitor, passing my type encoded in
the selector (visitor pattern)
|