Mercurial > hg > graal-jvmci-8
comparison graal/com.oracle.truffle.api.dsl.test/src/com/oracle/truffle/api/dsl/test/NodeFieldTest.java @ 16756:5148aab962af
Truffle-DSL: updated tests for the new generation layout.
author | Christian Humer <christian.humer@gmail.com> |
---|---|
date | Mon, 11 Aug 2014 15:53:05 +0200 |
parents | 5a0c694ef735 |
children | 476374f3fe9a |
comparison
equal
deleted
inserted
replaced
16755:bd28da642eea | 16756:5148aab962af |
---|---|
115 @NodeField(name = "field", type = String.class) | 115 @NodeField(name = "field", type = String.class) |
116 abstract static class RewriteTestNode extends ValueNode { | 116 abstract static class RewriteTestNode extends ValueNode { |
117 | 117 |
118 public abstract String getField(); | 118 public abstract String getField(); |
119 | 119 |
120 @Specialization(order = 1, rewriteOn = RuntimeException.class) | 120 @Specialization(rewriteOn = RuntimeException.class) |
121 String alwaysRewrite() { | 121 String alwaysRewrite() { |
122 throw new RuntimeException(); | 122 throw new RuntimeException(); |
123 } | 123 } |
124 | 124 |
125 @Specialization(order = 2) | 125 @Specialization(contains = "alwaysRewrite") |
126 String returnField() { | 126 String returnField() { |
127 return getField(); | 127 return getField(); |
128 } | 128 } |
129 } | 129 } |
130 | 130 |