1.1 --- a/micropython/ast.py Sun Aug 24 19:20:45 2008 +0200
1.2 +++ b/micropython/ast.py Mon Aug 25 02:04:10 2008 +0200
1.3 @@ -68,7 +68,6 @@
1.4 self.importer = importer
1.5 self.objtable = self.importer.get_object_table()
1.6 self.paramtable = self.importer.get_parameter_table()
1.7 - self.clstable = self.importer.get_class_table()
1.8 self.builtins = self.importer.modules.get("__builtins__")
1.9
1.10 # Desired optimisations.
1.11 @@ -388,6 +387,7 @@
1.12 StoreTemp, StoreFrame, StoreResult, StoreException, # as the value being stored
1.13 LoadAddressContext, LoadAttr, LoadAttrIndex, # as the object being referenced
1.14 StoreAttr, StoreAttrIndex, StoreCallable, # as the object being referenced
1.15 + LoadCallable,
1.16 TestIdentity, TestIdentityAddress, CheckSelf, # as one of the operands
1.17 CheckFrame,
1.18 LoadContext, # as the object providing the result
1.19 @@ -953,6 +953,7 @@
1.20
1.21 continue_label = self.new_label()
1.22 self.new_op(CheckSelf())
1.23 + self.active.source = temp
1.24 self.new_op(JumpIfTrue(continue_label))
1.25
1.26 # Where the context is inappropriate, drop the incomplete frame and
1.27 @@ -1786,11 +1787,9 @@
1.28 # Populate the new object required for the function.
1.29
1.30 if temp is not None:
1.31 - self.record_value()
1.32 + self.new_op(LoadCallable())
1.33 self.new_op(temp)
1.34 self.new_op(StoreCallable())
1.35 - self.set_source()
1.36 - self.discard_value()
1.37
1.38 self.new_op(temp)
1.39 #self.discard_temp(temp)