# HG changeset patch # User Paul Boddie # Date 1219016723 -7200 # Node ID 26fe4f93e469d6d9b7ba0942b80283d686a66740 # Parent b035a74d151bf4b7418c82e5a7f66c6a5f90789b Fix class table preparation. Fix temp-compatible storage optimisation. Moved various RSVP methods around. diff -r b035a74d151b -r 26fe4f93e469 micropython/__init__.py --- a/micropython/__init__.py Mon Aug 18 01:40:18 2008 +0200 +++ b/micropython/__init__.py Mon Aug 18 01:45:23 2008 +0200 @@ -246,7 +246,7 @@ for module in self.get_modules(): for obj in module.all_objects: if isinstance(obj, micropython.inspect.Class): - compatible = [obj] + obj.descendants + compatible = [obj] + list(obj.descendants) compatible_dict = dict([(cls.full_name(), cls) for cls in compatible]) t.add(obj.full_name(), compatible_dict) diff -r b035a74d151b -r 26fe4f93e469 micropython/ast.py --- a/micropython/ast.py Mon Aug 18 01:40:18 2008 +0200 +++ b/micropython/ast.py Mon Aug 18 01:45:23 2008 +0200 @@ -369,6 +369,7 @@ originally came from. """ + print instruction return ( isinstance(instruction.input, LoadTemp) and isinstance(instruction, StoreTemp) and instruction.input.attr == instruction.attr) or ( @@ -564,8 +565,9 @@ if self._should_optimise_temp_storage() and \ self._have_temp_compatible_access(): + removed = self.active self.remove_active_value() - return self.active + return removed else: return self.get_temp() diff -r b035a74d151b -r 26fe4f93e469 rsvp.py --- a/rsvp.py Mon Aug 18 01:40:18 2008 +0200 +++ b/rsvp.py Mon Aug 18 01:45:23 2008 +0200 @@ -58,7 +58,7 @@ "A really simple virtual processor." - def __init__(self, memory, objtable, paramtable, pc=None, debug=0): + def __init__(self, memory, objtable, paramtable, clstable, pc=None, debug=0): """ Initialise the processor with a 'memory' (a list of values containing @@ -68,6 +68,7 @@ self.memory = memory self.objtable = objtable self.paramtable = paramtable + self.clstable = clstable self.pc = pc or 0 self.debug = debug @@ -284,16 +285,14 @@ def CheckFrame(self): pass + def CheckSelf(self): pass + def LoadCallable(self): pass def LoadContext(self): context, ref = self.value self.push((None, context)) - def CheckSelf(self): pass - - def CheckContext(self): pass - def Return(self): self.pc = self.pull_pc()