Mercurial > hg > graal-compiler
comparison graal/com.oracle.graal.word/src/com/oracle/graal/word/nodes/SnippetLocationNode.java @ 16895:06c15e88d383
added factory method to all Node classes; replaced Node classes instantiation with calls to factory methods; replaced identity tests on Node classes with ' == <node class>.getGenClass()' idiom
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Mon, 18 Aug 2014 14:04:21 +0200 |
parents | cbd42807a31f |
children | f90dcdbbb75e |
comparison
equal
deleted
inserted
replaced
16894:cc7aaa92c27d | 16895:06c15e88d383 |
---|---|
54 @Input private ValueNode index; | 54 @Input private ValueNode index; |
55 @Input private ValueNode indexScaling; | 55 @Input private ValueNode indexScaling; |
56 | 56 |
57 public static SnippetLocationNode create(SnippetReflectionProvider snippetReflection, ValueNode identity, ValueNode kind, ValueNode displacement, ValueNode index, ValueNode indexScaling, | 57 public static SnippetLocationNode create(SnippetReflectionProvider snippetReflection, ValueNode identity, ValueNode kind, ValueNode displacement, ValueNode index, ValueNode indexScaling, |
58 Graph graph) { | 58 Graph graph) { |
59 return graph.unique(new SnippetLocationNode(snippetReflection, identity, kind, displacement, index, indexScaling)); | 59 return graph.unique(SnippetLocationNode.create(snippetReflection, identity, kind, displacement, index, indexScaling)); |
60 } | |
61 | |
62 public static SnippetLocationNode create(SnippetReflectionProvider snippetReflection, ValueNode locationIdentity, ValueNode kind, ValueNode displacement) { | |
63 return new SnippetLocationNodeGen(snippetReflection, locationIdentity, kind, displacement); | |
60 } | 64 } |
61 | 65 |
62 SnippetLocationNode(@InjectedNodeParameter SnippetReflectionProvider snippetReflection, ValueNode locationIdentity, ValueNode kind, ValueNode displacement) { | 66 SnippetLocationNode(@InjectedNodeParameter SnippetReflectionProvider snippetReflection, ValueNode locationIdentity, ValueNode kind, ValueNode displacement) { |
63 this(snippetReflection, locationIdentity, kind, displacement, null, null); | 67 this(snippetReflection, locationIdentity, kind, displacement, null, null); |
68 } | |
69 | |
70 public static SnippetLocationNode create(SnippetReflectionProvider snippetReflection, ValueNode locationIdentity, ValueNode kind, ValueNode displacement, ValueNode index, ValueNode indexScaling) { | |
71 return new SnippetLocationNodeGen(snippetReflection, locationIdentity, kind, displacement, index, indexScaling); | |
64 } | 72 } |
65 | 73 |
66 SnippetLocationNode(@InjectedNodeParameter SnippetReflectionProvider snippetReflection, ValueNode locationIdentity, ValueNode kind, ValueNode displacement, ValueNode index, ValueNode indexScaling) { | 74 SnippetLocationNode(@InjectedNodeParameter SnippetReflectionProvider snippetReflection, ValueNode locationIdentity, ValueNode kind, ValueNode displacement, ValueNode index, ValueNode indexScaling) { |
67 super(StampFactory.object()); | 75 super(StampFactory.object()); |
68 this.snippetReflection = snippetReflection; | 76 this.snippetReflection = snippetReflection; |