Skip to content

Commit 3dafb0a

Browse files
committed
Address code review
1 parent 54af89d commit 3dafb0a

File tree

5 files changed

+1
-21
lines changed

5 files changed

+1
-21
lines changed

Python/bytecodes.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -529,7 +529,7 @@ dummy_func(
529529
res = PyStackRef_False;
530530
}
531531

532-
op (_GUARD_NOS_COMPACT_ASCII, (nos, unused -- nos, unused)) {
532+
op(_GUARD_NOS_COMPACT_ASCII, (nos, unused -- nos, unused)) {
533533
PyObject *o = PyStackRef_AsPyObjectBorrow(nos);
534534
EXIT_IF(!PyUnicode_CheckExact(o));
535535
EXIT_IF(!PyUnicode_IS_COMPACT_ASCII(o));
@@ -951,8 +951,6 @@ dummy_func(
951951
DEOPT_IF(!_PyLong_IsNonNegativeCompact((PyLongObject *)sub));
952952
Py_ssize_t index = ((PyLongObject*)sub)->long_value.ob_digit[0];
953953
DEOPT_IF(PyUnicode_GET_LENGTH(str) <= index);
954-
// Specialize for reading an ASCII character from an ASCII string:
955-
DEOPT_IF(!PyUnicode_IS_COMPACT_ASCII(str));
956954
uint8_t c = PyUnicode_1BYTE_DATA(str)[index];
957955
assert(c < 128);
958956
STAT_INC(BINARY_OP, hit);

Python/executor_cases.c.h

Lines changed: 0 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Python/generated_cases.c.h

Lines changed: 0 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Python/optimizer_bytecodes.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -413,9 +413,6 @@ dummy_func(void) {
413413
}
414414

415415
op(_GUARD_NOS_COMPACT_ASCII, (nos, unused -- nos, unused)) {
416-
if (sym_matches_type(nos, &PyUnicode_Type)) {
417-
REPLACE_OP(this_instr, _NOP, 0, 0);
418-
}
419416
sym_set_type(nos, &PyUnicode_Type);
420417
}
421418

Python/optimizer_cases.c.h

Lines changed: 0 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)