|
Class: ReturnNode
Object
|
+--ParseNode
|
+--StatementNode
|
+--ReturnNode
|
+--JavaScriptParser::JavaScriptReturnNode
- Package:
- stx:libcomp
- Category:
- System-Compiler-Support
- Version:
- rev:
1.45
date: 2014/06/13 10:24:03
- user: cg
- file: ReturnNode.st directory: libcomp
- module: stx stc-classLibrary: libcomp
- Author:
- Claus Gittinger
node for parse-trees, representing return expressions
This is a helper class for the compiler.
accessing
-
expression: e
-
any block, which is returned cannot be inlined.
-
home
-
-
home: someOne blockHome: aBlockNode
-
-
lineNumber: something
-
set lineNr
checks
-
plausibilityCheckIn: aParser
-
check for return-in-return, as in
^ foo ifTrue:[ ^x]
that is (currently) not compilable by stc (generates bad C-code for it).
TODO: rewite to use lint/lint rules and apply them before accepting
code generation
-
basicCodeOn: aStream inBlock: b for: aCompiler
-
return from homeContext in a block
-
codeForSideEffectOn: aStream inBlock: b for: aCompiler
-
redefined - drop not needed since notreached
-
codeForSimpleReturnOn: aStream inBlock: b lineNumber: lineNrOrNil for: aCompiler
-
generate code to return myself as a simple method return
-
codeLocalReturnOn: aStream inBlock: b for: aCompiler
-
-
codeOn: aStream inBlock: b for: aCompiler
-
aCompiler parserFlags allowPossibleSTCCompilationProblems ifFalse:[
enumerating
-
nodeDo: anEnumerator
-
helper for parse tree walking
evaluation
-
evaluateExpressionIn: anEnvironment
-
when we arrive here, the parser context is already gone
- try block-return
printing & storing
-
printOn: aStream indent: i
-
queries
-
isConstant
-
-
isJavaScriptReturnNode
-
-
isReturnNode
-
-
isSimpleConstant
-
-
isSimpleExpression
-
-
isSimpleVariable
-
visiting
-
acceptVisitor: aVisitor
-
Double dispatch back to the visitor, passing my type encoded in
the selector (visitor pattern)
|