diff options
author | Bad Diode <bd@badd10de.dev> | 2021-11-10 16:40:29 +0100 |
---|---|---|
committer | Bad Diode <bd@badd10de.dev> | 2021-11-10 16:40:29 +0100 |
commit | 69f6b03296f96a60dd7fc103ff89d187f1a29aec (patch) | |
tree | b942b1afb25f6c6db2fa6be861406c1446026f8c /src/compiler.h | |
parent | e32231ffa4dfc4b5c3c65437f03190e57ccc9678 (diff) | |
download | bdl-69f6b03296f96a60dd7fc103ff89d187f1a29aec.tar.gz bdl-69f6b03296f96a60dd7fc103ff89d187f1a29aec.zip |
Change Environment to store locals in array
This will help directly translate the locals to assembly.
Diffstat (limited to 'src/compiler.h')
-rw-r--r-- | src/compiler.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/compiler.h b/src/compiler.h index d4b9e72..fe36ecf 100644 --- a/src/compiler.h +++ b/src/compiler.h | |||
@@ -405,6 +405,7 @@ compile_proc_call(Object *obj) { | |||
405 | 405 | ||
406 | void | 406 | void |
407 | compile_if(Object *obj) { | 407 | compile_if(Object *obj) { |
408 | context_printf(" ;; --> compile_if\n"); | ||
408 | char *lab_false = generate_label("BDLL"); | 409 | char *lab_false = generate_label("BDLL"); |
409 | compile_object(obj->condition); | 410 | compile_object(obj->condition); |
410 | context_printf(" pop rax\n"); | 411 | context_printf(" pop rax\n"); |
@@ -420,6 +421,7 @@ compile_if(Object *obj) { | |||
420 | } else { | 421 | } else { |
421 | context_printf("%s:\n", lab_false); | 422 | context_printf("%s:\n", lab_false); |
422 | } | 423 | } |
424 | context_printf(" ;; <-- compile_if\n"); | ||
423 | } | 425 | } |
424 | 426 | ||
425 | void | 427 | void |