Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 0 additions & 4 deletions 4 Lib/test/test_dis.py
Original file line number Diff line number Diff line change
Expand Up @@ -360,8 +360,6 @@ def _tryfinallyconst(b):
16 CALL_FUNCTION 0
18 POP_TOP
20 RERAISE
22 LOAD_CONST 0 (None)
24 RETURN_VALUE
""" % (_tryfinally.__code__.co_firstlineno + 1,
_tryfinally.__code__.co_firstlineno + 2,
_tryfinally.__code__.co_firstlineno + 4,
Expand All @@ -385,8 +383,6 @@ def _tryfinallyconst(b):
16 CALL_FUNCTION 0
18 POP_TOP
20 RERAISE
22 LOAD_CONST 0 (None)
24 RETURN_VALUE
""" % (_tryfinallyconst.__code__.co_firstlineno + 1,
_tryfinallyconst.__code__.co_firstlineno + 2,
_tryfinallyconst.__code__.co_firstlineno + 4,
Expand Down
6 changes: 3 additions & 3 deletions 6 Lib/test/test_peepholer.py
Original file line number Diff line number Diff line change
Expand Up @@ -416,9 +416,9 @@ def f(cond1, cond2):
if cond1: return 4
self.assertNotInBytecode(f, 'JUMP_FORWARD')
# There should be one jump for the while loop.
returns = [instr for instr in dis.get_instructions(f)
if instr.opname == 'JUMP_ABSOLUTE']
self.assertEqual(len(returns), 1)
jumps = [instr for instr in dis.get_instructions(f)
if 'JUMP' in instr.opname]
self.assertEqual(len(jumps), 1)
returns = [instr for instr in dis.get_instructions(f)
if instr.opname == 'RETURN_VALUE']
self.assertLessEqual(len(returns), 2)
Expand Down
4 changes: 2 additions & 2 deletions 4 Lib/test/test_sys_settrace.py
Original file line number Diff line number Diff line change
Expand Up @@ -948,7 +948,7 @@ def test_jump_in_nested_finally_3(output):
output.append(11)
output.append(12)

@jump_test(5, 11, [2, 4], (ValueError, 'unreachable'))
@jump_test(5, 11, [2, 4], (ValueError, 'after'))
def test_no_jump_over_return_try_finally_in_finally_block(output):
try:
output.append(2)
Expand Down Expand Up @@ -1457,7 +1457,7 @@ async def test_jump_between_async_with_blocks(output):
async with asynctracecontext(output, 4):
output.append(5)

@jump_test(5, 7, [2, 4], (ValueError, "unreachable"))
@jump_test(5, 7, [2, 4], (ValueError, "after"))
def test_no_jump_over_return_out_of_finally_block(output):
try:
output.append(2)
Expand Down
1 change: 0 additions & 1 deletion 1 Makefile.pre.in
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,6 @@ PYTHON_OBJS= \
Python/mysnprintf.o \
Python/mystrtoul.o \
Python/pathconfig.o \
Python/peephole.o \
Python/preconfig.o \
Python/pyarena.o \
Python/pyctype.o \
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Bytecode optimizations are performed directly on the control flow graph.
This will result in slightly more compact code objects in some
circumstances.
1 change: 0 additions & 1 deletion 1 PCbuild/pythoncore.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,6 @@
<ClCompile Include="..\Python\mysnprintf.c" />
<ClCompile Include="..\Python\mystrtoul.c" />
<ClCompile Include="..\Python\pathconfig.c" />
<ClCompile Include="..\Python\peephole.c" />
<ClCompile Include="..\Python\preconfig.c" />
<ClCompile Include="..\Python\pyarena.c" />
<ClCompile Include="..\Python\pyctype.c" />
Expand Down
5 changes: 1 addition & 4 deletions 5 PCbuild/pythoncore.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -1028,9 +1028,6 @@
<ClCompile Include="..\Python\pathconfig.c">
<Filter>Python</Filter>
</ClCompile>
<ClCompile Include="..\Python\peephole.c">
<Filter>Python</Filter>
</ClCompile>
<ClCompile Include="..\Python\preconfig.c">
<Filter>Python</Filter>
</ClCompile>
Expand Down Expand Up @@ -1184,4 +1181,4 @@
<Filter>Resource Files</Filter>
</ResourceCompile>
</ItemGroup>
</Project>
</Project>
Loading
Morty Proxy This is a proxified and sanitized view of the page, visit original site.