1.1 --- a/micropython/common.py Sun Feb 22 22:31:21 2009 +0100
1.2 +++ b/micropython/common.py Sat Feb 28 01:49:33 2009 +0100
1.3 @@ -3,7 +3,7 @@
1.4 """
1.5 Common classes.
1.6
1.7 -Copyright (C) 2007, 2008 Paul Boddie <paul@boddie.org.uk>
1.8 +Copyright (C) 2007, 2008, 2009 Paul Boddie <paul@boddie.org.uk>
1.9
1.10 This program is free software; you can redistribute it and/or modify it under
1.11 the terms of the GNU General Public License as published by the Free Software
1.12 @@ -84,10 +84,7 @@
1.13 def __repr__(self):
1.14 return "Block(%r, location=%r)" % (id(self), self.location)
1.15
1.16 - def as_raw(self, objtable):
1.17 -
1.18 - "Return the code for the given 'block'."
1.19 -
1.20 + def as_raw(self, objtable, paramtable):
1.21 for i, item in enumerate(self.code):
1.22 if hasattr(item, "location"):
1.23 item.location = location + i
1.24 @@ -99,16 +96,17 @@
1.25
1.26 "A representation of a raw program data object."
1.27
1.28 - def __init__(self, classcode, attrcode, codeaddr, codedetails, instance, name):
1.29 + def __init__(self, classcode, attrcode, codeaddr, codedetails, instance, name, funccode=None):
1.30 self.classcode = classcode
1.31 self.attrcode = attrcode
1.32 self.codeaddr = codeaddr
1.33 self.codedetails = codedetails
1.34 self.instance = instance
1.35 self.name = name
1.36 + self.funccode = funccode
1.37
1.38 def __repr__(self):
1.39 - return "%r # %s" % ((self.classcode, self.attrcode, self.codeaddr, self.codedetails, self.instance), self.name)
1.40 + return "%r # %s" % ((self.classcode, self.attrcode, self.codeaddr, self.codedetails, self.instance, self.funccode), self.name)
1.41
1.42 # Inspection representations.
1.43