@@ -108,7 +108,7 @@ protected boolean equal(AbstractTruffleString a, RubyEncoding encA, TruffleStrin
108
108
@ Cached EncodingNodes .NegotiateCompatibleStringEncodingNode negotiateCompatibleStringEncodingNode ,
109
109
@ Cached StringEqualInternalNode stringEqualInternalNode ) {
110
110
var compatibleEncoding = negotiateCompatibleStringEncodingNode .execute (this , a , encA , b , encB );
111
- return stringEqualInternalNode .executeInternal (a , b , compatibleEncoding );
111
+ return stringEqualInternalNode .executeInternal (this , a , b , compatibleEncoding );
112
112
}
113
113
}
114
114
@@ -128,9 +128,10 @@ public abstract boolean execute(Node node, AbstractTruffleString tstring, RubyEn
128
128
TruffleString cachedString , RubyEncoding cachedEncoding );
129
129
130
130
@ Specialization (guards = "encA == encB" )
131
- protected static boolean same (AbstractTruffleString a , RubyEncoding encA , TruffleString b , RubyEncoding encB ,
131
+ protected static boolean same (
132
+ Node node , AbstractTruffleString a , RubyEncoding encA , TruffleString b , RubyEncoding encB ,
132
133
@ Cached StringEqualInternalNode stringEqualInternalNode ) {
133
- return stringEqualInternalNode .executeInternal (a , b , encA );
134
+ return stringEqualInternalNode .executeInternal (node , a , b , encA );
134
135
}
135
136
136
137
@ Specialization (guards = "encA != encB" )
@@ -140,25 +141,29 @@ protected static boolean diff(AbstractTruffleString a, RubyEncoding encA, Truffl
140
141
}
141
142
142
143
@ GenerateUncached
144
+ @ GenerateCached (false )
145
+ @ GenerateInline
143
146
public abstract static class StringEqualInternalNode extends RubyBaseNode {
144
147
// compatibleEncoding is RubyEncoding or null
145
- public abstract boolean executeInternal (AbstractTruffleString a , AbstractTruffleString b ,
148
+ public abstract boolean executeInternal (Node node , AbstractTruffleString a , AbstractTruffleString b ,
146
149
RubyEncoding compatibleEncoding );
147
150
148
151
@ Specialization (guards = "a.isEmpty() || b.isEmpty()" )
149
- protected boolean empty (AbstractTruffleString a , AbstractTruffleString b , RubyEncoding compatibleEncoding ) {
152
+ protected static boolean empty (
153
+ AbstractTruffleString a , AbstractTruffleString b , RubyEncoding compatibleEncoding ) {
150
154
assert compatibleEncoding != null ;
151
155
return a .isEmpty () && b .isEmpty ();
152
156
}
153
157
154
158
@ Specialization (guards = { "compatibleEncoding != null" , "!a.isEmpty()" , "!b.isEmpty()" })
155
- protected boolean equalBytes (AbstractTruffleString a , AbstractTruffleString b , RubyEncoding compatibleEncoding ,
159
+ protected static boolean equalBytes (
160
+ AbstractTruffleString a , AbstractTruffleString b , RubyEncoding compatibleEncoding ,
156
161
@ Cached TruffleString .EqualNode equalNode ) {
157
162
return equalNode .execute (a , b , compatibleEncoding .tencoding );
158
163
}
159
164
160
165
@ Specialization (guards = "compatibleEncoding == null" )
161
- protected boolean notComparable (
166
+ protected static boolean notComparable (
162
167
AbstractTruffleString a , AbstractTruffleString b , RubyEncoding compatibleEncoding ) {
163
168
return false ;
164
169
}
0 commit comments