eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'PrimitiveNode':

Home

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

Class: PrimitiveNode


Inheritance:

   Object
   |
   +--ParseNode
      |
      +--StatementNode
         |
         +--PrimitiveNode

Package:
stx:libcomp
Category:
System-Compiler-Support
Version:
rev: 1.25 date: 2016/05/04 19:12:14
user: cg
file: PrimitiveNode.st directory: libcomp
module: stx stc-classLibrary: libcomp
Author:
Claus Gittinger

Description:


node for parse-trees, representing primitive code
This is a helper class for the compiler.

Primitives are (currently) not always supported by the incremental compiler 
- if you want a primitive, you must use the stc-compiler and 
link a new smalltalk.

On system which support dynamic object loading, methods with primitives are passed 
to stc and the resulting binary is loaded into the image 
(also a limited set of numeric primitives could be implemented for more ST-80 
 compatibility - if there is a need).

To allow autoloaded/filedIn code to be written for best performance, an optional
primitive directive (in the primitives first lines comment) may specify an
optional primitive; these are compiled on systems which do support binary code
loading, and ignored completely on others.


Class protocol:

instance creation
o  code: aString

o  primitiveNumber: anInteger


Instance protocol:

accessing
o  code: aString
set the primitives code - check for the 'OPTIONAL' directive

o  primitiveNumber: anInteger

code generation
o  codeForSideEffectOn: aStream inBlock: b for: aCompiler
catch code generation

o  codeOn: aStream inBlock: b for: aCompiler
catch code generation

enumerating
o  nodeDo: anEnumerator
helper for parse tree walking

evaluation
o  evaluateExpressionIn: anEnvironment
catch evaluation

o  evaluateIn: anEnvironment
catch evaluation

queries
o  containsReturn
JV@2011-07-19: I'm not quite sure that this is OK..."

o  isConstant

o  isOptional

o  isSimpleConstant

o  isSimpleExpression

o  isSimpleVariable

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



ST/X 7.1.0.0; WebServer 1.663 at exept.de:8081; Sun, 22 Jul 2018 16:46:19 GMT