Mercurial > hg > graal-compiler
comparison graal/com.oracle.truffle.codegen.processor/src/com/oracle/truffle/codegen/processor/node/NodeCodeGenerator.java @ 9258:07f8d136a05e
Truffle API changes for the Frame API. Introduction of Assumptions class.
author | Thomas Wuerthinger <thomas.wuerthinger@oracle.com> |
---|---|
date | Tue, 23 Apr 2013 15:34:06 +0200 |
parents | ee3a9188c65e |
children | fe5bc02fcd19 |
comparison
equal
deleted
inserted
replaced
9257:542712a4732a | 9258:07f8d136a05e |
---|---|
674 | 674 |
675 return method; | 675 return method; |
676 } | 676 } |
677 | 677 |
678 private CodeVariableElement createChildField(NodeChildData child) { | 678 private CodeVariableElement createChildField(NodeChildData child) { |
679 CodeVariableElement var = new CodeVariableElement(child.getNodeType(), child.getName()); | |
680 var.getModifiers().add(Modifier.PROTECTED); | |
681 | |
679 DeclaredType annotationType; | 682 DeclaredType annotationType; |
680 if (child.getCardinality() == Cardinality.MANY) { | 683 if (child.getCardinality() == Cardinality.MANY) { |
684 var.getModifiers().add(Modifier.FINAL); | |
681 annotationType = getContext().getTruffleTypes().getChildrenAnnotation(); | 685 annotationType = getContext().getTruffleTypes().getChildrenAnnotation(); |
682 } else { | 686 } else { |
683 annotationType = getContext().getTruffleTypes().getChildAnnotation(); | 687 annotationType = getContext().getTruffleTypes().getChildAnnotation(); |
684 } | 688 } |
685 | 689 |
686 CodeVariableElement var = new CodeVariableElement(child.getNodeType(), child.getName()); | |
687 var.getModifiers().add(Modifier.PROTECTED); | |
688 var.getAnnotationMirrors().add(new CodeAnnotationMirror(annotationType)); | 690 var.getAnnotationMirrors().add(new CodeAnnotationMirror(annotationType)); |
689 return var; | 691 return var; |
690 } | 692 } |
691 } | 693 } |
692 | 694 |
1496 builder.end(); // call replace, call specialize | 1498 builder.end(); // call replace, call specialize |
1497 } else { | 1499 } else { |
1498 builder.startCall(factoryClassName(node), "createSpecialized").string("this").string("null").end(); | 1500 builder.startCall(factoryClassName(node), "createSpecialized").string("this").string("null").end(); |
1499 } | 1501 } |
1500 builder.end().end(); | 1502 builder.end().end(); |
1503 emitSpecializationListeners(builder, node); | |
1501 return builder.getRoot(); | 1504 return builder.getRoot(); |
1502 } | 1505 } |
1503 | 1506 |
1504 private CodeTree createExecute(CodeTreeBuilder parent, ExecutableTypeData executable, SpecializationData specialization) { | 1507 private CodeTree createExecute(CodeTreeBuilder parent, ExecutableTypeData executable, SpecializationData specialization) { |
1505 NodeData node = specialization.getNode(); | 1508 NodeData node = specialization.getNode(); |