1.1 --- a/lib/builtins.py Mon Apr 20 01:50:00 2009 +0200
1.2 +++ b/lib/builtins.py Thu Apr 23 00:52:33 2009 +0200
1.3 @@ -34,6 +34,7 @@
1.4 def __mul__(self, other): pass
1.5 def __radd__(self, other): pass
1.6 def __mod__(self, other): pass
1.7 + def __rmod__(self, other): pass
1.8 def __lt__(self, other): pass
1.9 def __gt__(self, other): pass
1.10 def __le__(self, other): pass
1.11 @@ -80,6 +81,7 @@
1.12 def __floordiv__(self, other): pass
1.13 def __rfloordiv__(self, other): pass
1.14 def __mod__(self, other): pass
1.15 + def __rmod__(self, other): pass
1.16 def __pow__(self, other): pass
1.17 def __rpow__(self, other): pass
1.18 def __lt__(self, other): pass
1.19 @@ -114,7 +116,9 @@
1.20 def __floordiv__(self, other): pass
1.21 def __rfloordiv__(self, other): pass
1.22 def __mod__(self, other): pass
1.23 + def __rmod__(self, other): pass
1.24 def __pow__(self, other): pass
1.25 + def __rpow__(self, other): pass
1.26 def __and__(self, other): pass
1.27 def __rand__(self, other): pass
1.28 def __or__(self, other): pass
2.1 --- a/micropython/__init__.py Mon Apr 20 01:50:00 2009 +0200
2.2 +++ b/micropython/__init__.py Thu Apr 23 00:52:33 2009 +0200
2.3 @@ -411,8 +411,10 @@
2.4
2.5 # Name records (used to track actual use of names).
2.6 # Include names which may not be explicitly used in programs.
2.7 + # NOTE: Potentially declare these when inspecting. For example, __iter__
2.8 + # NOTE: and next are usually implicitly invoked by "for" statements.
2.9
2.10 - self.names_used = set(["__init__", "__call__", "__getitem__", "__bool__"])
2.11 + self.names_used = set(["__init__", "__call__", "__getitem__", "__bool__", "__iter__", "next"])
2.12
2.13 # Status information.
2.14
3.1 --- a/micropython/inspect.py Mon Apr 20 01:50:00 2009 +0200
3.2 +++ b/micropython/inspect.py Thu Apr 23 00:52:33 2009 +0200
3.3 @@ -626,6 +626,7 @@
3.4
3.5 def visitIf(self, node):
3.6 for test, body in node.tests:
3.7 + self.dispatch(test)
3.8 self.dispatch(body)
3.9 if node.else_ is not None:
3.10 self.dispatch(node.else_)
4.1 --- a/micropython/opt.py Mon Apr 20 01:50:00 2009 +0200
4.2 +++ b/micropython/opt.py Thu Apr 23 00:52:33 2009 +0200
4.3 @@ -155,7 +155,10 @@
4.4
4.5 "Return whether 'instruction' provides a constant target."
4.6
4.7 - return isinstance(instruction, (StoreName, StoreAddress)) and \
4.8 + # NOTE: Removed StoreName, since this would then demand population of
4.9 + # NOTE: locals/frames.
4.10 +
4.11 + return isinstance(instruction, StoreAddress) and \
4.12 instruction.attr.assignments == 1
4.13
4.14 def is_simple_input(self, instruction):
5.1 --- a/rsvp.py Mon Apr 20 01:50:00 2009 +0200
5.2 +++ b/rsvp.py Thu Apr 23 00:52:33 2009 +0200
5.3 @@ -88,6 +88,8 @@
5.4 """
5.5
5.6 self.memory = memory
5.7 + self._objlist = objlist
5.8 + self._paramlist = paramlist
5.9 self.objlist = objlist.as_raw()
5.10 self.paramlist = paramlist.as_raw()
5.11 self.true_constant = true_constant
5.12 @@ -333,7 +335,7 @@
5.13
5.14 def StoreName(self):
5.15 frame = self.local_sp_stack[-1]
5.16 - self.frame_stack[frame + self.operand] = self.value
5.17 + self.frame_stack[frame + self.operand] = self.source
5.18
5.19 LoadTemp = LoadName
5.20 StoreTemp = StoreName