@@ -569,20 +569,23 @@ Object invert(RubyString string,
569
569
}
570
570
571
571
@ ImportStatic (StringGuards .class )
572
+ @ GenerateCached (false )
573
+ @ GenerateInline
572
574
public abstract static class GetCodePointNode extends RubyBaseNode {
573
575
574
- public abstract int executeGetCodePoint (AbstractTruffleString string , RubyEncoding encoding , int byteIndex );
576
+ public abstract int executeGetCodePoint (Node node , AbstractTruffleString string , RubyEncoding encoding ,
577
+ int byteIndex );
575
578
576
579
@ Specialization
577
- int getCodePoint (AbstractTruffleString string , RubyEncoding encoding , int byteIndex ,
578
- @ Cached TruffleString .CodePointAtByteIndexNode getCodePointNode ,
580
+ static int getCodePoint (Node node , AbstractTruffleString string , RubyEncoding encoding , int byteIndex ,
581
+ @ Cached ( inline = false ) TruffleString .CodePointAtByteIndexNode getCodePointNode ,
579
582
@ Cached InlinedBranchProfile badCodePointProfile ) {
580
583
int codePoint = getCodePointNode .execute (string , byteIndex , encoding .tencoding ,
581
584
ErrorHandling .RETURN_NEGATIVE );
582
585
if (codePoint == -1 ) {
583
- badCodePointProfile .enter (this );
584
- throw new RaiseException (getContext (),
585
- coreExceptions ().argumentErrorInvalidByteSequence (encoding , this ));
586
+ badCodePointProfile .enter (node );
587
+ throw new RaiseException (getContext (node ),
588
+ coreExceptions (node ).argumentErrorInvalidByteSequence (encoding , node ));
586
589
}
587
590
return codePoint ;
588
591
}
0 commit comments