comparison graal/com.oracle.truffle.api.test/src/com/oracle/truffle/api/test/ReturnTypeSpecializationTest.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 269e6794e1ec
children 139b84d713bc
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.
60 60
61 @Child TestChildNode left; 61 @Child TestChildNode left;
62 @Child TestChildNode right; 62 @Child TestChildNode right;
63 63
64 public TestRootNode(TestChildNode left, TestChildNode right) { 64 public TestRootNode(TestChildNode left, TestChildNode right) {
65 super(null);
65 this.left = adoptChild(left); 66 this.left = adoptChild(left);
66 this.right = adoptChild(right); 67 this.right = adoptChild(right);
67 } 68 }
68 69
69 @Override 70 @Override
72 return right.execute(frame); 73 return right.execute(frame);
73 } 74 }
74 } 75 }
75 76
76 abstract class TestChildNode extends Node { 77 abstract class TestChildNode extends Node {
78
79 public TestChildNode() {
80 super(null);
81 }
77 82
78 abstract Object execute(VirtualFrame frame); 83 abstract Object execute(VirtualFrame frame);
79 84
80 int executeInt(VirtualFrame frame) throws UnexpectedResultException { 85 int executeInt(VirtualFrame frame) throws UnexpectedResultException {
81 Object result = execute(frame); 86 Object result = execute(frame);