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.37 date: 2021/01/20 10:29:24
user: cg
file: CascadeNode.st directory: libcomp
module: stx stc-classLibrary: libcomp

Description:


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

copyright

COPYRIGHT (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.

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
(comment from inherited method)
most work is in checking for inlinable code here.

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.7.0.0; WebServer 1.702 at 20f6060372b9.unknown:8081; Mon, 18 Nov 2024 04:17:36 GMT