summaryrefslogtreecommitdiff
path: root/src/compiler
diff options
context:
space:
mode:
Diffstat (limited to 'src/compiler')
-rw-r--r--src/compiler/compiler.lm6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/compiler/compiler.lm b/src/compiler/compiler.lm
index d0864b4..1ca7705 100644
--- a/src/compiler/compiler.lm
+++ b/src/compiler/compiler.lm
@@ -433,8 +433,10 @@ write_declaration(d:fspec::declaration::type, index:int)
if (!c) {
write_ins(INS_PUSHR, g_fcr)
- write_ins(INS_PUSH, index)
- write_ins(INS_OP, g_ops->find('#+'))
+ if (index != 0) {
+ write_ins(INS_PUSH, index)
+ write_ins(INS_OP, g_ops->find('#+'))
+ }
write_ins(INS_IO, d.primitive.bits)
} else {
write_ins(INS_PUSH, g_offs->find(%c))