diff options
author | pommicket <pommicket@gmail.com> | 2022-02-13 14:24:38 -0500 |
---|---|---|
committer | pommicket <pommicket@gmail.com> | 2022-02-13 14:24:38 -0500 |
commit | 239a1a3c271d03e9202b9dc62d87e6ee631d0d40 (patch) | |
tree | da50d62b0243fc40f16f30f1800d6e40524abb6d /05/main.b | |
parent | 24f260fa1649aeecae162b58eee1982fbce3a5ed (diff) |
fixed local variables and also structs containing arrays
Diffstat (limited to '05/main.b')
-rw-r--r-- | 05/main.b | 14 |
1 files changed, 9 insertions, 5 deletions
@@ -74,6 +74,9 @@ global local_var_rbp_offset global function_param_names ; set to 1 by parse_type_declarators if at least one function parameter has no name. global function_param_has_no_name +; ident list of number of bytes of stack space needed by local variables in each function +global functions_required_stack_space + #include util.b #include idents.b @@ -248,6 +251,7 @@ function main functions_addresses = ident_list_create(800000) functions_labels = ident_list_create(800000) function_types = ident_list_create(800000) + functions_required_stack_space = ident_list_create(800000) function_stmt_data = malloc(800000) ; should be at least 40 bytes * max # of functions dat_banned_objmacros = 255 @@ -292,8 +296,8 @@ function main tokens = malloc(16000000) p = tokenize(pptokens, tokens, input_filename, 1) - print_tokens(tokens, p) - print_separator() + ;print_tokens(tokens, p) + ;print_separator() ; NOTE: do NOT free pptokens; identifiers still reference them. parse_tokens(tokens) @@ -303,9 +307,9 @@ function main munmap(output_file_data, RWDATA_END) close(output_fd) - ident_list_printx64(global_variables) - puts(.str_types_bytes_used) - putnln(types_bytes_used) + ;ident_list_printx64(global_variables) + ;puts(.str_types_bytes_used) + ;putnln(types_bytes_used) exit(0) |