Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
97984d3
Make all labels in _PyUopExecute end in _tier_two
gvanrossum Oct 27, 2023
157a450
Control lltrace via PYTHON_LLTRACE=N
gvanrossum Oct 27, 2023
d1b9c1b
Rename PYTHONUOPS to PYTHON_UOPS for consistency
gvanrossum Oct 27, 2023
d805312
Integrate Tier 2 into _PyEval_EvalFrameDefault
gvanrossum Oct 27, 2023
e0e60ce
DO NOT MERGE: Always use -Xuops
gvanrossum Aug 9, 2023
a720f1a
Merge branch 'main' into mix-tiers
gvanrossum Oct 30, 2023
b808f6d
Merge branch 'main' into mix-tiers
gvanrossum Oct 31, 2023
a0aed59
Get rid of separate executor.c file
gvanrossum Oct 31, 2023
75605c7
Most suggestions from Mark's code review
gvanrossum Oct 31, 2023
5e84476
Fix test_generated_cases.py by stripping preprocessor prefix/suffix
gvanrossum Oct 31, 2023
917b7a2
Eradicate executors.c from Windows build files
gvanrossum Nov 1, 2023
9067eb0
Rename deoptimize_tier_two back to deoptimize (for Justin)
gvanrossum Nov 1, 2023
6a4e495
Fix whitespace
gvanrossum Nov 1, 2023
81f1883
Revert "DO NOT MERGE: Always use -Xuops"
gvanrossum Nov 1, 2023
ee27e73
Add blurb
gvanrossum Nov 1, 2023
7ebc228
Add more color to the news blurb
gvanrossum Nov 1, 2023
a1d0108
Merge remote-tracking branch 'origin/main' into mix-tiers
gvanrossum Nov 1, 2023
a96ac7f
Eliminate 'operand' local variable
gvanrossum Nov 1, 2023
e02409d
Rename self -> current_executor (TODO: eliminate it?)
gvanrossum Nov 1, 2023
fdf1a2f
Move `_EXIT_TRACE` logic to a separate label
gvanrossum Nov 1, 2023
2a6450c
Limit infinite recursion in test_typing
gvanrossum Nov 1, 2023
4783de3
Limit infinite recursion in test_fileio
gvanrossum Nov 1, 2023
b9516a1
Limit infinite recursion in test_xml_etree
gvanrossum Nov 1, 2023
33c3fae
Limit infinite recursion in test_call
gvanrossum Nov 1, 2023
998e054
Fix test_call better: adjust Py_C_RECURSION_LIMIT in pystate.h
gvanrossum Nov 1, 2023
19d9d40
Revert unnecessary fixes to recursive tests
gvanrossum Nov 1, 2023
03de1bf
Even better fix -- increase stack space on Windows in debug mode
gvanrossum Nov 1, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Rename deoptimize_tier_two back to deoptimize (for Justin)
  • Loading branch information
gvanrossum committed Nov 1, 2023
commit 9067eb064b09bcdbed3e2f9da13096cc911d64c0
4 changes: 2 additions & 2 deletions Python/ceval.c
Original file line number Diff line number Diff line change
Expand Up @@ -958,7 +958,7 @@ _PyEval_EvalFrameDefault(PyThreadState *tstate, _PyInterpreterFrame *frame, int
#undef DEOPT_IF
#define DEOPT_IF(COND, INSTNAME) \
if ((COND)) { \
goto deoptimize_tier_two;\
goto deoptimize;\
}

#ifdef Py_STATS
Expand Down Expand Up @@ -1046,7 +1046,7 @@ _PyEval_EvalFrameDefault(PyThreadState *tstate, _PyInterpreterFrame *frame, int
Py_DECREF(self);
goto resume_with_error;
Comment on lines +1048 to +1053
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We may not need to reset return_offset; we can also skip syncing stack_pointer; so we could make this slightly faster as follows (but it doesn't matter since errors are presumed to be on the slow path):

Suggested change
frame->return_offset = 0; // Don't leave this random
_PyFrame_SetStackPointer(frame, stack_pointer);
Py_DECREF(self);
goto resume_with_error;
Py_DECREF(self);
next_instr = frame->instr_ptr;
goto error;


deoptimize_tier_two:
deoptimize:
// On DEOPT_IF we just repeat the last instruction.
// This presumes nothing was popped from the stack (nor pushed).
DPRINTF(2, "DEOPT: [Opcode %d, operand %" PRIu64 "]\n", opcode, operand);
Expand Down