@@ -712,7 +712,7 @@ public static void perform() {
712712 @ Override
713713 public Throwable interceptInternalException (Throwable throwable , BytecodeNode bytecodeNode , int bci ) {
714714 if (throwable instanceof StackOverflowError soe ) {
715- PythonContext .get (this ).reacquireGilAfterStackOverflow ();
715+ PythonContext .get (this ).ensureGilAfterFailure ();
716716 return ExceptionUtils .wrapJavaException (soe , this , factory .createBaseException (RecursionError , ErrorMessages .MAXIMUM_RECURSION_DEPTH_EXCEEDED , new Object []{}));
717717 }
718718 return throwable ;
@@ -2302,13 +2302,12 @@ public static void performO(VirtualFrame frame, Object value, Object primary, Ob
23022302 @ ConstantOperand (type = LocalSetterRange .class )
23032303 @ ImportStatic ({PGuards .class })
23042304 public static final class UnpackToLocals {
2305- @ Specialization (guards = { "cannotBeOverridden (sequence, inliningTarget, getClassNode)" , "!isPString(sequence)" }, limit = "1 " )
2305+ @ Specialization (guards = "isBuiltinSequence (sequence) " )
23062306 @ ExplodeLoop
23072307 public static void doUnpackSequence (VirtualFrame localFrame , LocalSetterRange results , PSequence sequence ,
23082308 @ Bind ("this" ) Node inliningTarget ,
23092309 @ Bind ("$bytecode" ) BytecodeNode bytecode ,
23102310 @ Bind ("$bci" ) int bci ,
2311- @ SuppressWarnings ("unused" ) @ Cached GetClassNode getClassNode ,
23122311 @ Cached SequenceNodes .GetSequenceStorageNode getSequenceStorageNode ,
23132312 @ Cached SequenceStorageNodes .GetItemScalarNode getItemNode ,
23142313 @ Cached InlinedBranchProfile errorProfile ,
@@ -2380,12 +2379,11 @@ public static void doUnpackIterable(VirtualFrame virtualFrame, LocalSetterRange
23802379 @ ImportStatic ({PGuards .class })
23812380 @ SuppressWarnings ("truffle-interpreted-performance" )
23822381 public static final class UnpackStarredToLocals {
2383- @ Specialization (guards = { "cannotBeOverridden (sequence, inliningTarget, getClassNode)" , "!isPString(sequence)" }, limit = "1 " )
2382+ @ Specialization (guards = "isBuiltinSequence (sequence) " )
23842383 public static void doUnpackSequence (VirtualFrame localFrame ,
23852384 int starIndex ,
23862385 LocalSetterRange results ,
23872386 PSequence sequence ,
2388- @ SuppressWarnings ("unused" ) @ Cached GetClassNode getClassNode ,
23892387 @ Cached SequenceNodes .GetSequenceStorageNode getSequenceStorageNode ,
23902388 @ Shared @ Cached SequenceStorageNodes .GetItemScalarNode getItemNode ,
23912389 @ Shared @ Cached SequenceStorageNodes .GetItemSliceNode getItemSliceNode ,
@@ -3224,10 +3222,9 @@ public static PDict doMerge(VirtualFrame frame,
32243222 @ Operation
32253223 @ ImportStatic ({PGuards .class })
32263224 public static final class UnpackStarred {
3227- @ Specialization (guards = { "cannotBeOverridden (sequence, inliningTarget, getClassNode)" , "!isPString(sequence)" }, limit = "1 " )
3225+ @ Specialization (guards = "isBuiltinSequence (sequence) " )
32283226 public static Object [] doUnpackSequence (VirtualFrame localFrame , PSequence sequence ,
32293227 @ Bind ("this" ) Node inliningTarget ,
3230- @ SuppressWarnings ("unused" ) @ Cached GetClassNode getClassNode ,
32313228 @ Cached SequenceNodes .GetSequenceStorageNode getSequenceStorageNode ,
32323229 @ Cached SequenceStorageNodes .GetItemScalarNode getItemNode ,
32333230 @ Shared @ Cached PRaiseNode raiseNode ) {
@@ -3279,13 +3276,12 @@ private static void appendItem(ArrayList<Object> result, Object item) {
32793276 @ ConstantOperand (type = int .class )
32803277 @ ImportStatic ({PGuards .class })
32813278 public static final class UnpackSequence {
3282- @ Specialization (guards = { "cannotBeOverridden (sequence, inliningTarget, getClassNode)" , "!isPString(sequence)" }, limit = "1 " )
3279+ @ Specialization (guards = "isBuiltinSequence (sequence) " )
32833280 @ ExplodeLoop
32843281 public static Object [] doUnpackSequence (VirtualFrame localFrame ,
32853282 int count ,
32863283 PSequence sequence ,
32873284 @ Bind ("this" ) Node inliningTarget ,
3288- @ SuppressWarnings ("unused" ) @ Cached GetClassNode getClassNode ,
32893285 @ Cached SequenceNodes .GetSequenceStorageNode getSequenceStorageNode ,
32903286 @ Cached SequenceStorageNodes .GetItemScalarNode getItemNode ,
32913287 @ Shared @ Cached PRaiseNode raiseNode ) {
@@ -3351,7 +3347,7 @@ public static Object[] doUnpackIterable(VirtualFrame virtualFrame,
33513347 @ ConstantOperand (type = int .class )
33523348 @ ImportStatic ({PGuards .class })
33533349 public static final class UnpackEx {
3354- @ Specialization (guards = { "cannotBeOverridden (sequence, inliningTarget, getClassNode)" , "!isPString(sequence)" }, limit = "1 " )
3350+ @ Specialization (guards = "isBuiltinSequence (sequence) " )
33553351 public static Object [] doUnpackSequence (VirtualFrame localFrame ,
33563352 int countBefore ,
33573353 int countAfter ,
@@ -3840,13 +3836,13 @@ public static final class BinarySubscript {
38403836// }
38413837// TODO: add @Shared to GetItemNodes
38423838
3843- @ Specialization (guards = "cannotBeOverriddenForImmutableType (sequence)" )
3839+ @ Specialization (guards = "isBuiltinList (sequence)" )
38443840 public static Object doObjectSequence (PList sequence , int index ,
38453841 @ Cached ("createForList()" ) SequenceStorageNodes .GetItemNode getItemNode ) {
38463842 return getItemNode .execute (sequence .getSequenceStorage (), index );
38473843 }
38483844
3849- @ Specialization (guards = "cannotBeOverriddenForImmutableType (sequence)" )
3845+ @ Specialization (guards = "isBuiltinTuple (sequence)" )
38503846 public static Object doObjectTuple (PTuple sequence , int index ,
38513847 @ Cached ("createForTuple()" ) SequenceStorageNodes .GetItemNode getItemNode ) {
38523848 return getItemNode .execute (sequence .getSequenceStorage (), index );
0 commit comments