micropython

lib/native.py

438:b547786f38c7
2011-07-02 Paul Boddie Moved some code generation methods into a new Assembler class. Separated sequence element storage into a separate method which may form the basis of a native library routine.
     1 #!/usr/bin/env python     2      3 """     4 Native library functions.     5      6 Copyright (C) 2011 Paul Boddie <paul@boddie.org.uk>     7      8 This program is free software; you can redistribute it and/or modify it under     9 the terms of the GNU General Public License as published by the Free Software    10 Foundation; either version 3 of the License, or (at your option) any later    11 version.    12     13 This program is distributed in the hope that it will be useful, but WITHOUT    14 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS    15 FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more    16 details.    17     18 You should have received a copy of the GNU General Public License along with    19 this program.  If not, see <http://www.gnu.org/licenses/>.    20 """    21     22 def _int_add(self, other): pass    23 def _int_sub(self, other): pass    24 def _int_mul(self, other): pass    25 def _int_div(self, other): pass    26 def _int_mod(self, other): pass    27 def _int_pow(self, other): pass    28 def _int_and(self, other): pass    29 def _int_or(self, other): pass    30 def _int_xor(self, other): pass    31     32 def _int_rsub(self, other): pass    33 def _int_rdiv(self, other): pass    34 def _int_rmod(self, other): pass    35 def _int_rpow(self, other): pass    36     37 def _int_lt(self, other): pass    38 def _int_gt(self, other): pass    39 def _int_eq(self, other): pass    40     41 def _str_add(self, other): pass    42 def _str_lt(self, other): pass    43 def _str_gt(self, other): pass    44 def _str_eq(self, other): pass    45     46 # vim: tabstop=4 expandtab shiftwidth=4