Search in sources :

Example 1 with PascalSubroutine

use of cz.cuni.mff.d3s.trupple.language.runtime.customvalues.PascalSubroutine in project TrufflePascal by Aspect26.

the class NodeFactory method createSubroutineParameterPassNode.

public ExpressionNode createSubroutineParameterPassNode(Token variableToken) {
    String variableIdentifier = this.getIdentifierFromToken(variableToken);
    PascalSubroutine function = this.doLookup(variableIdentifier, LexicalScope::getSubroutine);
    TypeDescriptor descriptor = this.doLookup(variableIdentifier, LexicalScope::getIdentifierDescriptor);
    return new SubroutineLiteralNode(function, (SubroutineDescriptor) descriptor);
}
Also used : PascalSubroutine(cz.cuni.mff.d3s.trupple.language.runtime.customvalues.PascalSubroutine) TypeDescriptor(cz.cuni.mff.d3s.trupple.parser.identifierstable.types.TypeDescriptor)

Example 2 with PascalSubroutine

use of cz.cuni.mff.d3s.trupple.language.runtime.customvalues.PascalSubroutine in project TrufflePascal by Aspect26.

the class SubroutineDescriptor method setRootNode.

public void setRootNode(RootNode rootNode) {
    RootCallTarget callTarget = Truffle.getRuntime().createCallTarget(rootNode);
    this.subroutine = new PascalSubroutine(callTarget);
}
Also used : PascalSubroutine(cz.cuni.mff.d3s.trupple.language.runtime.customvalues.PascalSubroutine) RootCallTarget(com.oracle.truffle.api.RootCallTarget)

Aggregations

PascalSubroutine (cz.cuni.mff.d3s.trupple.language.runtime.customvalues.PascalSubroutine)2 RootCallTarget (com.oracle.truffle.api.RootCallTarget)1 TypeDescriptor (cz.cuni.mff.d3s.trupple.parser.identifierstable.types.TypeDescriptor)1