diff options
author | Jeremy Hylton <jeremy@alum.mit.edu> | 2000-02-15 21:59:50 (GMT) |
---|---|---|
committer | Jeremy Hylton <jeremy@alum.mit.edu> | 2000-02-15 21:59:50 (GMT) |
commit | 410e840c85727e56c6f8872b23e2976510fa7618 (patch) | |
tree | 1633b2568fb644c96aad40d0ae01c9cb63ddf0c8 /Tools | |
parent | ae3d79208f3147bff1a560a6ca125ff28daba98e (diff) | |
download | cpython-410e840c85727e56c6f8872b23e2976510fa7618.zip cpython-410e840c85727e56c6f8872b23e2976510fa7618.tar.gz cpython-410e840c85727e56c6f8872b23e2976510fa7618.tar.bz2 |
add a little debugging support when new.code raises SystemError
Diffstat (limited to 'Tools')
-rw-r--r-- | Tools/compiler/compiler/pyassem.py | 26 |
1 files changed, 21 insertions, 5 deletions
diff --git a/Tools/compiler/compiler/pyassem.py b/Tools/compiler/compiler/pyassem.py index 047836b..2200dec 100644 --- a/Tools/compiler/compiler/pyassem.py +++ b/Tools/compiler/compiler/pyassem.py @@ -140,11 +140,27 @@ class PyAssembler: if self.flags & CO_VARKEYWORDS: self.argcount = self.argcount - 1 stacksize = findDepth(self.insts) - co = new.code(self.argcount, nlocals, stacksize, - self.flags, lnotab.getCode(), self._getConsts(), - tuple(self.names), tuple(self.varnames), - self.filename, self.name, self.firstlineno, - lnotab.getTable()) + try: + co = new.code(self.argcount, nlocals, stacksize, + self.flags, lnotab.getCode(), self._getConsts(), + tuple(self.names), tuple(self.varnames), + self.filename, self.name, self.firstlineno, + lnotab.getTable()) + except SystemError, err: + print err + print repr(self.argcount) + print repr(nlocals) + print repr(stacksize) + print repr(self.flags) + print repr(lnotab.getCode()) + print repr(self._getConsts()) + print repr(self.names) + print repr(self.varnames) + print repr(self.filename) + print repr(self.name) + print repr(self.firstlineno) + print repr(lnotab.getTable()) + raise return co def _getConsts(self): |