@@ -349,18 +349,18 @@ public abstract static class SetItemNode extends PythonTernaryBuiltinNode {
349
349
350
350
private final ConditionProfile generalizedProfile = ConditionProfile .createBinaryProfile ();
351
351
352
- @ Specialization (guards = "lib.fitsInInt (key) || isPSlice(key)" )
352
+ @ Specialization (guards = "lib.canBeIndex (key) || isPSlice(key)" )
353
353
public Object doGeneric (VirtualFrame frame , PList primary , Object key , Object value ,
354
- @ SuppressWarnings ("unused" ) @ CachedLibrary (limit = "3" ) InteropLibrary lib ,
354
+ @ SuppressWarnings ("unused" ) @ CachedLibrary (limit = "3" ) PythonObjectLibrary lib ,
355
355
@ Cached ("createSetItem()" ) SequenceStorageNodes .SetItemNode setItemNode ) {
356
356
updateStorage (primary , setItemNode .execute (frame , primary .getSequenceStorage (), key , value ));
357
357
return PNone .NONE ;
358
358
}
359
359
360
360
@ SuppressWarnings ("unused" )
361
- @ Specialization (guards = {"!lib.fitsInInt (key)" , "!isPSlice(key)" })
361
+ @ Specialization (guards = {"!lib.canBeIndex (key)" , "!isPSlice(key)" })
362
362
public Object doListError (VirtualFrame frame , PList primary , Object key , Object value ,
363
- @ CachedLibrary (limit = "1" ) InteropLibrary lib ) {
363
+ @ CachedLibrary (limit = "1" ) PythonObjectLibrary lib ) {
364
364
throw raise (TypeError , ErrorMessages .OBJ_INDEX_MUST_BE_INT_OR_SLICES , "list" , key );
365
365
}
366
366
0 commit comments