eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'CascadeNode':

Home

Documentation
www.exept.de
Everywhere
for:
[back]

Class: CascadeNode


Inheritance:

   Object
   |
   +--ParseNode
      |
      +--MessageNode
         |
         +--CascadeNode

Package:
stx:libcomp
Category:
System-Compiler-Support
Version:
rev: 1.36 date: 2018/03/26 13:54:34
user: stefan
file: CascadeNode.st directory: libcomp
module: stx stc-classLibrary: libcomp
Author:
Claus Gittinger

Description:


node for parse-trees, representing cascade message sends
This is a helper class for the compiler.


Instance protocol:

*VMMaker-C translation
o  asTranslatorNodeIn: aTMethod
make a CCodeGenerator equivalent of me

o  realReceiver
return the real receiver
(sigh; ST/X encodes things differently)

code generation
o  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.

o  codeOn: aStream inBlock: b valueNeeded: valueNeeded for: aCompiler

enumerating
o  messages
helper for parse tree walking

o  nodeDo: anEnumerator
helper for parse tree walking

evaluation
o  evaluateForCascadeIn: anEnvironment
new code: avoids recursion error for long cascades

usage example(s):

t := receiver evaluateForCascadeIn:anEnvironment.

o  evaluateIn: anEnvironment
t perform:selector. ^ t

printing & storing
o  printMessagePartOn: aStream indent: i

o  printOn: aStream indent: i
new code:

usage example(s):

receiver printOn:aStream indent:i.

testing
o  isCascade

visiting
o  acceptVisitor: aVisitor
Double dispatch back to the visitor, passing my type encoded in
the selector (visitor pattern)



ST/X 7.2.0.0; WebServer 1.670 at bd0aa1f87cdd.unknown:8081; Fri, 19 Apr 2024 18:29:56 GMT