| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -539,7 +539,8 @@ typedef struct { | |||
| 539 | 539 | ||
| 540 | 540 | PyAPI_FUNC(int) _Py_Instrument(PyCodeObject *co, PyInterpreterState *interp); | |
| 541 | 541 | ||
| 542 | - extern _Py_CODEUNIT _Py_GetBaseCodeUnit(PyCodeObject *code, int offset); | ||
| 542 | + // Export for '_testinternalcapi' shared extension | ||
| 543 | + PyAPI_FUNC(_Py_CODEUNIT) _Py_GetBaseCodeUnit(PyCodeObject *code, int offset); | ||
| 543 | 544 | ||
| 544 | 545 | extern int _PyInstruction_GetLength(PyCodeObject *code, int offset); | |
| 545 | 546 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1770,13 +1770,12 @@ dummy_func( | |||
| 1770 | 1770 | FT_ATOMIC_STORE_INT8_RELEASE(gen->gi_frame_state, FRAME_SUSPENDED + oparg); | |
| 1771 | 1771 | /* We don't know which of these is relevant here, so keep them equal */ | |
| 1772 | 1772 | assert(INLINE_CACHE_ENTRIES_SEND == INLINE_CACHE_ENTRIES_FOR_ITER); | |
| 1773 | - #if TIER_ONE | ||
| 1774 | - assert(frame->instr_ptr->op.code == INSTRUMENTED_LINE || | ||
| 1775 | - frame->instr_ptr->op.code == INSTRUMENTED_INSTRUCTION || | ||
| 1776 | - _PyOpcode_Deopt[frame->instr_ptr->op.code] == SEND || | ||
| 1777 | - _PyOpcode_Deopt[frame->instr_ptr->op.code] == FOR_ITER || | ||
| 1778 | - _PyOpcode_Deopt[frame->instr_ptr->op.code] == INTERPRETER_EXIT || | ||
| 1779 | - _PyOpcode_Deopt[frame->instr_ptr->op.code] == ENTER_EXECUTOR); | ||
| 1773 | + #if TIER_ONE && defined(Py_DEBUG) | ||
| 1774 | + if (!PyStackRef_IsNone(frame->f_executable)) { | ||
| 1775 | + int i = frame->instr_ptr - _PyFrame_GetBytecode(frame); | ||
| 1776 | + int opcode = _Py_GetBaseCodeUnit(_PyFrame_GetCode(frame), i).op.code; | ||
| 1777 | + assert(opcode == SEND || opcode == FOR_ITER); | ||
| 1778 | + } | ||
| 1780 | 1779 | #endif | |
| 1781 | 1780 | RELOAD_STACK(); | |
| 1782 | 1781 | LOAD_IP(1 + INLINE_CACHE_ENTRIES_SEND); | |
| Back | FazBrowse Home | New Git URL |
0 commit comments