File tree Expand file tree Collapse file tree 1 file changed +11
-15
lines changed
src/vm/jvm/runtime/org/perl6/nqp/truffle/nodes/sixmodel Expand file tree Collapse file tree 1 file changed +11
-15
lines changed Original file line number Diff line number Diff line change 5
5
import org .perl6 .nqp .truffle .runtime .NQPNull ;
6
6
import org .perl6 .nqp .truffle .nodes .NQPObjNode ;
7
7
import org .perl6 .nqp .truffle .sixmodel .TypeObject ;
8
+ import com .oracle .truffle .api .dsl .NodeChild ;
9
+ import com .oracle .truffle .api .dsl .NodeChildren ;
10
+ import com .oracle .truffle .api .dsl .Specialization ;
8
11
import org .perl6 .nqp .dsl .Deserializer ;
9
12
10
13
@ NodeInfo (shortName = "who" )
11
- public final class NQPWhoNode extends NQPObjNode {
12
- @ Child private NQPNode argNode ;
13
-
14
- @ Deserializer
15
- public NQPWhoNode (NQPNode argNode ) {
16
- this .argNode = argNode ;
14
+ @ NodeChildren ({@ NodeChild (value ="valueNode" , type =NQPNode .class )})
15
+ public class NQPWhoNode extends NQPObjNode {
16
+ @ Specialization
17
+ public Object doTypeObject (TypeObject typeObject ) {
18
+ return typeObject .stable .who ;
17
19
}
18
20
19
- @ Override
20
- public Object execute (VirtualFrame frame ) {
21
- Object object = argNode .execute (frame );
22
- System .out .println ("who: " + object );
23
- //return ((TypeObject) object).stable;
24
-
25
- return NQPNull .SINGLETON ;
26
-
27
- //return who(argNode.execute(frame));
21
+ @ Deserializer ("who" )
22
+ public static NQPWhoNode deserialize (NQPNode valueNode ) {
23
+ return NQPWhoNodeGen .create (valueNode );
28
24
}
29
25
}
You can’t perform that action at this time.
0 commit comments