From 45f8df20fd18dca8275d89237f03404cb36e9db5 Mon Sep 17 00:00:00 2001 From: Mirek Kratochvil Date: Fri, 4 Sep 2026 15:32:08 +0200 Subject: upgrade apply --- apply.s | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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 -- cgit v1.2.3