1 (in-package :avm2-compiler
)
3 ;;;; misc low level operators, mostly just renaming asm opcodes
4 ;;; might not actually need most of these now, use %asm instead?
6 (defmacro define-0ary-ops
(&body ops
)
9 collect
`(defmethod scompile-cons ((car (eql ',(car i
))) cdr
)
10 (declare (ignore cdr
))
19 (%push-null
:push-null
)
22 (defmacro define-unary-ops
(&body ops
)
25 collect
`(defmethod scompile-cons ((car (eql ',(car i
))) cdr
)
27 (scompile (first cdr
))
38 (%to-integer
:convert-integer
)
39 (%to-double
:convert-double
)
40 (%to-string
:convert-string
)
43 (define-special %
1/ (value)
48 ;; (scompile '(%1/ 1.234))
50 (defmacro define-binops
(&body ops
)
53 collect
`(defmethod scompile-cons ((car (eql ',(car i
))) cdr
)
55 (scompile (first cdr
))
56 (scompile (second cdr
))
63 (ursh :unsigned-rshift
)
64 (equal :equals
) ;; fixme: decide if these are mapped correctly
65 (eq :strict-equals
) ;; fixme: decide if these are mapped correctly
67 (instance-of :instance-of
)
72 (%
2>= :greater-equals
)