@@ -29,15 +29,12 @@ public abstract class ObjectPrimitiveNodes {
29
29
@ RubiniusPrimitive (name = "object_id" )
30
30
public abstract static class ObjectIDPrimitiveNode extends RubiniusPrimitiveNode {
31
31
32
- @ Child private FixnumOrBignumNode fixnumOrBignum ;
33
-
34
32
public ObjectIDPrimitiveNode (RubyContext context , SourceSection sourceSection ) {
35
33
super (context , sourceSection );
36
34
}
37
35
38
36
public ObjectIDPrimitiveNode (ObjectIDPrimitiveNode prev ) {
39
37
super (prev );
40
- fixnumOrBignum = prev .fixnumOrBignum ;
41
38
}
42
39
43
40
public abstract Object executeObjectID (VirtualFrame frame , Object value );
@@ -83,23 +80,13 @@ public Object objectID(long value) {
83
80
if (isSmallFixnum (value )) {
84
81
return ObjectIDOperations .smallFixnumToID (value );
85
82
} else {
86
- if (fixnumOrBignum == null ) {
87
- CompilerDirectives .transferToInterpreter ();
88
- fixnumOrBignum = insert (new FixnumOrBignumNode (getContext (), getSourceSection ()));
89
- }
90
-
91
- return fixnumOrBignum .fixnumOrBignum (ObjectIDOperations .largeFixnumToID (value ));
83
+ return ObjectIDOperations .largeFixnumToID (getContext (), value );
92
84
}
93
85
}
94
86
95
87
@ Specialization
96
88
public Object objectID (double value ) {
97
- if (fixnumOrBignum == null ) {
98
- CompilerDirectives .transferToInterpreter ();
99
- fixnumOrBignum = insert (new FixnumOrBignumNode (getContext (), getSourceSection ()));
100
- }
101
-
102
- return fixnumOrBignum .fixnumOrBignum (ObjectIDOperations .floatToID (value ));
89
+ return ObjectIDOperations .floatToID (getContext (), value );
103
90
}
104
91
105
92
@ Specialization
0 commit comments