Commit 373f8d81 authored by Tim Peters's avatar Tim Peters

LOAD_FAST: rearrange branches to favor the expected case, and get

rid of a redundant NULL-pointer check in the expected case.
parent 7ba5e810
...@@ -1666,17 +1666,14 @@ eval_frame(PyFrameObject *f) ...@@ -1666,17 +1666,14 @@ eval_frame(PyFrameObject *f)
case LOAD_FAST: case LOAD_FAST:
x = GETLOCAL(oparg); x = GETLOCAL(oparg);
if (x == NULL) { if (x != NULL) {
format_exc_check_arg(
PyExc_UnboundLocalError,
UNBOUNDLOCAL_ERROR_MSG,
PyTuple_GetItem(co->co_varnames, oparg)
);
break;
}
Py_INCREF(x); Py_INCREF(x);
PUSH(x); PUSH(x);
if (x != NULL) continue; continue;
}
format_exc_check_arg(PyExc_UnboundLocalError,
UNBOUNDLOCAL_ERROR_MSG,
PyTuple_GetItem(co->co_varnames, oparg));
break; break;
case STORE_FAST: case STORE_FAST:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment