Mercurial > hg > graal-compiler
diff graal/com.oracle.truffle.codegen.processor/src/com/oracle/truffle/codegen/processor/node/NodeCodeGenerator.java @ 7859:3c68170fc9b0
Fixed a visibility bug in NodeFactory generation.
author | Christian Humer <christian.humer@gmail.com> |
---|---|
date | Mon, 25 Feb 2013 17:00:52 +0100 |
parents | 4958cbdbf360 |
children | 6b74ffe38183 |
line wrap: on
line diff
--- a/graal/com.oracle.truffle.codegen.processor/src/com/oracle/truffle/codegen/processor/node/NodeCodeGenerator.java Mon Feb 25 14:22:18 2013 +0100 +++ b/graal/com.oracle.truffle.codegen.processor/src/com/oracle/truffle/codegen/processor/node/NodeCodeGenerator.java Mon Feb 25 17:00:52 2013 +0100 @@ -511,8 +511,8 @@ TypeMirror nodeFactory = getContext().getEnvironment().getTypeUtils().getDeclaredType(Utils.fromTypeMirror(getContext().getType(NodeFactory.class)), node.getNodeType()); clazz.getImplements().add(nodeFactory); - clazz.add(createCreateNodeMethod(node, createVisibility)); - clazz.add(createCreateNodeSpecializedMethod(node, createVisibility)); + clazz.add(createCreateNodeMethod(node)); + clazz.add(createCreateNodeSpecializedMethod(node)); clazz.add(createGetNodeClassMethod(node)); clazz.add(createGetNodeSignaturesMethod(node)); clazz.add(createGetInstanceMethod(node, createVisibility)); @@ -580,16 +580,12 @@ return method; } - private CodeExecutableElement createCreateNodeMethod(NodeData node, Modifier visibility) { - CodeExecutableElement method = new CodeExecutableElement(modifiers(), node.getNodeType(), "createNode"); + private CodeExecutableElement createCreateNodeMethod(NodeData node) { + CodeExecutableElement method = new CodeExecutableElement(modifiers(PUBLIC), node.getNodeType(), "createNode"); CodeVariableElement arguments = new CodeVariableElement(getContext().getType(Object.class), "arguments"); method.setVarArgs(true); method.addParameter(arguments); - if (visibility != null) { - method.getModifiers().add(visibility); - } - CodeTreeBuilder builder = method.createBuilder(); List<ExecutableElement> signatures = findUserConstructors(node); boolean ifStarted = false; @@ -636,16 +632,13 @@ return method; } - private CodeExecutableElement createCreateNodeSpecializedMethod(NodeData node, Modifier visibility) { - CodeExecutableElement method = new CodeExecutableElement(modifiers(), node.getNodeType(), "createNodeSpecialized"); + private CodeExecutableElement createCreateNodeSpecializedMethod(NodeData node) { + CodeExecutableElement method = new CodeExecutableElement(modifiers(PUBLIC), node.getNodeType(), "createNodeSpecialized"); CodeVariableElement nodeParam = new CodeVariableElement(node.getNodeType(), "thisNode"); CodeVariableElement arguments = new CodeVariableElement(getContext().getType(Class.class), "types"); method.addParameter(nodeParam); method.addParameter(arguments); method.setVarArgs(true); - if (visibility != null) { - method.getModifiers().add(visibility); - } CodeTreeBuilder builder = method.createBuilder(); if (!node.needsRewrites(getContext())) {