aboutsummaryrefslogtreecommitdiff
path: root/src/interp/sys-macros.lisp
diff options
context:
space:
mode:
Diffstat (limited to 'src/interp/sys-macros.lisp')
-rw-r--r--src/interp/sys-macros.lisp36
1 files changed, 36 insertions, 0 deletions
diff --git a/src/interp/sys-macros.lisp b/src/interp/sys-macros.lisp
index a6d8dd9b..c74ada28 100644
--- a/src/interp/sys-macros.lisp
+++ b/src/interp/sys-macros.lisp
@@ -57,6 +57,17 @@
`(or (alpha-char-p ,x)
(member ,x '(#\? #\% #\!) :test #'char=)))
+
+;;
+;; -*- Byte -*-
+;;
+
+(defmacro |byteLessThan| (|x| |y|)
+ `(< (the fixnum x) (the fixnum y)))
+
+(defmacro |byteGreaterEqual| (|x| |y|)
+ `(>= (the fixnum x) (the fixnum y)))
+
;;
;; -*- BigFloat Constructors -*-
;;
@@ -310,6 +321,31 @@
;; -*- Association Lists -*-
;;
+
+;;
+;; -*- Simple Arrays -*-
+;;
+
+;; Note: these macros should probably be just ordinary functions.
+
+(defmacro |makeSimpleArray| (|t| |n|)
+ `(make-array ,|n| :element-type ,|t|))
+
+(defmacro |makeFilledSimpleArray| (|t| |n| |v|)
+ `(make-array ,|n| :element-type ,|t| :initial-element ,|v|))
+
+(defmacro |getSimpleArrayEntry| (|a| |i|)
+ `(aref (the simple-array ,|a|) (the fixnum ,|i|)))
+
+(defmacro |setSimpleArrayEntry| (|a| |i| |v|)
+ `(setf (aref (the simple-array ,|a|) (the fixnum ,|i|)) ,|v|))
+
+(defmacro |sizeOfSimpleArray| (|a|)
+ `(the fixnum (length (the simple-array ,|a|))))
+
+(defmacro |maxIndexOfSimpleArray| (|a|)
+ `(the fixnum (1- (the fixnum (length (the simple-array ,|a|))))))
+
;;
;; -*- Functions -*-
;;