aboutsummaryrefslogtreecommitdiff
path: root/forth/core.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/core.fs
parent60801ed68d5b2c6630c83883de150ccce98767f9 (diff)
downloadmal-136ce7c9afb5e103133fe6e423e6dad3d23db38d.tar.gz
mal-136ce7c9afb5e103133fe6e423e6dad3d23db38d.zip
forth: Split types for user fns vs native fns
Diffstat (limited to 'forth/core.fs')
-rw-r--r--forth/core.fs14
1 files changed, 7 insertions, 7 deletions
diff --git a/forth/core.fs b/forth/core.fs
index 6e8ccfb..16105ad 100644
--- a/forth/core.fs
+++ b/forth/core.fs
@@ -2,14 +2,14 @@ require env.fs
0 MalEnv. constant core
-: args-as-native drop { argv argc -- entry*argc... }
+: args-as-native { argv argc -- entry*argc... }
argc 0 ?do
argv i cells + @ as-native
loop ;
: defcore ( xt )
parse-allot-name MalSymbol. ( xt sym )
- swap MalFn. core env/set ;
+ swap MalNativeFn. core env/set ;
:noname args-as-native + MalInt. ; defcore +
:noname args-as-native - MalInt. ; defcore -
@@ -20,7 +20,7 @@ require env.fs
:noname args-as-native <= mal-bool ; defcore <=
:noname args-as-native >= mal-bool ; defcore >=
-:noname drop { argv argc }
+:noname { argv argc }
MalList new { list }
argc cells allocate throw { start }
argv start argc cells cmove
@@ -29,8 +29,8 @@ require env.fs
list
; defcore list
-:noname 2drop @ mal-type @ MalList = mal-bool ; defcore list?
-:noname 2drop @ empty? ; defcore empty?
-:noname 2drop @ mal-count ; defcore count
+:noname drop @ mal-type @ MalList = mal-bool ; defcore list?
+:noname drop @ empty? ; defcore empty?
+:noname drop @ mal-count ; defcore count
-:noname 2drop dup @ swap cell+ @ swap m= mal-bool ; defcore =
+:noname drop dup @ swap cell+ @ swap m= mal-bool ; defcore =