aboutsummaryrefslogtreecommitdiff
path: root/forth/types.fs
diff options
context:
space:
mode:
authorChouser <chouser@n01se.net>2015-02-15 14:10:47 -0500
committerChouser <chouser@n01se.net>2015-02-21 13:22:44 -0500
commit136ce7c9afb5e103133fe6e423e6dad3d23db38d (patch)
treec317f90935a7ef0e65abd41122adfaa7576bb831 /forth/types.fs
parent60801ed68d5b2c6630c83883de150ccce98767f9 (diff)
downloadmal-136ce7c9afb5e103133fe6e423e6dad3d23db38d.tar.gz
mal-136ce7c9afb5e103133fe6e423e6dad3d23db38d.zip
forth: Split types for user fns vs native fns
Diffstat (limited to 'forth/types.fs')
-rw-r--r--forth/types.fs32
1 files changed, 19 insertions, 13 deletions
diff --git a/forth/types.fs b/forth/types.fs
index 5eb546f..7675a5e 100644
--- a/forth/types.fs
+++ b/forth/types.fs
@@ -460,26 +460,32 @@ drop
MalType%
- cell% field MalFn/xt
- cell% field MalFn/meta
- cell% field MalFn/env
- cell% field MalFn/formal-args
- cell% field MalFn/body
-deftype MalFn
-
-: MalFn. { xt -- mal-fn }
- MalFn new { mal-fn }
- xt mal-fn MalFn/xt !
- MalMap/Empty mal-fn MalFn/meta !
+ cell% field MalNativeFn/xt
+ cell% field MalNativeFn/meta
+deftype MalNativeFn
+
+: MalNativeFn. { xt -- mal-fn }
+ MalNativeFn new { mal-fn }
+ xt mal-fn MalNativeFn/xt !
+ MalMap/Empty mal-fn MalNativeFn/meta !
mal-fn ;
-MalFn
+MalNativeFn
extend as-native
- MalFn/xt @ ;;
+ MalNativeFn/xt @ ;;
drop
MalType%
+ cell% field MalUserFn/meta
+ cell% field MalUserFn/env
+ cell% field MalUserFn/formal-args
+ cell% field MalUserFn/var-arg
+ cell% field MalUserFn/body
+deftype MalUserFn
+
+
+MalType%
cell% field SpecialOp/xt
deftype SpecialOp