micropython

Change of rsvp.py

259:11aaa493c628
rsvp.py
     1.1 --- a/rsvp.py	Fri Sep 04 00:26:30 2009 +0200
     1.2 +++ b/rsvp.py	Thu Sep 24 21:29:29 2009 +0200
     1.3 @@ -858,12 +858,6 @@
     1.4  
     1.5          self.machine.result = addr, addr
     1.6  
     1.7 -    def builtins_int_add(self):
     1.8 -        return self.builtins_int_arithmetic_op(operator.add)
     1.9 -
    1.10 -    def builtins_int_sub(self):
    1.11 -        return self.builtins_int_arithmetic_op(operator.sub)
    1.12 -
    1.13      def builtins_int_bool(self):
    1.14          frame = self.local_sp_stack[-1]
    1.15  
    1.16 @@ -952,6 +946,12 @@
    1.17          else:
    1.18              self.machine.result = self.false_constant, self.false_constant
    1.19  
    1.20 +    def builtins_int_add(self):
    1.21 +        return self.builtins_int_arithmetic_op(operator.add)
    1.22 +
    1.23 +    def builtins_int_sub(self):
    1.24 +        return self.builtins_int_arithmetic_op(operator.sub)
    1.25 +
    1.26      def builtins_int_lt(self):
    1.27          return self.builtins_int_op(operator.lt, 0)
    1.28  
    1.29 @@ -970,6 +970,12 @@
    1.30      def builtins_int_ne(self):
    1.31          return self.builtins_int_op(operator.ne, 1)
    1.32  
    1.33 +    def builtins_int_and(self):
    1.34 +        return self.builtins_int_arithmetic_op(operator.and_)
    1.35 +
    1.36 +    def builtins_int_or(self):
    1.37 +        return self.builtins_int_arithmetic_op(operator.or_)
    1.38 +
    1.39      def builtins_bool_bool(self):
    1.40          frame = self.local_sp_stack[-1]
    1.41  
    1.42 @@ -1204,6 +1210,10 @@
    1.43          "__builtins__.int.__ge__" : builtins_int_ge,
    1.44          "__builtins__.int.__eq__" : builtins_int_eq,
    1.45          "__builtins__.int.__ne__" : builtins_int_ne,
    1.46 +        "__builtins__.int.__and__" : builtins_int_and,
    1.47 +        "__builtins__.int.__rand__" : builtins_int_and,
    1.48 +        "__builtins__.int.__or__" : builtins_int_or,
    1.49 +        "__builtins__.int.__ror__" : builtins_int_or,
    1.50          "__builtins__.bool.__bool__" : builtins_bool_bool,
    1.51          "__builtins__.list.__getitem__" : builtins_list_getitem,
    1.52          "__builtins__.list.__len__" : builtins_list_len,