@@ -279,6 +279,7 @@ abstract static class SequenceStorageBaseNode extends PNodeWithContext {
279
279
protected static final int MAX_SEQUENCE_STORAGES = 9 ;
280
280
protected static final int MAX_ARRAY_STORAGES = 7 ;
281
281
282
+ @ InliningCutoff
282
283
protected static boolean isByteStorage (NativeSequenceStorage store ) {
283
284
return store .getElementType () == ListStorageType .Byte ;
284
285
}
@@ -694,6 +695,18 @@ protected static Object doMro(MroSequenceStorage storage, int idx) {
694
695
}
695
696
696
697
@ InliningCutoff
698
+ @ Specialization
699
+ protected static Object doNative (NativeSequenceStorage storage , int idx ,
700
+ @ Cached GetNativeItemScalarNode getItem ) {
701
+ return getItem .execute (storage , idx );
702
+ }
703
+ }
704
+
705
+ @ GenerateUncached
706
+ @ ImportStatic (SequenceStorageBaseNode .class )
707
+ protected abstract static class GetNativeItemScalarNode extends Node {
708
+ public abstract Object execute (NativeSequenceStorage s , int idx );
709
+
697
710
@ Specialization (guards = "isObject(getElementType, storage)" , limit = "1" )
698
711
protected static Object doNativeObject (NativeSequenceStorage storage , int idx ,
699
712
@ CachedLibrary ("storage.getPtr()" ) InteropLibrary lib ,
@@ -712,7 +725,6 @@ protected static Object doNativeObject(NativeSequenceStorage storage, int idx,
712
725
}
713
726
}
714
727
715
- @ InliningCutoff
716
728
@ Specialization (guards = "isByteStorage(storage)" , limit = "1" )
717
729
protected static int doNativeByte (NativeSequenceStorage storage , int idx ,
718
730
@ CachedLibrary ("storage.getPtr()" ) InteropLibrary lib ,
@@ -724,7 +736,6 @@ protected static int doNativeByte(NativeSequenceStorage storage, int idx,
724
736
return (byte ) result & 0xFF ;
725
737
}
726
738
727
- @ InliningCutoff
728
739
@ Specialization (guards = {"!isByteStorage(storage)" , "!isObject(getElementType, storage)" }, limit = "1" )
729
740
protected static Object doNative (NativeSequenceStorage storage , int idx ,
730
741
@ CachedLibrary ("storage.getPtr()" ) InteropLibrary lib ,
0 commit comments