30
30
import static com .oracle .graal .python .builtins .objects .cext .NativeCAPISymbols .FUN_PY_TRUFFLE_INT_ARRAY_TO_NATIVE ;
31
31
import static com .oracle .graal .python .builtins .objects .cext .NativeCAPISymbols .FUN_PY_TRUFFLE_LONG_ARRAY_TO_NATIVE ;
32
32
import static com .oracle .graal .python .builtins .objects .cext .NativeCAPISymbols .FUN_PY_TRUFFLE_OBJECT_ARRAY_TO_NATIVE ;
33
- import static com .oracle .graal .python .builtins .objects .common .IndexNodes .NormalizeIndexNode .INDEX_OUT_OF_BOUNDS ;
34
33
import static com .oracle .graal .python .nodes .SpecialMethodNames .__EQ__ ;
35
34
import static com .oracle .graal .python .nodes .SpecialMethodNames .__GE__ ;
36
35
import static com .oracle .graal .python .nodes .SpecialMethodNames .__GT__ ;
@@ -621,31 +620,31 @@ protected Object doScalarInt(@SuppressWarnings("unused") ContainerFactory factor
621
620
@ Shared ("getItemScalarNode" ) @ Cached GetItemScalarNode getItemScalarNode ,
622
621
@ Shared ("normalizeIndexNode" ) @ Cached NormalizeIndexCustomMessageNode normalizeIndexNode ,
623
622
@ Shared ("lenNode" ) @ Cached LenNode lenNode ) {
624
- return getItemScalarNode .execute (storage , normalizeIndexNode .execute (idx , lenNode .execute (storage ), INDEX_OUT_OF_BOUNDS ));
623
+ return getItemScalarNode .execute (storage , normalizeIndexNode .execute (idx , lenNode .execute (storage ), ErrorMessages . INDEX_OUT_OF_RANGE ));
625
624
}
626
625
627
626
@ Specialization
628
627
protected Object doScalarLong (@ SuppressWarnings ("unused" ) ContainerFactory factoryMethod , SequenceStorage storage , long idx ,
629
628
@ Shared ("getItemScalarNode" ) @ Cached GetItemScalarNode getItemScalarNode ,
630
629
@ Shared ("normalizeIndexNode" ) @ Cached NormalizeIndexCustomMessageNode normalizeIndexNode ,
631
630
@ Shared ("lenNode" ) @ Cached LenNode lenNode ) {
632
- return getItemScalarNode .execute (storage , normalizeIndexNode .execute (idx , lenNode .execute (storage ), INDEX_OUT_OF_BOUNDS ));
631
+ return getItemScalarNode .execute (storage , normalizeIndexNode .execute (idx , lenNode .execute (storage ), ErrorMessages . INDEX_OUT_OF_RANGE ));
633
632
}
634
633
635
634
@ Specialization
636
635
protected Object doScalarPInt (@ SuppressWarnings ("unused" ) ContainerFactory factoryMethod , SequenceStorage storage , PInt idx ,
637
636
@ Shared ("getItemScalarNode" ) @ Cached GetItemScalarNode getItemScalarNode ,
638
637
@ Shared ("normalizeIndexNode" ) @ Cached NormalizeIndexCustomMessageNode normalizeIndexNode ,
639
638
@ Shared ("lenNode" ) @ Cached LenNode lenNode ) {
640
- return getItemScalarNode .execute (storage , normalizeIndexNode .execute (idx , lenNode .execute (storage ), INDEX_OUT_OF_BOUNDS ));
639
+ return getItemScalarNode .execute (storage , normalizeIndexNode .execute (idx , lenNode .execute (storage ), ErrorMessages . INDEX_OUT_OF_RANGE ));
641
640
}
642
641
643
642
@ Specialization (guards = "!isPSlice(idx)" )
644
643
protected Object doScalarGeneric (@ SuppressWarnings ("unused" ) ContainerFactory factoryMethod , SequenceStorage storage , Object idx ,
645
644
@ Shared ("getItemScalarNode" ) @ Cached GetItemScalarNode getItemScalarNode ,
646
645
@ Shared ("normalizeIndexNode" ) @ Cached NormalizeIndexCustomMessageNode normalizeIndexNode ,
647
646
@ Shared ("lenNode" ) @ Cached LenNode lenNode ) {
648
- return getItemScalarNode .execute (storage , normalizeIndexNode .execute (idx , lenNode .execute (storage ), INDEX_OUT_OF_BOUNDS ));
647
+ return getItemScalarNode .execute (storage , normalizeIndexNode .execute (idx , lenNode .execute (storage ), ErrorMessages . INDEX_OUT_OF_RANGE ));
649
648
}
650
649
651
650
@ Specialization
@@ -912,7 +911,7 @@ protected static SequenceStorage doScalarInt(GenNodeSupplier generalizationNodeP
912
911
@ Shared ("doGenNode" ) @ Cached DoGeneralizationNode doGenNode ,
913
912
@ Shared ("normalizeNode" ) @ Cached NormalizeIndexCustomMessageNode normalizeNode ,
914
913
@ Shared ("lenNode" ) @ Cached LenNode lenNode ) {
915
- int normalized = normalizeNode .execute (idx , lenNode .execute (storage ), INDEX_OUT_OF_BOUNDS );
914
+ int normalized = normalizeNode .execute (idx , lenNode .execute (storage ), ErrorMessages . INDEX_OUT_OF_RANGE );
916
915
try {
917
916
setItemScalarNode .execute (storage , normalized , value );
918
917
return storage ;
@@ -936,7 +935,7 @@ protected static SequenceStorage doScalarLong(GenNodeSupplier generalizationNode
936
935
@ Shared ("doGenNode" ) @ Cached DoGeneralizationNode doGenNode ,
937
936
@ Shared ("normalizeNode" ) @ Cached NormalizeIndexCustomMessageNode normalizeNode ,
938
937
@ Shared ("lenNode" ) @ Cached LenNode lenNode ) {
939
- int normalized = normalizeNode .execute (idx , lenNode .execute (storage ), INDEX_OUT_OF_BOUNDS );
938
+ int normalized = normalizeNode .execute (idx , lenNode .execute (storage ), ErrorMessages . INDEX_OUT_OF_RANGE );
940
939
try {
941
940
setItemScalarNode .execute (storage , normalized , value );
942
941
return storage ;
@@ -955,7 +954,7 @@ protected static SequenceStorage doScalarPInt(GenNodeSupplier generalizationNode
955
954
@ Shared ("doGenNode" ) @ Cached DoGeneralizationNode doGenNode ,
956
955
@ Shared ("normalizeNode" ) @ Cached NormalizeIndexCustomMessageNode normalizeNode ,
957
956
@ Shared ("lenNode" ) @ Cached LenNode lenNode ) {
958
- int normalized = normalizeNode .execute (idx , lenNode .execute (storage ), INDEX_OUT_OF_BOUNDS );
957
+ int normalized = normalizeNode .execute (idx , lenNode .execute (storage ), ErrorMessages . INDEX_OUT_OF_RANGE );
959
958
try {
960
959
setItemScalarNode .execute (storage , normalized , value );
961
960
return storage ;
@@ -974,7 +973,7 @@ protected static SequenceStorage doScalarGeneric(GenNodeSupplier generalizationN
974
973
@ Shared ("doGenNode" ) @ Cached DoGeneralizationNode doGenNode ,
975
974
@ Shared ("normalizeNode" ) @ Cached NormalizeIndexCustomMessageNode normalizeNode ,
976
975
@ Shared ("lenNode" ) @ Cached LenNode lenNode ) {
977
- int normalized = normalizeNode .execute (idx , lenNode .execute (storage ), INDEX_OUT_OF_BOUNDS );
976
+ int normalized = normalizeNode .execute (idx , lenNode .execute (storage ), ErrorMessages . INDEX_OUT_OF_RANGE );
978
977
try {
979
978
setItemScalarNode .execute (storage , normalized , value );
980
979
return storage ;
0 commit comments