diff options
author | ubq323 <ubq323@ubq323.website> | 2024-06-26 14:48:27 +0100 |
---|---|---|
committer | ubq323 <ubq323@ubq323.website> | 2024-06-26 14:48:27 +0100 |
commit | 517e9fe048844533d927c4e3b6d021f82ccea984 (patch) | |
tree | 5629a6d2e43201c14a8d43d652751ff8a987eefb /com.c | |
parent | a8519434f058d0ab60bf7f90acc61997cb982cfa (diff) |
remove OP_PUTS and OP_PRINT, use say and write functions instead
Diffstat (limited to 'com.c')
-rw-r--r-- | com.c | 6 |
1 files changed, 1 insertions, 5 deletions
@@ -39,8 +39,6 @@ static int stack_effect_of(Op opcode) { case OP_TRUE: case OP_FALSE: return 1; - case OP_PUTS: - case OP_PRINT: case OP_SKIP: case OP_REDO: case OP_SETGLOBAL: @@ -111,7 +109,7 @@ static size_t compile_constant(Compiler *C, Val v) { static void compile_call_instr(Compiler *C, uint8_t len) { compile_opcode(C, OP_CALL); compile_byte(C, len); - C->stack_cur -= len; + C->stack_cur -= len - 1; } static void compile_endscope_instr(Compiler *C, uint8_t nlocals) { @@ -337,8 +335,6 @@ typedef struct { } BuiltinForm; static BuiltinForm builtin_forms[] = { - { "puts", 1, false, single_form, OP_PUTS }, - { "print", 1, false, single_form, OP_PRINT }, { "set", 2, false, set_form, 0 }, { "do", 1, true, do_form, 0 }, { "if", 3, false, if_form, 0 }, |