Mercurial > hg > graal-compiler
comparison graal/com.oracle.truffle.api.test/src/com/oracle/truffle/api/test/ArgumentsTest.java @ 11903:df1d665ca846
Truffle; remove uses of Node() constructor in test code
author | Michael Van De Vanter <michael.van.de.vanter@oracle.com> |
---|---|
date | Sun, 06 Oct 2013 19:53:00 -0700 |
parents | e162d9e32830 |
children | a08b8694f556 |
comparison
equal
deleted
inserted
replaced
11901:61767ccd4600 | 11903:df1d665ca846 |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. | 2 * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. | 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * | 4 * |
5 * This code is free software; you can redistribute it and/or modify it | 5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as | 6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. | 7 * published by the Free Software Foundation. |
73 class TestRootNode extends RootNode { | 73 class TestRootNode extends RootNode { |
74 | 74 |
75 @Children private TestArgumentNode[] children; | 75 @Children private TestArgumentNode[] children; |
76 | 76 |
77 TestRootNode(TestArgumentNode[] children) { | 77 TestRootNode(TestArgumentNode[] children) { |
78 super(null); | |
78 this.children = adoptChildren(children); | 79 this.children = adoptChildren(children); |
79 } | 80 } |
80 | 81 |
81 @Override | 82 @Override |
82 public Object execute(VirtualFrame frame) { | 83 public Object execute(VirtualFrame frame) { |
91 class TestArgumentNode extends Node { | 92 class TestArgumentNode extends Node { |
92 | 93 |
93 private final int index; | 94 private final int index; |
94 | 95 |
95 TestArgumentNode(int index) { | 96 TestArgumentNode(int index) { |
97 super(null); | |
96 this.index = index; | 98 this.index = index; |
97 } | 99 } |
98 | 100 |
99 int execute(VirtualFrame frame) { | 101 int execute(VirtualFrame frame) { |
100 return frame.getArguments(TestArguments.class).values[index]; | 102 return frame.getArguments(TestArguments.class).values[index]; |