@@ -712,7 +712,7 @@ public static void perform() {
712
712
@ Override
713
713
public Throwable interceptInternalException (Throwable throwable , BytecodeNode bytecodeNode , int bci ) {
714
714
if (throwable instanceof StackOverflowError soe ) {
715
- PythonContext .get (this ).reacquireGilAfterStackOverflow ();
715
+ PythonContext .get (this ).ensureGilAfterFailure ();
716
716
return ExceptionUtils .wrapJavaException (soe , this , factory .createBaseException (RecursionError , ErrorMessages .MAXIMUM_RECURSION_DEPTH_EXCEEDED , new Object []{}));
717
717
}
718
718
return throwable ;
@@ -2302,13 +2302,12 @@ public static void performO(VirtualFrame frame, Object value, Object primary, Ob
2302
2302
@ ConstantOperand (type = LocalSetterRange .class )
2303
2303
@ ImportStatic ({PGuards .class })
2304
2304
public static final class UnpackToLocals {
2305
- @ Specialization (guards = { "cannotBeOverridden (sequence, inliningTarget, getClassNode)" , "!isPString(sequence)" }, limit = "1 " )
2305
+ @ Specialization (guards = "isBuiltinSequence (sequence) " )
2306
2306
@ ExplodeLoop
2307
2307
public static void doUnpackSequence (VirtualFrame localFrame , LocalSetterRange results , PSequence sequence ,
2308
2308
@ Bind ("this" ) Node inliningTarget ,
2309
2309
@ Bind ("$bytecode" ) BytecodeNode bytecode ,
2310
2310
@ Bind ("$bci" ) int bci ,
2311
- @ SuppressWarnings ("unused" ) @ Cached GetClassNode getClassNode ,
2312
2311
@ Cached SequenceNodes .GetSequenceStorageNode getSequenceStorageNode ,
2313
2312
@ Cached SequenceStorageNodes .GetItemScalarNode getItemNode ,
2314
2313
@ Cached InlinedBranchProfile errorProfile ,
@@ -2380,12 +2379,11 @@ public static void doUnpackIterable(VirtualFrame virtualFrame, LocalSetterRange
2380
2379
@ ImportStatic ({PGuards .class })
2381
2380
@ SuppressWarnings ("truffle-interpreted-performance" )
2382
2381
public static final class UnpackStarredToLocals {
2383
- @ Specialization (guards = { "cannotBeOverridden (sequence, inliningTarget, getClassNode)" , "!isPString(sequence)" }, limit = "1 " )
2382
+ @ Specialization (guards = "isBuiltinSequence (sequence) " )
2384
2383
public static void doUnpackSequence (VirtualFrame localFrame ,
2385
2384
int starIndex ,
2386
2385
LocalSetterRange results ,
2387
2386
PSequence sequence ,
2388
- @ SuppressWarnings ("unused" ) @ Cached GetClassNode getClassNode ,
2389
2387
@ Cached SequenceNodes .GetSequenceStorageNode getSequenceStorageNode ,
2390
2388
@ Shared @ Cached SequenceStorageNodes .GetItemScalarNode getItemNode ,
2391
2389
@ Shared @ Cached SequenceStorageNodes .GetItemSliceNode getItemSliceNode ,
@@ -3224,10 +3222,9 @@ public static PDict doMerge(VirtualFrame frame,
3224
3222
@ Operation
3225
3223
@ ImportStatic ({PGuards .class })
3226
3224
public static final class UnpackStarred {
3227
- @ Specialization (guards = { "cannotBeOverridden (sequence, inliningTarget, getClassNode)" , "!isPString(sequence)" }, limit = "1 " )
3225
+ @ Specialization (guards = "isBuiltinSequence (sequence) " )
3228
3226
public static Object [] doUnpackSequence (VirtualFrame localFrame , PSequence sequence ,
3229
3227
@ Bind ("this" ) Node inliningTarget ,
3230
- @ SuppressWarnings ("unused" ) @ Cached GetClassNode getClassNode ,
3231
3228
@ Cached SequenceNodes .GetSequenceStorageNode getSequenceStorageNode ,
3232
3229
@ Cached SequenceStorageNodes .GetItemScalarNode getItemNode ,
3233
3230
@ Shared @ Cached PRaiseNode raiseNode ) {
@@ -3279,13 +3276,12 @@ private static void appendItem(ArrayList<Object> result, Object item) {
3279
3276
@ ConstantOperand (type = int .class )
3280
3277
@ ImportStatic ({PGuards .class })
3281
3278
public static final class UnpackSequence {
3282
- @ Specialization (guards = { "cannotBeOverridden (sequence, inliningTarget, getClassNode)" , "!isPString(sequence)" }, limit = "1 " )
3279
+ @ Specialization (guards = "isBuiltinSequence (sequence) " )
3283
3280
@ ExplodeLoop
3284
3281
public static Object [] doUnpackSequence (VirtualFrame localFrame ,
3285
3282
int count ,
3286
3283
PSequence sequence ,
3287
3284
@ Bind ("this" ) Node inliningTarget ,
3288
- @ SuppressWarnings ("unused" ) @ Cached GetClassNode getClassNode ,
3289
3285
@ Cached SequenceNodes .GetSequenceStorageNode getSequenceStorageNode ,
3290
3286
@ Cached SequenceStorageNodes .GetItemScalarNode getItemNode ,
3291
3287
@ Shared @ Cached PRaiseNode raiseNode ) {
@@ -3351,7 +3347,7 @@ public static Object[] doUnpackIterable(VirtualFrame virtualFrame,
3351
3347
@ ConstantOperand (type = int .class )
3352
3348
@ ImportStatic ({PGuards .class })
3353
3349
public static final class UnpackEx {
3354
- @ Specialization (guards = { "cannotBeOverridden (sequence, inliningTarget, getClassNode)" , "!isPString(sequence)" }, limit = "1 " )
3350
+ @ Specialization (guards = "isBuiltinSequence (sequence) " )
3355
3351
public static Object [] doUnpackSequence (VirtualFrame localFrame ,
3356
3352
int countBefore ,
3357
3353
int countAfter ,
@@ -3840,13 +3836,13 @@ public static final class BinarySubscript {
3840
3836
// }
3841
3837
// TODO: add @Shared to GetItemNodes
3842
3838
3843
- @ Specialization (guards = "cannotBeOverriddenForImmutableType (sequence)" )
3839
+ @ Specialization (guards = "isBuiltinList (sequence)" )
3844
3840
public static Object doObjectSequence (PList sequence , int index ,
3845
3841
@ Cached ("createForList()" ) SequenceStorageNodes .GetItemNode getItemNode ) {
3846
3842
return getItemNode .execute (sequence .getSequenceStorage (), index );
3847
3843
}
3848
3844
3849
- @ Specialization (guards = "cannotBeOverriddenForImmutableType (sequence)" )
3845
+ @ Specialization (guards = "isBuiltinTuple (sequence)" )
3850
3846
public static Object doObjectTuple (PTuple sequence , int index ,
3851
3847
@ Cached ("createForTuple()" ) SequenceStorageNodes .GetItemNode getItemNode ) {
3852
3848
return getItemNode .execute (sequence .getSequenceStorage (), index );
0 commit comments