aboutsummaryrefslogtreecommitdiffstats
path: root/csc/ir1.csc
diff options
context:
space:
mode:
Diffstat (limited to 'csc/ir1.csc')
-rw-r--r--csc/ir1.csc19
1 files changed, 19 insertions, 0 deletions
diff --git a/csc/ir1.csc b/csc/ir1.csc
index 942f8f9..484b38f 100644
--- a/csc/ir1.csc
+++ b/csc/ir1.csc
@@ -1,6 +1,7 @@
(define-library (csc ir1)
(export
%call
+ %call-builtin
%constant
%define-syntax
%if
@@ -12,6 +13,9 @@
%library-ref
%sequence
call-arguments
+ call-builtin-arguments
+ call-builtin-operation
+ call-builtin?
call-procedure
call?
constant-expression
@@ -46,6 +50,7 @@
library-ref-name
library-ref?
make-call
+ make-call-builtin
make-constant
make-define-syntax
make-if
@@ -157,6 +162,20 @@
(arguments call-arguments))
+ ; <call-builtin> operation arguments
+ ; Executes the given builtin operation on the arguments. The known builtin
+ ; operations are listed below. Each operation can return a value, or not.
+ ; - alloc: size -> result
+ ; - peek: pointer * offset -> result
+ ; - poke: word * pointer * offset -> ()
+ (define-match-record-type <call-builtin>
+ (make-call-builtin operation arguments)
+ call-builtin?
+ %call-builtin
+ (operation call-builtin-operation)
+ (arguments call-builtin-arguments))
+
+
; <sequence> head tail
; Evaluate head, ignoring any result. Then tail is evaluated.
(define-match-record-type <sequence>