[Patches] [ python-Patches-693755 ] Separate opcodes from dis.py

SourceForge.net noreply@sourceforge.net
Thu, 27 Feb 2003 13:36:17 -0800


Patches item #693755, was opened at 2003-02-26 10:51
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=693755&group_id=5470

Category: Library (Lib)
Group: Python 2.3
Status: Open
Resolution: Accepted
Priority: 5
Submitted By: Skip Montanaro (montanaro)
Assigned to: Skip Montanaro (montanaro)
Summary: Separate opcodes from dis.py

Initial Comment:
This patch implements a few changes I've had in my copy of
dis.py for awhile.  In particular, it separates opcode data
definitions into a separate module, allows classes and strings
containing bytecode to be disassembled.

----------------------------------------------------------------------

>Comment By: Skip Montanaro (montanaro)
Date: 2003-02-27 15:36

Message:
Logged In: YES 
user_id=44345

Whoops!  I thought I had cleaned out the duplicate code from dis.py.  Will 
check on that and rename opcodes to opcode.

Agreed that automatically generating opcode.py from opcode.h is a
separate thing.  opcode.h will need some annotations to allow the various
secondary calls (jrelop, hasconst.append, etc) to be generated as well.

New patch should have the desired corrections as well as a minimal
test_dis.py.

Checking in...

----------------------------------------------------------------------

Comment By: Guido van Rossum (gvanrossum)
Date: 2003-02-27 14:58

Message:
Logged In: YES 
user_id=6380

Looks fine, except it seems you didn't actually delete the
calls to def_op etc. from dis.py!

Also: - maybe rename it to opcode.py in consistency with
both keyword.py and opcode.h.

And it would be nice of opcode.h knew how to update itself
by reading opcode.h, but that's A Separate Project.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=693755&group_id=5470