Mercurial > hg > graal-jvmci-8
diff graal/com.oracle.truffle.dsl.processor/src/com/oracle/truffle/dsl/processor/parser/NodeParser.java @ 20942:a2e295c6cf7c
Truffle-DSL: fixed frame might be added twice for polymorphic signatures.
author | Christian Humer <christian.humer@gmail.com> |
---|---|
date | Tue, 14 Apr 2015 19:23:32 +0200 |
parents | 4f45e4d3361c |
children | a778fbcb8d8e |
line wrap: on
line diff
--- a/graal/com.oracle.truffle.dsl.processor/src/com/oracle/truffle/dsl/processor/parser/NodeParser.java Tue Apr 14 15:16:14 2015 +0200 +++ b/graal/com.oracle.truffle.dsl.processor/src/com/oracle/truffle/dsl/processor/parser/NodeParser.java Tue Apr 14 19:23:32 2015 +0200 @@ -1345,13 +1345,16 @@ } else { frameType = context.getType(Frame.class); } - types.add(new CodeVariableElement(frameType, "frameValue")); + types.add(new CodeVariableElement(frameType, TemplateMethod.FRAME_NAME)); } TypeMirror returnType = null; int index = 0; for (Parameter genericParameter : generic.getReturnTypeAndParameters()) { TypeMirror polymorphicType; + if (genericParameter.getLocalName().equals(TemplateMethod.FRAME_NAME)) { + continue; + } if (!genericParameter.getSpecification().isSignature()) { polymorphicType = genericParameter.getType(); } else { @@ -1377,7 +1380,11 @@ polymorphicType = context.getType(Object.class); } } else { - polymorphicType = context.getType(Object.class); + if (generic.getFrame() == genericParameter) { + polymorphicType = context.getType(Frame.class); + } else { + polymorphicType = context.getType(Object.class); + } } } if (genericParameter == generic.getReturnType()) {