Mercurial > hg > graal-jvmci-8
diff graal/com.oracle.truffle.dsl.processor/src/com/oracle/truffle/dsl/processor/node/NodeCodeGenerator.java @ 13535:e8ef44830b50
Truffle-DSL: fixed bugs due to previous cleanup. addtional cleanup.
author | Christian Humer <christian.humer@gmail.com> |
---|---|
date | Tue, 07 Jan 2014 22:06:37 +0100 |
parents | b466199f19e1 |
children | 419b3ea1bdd1 |
line wrap: on
line diff
--- a/graal/com.oracle.truffle.dsl.processor/src/com/oracle/truffle/dsl/processor/node/NodeCodeGenerator.java Tue Jan 07 20:21:17 2014 +0100 +++ b/graal/com.oracle.truffle.dsl.processor/src/com/oracle/truffle/dsl/processor/node/NodeCodeGenerator.java Tue Jan 07 22:06:37 2014 +0100 @@ -964,16 +964,16 @@ CodeTreeBuilder resetBuilder = builder.create(); for (ActualParameter param : getModel().getSignatureParameters()) { - NodeChildData child = param.getSpecification().getExecution().getChild(); + NodeExecutionData execution = param.getSpecification().getExecution(); CodeTreeBuilder access = builder.create(); - access.string("this.").string(child.getName()); - if (child.getCardinality().isMany()) { - access.string("[").string(String.valueOf(param.getSpecificationVarArgsIndex())).string("]"); + access.string("this.").string(execution.getChild().getName()); + if (execution.isIndexed()) { + access.string("[").string(String.valueOf(execution.getIndex())).string("]"); } String oldName = "old" + Utils.firstLetterUpperCase(param.getLocalName()); - oldBuilder.declaration(child.getNodeData().getNodeType(), oldName, access); + oldBuilder.declaration(execution.getChild().getNodeData().getNodeType(), oldName, access); nullBuilder.startStatement().tree(access.getRoot()).string(" = null").end(); resetBuilder.startStatement().tree(access.getRoot()).string(" = ").string(oldName).end(); } @@ -1111,7 +1111,7 @@ ExecutableTypeData sourceExecutableType = node.findExecutableType(polymorph.getReturnType().getTypeSystemType(), 0); boolean sourceThrowsUnexpected = sourceExecutableType != null && sourceExecutableType.hasUnexpectedValue(getContext()); - if (sourceExecutableType.getType().equals(node.getGenericSpecialization().getReturnType().getTypeSystemType())) { + if (sourceThrowsUnexpected && sourceExecutableType.getType().equals(node.getGenericSpecialization().getReturnType().getTypeSystemType())) { sourceThrowsUnexpected = false; } if (sourceThrowsUnexpected) {