summaryrefslogtreecommitdiff
path: root/modules/language/python/compile.scm
diff options
context:
space:
mode:
Diffstat (limited to 'modules/language/python/compile.scm')
-rw-r--r--modules/language/python/compile.scm37
1 files changed, 28 insertions, 9 deletions
diff --git a/modules/language/python/compile.scm b/modules/language/python/compile.scm
index 4de9ac6..a8fdeac 100644
--- a/modules/language/python/compile.scm
+++ b/modules/language/python/compile.scm
@@ -266,6 +266,22 @@
((__invert__) (N 'py-lognot))
((__int__) (N 'mk-int))
((__float__) (N 'mk-float))
+ ((__lshift__) (N 'py-lshift))
+ ((__rshift__) (N 'py-rshift))
+ ((__rlshift__) (N 'py-rlshift))
+ ((__rrshift__) (N 'py-rrshift))
+ ((as_integer_ratio) (N 'py-as-integer-ratio))
+ ((conjugate) (N 'py-conjugate))
+ ((fromhex) (N 'py-fromhex))
+ ((hex) (N 'py-hex))
+ ((imag) (N 'py-imag))
+ ((is_integer) (N 'py-is-integer))
+ ((real) (N 'py-real))
+ ((__mod__) (N 'py-mod))
+ ((__rmod__) (N 'py-rmod))
+ ((__floordiv__) (N 'py-floordiv))
+ ((__rfloordiv__)(N 'py-rfloordiv))
+ ((__hex__) (N 'hex))
;; Lists
((append) (L 'pylist-append!))
@@ -537,35 +553,38 @@
(#:+
((_ . l)
(cons '+ (map (g vs exp) l))))
+
(#:-
((_ . l)
(cons '- (map (g vs exp) l))))
+
(#:*
((_ . l)
(cons '* (map (g vs exp) l))))
+
(#:/
((_ . l)
(cons (N 'py-/) (map (g vs exp) l))))
(#:%
((_ . l)
- (cons 'modulo (map (g vs exp) l))))
+ (cons (N 'py-mod) (map (g vs exp) l))))
(#://
((_ . l)
- (cons 'floor-quotient (map (g vs exp) l))))
-
+ (cons (N 'py-floordiv) (map (g vs exp) l))))
+
(#:<<
((_ . l)
- (cons (C '<<) (map (g vs exp) l))))
+ (cons (N 'py-lshift) (map (g vs exp) l))))
(#:>>
((_ . l)
- (cons (C '>>) (map (g vs exp) l))))
+ (cons (N 'py-rshift) (map (g vs exp) l))))
(#:u~
((_ x)
- (list 'lognot (exp vs x))))
+ (list (N 'py-lognot) (exp vs x))))
(#:u-
((_ x)
@@ -577,15 +596,15 @@
(#:band
((_ . l)
- (cons 'logand (map (g vs exp) l))))
+ (cons (N 'py-logand) (map (g vs exp) l))))
(#:bxor
((_ . l)
- (cons 'logxor (map (g vs exp) l))))
+ (cons (N 'py-logxor) (map (g vs exp) l))))
(#:bor
((_ . l)
- (cons 'logior (map (g vs exp) l))))
+ (cons (N 'py-logior) (map (g vs exp) l))))
(#:not
((_ x)