Search in sources :

Example 1 with ClassLiteral

use of com.oracle.truffle.dsl.processor.expression.DSLExpression.ClassLiteral in project graal by oracle.

the class FlatNodeGenFactory method substituteLibraryCall.

private DSLExpression substituteLibraryCall(Call call) {
    ClassLiteral literal = (ClassLiteral) call.getParameters().get(0);
    CodeVariableElement var = createLibraryConstant(constants, literal.getLiteral());
    String constantName = var.getSimpleName().toString();
    Variable singleton = new Variable(null, constantName);
    singleton.setResolvedTargetType(var.asType());
    singleton.setResolvedVariable(var);
    return singleton;
}
Also used : Variable(com.oracle.truffle.dsl.processor.expression.DSLExpression.Variable) CodeVariableElement(com.oracle.truffle.dsl.processor.java.model.CodeVariableElement) ClassLiteral(com.oracle.truffle.dsl.processor.expression.DSLExpression.ClassLiteral)

Example 2 with ClassLiteral

use of com.oracle.truffle.dsl.processor.expression.DSLExpression.ClassLiteral in project graal by oracle.

the class FlatNodeGenFactory method substituteLanguageReference.

private DSLExpression substituteLanguageReference(Call call) {
    ClassLiteral literal = (ClassLiteral) call.getParameters().get(0);
    CodeVariableElement var = createLanguageReferenceConstant(constants, literal.getLiteral());
    String constantName = var.getSimpleName().toString();
    Variable singleton = new Variable(null, constantName);
    singleton.setResolvedTargetType(var.asType());
    singleton.setResolvedVariable(var);
    return singleton;
}
Also used : Variable(com.oracle.truffle.dsl.processor.expression.DSLExpression.Variable) CodeVariableElement(com.oracle.truffle.dsl.processor.java.model.CodeVariableElement) ClassLiteral(com.oracle.truffle.dsl.processor.expression.DSLExpression.ClassLiteral)

Example 3 with ClassLiteral

use of com.oracle.truffle.dsl.processor.expression.DSLExpression.ClassLiteral in project graal by oracle.

the class FlatNodeGenFactory method substituteContextReference.

private DSLExpression substituteContextReference(Call call) {
    ClassLiteral literal = (ClassLiteral) call.getParameters().get(0);
    CodeVariableElement var = createContextReferenceConstant(constants, literal.getLiteral());
    String constantName = var.getSimpleName().toString();
    Variable singleton = new Variable(null, constantName);
    singleton.setResolvedTargetType(var.asType());
    singleton.setResolvedVariable(var);
    return singleton;
}
Also used : Variable(com.oracle.truffle.dsl.processor.expression.DSLExpression.Variable) CodeVariableElement(com.oracle.truffle.dsl.processor.java.model.CodeVariableElement) ClassLiteral(com.oracle.truffle.dsl.processor.expression.DSLExpression.ClassLiteral)

Aggregations

ClassLiteral (com.oracle.truffle.dsl.processor.expression.DSLExpression.ClassLiteral)3 Variable (com.oracle.truffle.dsl.processor.expression.DSLExpression.Variable)3 CodeVariableElement (com.oracle.truffle.dsl.processor.java.model.CodeVariableElement)3