mirror of
https://github.com/python/cpython.git
synced 2025-10-21 14:12:27 +00:00
Revert "GH-128914: Remove conditional stack effects from bytecodes.c
and the code generators (GH-128918)" (GH-129202)
The commit introduced a ~2.5-3% regression in the free threading build.
This reverts commit ab61d3f430
.
This commit is contained in:
parent
d7d066c3ab
commit
a10f99375e
44 changed files with 1679 additions and 1460 deletions
|
@ -1588,11 +1588,11 @@ class TestBranchAndJumpEvents(CheckEvents):
|
|||
('branch right', 'whilefunc', 1, 3)])
|
||||
|
||||
self.check_events(func, recorders = BRANCH_OFFSET_RECORDERS, expected = [
|
||||
('branch left', 'func', 30, 34),
|
||||
('branch right', 'func', 46, 60),
|
||||
('branch left', 'func', 30, 34),
|
||||
('branch left', 'func', 46, 52),
|
||||
('branch right', 'func', 30, 72)])
|
||||
('branch left', 'func', 28, 32),
|
||||
('branch right', 'func', 44, 58),
|
||||
('branch left', 'func', 28, 32),
|
||||
('branch left', 'func', 44, 50),
|
||||
('branch right', 'func', 28, 70)])
|
||||
|
||||
def test_except_star(self):
|
||||
|
||||
|
@ -1762,8 +1762,7 @@ class TestLoadSuperAttr(CheckEvents):
|
|||
return self._exec(co)
|
||||
|
||||
def _has_load_super_attr(self, co):
|
||||
has = any(instr.opname in ("LOAD_SUPER_ATTR", "LOAD_SUPER_METHOD")
|
||||
for instr in dis.get_instructions(co))
|
||||
has = any(instr.opname == "LOAD_SUPER_ATTR" for instr in dis.get_instructions(co))
|
||||
if not has:
|
||||
has = any(
|
||||
isinstance(c, types.CodeType) and self._has_load_super_attr(c)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue