Message203845
Attached is a patch exposing the old opcode_stack_effect() function to Python. The patch does the following:
* renames opcode_stack_effect() to PyCompile_OpcodeStackEffect()
* removes the "static" modifier from PyCompile_OpcodeStackEffect()
* changes PyCompile_OpcodeStackEffect()'s behavior so it returns a magic
value on failure
* preserves existing behavior when compiling code and encountering
an opcode/oparg pair that results in failure
* creates a new _opcode module
* exposes PyCompile_OpcodeStackEffect() as _opcode.stack_effect()
* tests _opcode module with new test__opcode.py
* imports _opcode.stack_effect() into opcode, exposing it publically
* documents the function in dis (there is no documentation for opcode,
and dis imports and exposes everything in opcode)
Whew! I think it's ready to go in. |
|
Date |
User |
Action |
Args |
2013-11-22 19:42:03 | larry | set | recipients:
+ larry, ncoghlan |
2013-11-22 19:42:03 | larry | set | messageid: <1385149323.26.0.11954812505.issue19722@psf.upfronthosting.co.za> |
2013-11-22 19:42:03 | larry | link | issue19722 messages |
2013-11-22 19:42:03 | larry | create | |
|