Mercurial > hg > graal-compiler
annotate graal/com.oracle.truffle.api.dsl.test/src/com/oracle/truffle/api/dsl/test/NodeChildNoNameTest.java @ 20934:033dd4494705
Fix compare in LoweringPhase.processBlock
author | Stefan Anzinger <stefan.anzinger@oracle.com> |
---|---|
date | Tue, 14 Apr 2015 17:23:37 +0200 |
parents | 0f5ff66a949d |
children |
rev | line source |
---|---|
11183
0f5ff66a949d
Truffle-DSL: Fixed a bug with anonymous children (GRAAL-321 #resolve)
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
1 /* |
0f5ff66a949d
Truffle-DSL: Fixed a bug with anonymous children (GRAAL-321 #resolve)
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
2 * Copyright (c) 2012, 2012, Oracle and/or its affiliates. All rights reserved. |
0f5ff66a949d
Truffle-DSL: Fixed a bug with anonymous children (GRAAL-321 #resolve)
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
0f5ff66a949d
Truffle-DSL: Fixed a bug with anonymous children (GRAAL-321 #resolve)
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
4 * |
0f5ff66a949d
Truffle-DSL: Fixed a bug with anonymous children (GRAAL-321 #resolve)
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
5 * This code is free software; you can redistribute it and/or modify it |
0f5ff66a949d
Truffle-DSL: Fixed a bug with anonymous children (GRAAL-321 #resolve)
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
6 * under the terms of the GNU General Public License version 2 only, as |
0f5ff66a949d
Truffle-DSL: Fixed a bug with anonymous children (GRAAL-321 #resolve)
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
7 * published by the Free Software Foundation. |
0f5ff66a949d
Truffle-DSL: Fixed a bug with anonymous children (GRAAL-321 #resolve)
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
8 * |
0f5ff66a949d
Truffle-DSL: Fixed a bug with anonymous children (GRAAL-321 #resolve)
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
9 * This code is distributed in the hope that it will be useful, but WITHOUT |
0f5ff66a949d
Truffle-DSL: Fixed a bug with anonymous children (GRAAL-321 #resolve)
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
0f5ff66a949d
Truffle-DSL: Fixed a bug with anonymous children (GRAAL-321 #resolve)
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
0f5ff66a949d
Truffle-DSL: Fixed a bug with anonymous children (GRAAL-321 #resolve)
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
12 * version 2 for more details (a copy is included in the LICENSE file that |
0f5ff66a949d
Truffle-DSL: Fixed a bug with anonymous children (GRAAL-321 #resolve)
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
13 * accompanied this code). |
0f5ff66a949d
Truffle-DSL: Fixed a bug with anonymous children (GRAAL-321 #resolve)
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
14 * |
0f5ff66a949d
Truffle-DSL: Fixed a bug with anonymous children (GRAAL-321 #resolve)
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
15 * You should have received a copy of the GNU General Public License version |
0f5ff66a949d
Truffle-DSL: Fixed a bug with anonymous children (GRAAL-321 #resolve)
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
16 * 2 along with this work; if not, write to the Free Software Foundation, |
0f5ff66a949d
Truffle-DSL: Fixed a bug with anonymous children (GRAAL-321 #resolve)
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
0f5ff66a949d
Truffle-DSL: Fixed a bug with anonymous children (GRAAL-321 #resolve)
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
18 * |
0f5ff66a949d
Truffle-DSL: Fixed a bug with anonymous children (GRAAL-321 #resolve)
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
0f5ff66a949d
Truffle-DSL: Fixed a bug with anonymous children (GRAAL-321 #resolve)
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
20 * or visit www.oracle.com if you need additional information or have any |
0f5ff66a949d
Truffle-DSL: Fixed a bug with anonymous children (GRAAL-321 #resolve)
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
21 * questions. |
0f5ff66a949d
Truffle-DSL: Fixed a bug with anonymous children (GRAAL-321 #resolve)
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
22 */ |
0f5ff66a949d
Truffle-DSL: Fixed a bug with anonymous children (GRAAL-321 #resolve)
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
23 package com.oracle.truffle.api.dsl.test; |
0f5ff66a949d
Truffle-DSL: Fixed a bug with anonymous children (GRAAL-321 #resolve)
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
24 |
0f5ff66a949d
Truffle-DSL: Fixed a bug with anonymous children (GRAAL-321 #resolve)
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
25 import org.junit.*; |
0f5ff66a949d
Truffle-DSL: Fixed a bug with anonymous children (GRAAL-321 #resolve)
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
26 |
0f5ff66a949d
Truffle-DSL: Fixed a bug with anonymous children (GRAAL-321 #resolve)
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
27 import com.oracle.truffle.api.dsl.*; |
0f5ff66a949d
Truffle-DSL: Fixed a bug with anonymous children (GRAAL-321 #resolve)
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
28 import com.oracle.truffle.api.dsl.test.NodeChildNoNameTestFactory.OneArgNoNameFactory; |
0f5ff66a949d
Truffle-DSL: Fixed a bug with anonymous children (GRAAL-321 #resolve)
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
29 import com.oracle.truffle.api.dsl.test.NodeChildNoNameTestFactory.ThreeArgsNoNameFactory; |
0f5ff66a949d
Truffle-DSL: Fixed a bug with anonymous children (GRAAL-321 #resolve)
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
30 import com.oracle.truffle.api.dsl.test.NodeChildNoNameTestFactory.TwoArgsNoNameFactory; |
0f5ff66a949d
Truffle-DSL: Fixed a bug with anonymous children (GRAAL-321 #resolve)
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
31 import com.oracle.truffle.api.dsl.test.TypeSystemTest.ValueNode; |
0f5ff66a949d
Truffle-DSL: Fixed a bug with anonymous children (GRAAL-321 #resolve)
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
32 import com.oracle.truffle.api.frame.*; |
0f5ff66a949d
Truffle-DSL: Fixed a bug with anonymous children (GRAAL-321 #resolve)
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
33 |
0f5ff66a949d
Truffle-DSL: Fixed a bug with anonymous children (GRAAL-321 #resolve)
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
34 public class NodeChildNoNameTest { |
0f5ff66a949d
Truffle-DSL: Fixed a bug with anonymous children (GRAAL-321 #resolve)
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
35 |
0f5ff66a949d
Truffle-DSL: Fixed a bug with anonymous children (GRAAL-321 #resolve)
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
36 @Test |
0f5ff66a949d
Truffle-DSL: Fixed a bug with anonymous children (GRAAL-321 #resolve)
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
37 public void testOneArg() { |
0f5ff66a949d
Truffle-DSL: Fixed a bug with anonymous children (GRAAL-321 #resolve)
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
38 ValueNode node = new ConstantNode(); |
0f5ff66a949d
Truffle-DSL: Fixed a bug with anonymous children (GRAAL-321 #resolve)
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
39 OneArgNoName arg = OneArgNoNameFactory.create(node); |
0f5ff66a949d
Truffle-DSL: Fixed a bug with anonymous children (GRAAL-321 #resolve)
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
40 Assert.assertEquals(node, arg.getChild0()); |
0f5ff66a949d
Truffle-DSL: Fixed a bug with anonymous children (GRAAL-321 #resolve)
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
41 Assert.assertEquals(43, TestHelper.createCallTarget(arg).call()); |
0f5ff66a949d
Truffle-DSL: Fixed a bug with anonymous children (GRAAL-321 #resolve)
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
42 } |
0f5ff66a949d
Truffle-DSL: Fixed a bug with anonymous children (GRAAL-321 #resolve)
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
43 |
0f5ff66a949d
Truffle-DSL: Fixed a bug with anonymous children (GRAAL-321 #resolve)
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
44 @Test |
0f5ff66a949d
Truffle-DSL: Fixed a bug with anonymous children (GRAAL-321 #resolve)
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
45 public void testTwoArg() { |
0f5ff66a949d
Truffle-DSL: Fixed a bug with anonymous children (GRAAL-321 #resolve)
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
46 ValueNode node1 = new ConstantNode(); |
0f5ff66a949d
Truffle-DSL: Fixed a bug with anonymous children (GRAAL-321 #resolve)
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
47 ValueNode node2 = new ConstantNode(); |
0f5ff66a949d
Truffle-DSL: Fixed a bug with anonymous children (GRAAL-321 #resolve)
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
48 TwoArgsNoName arg = TwoArgsNoNameFactory.create(node1, node2); |
0f5ff66a949d
Truffle-DSL: Fixed a bug with anonymous children (GRAAL-321 #resolve)
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
49 Assert.assertEquals(node1, arg.getChild0()); |
0f5ff66a949d
Truffle-DSL: Fixed a bug with anonymous children (GRAAL-321 #resolve)
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
50 Assert.assertEquals(node2, arg.getChild1()); |
0f5ff66a949d
Truffle-DSL: Fixed a bug with anonymous children (GRAAL-321 #resolve)
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
51 Assert.assertEquals(84, TestHelper.createCallTarget(arg).call()); |
0f5ff66a949d
Truffle-DSL: Fixed a bug with anonymous children (GRAAL-321 #resolve)
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
52 } |
0f5ff66a949d
Truffle-DSL: Fixed a bug with anonymous children (GRAAL-321 #resolve)
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
53 |
0f5ff66a949d
Truffle-DSL: Fixed a bug with anonymous children (GRAAL-321 #resolve)
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
54 @Test |
0f5ff66a949d
Truffle-DSL: Fixed a bug with anonymous children (GRAAL-321 #resolve)
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
55 public void testThreeArg() { |
0f5ff66a949d
Truffle-DSL: Fixed a bug with anonymous children (GRAAL-321 #resolve)
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
56 ValueNode node1 = new ConstantNode(); |
0f5ff66a949d
Truffle-DSL: Fixed a bug with anonymous children (GRAAL-321 #resolve)
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
57 ValueNode node2 = new ConstantNode(); |
0f5ff66a949d
Truffle-DSL: Fixed a bug with anonymous children (GRAAL-321 #resolve)
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
58 ValueNode node3 = new ConstantNode(); |
0f5ff66a949d
Truffle-DSL: Fixed a bug with anonymous children (GRAAL-321 #resolve)
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
59 ThreeArgsNoName arg = ThreeArgsNoNameFactory.create(node1, node2, node3); |
0f5ff66a949d
Truffle-DSL: Fixed a bug with anonymous children (GRAAL-321 #resolve)
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
60 Assert.assertEquals(node1, arg.getChild0()); |
0f5ff66a949d
Truffle-DSL: Fixed a bug with anonymous children (GRAAL-321 #resolve)
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
61 Assert.assertEquals(node2, arg.getChild1()); |
0f5ff66a949d
Truffle-DSL: Fixed a bug with anonymous children (GRAAL-321 #resolve)
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
62 Assert.assertEquals(node3, arg.getChild2()); |
0f5ff66a949d
Truffle-DSL: Fixed a bug with anonymous children (GRAAL-321 #resolve)
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
63 Assert.assertEquals(126, TestHelper.createCallTarget(arg).call()); |
0f5ff66a949d
Truffle-DSL: Fixed a bug with anonymous children (GRAAL-321 #resolve)
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
64 } |
0f5ff66a949d
Truffle-DSL: Fixed a bug with anonymous children (GRAAL-321 #resolve)
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
65 |
0f5ff66a949d
Truffle-DSL: Fixed a bug with anonymous children (GRAAL-321 #resolve)
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
66 private static class ConstantNode extends ValueNode { |
0f5ff66a949d
Truffle-DSL: Fixed a bug with anonymous children (GRAAL-321 #resolve)
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
67 |
0f5ff66a949d
Truffle-DSL: Fixed a bug with anonymous children (GRAAL-321 #resolve)
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
68 @Override |
0f5ff66a949d
Truffle-DSL: Fixed a bug with anonymous children (GRAAL-321 #resolve)
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
69 public Object execute(VirtualFrame frame) { |
0f5ff66a949d
Truffle-DSL: Fixed a bug with anonymous children (GRAAL-321 #resolve)
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
70 return 42; |
0f5ff66a949d
Truffle-DSL: Fixed a bug with anonymous children (GRAAL-321 #resolve)
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
71 } |
0f5ff66a949d
Truffle-DSL: Fixed a bug with anonymous children (GRAAL-321 #resolve)
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
72 } |
0f5ff66a949d
Truffle-DSL: Fixed a bug with anonymous children (GRAAL-321 #resolve)
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
73 |
0f5ff66a949d
Truffle-DSL: Fixed a bug with anonymous children (GRAAL-321 #resolve)
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
74 @NodeChild |
0f5ff66a949d
Truffle-DSL: Fixed a bug with anonymous children (GRAAL-321 #resolve)
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
75 abstract static class OneArgNoName extends ValueNode { |
0f5ff66a949d
Truffle-DSL: Fixed a bug with anonymous children (GRAAL-321 #resolve)
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
76 |
0f5ff66a949d
Truffle-DSL: Fixed a bug with anonymous children (GRAAL-321 #resolve)
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
77 public abstract ValueNode getChild0(); |
0f5ff66a949d
Truffle-DSL: Fixed a bug with anonymous children (GRAAL-321 #resolve)
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
78 |
0f5ff66a949d
Truffle-DSL: Fixed a bug with anonymous children (GRAAL-321 #resolve)
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
79 @Specialization |
0f5ff66a949d
Truffle-DSL: Fixed a bug with anonymous children (GRAAL-321 #resolve)
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
80 int doIt(int exp) { |
0f5ff66a949d
Truffle-DSL: Fixed a bug with anonymous children (GRAAL-321 #resolve)
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
81 return exp + 1; |
0f5ff66a949d
Truffle-DSL: Fixed a bug with anonymous children (GRAAL-321 #resolve)
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
82 } |
0f5ff66a949d
Truffle-DSL: Fixed a bug with anonymous children (GRAAL-321 #resolve)
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
83 |
0f5ff66a949d
Truffle-DSL: Fixed a bug with anonymous children (GRAAL-321 #resolve)
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
84 } |
0f5ff66a949d
Truffle-DSL: Fixed a bug with anonymous children (GRAAL-321 #resolve)
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
85 |
0f5ff66a949d
Truffle-DSL: Fixed a bug with anonymous children (GRAAL-321 #resolve)
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
86 @NodeChildren({@NodeChild, @NodeChild}) |
0f5ff66a949d
Truffle-DSL: Fixed a bug with anonymous children (GRAAL-321 #resolve)
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
87 abstract static class TwoArgsNoName extends ValueNode { |
0f5ff66a949d
Truffle-DSL: Fixed a bug with anonymous children (GRAAL-321 #resolve)
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
88 |
0f5ff66a949d
Truffle-DSL: Fixed a bug with anonymous children (GRAAL-321 #resolve)
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
89 public abstract ValueNode getChild0(); |
0f5ff66a949d
Truffle-DSL: Fixed a bug with anonymous children (GRAAL-321 #resolve)
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
90 |
0f5ff66a949d
Truffle-DSL: Fixed a bug with anonymous children (GRAAL-321 #resolve)
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
91 public abstract ValueNode getChild1(); |
0f5ff66a949d
Truffle-DSL: Fixed a bug with anonymous children (GRAAL-321 #resolve)
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
92 |
0f5ff66a949d
Truffle-DSL: Fixed a bug with anonymous children (GRAAL-321 #resolve)
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
93 @Specialization |
0f5ff66a949d
Truffle-DSL: Fixed a bug with anonymous children (GRAAL-321 #resolve)
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
94 int doIt(int exp0, int exp1) { |
0f5ff66a949d
Truffle-DSL: Fixed a bug with anonymous children (GRAAL-321 #resolve)
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
95 return exp0 + exp1; |
0f5ff66a949d
Truffle-DSL: Fixed a bug with anonymous children (GRAAL-321 #resolve)
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
96 } |
0f5ff66a949d
Truffle-DSL: Fixed a bug with anonymous children (GRAAL-321 #resolve)
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
97 } |
0f5ff66a949d
Truffle-DSL: Fixed a bug with anonymous children (GRAAL-321 #resolve)
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
98 |
0f5ff66a949d
Truffle-DSL: Fixed a bug with anonymous children (GRAAL-321 #resolve)
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
99 @NodeChildren({@NodeChild, @NodeChild, @NodeChild}) |
0f5ff66a949d
Truffle-DSL: Fixed a bug with anonymous children (GRAAL-321 #resolve)
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
100 abstract static class ThreeArgsNoName extends ValueNode { |
0f5ff66a949d
Truffle-DSL: Fixed a bug with anonymous children (GRAAL-321 #resolve)
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
101 |
0f5ff66a949d
Truffle-DSL: Fixed a bug with anonymous children (GRAAL-321 #resolve)
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
102 public abstract ValueNode getChild0(); |
0f5ff66a949d
Truffle-DSL: Fixed a bug with anonymous children (GRAAL-321 #resolve)
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
103 |
0f5ff66a949d
Truffle-DSL: Fixed a bug with anonymous children (GRAAL-321 #resolve)
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
104 public abstract ValueNode getChild1(); |
0f5ff66a949d
Truffle-DSL: Fixed a bug with anonymous children (GRAAL-321 #resolve)
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
105 |
0f5ff66a949d
Truffle-DSL: Fixed a bug with anonymous children (GRAAL-321 #resolve)
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
106 public abstract ValueNode getChild2(); |
0f5ff66a949d
Truffle-DSL: Fixed a bug with anonymous children (GRAAL-321 #resolve)
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
107 |
0f5ff66a949d
Truffle-DSL: Fixed a bug with anonymous children (GRAAL-321 #resolve)
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
108 @Specialization |
0f5ff66a949d
Truffle-DSL: Fixed a bug with anonymous children (GRAAL-321 #resolve)
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
109 int doIt(int exp0, int exp1, int exp2) { |
0f5ff66a949d
Truffle-DSL: Fixed a bug with anonymous children (GRAAL-321 #resolve)
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
110 return exp0 + exp1 + exp2; |
0f5ff66a949d
Truffle-DSL: Fixed a bug with anonymous children (GRAAL-321 #resolve)
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
111 } |
0f5ff66a949d
Truffle-DSL: Fixed a bug with anonymous children (GRAAL-321 #resolve)
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
112 } |
0f5ff66a949d
Truffle-DSL: Fixed a bug with anonymous children (GRAAL-321 #resolve)
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
113 |
0f5ff66a949d
Truffle-DSL: Fixed a bug with anonymous children (GRAAL-321 #resolve)
Christian Humer <christian.humer@gmail.com>
parents:
diff
changeset
|
114 } |