31
31
public abstract class BasicObjectNodes {
32
32
33
33
@ CoreMethod (names = "!" )
34
- public abstract static class NotNode extends CoreMethodNode {
34
+ public abstract static class NotNode extends UnaryCoreMethodNode {
35
35
36
36
public NotNode (RubyContext context , SourceSection sourceSection ) {
37
37
super (context , sourceSection );
@@ -41,10 +41,8 @@ public NotNode(NotNode prev) {
41
41
super (prev );
42
42
}
43
43
44
- @ CreateCast ("arguments" ) public RubyNode [] createCast (RubyNode [] arguments ) {
45
- return new RubyNode [] {
46
- BooleanCastNodeFactory .create (getContext (), getSourceSection (), arguments [0 ])
47
- };
44
+ @ CreateCast ("operand" ) public RubyNode createCast (RubyNode operand ) {
45
+ return BooleanCastNodeFactory .create (getContext (), getSourceSection (), operand );
48
46
}
49
47
50
48
@ Specialization
@@ -149,7 +147,7 @@ protected boolean isSmallFixnum(long fixnum) {
149
147
}
150
148
151
149
@ CoreMethod (names = {"equal?" , "==" }, required = 1 )
152
- public abstract static class ReferenceEqualNode extends CoreMethodNode {
150
+ public abstract static class ReferenceEqualNode extends BinaryCoreMethodNode {
153
151
154
152
public ReferenceEqualNode (RubyContext context , SourceSection sourceSection ) {
155
153
super (context , sourceSection );
@@ -170,17 +168,17 @@ public ReferenceEqualNode(ReferenceEqualNode prev) {
170
168
return a == b ;
171
169
}
172
170
173
- @ Specialization (guards = {"isNotRubyBasicObject(arguments[0] )" , "isNotRubyBasicObject(arguments[1] )" , "notSameClass" })
171
+ @ Specialization (guards = {"isNotRubyBasicObject(left )" , "isNotRubyBasicObject(right )" , "notSameClass" })
174
172
public boolean equal (Object a , Object b ) {
175
173
return false ;
176
174
}
177
175
178
- @ Specialization (guards = "isNotRubyBasicObject(arguments[0] )" )
176
+ @ Specialization (guards = "isNotRubyBasicObject(left )" )
179
177
public boolean equal (Object a , RubyBasicObject b ) {
180
178
return false ;
181
179
}
182
180
183
- @ Specialization (guards = "isNotRubyBasicObject(arguments[1] )" )
181
+ @ Specialization (guards = "isNotRubyBasicObject(right )" )
184
182
public boolean equal (RubyBasicObject a , Object b ) {
185
183
return false ;
186
184
}
0 commit comments