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.27 date: 2023/06/04 09:30:03
user: cg
file: PrimitiveNode.st directory: libcomp
module: stx stc-classLibrary: libcomp

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.

copyright

COPYRIGHT (c) 1990 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.

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  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.7.0.0; WebServer 1.702 at 20f6060372b9.unknown:8081; Mon, 30 Dec 2024 17:52:13 GMT