Mercurial > hg > graal-jvmci-8
comparison graal/com.oracle.truffle.dsl.processor/src/com/oracle/truffle/dsl/processor/generator/NodeGenFactory.java @ 19763:d03352ba2efb
Truffle-DSL: fix another null issue for execute method generation.
author | Christian Humer <christian.humer@gmail.com> |
---|---|
date | Tue, 10 Mar 2015 13:47:46 +0100 |
parents | 2f5d4df2af90 |
children | e8d2f3f95dcd |
comparison
equal
deleted
inserted
replaced
19762:223e1d7b15b7 | 19763:d03352ba2efb |
---|---|
869 | 869 |
870 boolean hasExecutedUnexpected = executedType != null && !executedType.isGeneric() && !executedType.isVoid(); | 870 boolean hasExecutedUnexpected = executedType != null && !executedType.isGeneric() && !executedType.isVoid(); |
871 | 871 |
872 CodeTreeBuilder contentBuilder = builder.create(); | 872 CodeTreeBuilder contentBuilder = builder.create(); |
873 contentBuilder.startReturn(); | 873 contentBuilder.startReturn(); |
874 if (!hasExecutedUnexpected) { | 874 if (!hasExecutedUnexpected && !execType.hasUnexpectedValue(context)) { |
875 if (executedType == null || executedType.needsCastTo(returnType)) { | 875 if (executedType == null || executedType.needsCastTo(returnType)) { |
876 contentBuilder.cast(returnType.getPrimitiveType(), executeBuilder.build()); | 876 contentBuilder.cast(returnType.getPrimitiveType(), executeBuilder.build()); |
877 } else { | 877 } else { |
878 contentBuilder.tree(executeBuilder.build()); | 878 contentBuilder.tree(executeBuilder.build()); |
879 } | 879 } |