@@ -4403,7 +4403,7 @@ protected int notValidUtf8(Object string, int byteIndex,
4403
4403
@ NodeChild (value = "string" , type = RubyNode .class )
4404
4404
@ NodeChild (value = "pattern" , type = RubyNode .class )
4405
4405
@ NodeChild (value = "offset" , type = RubyNode .class )
4406
- public abstract static class StringCharacterIndexPrimitiveNode extends PrimitiveNode {
4406
+ public abstract static class StringCharacterIndexNode extends PrimitiveNode {
4407
4407
4408
4408
@ Child SingleByteOptimizableNode singleByteOptimizableNode = SingleByteOptimizableNode .create ();
4409
4409
@@ -4422,7 +4422,7 @@ protected RubyNode coercePatternToRope(RubyNode pattern) {
4422
4422
"offset >= 0" ,
4423
4423
"singleByteOptimizableNode.execute(stringRope)" ,
4424
4424
"!patternFits(stringRope, patternRope, offset)" })
4425
- protected Object stringCharacterIndexPatternTooLarge (Rope stringRope , Rope patternRope , int offset ) {
4425
+ protected Object patternTooLarge (Rope stringRope , Rope patternRope , int offset ) {
4426
4426
return nil ;
4427
4427
}
4428
4428
@@ -4431,7 +4431,7 @@ protected Object stringCharacterIndexPatternTooLarge(Rope stringRope, Rope patte
4431
4431
"offset >= 0" ,
4432
4432
"singleByteOptimizableNode.execute(stringRope)" ,
4433
4433
"patternFits(stringRope, patternRope, offset)" })
4434
- protected Object stringCharacterIndexSingleByteOptimizable (Rope stringRope , Rope patternRope , int offset ,
4434
+ protected Object singleByteOptimizable (Rope stringRope , Rope patternRope , int offset ,
4435
4435
@ Cached RopeNodes .BytesNode stringBytesNode ,
4436
4436
@ Cached RopeNodes .BytesNode patternBytesNode ,
4437
4437
@ Cached LoopConditionProfile loopProfile ,
@@ -4463,7 +4463,7 @@ protected Object stringCharacterIndexSingleByteOptimizable(Rope stringRope, Rope
4463
4463
guards = {
4464
4464
"offset >= 0" ,
4465
4465
"!singleByteOptimizableNode.execute(stringRope)" })
4466
- protected Object stringCharacterIndex (Rope stringRope , Rope patternRope , int offset ,
4466
+ protected Object multiByte (Rope stringRope , Rope patternRope , int offset ,
4467
4467
@ Cached RopeNodes .CalculateCharacterLengthNode calculateCharacterLengthNode ,
4468
4468
@ Cached RopeNodes .BytesNode stringBytesNode ,
4469
4469
@ Cached RopeNodes .BytesNode patternBytesNode ) {
@@ -4514,7 +4514,7 @@ protected boolean patternFits(Rope stringRope, Rope patternRope, int offset) {
4514
4514
@ NodeChild (value = "string" , type = RubyNode .class )
4515
4515
@ NodeChild (value = "pattern" , type = RubyNode .class )
4516
4516
@ NodeChild (value = "offset" , type = RubyNode .class )
4517
- public abstract static class StringByteIndexPrimitiveNode extends PrimitiveNode {
4517
+ public abstract static class StringByteIndexNode extends PrimitiveNode {
4518
4518
4519
4519
@ Child SingleByteOptimizableNode singleByteOptimizableNode = SingleByteOptimizableNode .create ();
4520
4520
@@ -4529,7 +4529,7 @@ protected RubyNode coercePatternToRope(RubyNode pattern) {
4529
4529
}
4530
4530
4531
4531
@ Specialization (guards = { "offset >= 0" , "!patternFits(stringRope, patternRope, offset)" })
4532
- protected Object stringByteIndexPatternTooLarge (Rope stringRope , Rope patternRope , int offset ) {
4532
+ protected Object patternTooLarge (Rope stringRope , Rope patternRope , int offset ) {
4533
4533
return nil ;
4534
4534
}
4535
4535
@@ -4538,7 +4538,7 @@ protected Object stringByteIndexPatternTooLarge(Rope stringRope, Rope patternRop
4538
4538
"offset >= 0" ,
4539
4539
"singleByteOptimizableNode.execute(stringRope)" ,
4540
4540
"patternFits(stringRope, patternRope, offset)" })
4541
- protected Object stringByteIndexSingleByteOptimizable (Rope stringRope , Rope patternRope , int offset ,
4541
+ protected Object singleByteOptimizable (Rope stringRope , Rope patternRope , int offset ,
4542
4542
@ Cached RopeNodes .BytesNode stringBytesNode ,
4543
4543
@ Cached RopeNodes .BytesNode patternBytesNode ,
4544
4544
@ Cached LoopConditionProfile loopProfile ,
@@ -4571,7 +4571,7 @@ protected Object stringByteIndexSingleByteOptimizable(Rope stringRope, Rope patt
4571
4571
"offset >= 0" ,
4572
4572
"!singleByteOptimizableNode.execute(stringRope)" ,
4573
4573
"patternFits(stringRope, patternRope, offset)" })
4574
- protected Object stringByteIndex (Rope stringRope , Rope patternRope , int offset ,
4574
+ protected Object multiByte (Rope stringRope , Rope patternRope , int offset ,
4575
4575
@ Cached RopeNodes .CalculateCharacterLengthNode calculateCharacterLengthNode ,
4576
4576
@ Cached RopeNodes .BytesNode stringBytesNode ,
4577
4577
@ Cached RopeNodes .BytesNode patternBytesNode ) {
0 commit comments