comparison graal/com.oracle.truffle.api.codegen.test/src/com/oracle/truffle/api/codegen/test/TypeSystemTest.java @ 9287:8e3a1635cc9e

Implemented @NodeChild(executeWith={...}).
author Christian Humer <christian.humer@gmail.com>
date Wed, 24 Apr 2013 21:50:03 +0200
parents 5f7f0d3e3638
children e162d9e32830
comparison
equal deleted inserted replaced
9286:39f08ef7b5d8 9287:8e3a1635cc9e
99 99
100 } 100 }
101 101
102 public static class ArgumentNode extends ValueNode { 102 public static class ArgumentNode extends ValueNode {
103 103
104 private int invocationCount;
104 final int index; 105 final int index;
105 106
106 public ArgumentNode(int index) { 107 public ArgumentNode(int index) {
107 this.index = index; 108 this.index = index;
108 } 109 }
109 110
111 public int getInvocationCount() {
112 return invocationCount;
113 }
114
110 @Override 115 @Override
111 public Object execute(VirtualFrame frame) { 116 public Object execute(VirtualFrame frame) {
117 invocationCount++;
112 return ((TestArguments) frame.getArguments()).get(index); 118 return ((TestArguments) frame.getArguments()).get(index);
113 } 119 }
114 120
115 } 121 }
116 122