68
68
import org .truffleruby .core .proc .ProcOperations ;
69
69
import org .truffleruby .core .proc .RubyProc ;
70
70
import org .truffleruby .core .string .RubyString ;
71
+ import org .truffleruby .core .string .StringOperations ;
71
72
import org .truffleruby .core .support .RubyIO ;
72
73
import org .truffleruby .core .symbol .RubySymbol ;
73
74
import org .truffleruby .core .thread .RubyThread ;
74
75
import org .truffleruby .extra .ffi .Pointer ;
75
76
import org .truffleruby .interop .TranslateInteropExceptionNode ;
76
- import org .truffleruby .language .RubyGuards ;
77
77
import org .truffleruby .language .SafepointAction ;
78
78
import org .truffleruby .language .arguments .ArgumentsDescriptor ;
79
79
import org .truffleruby .language .arguments .NoKeywordArgumentsDescriptor ;
@@ -279,8 +279,8 @@ public abstract static class VMWatchSignalNode extends PrimitiveArrayArgumentsNo
279
279
boolean watchSignalString (Object signalString , boolean isRubyDefaultHandler , Object action ,
280
280
@ Cached @ Shared RubyStringLibrary libSignalString ,
281
281
@ Cached @ Exclusive RubyStringLibrary libAction ) {
282
- final String actionString = RubyGuards .getJavaString (action );
283
- final String signalName = RubyGuards .getJavaString (signalString );
282
+ final String actionString = StringOperations .getJavaString (action );
283
+ final String signalName = StringOperations .getJavaString (signalString );
284
284
285
285
switch (actionString ) {
286
286
case "DEFAULT" :
@@ -305,7 +305,7 @@ boolean watchSignalProc(Object signalString, boolean isRubyDefaultHandler, RubyP
305
305
SharedObjects .writeBarrier (getLanguage (), proc );
306
306
}
307
307
308
- final String signalName = RubyGuards .getJavaString (signalString );
308
+ final String signalName = StringOperations .getJavaString (signalString );
309
309
310
310
return registerHandler (signalName , signal -> {
311
311
var rootThread = context .getThreadManager ().getRootThread ();
@@ -395,7 +395,7 @@ public abstract static class VMGetConfigItemNode extends PrimitiveArrayArguments
395
395
@ TruffleBoundary
396
396
@ Specialization
397
397
Object get (Object key ) {
398
- final String keyString = RubyGuards .getJavaString (key );
398
+ final String keyString = StringOperations .getJavaString (key );
399
399
final Object value = getContext ().getNativeConfiguration ().get (keyString );
400
400
401
401
if (value == null ) {
@@ -417,7 +417,7 @@ Object getSection(Object section, RubyProc block,
417
417
@ Cached CallBlockNode yieldNode ) {
418
418
for (Entry <String , Object > entry : getContext ()
419
419
.getNativeConfiguration ()
420
- .getSection (RubyGuards .getJavaString (section ))) {
420
+ .getSection (StringOperations .getJavaString (section ))) {
421
421
final RubyString key = createString (fromJavaStringNode , entry .getKey (), Encodings .UTF_8 ); // CR_7BIT
422
422
yieldNode .yield (this , block , key , entry .getValue ());
423
423
}
@@ -576,7 +576,7 @@ public abstract static class ShouldNotReachHereNode extends PrimitiveArrayArgume
576
576
Object shouldNotReachHere (Object message ,
577
577
@ Cached RubyStringLibrary libString ) {
578
578
CompilerDirectives .transferToInterpreterAndInvalidate ();
579
- throw CompilerDirectives .shouldNotReachHere (RubyGuards .getJavaString (message ));
579
+ throw CompilerDirectives .shouldNotReachHere (StringOperations .getJavaString (message ));
580
580
}
581
581
582
582
}
0 commit comments