[issue22352] Ensure opcode names and args fit in disassembly output

2017-04-19 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22352] Ensure opcode names and args fit in disassembly output

2017-04-19 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:


New changeset d90045f319e2ea9772b9fbd62a05fdf34af96b6c by Serhiy Storchaka in 
branch 'master':
bpo-22352: Adjust widths in the output of dis.dis() for large line numbers and 
(#1153)
https://github.com/python/cpython/commit/d90045f319e2ea9772b9fbd62a05fdf34af96b6c


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22352] Ensure opcode names and args fit in disassembly output

2017-04-15 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Proposed patch adjusts column widths of the output of dis.dis() for large line 
numbers and instruction offsets and adds tests for widths of opcode names.

Unfortunately this test is failed for two new opcodes: 
BUILD_MAP_UNPACK_WITH_CALL and BUILD_TUPLE_UNPACK_WITH_CALL (26 and 28 
characters respectively).

--
nosy: +serhiy.storchaka
stage:  -> patch review
type: behavior -> enhancement
versions: +Python 3.7 -Python 3.5

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22352] Ensure opcode names and args fit in disassembly output

2017-04-15 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
pull_requests: +1284

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22352] Ensure opcode names and args fit in disassembly output

2015-06-27 Thread Nick Coghlan

Changes by Nick Coghlan ncogh...@gmail.com:


--
assignee: ncoghlan - 

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22352
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22352] Ensure opcode names and args fit in disassembly output

2014-09-06 Thread Nick Coghlan

New submission from Nick Coghlan:

While exploring display options for issue 11822, I found that the new matrix 
multiplication opcode names (BINARY_MATRIX_MULTIPLY and 
INPLACE_MATRIX_MULTIPLY) don't fit in the nominal field width in the 
disassembly output (which is currently 20 characters).

These two clock in at 22 and 23 characters respectively.

In practice, they do fit, since neither takes on argument, which effectively 
allows an extra 5 characters (while still looking neat) and unlimited 
characters if we ignore expanding past the column of opcode arguments.

However, it would be good to:

1. Factor out the opname and oparg sizes to private class attributes on 
dis.Instruction

2. have a test in test_dis that scans dis.opnames and ensures all opcodes  
dis.HAVE_ARGUMENT have names shorter than the combined length of the two 
fields, and that all opcodes = HAVE_ARGUMENT will fit in the opname field, 
even with an argument present.

Have such a test will ensure any new opcodes added can be displayed without any 
problems, rather than anyone having to remember to check manually.

--
assignee: ncoghlan
components: Library (Lib)
messages: 226530
nosy: ncoghlan
priority: low
severity: normal
status: open
title: Ensure opcode names and args fit in disassembly output
type: behavior
versions: Python 3.5

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22352
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com