Skip to content

Commit d0e6718

Browse files
committed
Simplify
1 parent d2f9c63 commit d0e6718

1 file changed

Lines changed: 0 additions & 6 deletions

File tree

mypyc/irbuild/specialize.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1220,7 +1220,6 @@ def translate_getitem_with_bounds_check(
12201220
adjust_index_op: PrimitiveDescription,
12211221
range_check_op: PrimitiveDescription,
12221222
get_item_unsafe_op: PrimitiveDescription,
1223-
require_i64_index: bool = False,
12241223
) -> Value | None:
12251224
"""Shared helper for optimized __getitem__ with bounds checking.
12261225
@@ -1253,10 +1252,6 @@ def translate_getitem_with_bounds_check(
12531252
# Get the index argument
12541253
index = builder.accept(args[0])
12551254

1256-
# If required, check that index is i64 (for experimental mode)
1257-
if require_i64_index and not is_int64_rprimitive(index.type):
1258-
return None
1259-
12601255
# Adjust the index (handle negative indices)
12611256
adjusted_index = builder.primitive_op(adjust_index_op, [obj, index], ctx_expr.line)
12621257

@@ -1360,5 +1355,4 @@ def translate_bytes_get_item(
13601355
bytes_adjust_index_op,
13611356
bytes_range_check_op,
13621357
bytes_get_item_unsafe_op,
1363-
require_i64_index=True,
13641358
)

0 commit comments

Comments
 (0)