Class Thunk
java.lang.Object
simula.compiler.syntaxClass.SyntaxClass
simula.compiler.syntaxClass.declaration.Declaration
simula.compiler.syntaxClass.declaration.DeclarationScope
simula.compiler.syntaxClass.declaration.Thunk
Thunk Declaration.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate ClassDesc
Local variableprivate Expression
Local variableprivate int
Local variableprivate static int
Local variableFields inherited from class simula.compiler.syntaxClass.declaration.DeclarationScope
CLASSFILE_ALREADY_GENERATED, declarationList, hasLocalClasses, isPreCompiledFromFile, labelList, sourceBlockLevel, sourceFileName
Fields inherited from class simula.compiler.syntaxClass.declaration.Declaration
declarationKind, declaredIn, externalIdent, identifier, isProtected, type
Fields inherited from class simula.compiler.syntaxClass.SyntaxClass
CHECKED, lineNumber
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
Thunk
(int kind, Expression expr) Create a new Thunk object. -
Method Summary
Modifier and TypeMethodDescriptionbyte[]
Build Class Fileprivate void
buildConstructor
(CodeBuilder codeBuilder) Generate byteCode for the Constructor.static void
buildInvoke
(int kind, Expression expr, CodeBuilder codeBuilder) ClassFile Coding Utility: Build invoke Thunk(package private) void
buildMethod_get
(CodeBuilder codeBuilder) Generate byteCode for the 'get' method.(package private) void
buildMethod_put
(CodeBuilder codeBuilder, Expression beforeDot, Expression expr) Generate byteCode for the 'put' method.private void
buildMethod_put2
(CodeBuilder codeBuilder) ClassFile Coding Utility: Build synthetic bridge to the 'put' method.private static void
buildProcedureQuant
(Expression apar, CodeBuilder codeBuilder) ClassFile Coding Utility: Edit new procedure quant.Find visible attribute's MeaningtoString()
Methods inherited from class simula.compiler.syntaxClass.declaration.DeclarationScope
buildAndLoadOrAddClassFile, buildCTX, buildCTX, buildCTX2, createJavaClassFile, doBuildClassFile, edCTX, edCTX, edJavaClassName, edScope, edScopeChain, findLabelMeaning, findMeaning, findProcedure, getBytesFromFile, getClassDesc, getRTBlockLevel, loadOrAddClassFile, modifyIdentifier, prefixLevel, prep, printDeclarationList, printStaticChain, scopeID
Methods inherited from class simula.compiler.syntaxClass.declaration.Declaration
acceptDeclaration, buildDeclaration, buildDeclarationCode, buildInitAttribute, checkAlreadyDefined, getFieldIdentifier, getJavaIdentifier, isCompatibleClasses, verifyTree
Methods inherited from class simula.compiler.syntaxClass.SyntaxClass
ASSERT_SEMANTICS_CHECKED, buildByteCode, doChecking, doDeclarationCoding, doJavaCoding, edIndent, edTreeIndent, IS_SEMANTICS_CHECKED, print, printTree, readObject, SET_SEMANTICS_CHECKED, setLineNumber, toJavaCode, writeObject
-
Field Details
-
OBJECT_SEQU
private static int OBJECT_SEQULocal variable -
CD_ThisClass
Local variable -
kind
private int kindLocal variable -
expr
Local variable
-
-
Constructor Details
-
Thunk
Create a new Thunk object.- Parameters:
kind
- the kind codeexpr
- the Thunk expression.
-
-
Method Details
-
findVisibleAttributeMeaning
Description copied from class:DeclarationScope
Find visible attribute's Meaning- Overrides:
findVisibleAttributeMeaning
in classDeclarationScope
- Parameters:
ident
- attribute identifier- Returns:
- the resulting Meaning
-
buildInvoke
ClassFile Coding Utility: Build invoke Thunk- Parameters:
kind
- a kind codeexpr
- the Thunk expressioncodeBuilder
- the codeBuilder to use.
-
buildClassFile
public byte[] buildClassFile()Description copied from class:DeclarationScope
Build Class File- Specified by:
buildClassFile
in classDeclarationScope
- Returns:
- Class File bytes
-
buildConstructor
Generate byteCode for the Constructor.
public ClassIdent(RTS_RTObject staticLink) { super(staticLink); }
- Parameters:
codeBuilder
- the CodeBuilder
-
buildMethod_get
Generate byteCode for the 'get' method.
public Integer get() { return(((adHoc13)(_ENV._SL)).n);
- Parameters:
codeBuilder
- the CodeBuilder
-
buildMethod_put
Generate byteCode for the 'put' method.
public Integer put(Integer x_) { return(((adHoc13)(_ENV._SL)).n=(int)x_);
}
- Parameters:
codeBuilder
- the CodeBuilderbeforeDot
- expression.expr
- the Thunk expression.
-
buildMethod_put2
ClassFile Coding Utility: Build synthetic bridge to the 'put' method.- Parameters:
codeBuilder
- the codeBuilder to use.
-
buildProcedureQuant
ClassFile Coding Utility: Edit new procedure quant.- Parameters:
apar
- the actual parametercodeBuilder
- the CodeBuilder
-
toString
-