Class StandardProcedure
java.lang.Object
simula.compiler.syntaxClass.SyntaxClass
simula.compiler.syntaxClass.declaration.Declaration
simula.compiler.syntaxClass.declaration.DeclarationScope
simula.compiler.syntaxClass.declaration.BlockDeclaration
simula.compiler.syntaxClass.declaration.ProcedureDeclaration
simula.compiler.syntaxClass.declaration.StandardProcedure
Standard Procedure.
Link to GitHub: Source File.
- Author:
- Øystein Myhre Andersen
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate String
The mtd picked by 'getLegalOverLoadMatch'private String[]
Set of method type descriptors.private ProcedureSpecification
The overload matchFields inherited from class simula.compiler.syntaxClass.declaration.ProcedureDeclaration
myVirtual, parameterList, result
Fields inherited from class simula.compiler.syntaxClass.declaration.BlockDeclaration
currentBlock, isContextFree, isMainModule, labelcodeList, labelContext, labelContextStack, lastLineNumber, nLocalVariables, prevBlock, statements
Fields 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, OBJECT_SEQU
-
Constructor Summary
ConstructorsConstructorDescriptionStandardProcedure
(DeclarationScope declaredIn, int kind, String[] mtdSet, Type type, String ident, Parameter... param) Create a new StandardProcedure with parameters.StandardProcedure
(DeclarationScope declaredIn, int kind, Type type, String ident) Create a new StandardProcedure without parameters.StandardProcedure
(DeclarationScope declaredIn, int kind, Type type, String ident, Parameter... param) Create a new StandardProcedure with parameters. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Perform semantic checking.private String
edMethodTypeDesc
(Expression beforeDot, Vector<Expression> params) Edit MethodTypeDescprivate ProcedureSpecification
getLegalOverLoadMatch
(String mtd, Vector<Expression> params) Get LegalOverLoadMatch.getMethodTypeDesc
(Expression beforeDot, Vector<Expression> params) Get MethodTypeDescgetOverLoadMatch
(Vector<Expression> params) Get OverLoadMatch.Return the getProcedureSpecification obtained from the given MethodTypeDesc.toString()
Methods inherited from class simula.compiler.syntaxClass.declaration.ProcedureDeclaration
build_STM_BODY, buildClassFile, buildDeclaration, buildInitAttribute, codeProcedureBody, doJavaCoding, edConstructorSignature, expectProcedureDeclaration, findVisibleAttributeMeaning, getResultFieldRefEntry, print, printTree, readObject, writeObject
Methods inherited from class simula.compiler.syntaxClass.declaration.BlockDeclaration
addLeadingLabel, allocateLocalVariable, build_TRY_CATCH, buildIsMethodDetachUsed, buildIsQPSystemBlock, buildMethod_STM, buildMethodMain, codeMethodMain, codeStatements, codeSTMBody, currentClassDesc, expectFormalParameterPart, getConstructorMethodTypeDesc, hasAccumLabel, hasDeclaredLabel, isBlockWithLocalClasses, isQPSystemBlock, nearestEnclosingBlock, printStatementList
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, buildDeclarationCode, checkAlreadyDefined, getFieldIdentifier, getJavaIdentifier, isCompatibleClasses, verifyTree
Methods inherited from class simula.compiler.syntaxClass.SyntaxClass
ASSERT_SEMANTICS_CHECKED, buildByteCode, doDeclarationCoding, edIndent, edTreeIndent, IS_SEMANTICS_CHECKED, SET_SEMANTICS_CHECKED, setLineNumber, toJavaCode
-
Field Details
-
mtdSet
Set of method type descriptors. -
overLoadMatch
The overload match -
mtdPicked
The mtd picked by 'getLegalOverLoadMatch'
-
-
Constructor Details
-
StandardProcedure
StandardProcedure(DeclarationScope declaredIn, int kind, Type type, String ident) Create a new StandardProcedure without parameters.- Parameters:
declaredIn
- the enclosing scopekind
- the declaration kindtype
- the procedure's typeident
- the procedure identifier
-
StandardProcedure
StandardProcedure(DeclarationScope declaredIn, int kind, Type type, String ident, Parameter... param) Create a new StandardProcedure with parameters.- Parameters:
declaredIn
- the enclosing scopekind
- the declaration kindtype
- the procuedre's typeident
- the procedure identifierparam
- the parameters
-
StandardProcedure
StandardProcedure(DeclarationScope declaredIn, int kind, String[] mtdSet, Type type, String ident, Parameter... param) Create a new StandardProcedure with parameters.- Parameters:
declaredIn
- the enclosing scopekind
- the declaration kindmtdSet
- the set of Method Type Descriptorstype
- the procuedre's typeident
- the procedure identifierparam
- the parameters
-
-
Method Details
-
doChecking
public void doChecking()Description copied from class:SyntaxClass
Perform semantic checking.
This must be redefined in every subclass.
- Overrides:
doChecking
in classProcedureDeclaration
-
getOverLoadMatch
Get OverLoadMatch.- Parameters:
params
- the actual parameters- Returns:
- OverLoadMatch
-
getLegalOverLoadMatch
Get LegalOverLoadMatch.- Parameters:
mtd
- a method type descriptorparams
- the actual parameters.- Returns:
- a legal OverLoadMatch or null.
-
getProcedureSpecification
Return the getProcedureSpecification obtained from the given MethodTypeDesc.- Parameters:
mtd
- the MethodTypeDesc- Returns:
- the getProcedureSpecification obtained from the given MethodTypeDesc.
-
getMethodTypeDesc
Get MethodTypeDesc- Parameters:
beforeDot
- the Expression beforeDotparams
- the actual parameters- Returns:
- MethodTypeDesc
-
edMethodTypeDesc
Edit MethodTypeDesc- Parameters:
beforeDot
- the Expression beforeDotparams
- the actual parameters- Returns:
- MethodTypeDesc String
-
toString
- Overrides:
toString
in classProcedureDeclaration
-