Search in sources :

Example 1 with LLVMConversionType

use of com.oracle.truffle.llvm.parser.instructions.LLVMConversionType in project sulong by graalvm.

the class LLVMBitcodeInstructionVisitor method visit.

@Override
public void visit(CastInstruction cast) {
    LLVMConversionType type = LLVMBitcodeTypeHelper.toConversionType(cast.getOperator());
    LLVMExpressionNode fromNode = symbols.resolve(cast.getValue());
    Type from = cast.getValue().getType();
    Type to = cast.getType();
    LLVMExpressionNode result = nodeFactory.createCast(runtime, fromNode, to, from, type);
    createFrameWrite(result, cast);
}
Also used : LLVMConversionType(com.oracle.truffle.llvm.parser.instructions.LLVMConversionType) PrimitiveType(com.oracle.truffle.llvm.runtime.types.PrimitiveType) StructureType(com.oracle.truffle.llvm.runtime.types.StructureType) ArrayType(com.oracle.truffle.llvm.runtime.types.ArrayType) AggregateType(com.oracle.truffle.llvm.runtime.types.AggregateType) LLVMArithmeticInstructionType(com.oracle.truffle.llvm.parser.instructions.LLVMArithmeticInstructionType) Type(com.oracle.truffle.llvm.runtime.types.Type) PointerType(com.oracle.truffle.llvm.runtime.types.PointerType) FunctionType(com.oracle.truffle.llvm.runtime.types.FunctionType) LLVMConversionType(com.oracle.truffle.llvm.parser.instructions.LLVMConversionType) LLVMExpressionNode(com.oracle.truffle.llvm.runtime.nodes.api.LLVMExpressionNode)

Aggregations

LLVMArithmeticInstructionType (com.oracle.truffle.llvm.parser.instructions.LLVMArithmeticInstructionType)1 LLVMConversionType (com.oracle.truffle.llvm.parser.instructions.LLVMConversionType)1 LLVMExpressionNode (com.oracle.truffle.llvm.runtime.nodes.api.LLVMExpressionNode)1 AggregateType (com.oracle.truffle.llvm.runtime.types.AggregateType)1 ArrayType (com.oracle.truffle.llvm.runtime.types.ArrayType)1 FunctionType (com.oracle.truffle.llvm.runtime.types.FunctionType)1 PointerType (com.oracle.truffle.llvm.runtime.types.PointerType)1 PrimitiveType (com.oracle.truffle.llvm.runtime.types.PrimitiveType)1 StructureType (com.oracle.truffle.llvm.runtime.types.StructureType)1 Type (com.oracle.truffle.llvm.runtime.types.Type)1