aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apply.s8
1 files changed, 7 insertions, 1 deletions
diff --git a/apply.s b/apply.s
index 113122a..b8df873 100644
--- a/apply.s
+++ b/apply.s
@@ -6,12 +6,18 @@
.include "include/io.s"
.include "include/main_exit.s"
+.thunkcode theplus
+ mov %rsi, %rbp
+ thunkto %rsi, $FUN2_code, $plus, $0
+ enter_rbp
+
.thunkcode main
# make an integer
thunkto %r11, $INT_code, $1
# make an empty closure for adding stuff
- thunkto %r12, $FUN2_code, $plus, $0
+ #thunkto %r12, $FUN2_code, $plus, $0 # this had less indirection
+ thunkto %r12, $theplus, $0
# apply first argument
thunkto %r12, $apply, $2, %r12, %r11