Skip to content

Commit 1c4ee9a

Browse files
committed
Align builtin sq_length/mp_length slots definitions with CPython
1 parent 1e0a2ae commit 1c4ee9a

File tree

7 files changed

+5
-3
lines changed

7 files changed

+5
-3
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/modules/ctypes/PyCArrayBuiltins.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -338,6 +338,7 @@ static Object Array_item(VirtualFrame frame, CDataObject self, Object item,
338338
}
339339

340340
@Slot(SlotKind.sq_length)
341+
@Slot(SlotKind.mp_length)
341342
@GenerateUncached
342343
@GenerateNodeFactory
343344
abstract static class LenNode extends LenBuiltinNode {

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/array/ArrayBuiltins.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -743,6 +743,7 @@ static Object getitem(PArray self,
743743
}
744744

745745
@Slot(SlotKind.sq_length)
746+
@Slot(SlotKind.mp_length)
746747
@GenerateUncached
747748
@GenerateNodeFactory
748749
abstract static class LenNode extends LenBuiltinNode {

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/contextvars/ContextBuiltins.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ protected List<? extends NodeFactory<? extends PythonBuiltinBaseNode>> getNodeFa
8585
return ContextBuiltinsFactory.getFactories();
8686
}
8787

88-
@Slot(SlotKind.sq_length)
88+
@Slot(SlotKind.mp_length)
8989
@GenerateUncached
9090
@GenerateNodeFactory
9191
public abstract static class LenNode extends LenBuiltinNode {

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/dict/DictBuiltins.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -391,7 +391,6 @@ static boolean run(VirtualFrame frame, PDict self, Object key,
391391
}
392392
}
393393

394-
@Slot(SlotKind.sq_length)
395394
@Slot(SlotKind.mp_length)
396395
@GenerateUncached
397396
@GenerateNodeFactory

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/foreign/ForeignObjectBuiltins.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,7 @@ static Object[] unpackForeignArray(Object left, InteropLibrary lib, PForeignToPT
239239
}
240240

241241
@Slot(SlotKind.sq_length)
242+
@Slot(SlotKind.mp_length)
242243
@GenerateUncached
243244
@GenerateNodeFactory
244245
abstract static class LenNode extends LenBuiltinNode {

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/mappingproxy/MappingproxyBuiltins.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,6 @@ Object run(VirtualFrame frame, PMappingproxy self, Object key,
196196
}
197197
}
198198

199-
@Slot(SlotKind.sq_length)
200199
@Slot(SlotKind.mp_length)
201200
@GenerateUncached
202201
@GenerateNodeFactory

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/mmap/MMapBuiltins.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -279,6 +279,7 @@ protected static CastToByteNode createCoerce() {
279279
}
280280

281281
@Slot(SlotKind.sq_length)
282+
@Slot(SlotKind.mp_length)
282283
@GenerateUncached
283284
@GenerateNodeFactory
284285
public abstract static class LenNode extends LenBuiltinNode {

0 commit comments

Comments
 (0)