Mercurial > hg > graal-compiler
diff graal/com.oracle.truffle.dsl.processor/src/com/oracle/truffle/dsl/processor/generator/NodeBaseFactory.java @ 18775:a069a87b9a02
Truffle-DSL: Added tests and verification of overridable generic execute methods.
author | Christian Humer <christian.humer@gmail.com> |
---|---|
date | Mon, 05 Jan 2015 01:31:08 +0100 |
parents | a720bf2e2f43 |
children | c0fb70634640 |
line wrap: on
line diff
--- a/graal/com.oracle.truffle.dsl.processor/src/com/oracle/truffle/dsl/processor/generator/NodeBaseFactory.java Mon Jan 05 01:31:07 2015 +0100 +++ b/graal/com.oracle.truffle.dsl.processor/src/com/oracle/truffle/dsl/processor/generator/NodeBaseFactory.java Mon Jan 05 01:31:08 2015 +0100 @@ -1170,7 +1170,7 @@ } private ExecutableTypeData resolveExecutableType(NodeExecutionData execution, TypeData type) { - ExecutableTypeData targetExecutable = execution.getChild().findExecutableType(context, type); + ExecutableTypeData targetExecutable = execution.getChild().findExecutableType(type); if (targetExecutable == null) { targetExecutable = execution.getChild().findAnyGenericExecutableType(context); } @@ -1343,14 +1343,14 @@ builder.startElseBlock(); } - ExecutableTypeData implictExecutableTypeData = execution.getChild().findExecutableType(context, sourceType); + ExecutableTypeData implictExecutableTypeData = execution.getChild().findExecutableType(sourceType); if (implictExecutableTypeData == null) { /* * For children with executeWith.size() > 0 an executable type may not exist so use * the generic executable type which is guaranteed to exist. An expect call is * inserted automatically by #createExecuteExpression. */ - implictExecutableTypeData = execution.getChild().getNodeData().findExecutableType(node.getTypeSystem().getGenericTypeData(), execution.getChild().getExecuteWith().size()); + implictExecutableTypeData = execution.getChild().getNodeData().findAnyGenericExecutableType(context, execution.getChild().getExecuteWith().size()); } ImplicitCastData cast = execution.getChild().getNodeData().getTypeSystem().lookupCast(sourceType, targetParameter.getTypeSystemType()); @@ -1838,12 +1838,12 @@ /** * <pre> * variant1 $condition != null - * + * * $type $name = defaultValue($type); * if ($condition) { * $name = $value; * } - * + * * variant2 $condition != null * $type $name = $value; * </pre>