Verified Commit 40bf8145 authored by Camil Staps's avatar Camil Staps 🚀

Reset used_ccalls and requires_file_io in initialize_code to only repeat the...

Reset used_ccalls and requires_file_io in initialize_code to only repeat the warning when needed in case the bytecode generator is called multiple times
parent 630cc723
Pipeline #43767 canceled with stages
in 12 seconds
...@@ -98,9 +98,13 @@ struct program *initialize_code(void) { ...@@ -98,9 +98,13 @@ struct program *initialize_code(void) {
labels = NULL; labels = NULL;
label_id = 0; label_id = 0;
global_label_string_count = 0; global_label_string_count = 0;
start_label=NULL;
module_n = 0; module_n = 0;
used_ccalls_ptr=0;
requires_file_io_ptr=0;
pgrm = (struct program) { pgrm = (struct program) {
0, 0,
0, 0,
...@@ -5178,7 +5182,4 @@ void free_generated_program(void) { ...@@ -5178,7 +5182,4 @@ void free_generated_program(void) {
free_program(&pgrm); free_program(&pgrm);
if (labels!=NULL) if (labels!=NULL)
free_label_node(labels); free_label_node(labels);
/* This prevents overriding warning in case we generate multiple times in one run. */
start_label=NULL;
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment