From 86821353804e434fb547b3ce69d26c87ce314b5c Mon Sep 17 00:00:00 2001 From: Simon Forman Date: Sat, 18 Mar 2023 11:40:19 -0700 Subject: [PATCH] No reason to pass expression to function. --- implementations/uvm-ncc/joy.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/implementations/uvm-ncc/joy.c b/implementations/uvm-ncc/joy.c index 360cd2b..61d70e9 100644 --- a/implementations/uvm-ncc/joy.c +++ b/implementations/uvm-ncc/joy.c @@ -550,8 +550,9 @@ u64 joy_eval(char *symbol, u32 stack, u32 expression) { MATCH("clear") return (u64)expression; - MATCH("swaack") return swaack(stack, expression); - print_str(symbol);print_endl(); + MATCH("swaack") { stack = swaack(stack); } + CHECK_ERROR + //print_str(symbol);print_endl(); return (u64)stack << 32 | expression; } @@ -573,13 +574,11 @@ pop_list(u32 stack) u64 -swaack(u32 stack, u32 expression) +swaack(u32 stack) { u32 list = pop_list(stack); CHECK_ERROR - stack = cons(tail(stack), list); - CHECK_ERROR - return (u64)stack << 32 | expression; + return cons(tail(stack), list); }