From 7a412aa949c8295ea553083724f4cacea1c6915a Mon Sep 17 00:00:00 2001 From: inglorion Date: Sun, 22 Feb 2015 17:04:41 -0800 Subject: [PATCH] added a function to get the command line arguments --- bootstrap/src/antimony/args.voo | 47 + bootstrap/src/voodoo_translator/compile_module.voo | 950 +++++++++++---------- configure | 1 + src/antimony/args.sb | 26 + src/voodoo_translator/compile_module.sb | 5 +- 5 files changed, 559 insertions(+), 470 deletions(-) create mode 100644 bootstrap/src/antimony/args.voo create mode 100644 src/antimony/args.sb diff --git a/bootstrap/src/antimony/args.voo b/bootstrap/src/antimony/args.voo new file mode 100644 index 0000000..023063e --- /dev/null +++ b/bootstrap/src/antimony/args.voo @@ -0,0 +1,47 @@ +section data +import sbJ___log +section data +export sbJ___saved_argc sbJ___saved_argv +align +sbJ___saved_argc: +word 0 +align +sbJ___saved_argv: +word 0 +align +sbJ___saved_args: +word -1 +section functions +export sbJ_args +import sbJ_array sbJ_blob_from_cstring sbJ_eq sbJ_false sbJ_lt sbJ_true +align +sbJ_args: +function + block + let sbJ__sb_G1 call sbJ_eq @sbJ___saved_args -1 + ifeq sbJ__sb_G1 @sbJ_true + block + let sbJ_items auto-words @sbJ___saved_argc + block + let _sb_G5 0 + let sbJ_i 0 +_sb_G6: + let sbJ__sb_G2 call sbJ_lt sbJ_i @sbJ___saved_argc + set _sb_G5 sbJ__sb_G2 + ifeq _sb_G5 @sbJ_false + goto _sb_G7 + end if + let sbJ__sb_G3 get-word @sbJ___saved_argv sbJ_i + let sbJ__sb_G4 call sbJ_blob_from_cstring sbJ__sb_G3 + set-word sbJ_items sbJ_i sbJ__sb_G4 + set sbJ_i add sbJ_i 1 + goto _sb_G6 +_sb_G7: + end block + set @sbJ___saved_args call sbJ_array @sbJ___saved_argc sbJ_items + end block + end if + return @sbJ___saved_args + end block +end function + diff --git a/bootstrap/src/voodoo_translator/compile_module.voo b/bootstrap/src/voodoo_translator/compile_module.voo index 7e68374..c1c7c64 100644 --- a/bootstrap/src/voodoo_translator/compile_module.voo +++ b/bootstrap/src/voodoo_translator/compile_module.voo @@ -9,175 +9,181 @@ _sb_G27: string "sb" _sb_G28: string "import" -_sb_G52: +_sb_G55: string "main.voo" -_sb_G53: +_sb_G56: string "__init" -_sb_G54: +_sb_G57: string "section functions\x0a" -_sb_G55: +_sb_G58: string "export main\x0a" -_sb_G56: +_sb_G59: string "import sbJ_sb_init " -_sb_G57: +_sb_G60: +string "sbJ___saved_argc sbJ___saved_argv " +_sb_G61: string "\x0a\x0aalign\x0a" -_sb_G58: +_sb_G62: string "main:\x0a" -_sb_G59: -string "function\x0a" -_sb_G60: +_sb_G63: +string "function argc argv\x0a" +_sb_G64: string "call sbJ_sb_init\x0a" -_sb_G61: +_sb_G65: +string "set @sbJ___saved_argc argc\x0a" +_sb_G66: +string "set @sbJ___saved_argv argv\x0a" +_sb_G67: string "call " -_sb_G62: +_sb_G68: string "\x0areturn 0\x0a" -_sb_G63: +_sb_G69: string "end function\x0a" -_sb_G76: +_sb_G82: string ".voo" -_sb_G77: +_sb_G83: string ".o" -_sb_G200: -string ".sb" -_sb_G201: -string ".voo" -_sb_G205: -string "return" _sb_G206: -string "__init.sb" +string ".sb" _sb_G207: -string "__init" -_sb_G208: -string "sb" -_sb_G209: -string "section" -_sb_G210: -string "sb" +string ".voo" _sb_G211: -string "data" +string "return" _sb_G212: -string "sb" +string "__init.sb" _sb_G213: -string "__sb_abi_version" +string "__init" _sb_G214: string "sb" _sb_G215: -string "export" +string "section" _sb_G216: string "sb" _sb_G217: -string "var" +string "data" _sb_G218: string "sb" _sb_G219: -string "=" +string "__sb_abi_version" _sb_G220: string "sb" _sb_G221: -string "section" +string "export" _sb_G222: string "sb" _sb_G223: -string "functions" -_sb_G227: +string "var" +_sb_G224: string "sb" +_sb_G225: +string "=" +_sb_G226: +string "sb" +_sb_G227: +string "section" _sb_G228: +string "sb" +_sb_G229: +string "functions" +_sb_G233: +string "sb" +_sb_G234: string "import" -_sb_G232: +_sb_G238: string "import" -_sb_G233: +_sb_G239: string "__exports" -_sb_G234: +_sb_G240: string "export" -_sb_G235: +_sb_G241: string "table" -_sb_G239: +_sb_G245: string "let" -_sb_G240: +_sb_G246: string "sb" -_sb_G241: +_sb_G247: string "make_hash_table" -_sb_G242: +_sb_G248: string "sb" -_sb_G243: +_sb_G249: string "symbol_hash" -_sb_G244: +_sb_G250: string "sb" -_sb_G245: +_sb_G251: string "symbol_eq" -_sb_G246: +_sb_G252: string "sym" -_sb_G247: +_sb_G253: string "var" -_sb_G248: +_sb_G254: string "=" -_sb_G249: +_sb_G255: string "quote" -_sb_G250: +_sb_G256: string "set" -_sb_G251: +_sb_G257: string "sb" -_sb_G252: +_sb_G258: string "hash_table_put" -_sb_G253: +_sb_G259: string "return" -_sb_G254: +_sb_G260: string "function" -_sb_G255: +_sb_G261: string "function" -_sb_G256: +_sb_G262: string ".voo" -_sb_G261: +_sb_G267: string ".voo" -_sb_G283: +_sb_G289: string "sb" -_sb_G284: +_sb_G290: string "true" -_sb_G285: +_sb_G291: string "sb" -_sb_G286: +_sb_G292: string "import" -_sb_G287: +_sb_G293: string "sb" -_sb_G288: +_sb_G294: string "__log" -_sb_G341: +_sb_G347: string "sb" -_sb_G342: +_sb_G348: string "export" -_sb_G346: +_sb_G352: string "sb" -_sb_G347: +_sb_G353: string "import" -_sb_G348: +_sb_G354: string "sb" -_sb_G349: +_sb_G355: string "true" -_sb_G353: +_sb_G359: string "sb" -_sb_G354: +_sb_G360: string "alias" -_sb_G355: +_sb_G361: string "sb" -_sb_G356: +_sb_G362: string "function" -_sb_G357: +_sb_G363: string "sb" -_sb_G358: +_sb_G364: string "section" -_sb_G359: +_sb_G365: string "sb" -_sb_G360: +_sb_G366: string "struct" -_sb_G361: +_sb_G367: string "sb" -_sb_G362: +_sb_G368: string "var" -_sb_G373: +_sb_G379: string "VOODOOC" -_sb_G374: +_sb_G380: string "voodooc" -_sb_G375: +_sb_G381: string "-o" import sbJ___log section functions @@ -337,38 +343,44 @@ sbJ_compile_executable_to_voodoo: function sbJ_namespace sbJ_src_path sbJ_dir block call sbJ_compile_module_to_voodoo sbJ_namespace sbJ_src_path sbJ_dir - let sbJ__sb_G37 call sbJ_make_blob _sb_G52 8 + let sbJ__sb_G37 call sbJ_make_blob _sb_G55 8 let sbJ__sb_G38 call sbJ_path_join sbJ_dir sbJ__sb_G37 let sbJ_main_file call sbJ_output_file sbJ__sb_G38 - let sbJ__sb_G39 call sbJ_make_blob _sb_G53 6 + let sbJ__sb_G39 call sbJ_make_blob _sb_G56 6 let sbJ_init_sym call sbJ_namespace_intern sbJ_namespace sbJ__sb_G39 let sbJ_encoded_init call sbJ_encode_symbol sbJ_init_sym let sbJ__sb_G40 call sbJ_blob_builder let sbJ_code sbJ__sb_G40 - let sbJ__sb_G41 call sbJ_make_blob _sb_G54 18 + let sbJ__sb_G41 call sbJ_make_blob _sb_G57 18 call sbJ_blob_builder_append_blob sbJ_code sbJ__sb_G41 - let sbJ__sb_G42 call sbJ_make_blob _sb_G55 12 + let sbJ__sb_G42 call sbJ_make_blob _sb_G58 12 call sbJ_blob_builder_append_blob sbJ_code sbJ__sb_G42 - let sbJ__sb_G43 call sbJ_make_blob _sb_G56 19 + let sbJ__sb_G43 call sbJ_make_blob _sb_G59 19 call sbJ_blob_builder_append_blob sbJ_code sbJ__sb_G43 - call sbJ_blob_builder_append_blob sbJ_code sbJ_encoded_init - let sbJ__sb_G44 call sbJ_make_blob _sb_G57 8 + let sbJ__sb_G44 call sbJ_make_blob _sb_G60 34 call sbJ_blob_builder_append_blob sbJ_code sbJ__sb_G44 - let sbJ__sb_G45 call sbJ_make_blob _sb_G58 6 + call sbJ_blob_builder_append_blob sbJ_code sbJ_encoded_init + let sbJ__sb_G45 call sbJ_make_blob _sb_G61 8 call sbJ_blob_builder_append_blob sbJ_code sbJ__sb_G45 - let sbJ__sb_G46 call sbJ_make_blob _sb_G59 9 + let sbJ__sb_G46 call sbJ_make_blob _sb_G62 6 call sbJ_blob_builder_append_blob sbJ_code sbJ__sb_G46 - let sbJ__sb_G47 call sbJ_make_blob _sb_G60 17 + let sbJ__sb_G47 call sbJ_make_blob _sb_G63 19 call sbJ_blob_builder_append_blob sbJ_code sbJ__sb_G47 - let sbJ__sb_G48 call sbJ_make_blob _sb_G61 5 + let sbJ__sb_G48 call sbJ_make_blob _sb_G64 17 call sbJ_blob_builder_append_blob sbJ_code sbJ__sb_G48 - call sbJ_blob_builder_append_blob sbJ_code sbJ_encoded_init - let sbJ__sb_G49 call sbJ_make_blob _sb_G62 10 + let sbJ__sb_G49 call sbJ_make_blob _sb_G65 27 call sbJ_blob_builder_append_blob sbJ_code sbJ__sb_G49 - let sbJ__sb_G50 call sbJ_make_blob _sb_G63 13 + let sbJ__sb_G50 call sbJ_make_blob _sb_G66 27 call sbJ_blob_builder_append_blob sbJ_code sbJ__sb_G50 - let sbJ__sb_G51 call sbJ_blob_builder_to_blob sbJ_code - call sbJ_write_blob_to_stream sbJ__sb_G51 sbJ_main_file + let sbJ__sb_G51 call sbJ_make_blob _sb_G67 5 + call sbJ_blob_builder_append_blob sbJ_code sbJ__sb_G51 + call sbJ_blob_builder_append_blob sbJ_code sbJ_encoded_init + let sbJ__sb_G52 call sbJ_make_blob _sb_G68 10 + call sbJ_blob_builder_append_blob sbJ_code sbJ__sb_G52 + let sbJ__sb_G53 call sbJ_make_blob _sb_G69 13 + call sbJ_blob_builder_append_blob sbJ_code sbJ__sb_G53 + let sbJ__sb_G54 call sbJ_blob_builder_to_blob sbJ_code + call sbJ_write_blob_to_stream sbJ__sb_G54 sbJ_main_file call sbJ_flush_stream sbJ_main_file call sbJ_close_stream sbJ_main_file return 0 @@ -379,8 +391,8 @@ align sbJ_compile_module: function sbJ_namespace sbJ_src_path sbJ_outfile block - let sbJ__sb_G64 call sbJ_tempdir - let sbJ_tdir sbJ__sb_G64 + let sbJ__sb_G70 call sbJ_tempdir + let sbJ_tdir sbJ__sb_G70 call sbJ_compile_module_to_voodoo sbJ_namespace sbJ_src_path sbJ_tdir let sbJ_objects call sbJ_compile_module_from_voodoo sbJ_tdir sbJ_tdir call sbJ_link_module sbJ_outfile sbJ_objects @@ -397,40 +409,40 @@ function sbJ_src_path sbJ_tdir let sbJ_dir call sbJ_opendir sbJ_src_path let sbJ_objects call sbJ_dynarray 0 0 block - let _sb_G73 0 + let _sb_G79 0 let sbJ_name 0 -_sb_G74: +_sb_G80: set sbJ_name call sbJ_readdir sbJ_dir - let sbJ__sb_G65 call sbJ_ne sbJ_name -1 - set _sb_G73 sbJ__sb_G65 - ifeq _sb_G73 @sbJ_false - goto _sb_G75 + let sbJ__sb_G71 call sbJ_ne sbJ_name -1 + set _sb_G79 sbJ__sb_G71 + ifeq _sb_G79 @sbJ_false + goto _sb_G81 end if - let sbJ__sb_G66 call sbJ_blob_nth sbJ_name 0 - let sbJ__sb_G67 call sbJ_ne 46 sbJ__sb_G66 - ifeq sbJ__sb_G67 @sbJ_true + let sbJ__sb_G72 call sbJ_blob_nth sbJ_name 0 + let sbJ__sb_G73 call sbJ_ne 46 sbJ__sb_G72 + ifeq sbJ__sb_G73 @sbJ_true block # skip names starting in . - let sbJ__sb_G68 call sbJ_make_blob _sb_G76 4 - let sbJ__sb_G69 call sbJ_blob_ends_with sbJ_name sbJ__sb_G68 - ifeq sbJ__sb_G69 @sbJ_true + let sbJ__sb_G74 call sbJ_make_blob _sb_G82 4 + let sbJ__sb_G75 call sbJ_blob_ends_with sbJ_name sbJ__sb_G74 + ifeq sbJ__sb_G75 @sbJ_true block let sbJ_infile call sbJ_path_join sbJ_src_path sbJ_name - let sbJ__sb_G70 call sbJ_make_blob _sb_G77 2 - let sbJ__sb_G71 call sbJ_concatenate_blobs sbJ_name sbJ__sb_G70 - let sbJ_ofile call sbJ_path_join sbJ_tdir sbJ__sb_G71 + let sbJ__sb_G76 call sbJ_make_blob _sb_G83 2 + let sbJ__sb_G77 call sbJ_concatenate_blobs sbJ_name sbJ__sb_G76 + let sbJ_ofile call sbJ_path_join sbJ_tdir sbJ__sb_G77 call sbJ_voodoo_compile_file sbJ_infile sbJ_ofile call sbJ_dynarray_add sbJ_objects sbJ_ofile end block end if end block end if - goto _sb_G74 -_sb_G75: + goto _sb_G80 +_sb_G81: end block call sbJ_closedir sbJ_dir - let sbJ__sb_G72 call sbJ_dynarray_to_array sbJ_objects - return sbJ__sb_G72 + let sbJ__sb_G78 call sbJ_dynarray_to_array sbJ_objects + return sbJ__sb_G78 end block end function @@ -442,293 +454,293 @@ function sbJ_namespace sbJ_src_path sbJ_dest_dir # .voo files in src_path are copied into dest_dir. let sbJ_state call sbJ_make_compile_module_state sbJ_namespace let sbJ_dir call sbJ_opendir sbJ_src_path - let sbJ__sb_G78 call sbJ_make_blob _sb_G200 3 - let sbJ_dot_sb sbJ__sb_G78 - let sbJ__sb_G79 call sbJ_make_blob _sb_G201 4 - let sbJ_dot_voo sbJ__sb_G79 + let sbJ__sb_G84 call sbJ_make_blob _sb_G206 3 + let sbJ_dot_sb sbJ__sb_G84 + let sbJ__sb_G85 call sbJ_make_blob _sb_G207 4 + let sbJ_dot_voo sbJ__sb_G85 let sbJ_cmd call sbJ_dynarray 0 0 block - let _sb_G202 0 + let _sb_G208 0 let sbJ_name 0 -_sb_G203: +_sb_G209: set sbJ_name call sbJ_readdir sbJ_dir - let sbJ__sb_G80 call sbJ_ne sbJ_name -1 - set _sb_G202 sbJ__sb_G80 - ifeq _sb_G202 @sbJ_false - goto _sb_G204 + let sbJ__sb_G86 call sbJ_ne sbJ_name -1 + set _sb_G208 sbJ__sb_G86 + ifeq _sb_G208 @sbJ_false + goto _sb_G210 end if - let sbJ__sb_G81 call sbJ_blob_nth sbJ_name 0 - let sbJ__sb_G82 call sbJ_ne 46 sbJ__sb_G81 - ifeq sbJ__sb_G82 @sbJ_true + let sbJ__sb_G87 call sbJ_blob_nth sbJ_name 0 + let sbJ__sb_G88 call sbJ_ne 46 sbJ__sb_G87 + ifeq sbJ__sb_G88 @sbJ_true block # skip names starting in . - let sbJ__sb_G83 call sbJ_blob_ends_with sbJ_name sbJ_dot_sb - ifeq sbJ__sb_G83 @sbJ_true + let sbJ__sb_G89 call sbJ_blob_ends_with sbJ_name sbJ_dot_sb + ifeq sbJ__sb_G89 @sbJ_true block let sbJ_infile call sbJ_path_join sbJ_src_path sbJ_name - let sbJ__sb_G84 call sbJ_concatenate_blobs sbJ_name sbJ_dot_voo - let sbJ_outfile call sbJ_path_join sbJ_dest_dir sbJ__sb_G84 + let sbJ__sb_G90 call sbJ_concatenate_blobs sbJ_name sbJ_dot_voo + let sbJ_outfile call sbJ_path_join sbJ_dest_dir sbJ__sb_G90 call sbJ_transmute_file sbJ_state sbJ_infile sbJ_outfile end block else block - let sbJ__sb_G85 call sbJ_blob_ends_with sbJ_name sbJ_dot_voo - ifeq sbJ__sb_G85 @sbJ_true + let sbJ__sb_G91 call sbJ_blob_ends_with sbJ_name sbJ_dot_voo + ifeq sbJ__sb_G91 @sbJ_true block - let sbJ__sb_G86 call sbJ_path_join sbJ_src_path sbJ_name - let sbJ__sb_G87 call sbJ_path_join sbJ_dest_dir sbJ_name - call sbJ_copy sbJ__sb_G86 sbJ__sb_G87 + let sbJ__sb_G92 call sbJ_path_join sbJ_src_path sbJ_name + let sbJ__sb_G93 call sbJ_path_join sbJ_dest_dir sbJ_name + call sbJ_copy sbJ__sb_G92 sbJ__sb_G93 end block end if end block end if end block end if - goto _sb_G203 -_sb_G204: + goto _sb_G209 +_sb_G210: end block call sbJ_closedir sbJ_dir let sbJ_init_code get-word sbJ_state 1 let sbJ_items auto-words 6 - let sbJ__sb_G88 call sbJ_make_blob _sb_G205 6 - let sbJ__sb_G89 call sbJ_namespace_intern sbJ_namespace sbJ__sb_G88 6 - set-word sbJ_items 0 sbJ__sb_G89 + let sbJ__sb_G94 call sbJ_make_blob _sb_G211 6 + let sbJ__sb_G95 call sbJ_namespace_intern sbJ_namespace sbJ__sb_G94 6 + set-word sbJ_items 0 sbJ__sb_G95 set-word sbJ_items 1 1 - let sbJ__sb_G90 call sbJ_array 2 sbJ_items - call sbJ_dynarray_add sbJ_init_code sbJ__sb_G90 + let sbJ__sb_G96 call sbJ_array 2 sbJ_items + call sbJ_dynarray_add sbJ_init_code sbJ__sb_G96 let sbJ_init_code_len call sbJ_dynarray_length sbJ_init_code - let sbJ__sb_G91 call sbJ_make_blob _sb_G206 9 - let sbJ_init_name call sbJ_path_join sbJ_dest_dir sbJ__sb_G91 - let sbJ__sb_G92 call sbJ_make_blob _sb_G207 6 - let sbJ__sb_G93 call sbJ_namespace_intern sbJ_namespace sbJ__sb_G92 6 - let sbJ_init_fun sbJ__sb_G93 + let sbJ__sb_G97 call sbJ_make_blob _sb_G212 9 + let sbJ_init_name call sbJ_path_join sbJ_dest_dir sbJ__sb_G97 + let sbJ__sb_G98 call sbJ_make_blob _sb_G213 6 + let sbJ__sb_G99 call sbJ_namespace_intern sbJ_namespace sbJ__sb_G98 6 + let sbJ_init_fun sbJ__sb_G99 let sbJ_stream call sbJ_output_file sbJ_init_name - let sbJ__sb_G94 call sbJ_make_blob _sb_G208 2 - let sbJ__sb_G95 call sbJ_get_namespace_absolute sbJ__sb_G94 - let sbJ__sb_G96 call sbJ_make_blob _sb_G209 7 - let sbJ__sb_G97 call sbJ_namespace_intern sbJ__sb_G95 sbJ__sb_G96 - set-word sbJ_items 0 sbJ__sb_G97 - let sbJ__sb_G98 call sbJ_make_blob _sb_G210 2 - let sbJ__sb_G99 call sbJ_get_namespace_absolute sbJ__sb_G98 - let sbJ__sb_G100 call sbJ_make_blob _sb_G211 4 - let sbJ__sb_G101 call sbJ_namespace_intern sbJ__sb_G99 sbJ__sb_G100 - set-word sbJ_items 1 sbJ__sb_G101 - let sbJ__sb_G102 call sbJ_array 2 sbJ_items - call sbJ_write_antimony sbJ__sb_G102 sbJ_stream + let sbJ__sb_G100 call sbJ_make_blob _sb_G214 2 + let sbJ__sb_G101 call sbJ_get_namespace_absolute sbJ__sb_G100 + let sbJ__sb_G102 call sbJ_make_blob _sb_G215 7 + let sbJ__sb_G103 call sbJ_namespace_intern sbJ__sb_G101 sbJ__sb_G102 + set-word sbJ_items 0 sbJ__sb_G103 + let sbJ__sb_G104 call sbJ_make_blob _sb_G216 2 + let sbJ__sb_G105 call sbJ_get_namespace_absolute sbJ__sb_G104 + let sbJ__sb_G106 call sbJ_make_blob _sb_G217 4 + let sbJ__sb_G107 call sbJ_namespace_intern sbJ__sb_G105 sbJ__sb_G106 + set-word sbJ_items 1 sbJ__sb_G107 + let sbJ__sb_G108 call sbJ_array 2 sbJ_items + call sbJ_write_antimony sbJ__sb_G108 sbJ_stream call sbJ_write_newline_and_flush_stream sbJ_stream - let sbJ__sb_G103 call sbJ_make_blob _sb_G212 2 - let sbJ__sb_G104 call sbJ_get_namespace_absolute sbJ__sb_G103 - let sbJ__sb_G105 call sbJ_make_blob _sb_G213 16 - let sbJ__sb_G106 call sbJ_namespace_intern sbJ__sb_G104 sbJ__sb_G105 - let sbJ_abi_version_sym sbJ__sb_G106 - let sbJ__sb_G107 call sbJ_make_blob _sb_G214 2 - let sbJ__sb_G108 call sbJ_get_namespace_absolute sbJ__sb_G107 - let sbJ__sb_G109 call sbJ_make_blob _sb_G215 6 - let sbJ__sb_G110 call sbJ_namespace_intern sbJ__sb_G108 sbJ__sb_G109 - set-word sbJ_items 0 sbJ__sb_G110 + let sbJ__sb_G109 call sbJ_make_blob _sb_G218 2 + let sbJ__sb_G110 call sbJ_get_namespace_absolute sbJ__sb_G109 + let sbJ__sb_G111 call sbJ_make_blob _sb_G219 16 + let sbJ__sb_G112 call sbJ_namespace_intern sbJ__sb_G110 sbJ__sb_G111 + let sbJ_abi_version_sym sbJ__sb_G112 + let sbJ__sb_G113 call sbJ_make_blob _sb_G220 2 + let sbJ__sb_G114 call sbJ_get_namespace_absolute sbJ__sb_G113 + let sbJ__sb_G115 call sbJ_make_blob _sb_G221 6 + let sbJ__sb_G116 call sbJ_namespace_intern sbJ__sb_G114 sbJ__sb_G115 + set-word sbJ_items 0 sbJ__sb_G116 set-word sbJ_items 1 sbJ_abi_version_sym - let sbJ__sb_G111 call sbJ_array 2 sbJ_items - call sbJ_write_antimony sbJ__sb_G111 sbJ_stream + let sbJ__sb_G117 call sbJ_array 2 sbJ_items + call sbJ_write_antimony sbJ__sb_G117 sbJ_stream call sbJ_write_newline_and_flush_stream sbJ_stream - let sbJ__sb_G112 call sbJ_make_blob _sb_G216 2 - let sbJ__sb_G113 call sbJ_get_namespace_absolute sbJ__sb_G112 - let sbJ__sb_G114 call sbJ_make_blob _sb_G217 3 - let sbJ__sb_G115 call sbJ_namespace_intern sbJ__sb_G113 sbJ__sb_G114 - set-word sbJ_items 0 sbJ__sb_G115 + let sbJ__sb_G118 call sbJ_make_blob _sb_G222 2 + let sbJ__sb_G119 call sbJ_get_namespace_absolute sbJ__sb_G118 + let sbJ__sb_G120 call sbJ_make_blob _sb_G223 3 + let sbJ__sb_G121 call sbJ_namespace_intern sbJ__sb_G119 sbJ__sb_G120 + set-word sbJ_items 0 sbJ__sb_G121 set-word sbJ_items 1 sbJ_abi_version_sym - let sbJ__sb_G116 call sbJ_make_blob _sb_G218 2 - let sbJ__sb_G117 call sbJ_get_namespace_absolute sbJ__sb_G116 - let sbJ__sb_G118 call sbJ_make_blob _sb_G219 1 - let sbJ__sb_G119 call sbJ_namespace_intern sbJ__sb_G117 sbJ__sb_G118 - set-word sbJ_items 2 sbJ__sb_G119 + let sbJ__sb_G122 call sbJ_make_blob _sb_G224 2 + let sbJ__sb_G123 call sbJ_get_namespace_absolute sbJ__sb_G122 + let sbJ__sb_G124 call sbJ_make_blob _sb_G225 1 + let sbJ__sb_G125 call sbJ_namespace_intern sbJ__sb_G123 sbJ__sb_G124 + set-word sbJ_items 2 sbJ__sb_G125 set-word sbJ_items 3 5 - let sbJ__sb_G120 call sbJ_array 4 sbJ_items - call sbJ_write_antimony sbJ__sb_G120 sbJ_stream + let sbJ__sb_G126 call sbJ_array 4 sbJ_items + call sbJ_write_antimony sbJ__sb_G126 sbJ_stream call sbJ_write_newline_and_flush_stream sbJ_stream - let sbJ__sb_G121 call sbJ_make_blob _sb_G220 2 - let sbJ__sb_G122 call sbJ_get_namespace_absolute sbJ__sb_G121 - let sbJ__sb_G123 call sbJ_make_blob _sb_G221 7 - let sbJ__sb_G124 call sbJ_namespace_intern sbJ__sb_G122 sbJ__sb_G123 - set-word sbJ_items 0 sbJ__sb_G124 - let sbJ__sb_G125 call sbJ_make_blob _sb_G222 2 - let sbJ__sb_G126 call sbJ_get_namespace_absolute sbJ__sb_G125 - let sbJ__sb_G127 call sbJ_make_blob _sb_G223 9 - let sbJ__sb_G128 call sbJ_namespace_intern sbJ__sb_G126 sbJ__sb_G127 - set-word sbJ_items 1 sbJ__sb_G128 - let sbJ__sb_G129 call sbJ_array 2 sbJ_items - call sbJ_write_antimony sbJ__sb_G129 sbJ_stream + let sbJ__sb_G127 call sbJ_make_blob _sb_G226 2 + let sbJ__sb_G128 call sbJ_get_namespace_absolute sbJ__sb_G127 + let sbJ__sb_G129 call sbJ_make_blob _sb_G227 7 + let sbJ__sb_G130 call sbJ_namespace_intern sbJ__sb_G128 sbJ__sb_G129 + set-word sbJ_items 0 sbJ__sb_G130 + let sbJ__sb_G131 call sbJ_make_blob _sb_G228 2 + let sbJ__sb_G132 call sbJ_get_namespace_absolute sbJ__sb_G131 + let sbJ__sb_G133 call sbJ_make_blob _sb_G229 9 + let sbJ__sb_G134 call sbJ_namespace_intern sbJ__sb_G132 sbJ__sb_G133 + set-word sbJ_items 1 sbJ__sb_G134 + let sbJ__sb_G135 call sbJ_array 2 sbJ_items + call sbJ_write_antimony sbJ__sb_G135 sbJ_stream call sbJ_write_newline_and_flush_stream sbJ_stream # Add imports for the symbols we export, so that the init code # can use them. let sbJ_exports get-word sbJ_state 3 - let sbJ__sb_G130 call sbJ_dynarray_length sbJ_exports - let sbJ_exports_len sbJ__sb_G130 + let sbJ__sb_G136 call sbJ_dynarray_length sbJ_exports + let sbJ_exports_len sbJ__sb_G136 block - let _sb_G224 0 + let _sb_G230 0 let sbJ_code auto-words 2 - let sbJ__sb_G131 call sbJ_make_blob _sb_G227 2 - let sbJ__sb_G132 call sbJ_get_namespace_absolute sbJ__sb_G131 - let sbJ__sb_G133 call sbJ_make_blob _sb_G228 6 - let sbJ__sb_G134 call sbJ_namespace_intern sbJ__sb_G132 sbJ__sb_G133 - set-word sbJ_code 0 sbJ__sb_G134 + let sbJ__sb_G137 call sbJ_make_blob _sb_G233 2 + let sbJ__sb_G138 call sbJ_get_namespace_absolute sbJ__sb_G137 + let sbJ__sb_G139 call sbJ_make_blob _sb_G234 6 + let sbJ__sb_G140 call sbJ_namespace_intern sbJ__sb_G138 sbJ__sb_G139 + set-word sbJ_code 0 sbJ__sb_G140 let sbJ_i 0 -_sb_G225: - let sbJ__sb_G135 call sbJ_lt sbJ_i sbJ_exports_len - set _sb_G224 sbJ__sb_G135 - ifeq _sb_G224 @sbJ_false - goto _sb_G226 +_sb_G231: + let sbJ__sb_G141 call sbJ_lt sbJ_i sbJ_exports_len + set _sb_G230 sbJ__sb_G141 + ifeq _sb_G230 @sbJ_false + goto _sb_G232 end if - let sbJ__sb_G136 call sbJ_dynarray_nth sbJ_exports sbJ_i - set-word sbJ_code 1 sbJ__sb_G136 - let sbJ__sb_G137 call sbJ_array 2 sbJ_code - call sbJ_write_antimony sbJ__sb_G137 sbJ_stream + let sbJ__sb_G142 call sbJ_dynarray_nth sbJ_exports sbJ_i + set-word sbJ_code 1 sbJ__sb_G142 + let sbJ__sb_G143 call sbJ_array 2 sbJ_code + call sbJ_write_antimony sbJ__sb_G143 sbJ_stream call sbJ_write_newline_and_flush_stream sbJ_stream set sbJ_i add sbJ_i 1 - goto _sb_G225 -_sb_G226: + goto _sb_G231 +_sb_G232: end block let sbJ_old_ns @sbJ_J2anamespaceJ2a set @sbJ_J2anamespaceJ2a sbJ_namespace block - let _sb_G229 0 - let sbJ__sb_G138 get-word sbJ_state 2 - let sbJ_imports sbJ__sb_G138 - let sbJ__sb_G139 call sbJ_dynarray_length sbJ_imports - let sbJ_imports_len sbJ__sb_G139 + let _sb_G235 0 + let sbJ__sb_G144 get-word sbJ_state 2 + let sbJ_imports sbJ__sb_G144 + let sbJ__sb_G145 call sbJ_dynarray_length sbJ_imports + let sbJ_imports_len sbJ__sb_G145 let sbJ_prefix_items auto-words 1 - let sbJ__sb_G140 call sbJ_make_blob _sb_G232 6 - let sbJ__sb_G141 call sbJ_namespace_intern sbJ_namespace sbJ__sb_G140 6 - set-word sbJ_prefix_items 0 sbJ__sb_G141 + let sbJ__sb_G146 call sbJ_make_blob _sb_G238 6 + let sbJ__sb_G147 call sbJ_namespace_intern sbJ_namespace sbJ__sb_G146 6 + set-word sbJ_prefix_items 0 sbJ__sb_G147 let sbJ_prefix call sbJ_array 1 sbJ_prefix_items let sbJ_i 0 -_sb_G230: - let sbJ__sb_G142 call sbJ_lt sbJ_i sbJ_imports_len - set _sb_G229 sbJ__sb_G142 - ifeq _sb_G229 @sbJ_false - goto _sb_G231 +_sb_G236: + let sbJ__sb_G148 call sbJ_lt sbJ_i sbJ_imports_len + set _sb_G235 sbJ__sb_G148 + ifeq _sb_G235 @sbJ_false + goto _sb_G237 end if - let sbJ__sb_G143 call sbJ_dynarray_nth sbJ_imports sbJ_i - let sbJ__sb_G144 call sbJ_subarray sbJ__sb_G143 1 - let sbJ__sb_G145 call sbJ_concatenate_arrays sbJ_prefix sbJ__sb_G144 - call sbJ_write_antimony sbJ__sb_G145 sbJ_stream + let sbJ__sb_G149 call sbJ_dynarray_nth sbJ_imports sbJ_i + let sbJ__sb_G150 call sbJ_subarray sbJ__sb_G149 1 + let sbJ__sb_G151 call sbJ_concatenate_arrays sbJ_prefix sbJ__sb_G150 + call sbJ_write_antimony sbJ__sb_G151 sbJ_stream call sbJ_write_newline_and_flush_stream sbJ_stream set sbJ_i add sbJ_i 1 - goto _sb_G230 -_sb_G231: + goto _sb_G236 +_sb_G237: end block - let sbJ__sb_G146 call sbJ_make_blob _sb_G233 9 - let sbJ_exports_sym call sbJ_namespace_intern sbJ_namespace sbJ__sb_G146 - let sbJ__sb_G147 call sbJ_make_blob _sb_G234 6 - let sbJ__sb_G148 call sbJ_namespace_intern sbJ_namespace sbJ__sb_G147 - set-word sbJ_items 0 sbJ__sb_G148 + let sbJ__sb_G152 call sbJ_make_blob _sb_G239 9 + let sbJ_exports_sym call sbJ_namespace_intern sbJ_namespace sbJ__sb_G152 + let sbJ__sb_G153 call sbJ_make_blob _sb_G240 6 + let sbJ__sb_G154 call sbJ_namespace_intern sbJ_namespace sbJ__sb_G153 + set-word sbJ_items 0 sbJ__sb_G154 set-word sbJ_items 1 sbJ_exports_sym set-word sbJ_items 2 sbJ_init_fun - let sbJ__sb_G149 call sbJ_array 3 sbJ_items - call sbJ_write_antimony sbJ__sb_G149 sbJ_stream + let sbJ__sb_G155 call sbJ_array 3 sbJ_items + call sbJ_write_antimony sbJ__sb_G155 sbJ_stream call sbJ_write_newline_and_flush_stream sbJ_stream let sbJ_exports_code call sbJ_dynarray 0 0 - let sbJ__sb_G150 call sbJ_make_blob _sb_G235 5 - let sbJ_table_sym call sbJ_namespace_intern sbJ_namespace sbJ__sb_G150 + let sbJ__sb_G156 call sbJ_make_blob _sb_G241 5 + let sbJ_table_sym call sbJ_namespace_intern sbJ_namespace sbJ__sb_G156 block - let _sb_G236 0 - let sbJ__sb_G151 call sbJ_make_blob _sb_G239 3 - let sbJ__sb_G152 call sbJ_namespace_intern sbJ_namespace sbJ__sb_G151 - set-word sbJ_items 0 sbJ__sb_G152 + let _sb_G242 0 + let sbJ__sb_G157 call sbJ_make_blob _sb_G245 3 + let sbJ__sb_G158 call sbJ_namespace_intern sbJ_namespace sbJ__sb_G157 + set-word sbJ_items 0 sbJ__sb_G158 set-word sbJ_items 1 sbJ_table_sym - let sbJ__sb_G153 call sbJ_make_blob _sb_G240 2 - let sbJ__sb_G154 call sbJ_get_namespace_absolute sbJ__sb_G153 - let sbJ__sb_G155 call sbJ_make_blob _sb_G241 15 - let sbJ__sb_G156 call sbJ_namespace_intern sbJ__sb_G154 sbJ__sb_G155 - set-word sbJ_items 2 sbJ__sb_G156 - let sbJ__sb_G157 call sbJ_make_blob _sb_G242 2 - let sbJ__sb_G158 call sbJ_get_namespace_absolute sbJ__sb_G157 - let sbJ__sb_G159 call sbJ_make_blob _sb_G243 11 - let sbJ__sb_G160 call sbJ_namespace_intern sbJ__sb_G158 sbJ__sb_G159 - set-word sbJ_items 3 sbJ__sb_G160 - let sbJ__sb_G161 call sbJ_make_blob _sb_G244 2 - let sbJ__sb_G162 call sbJ_get_namespace_absolute sbJ__sb_G161 - let sbJ__sb_G163 call sbJ_make_blob _sb_G245 9 - let sbJ__sb_G164 call sbJ_namespace_intern sbJ__sb_G162 sbJ__sb_G163 - set-word sbJ_items 4 sbJ__sb_G164 - let sbJ__sb_G165 call sbJ_array 5 sbJ_items - call sbJ_dynarray_add sbJ_exports_code sbJ__sb_G165 - let sbJ__sb_G166 call sbJ_make_blob _sb_G246 3 - let sbJ_sym_sym call sbJ_namespace_intern sbJ_namespace sbJ__sb_G166 - let sbJ__sb_G167 call sbJ_make_blob _sb_G247 3 - let sbJ__sb_G168 call sbJ_namespace_intern sbJ_namespace sbJ__sb_G167 3 - set-word sbJ_items 0 sbJ__sb_G168 + let sbJ__sb_G159 call sbJ_make_blob _sb_G246 2 + let sbJ__sb_G160 call sbJ_get_namespace_absolute sbJ__sb_G159 + let sbJ__sb_G161 call sbJ_make_blob _sb_G247 15 + let sbJ__sb_G162 call sbJ_namespace_intern sbJ__sb_G160 sbJ__sb_G161 + set-word sbJ_items 2 sbJ__sb_G162 + let sbJ__sb_G163 call sbJ_make_blob _sb_G248 2 + let sbJ__sb_G164 call sbJ_get_namespace_absolute sbJ__sb_G163 + let sbJ__sb_G165 call sbJ_make_blob _sb_G249 11 + let sbJ__sb_G166 call sbJ_namespace_intern sbJ__sb_G164 sbJ__sb_G165 + set-word sbJ_items 3 sbJ__sb_G166 + let sbJ__sb_G167 call sbJ_make_blob _sb_G250 2 + let sbJ__sb_G168 call sbJ_get_namespace_absolute sbJ__sb_G167 + let sbJ__sb_G169 call sbJ_make_blob _sb_G251 9 + let sbJ__sb_G170 call sbJ_namespace_intern sbJ__sb_G168 sbJ__sb_G169 + set-word sbJ_items 4 sbJ__sb_G170 + let sbJ__sb_G171 call sbJ_array 5 sbJ_items + call sbJ_dynarray_add sbJ_exports_code sbJ__sb_G171 + let sbJ__sb_G172 call sbJ_make_blob _sb_G252 3 + let sbJ_sym_sym call sbJ_namespace_intern sbJ_namespace sbJ__sb_G172 + let sbJ__sb_G173 call sbJ_make_blob _sb_G253 3 + let sbJ__sb_G174 call sbJ_namespace_intern sbJ_namespace sbJ__sb_G173 3 + set-word sbJ_items 0 sbJ__sb_G174 set-word sbJ_items 1 sbJ_sym_sym - let sbJ__sb_G169 call sbJ_make_blob _sb_G248 1 - let sbJ__sb_G170 call sbJ_namespace_intern sbJ_namespace sbJ__sb_G169 1 - set-word sbJ_items 2 sbJ__sb_G170 + let sbJ__sb_G175 call sbJ_make_blob _sb_G254 1 + let sbJ__sb_G176 call sbJ_namespace_intern sbJ_namespace sbJ__sb_G175 1 + set-word sbJ_items 2 sbJ__sb_G176 set-word sbJ_items 3 1 - let sbJ__sb_G171 call sbJ_array 4 sbJ_items - call sbJ_dynarray_add sbJ_exports_code sbJ__sb_G171 + let sbJ__sb_G177 call sbJ_array 4 sbJ_items + call sbJ_dynarray_add sbJ_exports_code sbJ__sb_G177 let sbJ_i 0 -_sb_G237: - let sbJ__sb_G172 call sbJ_lt sbJ_i sbJ_exports_len - set _sb_G236 sbJ__sb_G172 - ifeq _sb_G236 @sbJ_false - goto _sb_G238 +_sb_G243: + let sbJ__sb_G178 call sbJ_lt sbJ_i sbJ_exports_len + set _sb_G242 sbJ__sb_G178 + ifeq _sb_G242 @sbJ_false + goto _sb_G244 end if - let sbJ__sb_G173 call sbJ_make_blob _sb_G249 5 - let sbJ__sb_G174 call sbJ_namespace_intern sbJ_namespace sbJ__sb_G173 - set-word sbJ_items 0 sbJ__sb_G174 - let sbJ__sb_G175 call sbJ_dynarray_nth sbJ_exports sbJ_i - set-word sbJ_items 1 sbJ__sb_G175 - let sbJ__sb_G176 call sbJ_array 2 sbJ_items - set-word sbJ_items 2 sbJ__sb_G176 - let sbJ__sb_G177 call sbJ_make_blob _sb_G250 3 - let sbJ__sb_G178 call sbJ_namespace_intern sbJ_namespace sbJ__sb_G177 - set-word sbJ_items 0 sbJ__sb_G178 + let sbJ__sb_G179 call sbJ_make_blob _sb_G255 5 + let sbJ__sb_G180 call sbJ_namespace_intern sbJ_namespace sbJ__sb_G179 + set-word sbJ_items 0 sbJ__sb_G180 + let sbJ__sb_G181 call sbJ_dynarray_nth sbJ_exports sbJ_i + set-word sbJ_items 1 sbJ__sb_G181 + let sbJ__sb_G182 call sbJ_array 2 sbJ_items + set-word sbJ_items 2 sbJ__sb_G182 + let sbJ__sb_G183 call sbJ_make_blob _sb_G256 3 + let sbJ__sb_G184 call sbJ_namespace_intern sbJ_namespace sbJ__sb_G183 + set-word sbJ_items 0 sbJ__sb_G184 set-word sbJ_items 1 sbJ_sym_sym - let sbJ__sb_G179 call sbJ_array 3 sbJ_items - call sbJ_dynarray_add sbJ_exports_code sbJ__sb_G179 - let sbJ__sb_G180 call sbJ_make_blob _sb_G251 2 - let sbJ__sb_G181 call sbJ_get_namespace_absolute sbJ__sb_G180 - let sbJ__sb_G182 call sbJ_make_blob _sb_G252 14 - let sbJ__sb_G183 call sbJ_namespace_intern sbJ__sb_G181 sbJ__sb_G182 - set-word sbJ_items 0 sbJ__sb_G183 + let sbJ__sb_G185 call sbJ_array 3 sbJ_items + call sbJ_dynarray_add sbJ_exports_code sbJ__sb_G185 + let sbJ__sb_G186 call sbJ_make_blob _sb_G257 2 + let sbJ__sb_G187 call sbJ_get_namespace_absolute sbJ__sb_G186 + let sbJ__sb_G188 call sbJ_make_blob _sb_G258 14 + let sbJ__sb_G189 call sbJ_namespace_intern sbJ__sb_G187 sbJ__sb_G188 + set-word sbJ_items 0 sbJ__sb_G189 set-word sbJ_items 1 sbJ_table_sym set-word sbJ_items 2 sbJ_sym_sym set-word sbJ_items 3 sbJ_sym_sym - let sbJ__sb_G184 call sbJ_array 4 sbJ_items - call sbJ_dynarray_add sbJ_exports_code sbJ__sb_G184 + let sbJ__sb_G190 call sbJ_array 4 sbJ_items + call sbJ_dynarray_add sbJ_exports_code sbJ__sb_G190 set sbJ_i add sbJ_i 1 - goto _sb_G237 -_sb_G238: + goto _sb_G243 +_sb_G244: end block - let sbJ__sb_G185 call sbJ_make_blob _sb_G253 6 - let sbJ__sb_G186 call sbJ_namespace_intern sbJ_namespace sbJ__sb_G185 - set-word sbJ_items 0 sbJ__sb_G186 + let sbJ__sb_G191 call sbJ_make_blob _sb_G259 6 + let sbJ__sb_G192 call sbJ_namespace_intern sbJ_namespace sbJ__sb_G191 + set-word sbJ_items 0 sbJ__sb_G192 set-word sbJ_items 1 sbJ_table_sym - let sbJ__sb_G187 call sbJ_array 2 sbJ_items - call sbJ_dynarray_add sbJ_exports_code sbJ__sb_G187 - let sbJ__sb_G188 call sbJ_make_blob _sb_G254 8 - let sbJ__sb_G189 call sbJ_namespace_intern sbJ_namespace sbJ__sb_G188 - set-word sbJ_items 0 sbJ__sb_G189 + let sbJ__sb_G193 call sbJ_array 2 sbJ_items + call sbJ_dynarray_add sbJ_exports_code sbJ__sb_G193 + let sbJ__sb_G194 call sbJ_make_blob _sb_G260 8 + let sbJ__sb_G195 call sbJ_namespace_intern sbJ_namespace sbJ__sb_G194 + set-word sbJ_items 0 sbJ__sb_G195 set-word sbJ_items 1 sbJ_exports_sym - let sbJ__sb_G190 call sbJ_dynarray_to_array sbJ_exports_code - let sbJ__sb_G191 call sbJ_block sbJ__sb_G190 - set-word sbJ_items 2 sbJ__sb_G191 - let sbJ__sb_G192 call sbJ_array 3 sbJ_items - call sbJ_write_antimony sbJ__sb_G192 sbJ_stream + let sbJ__sb_G196 call sbJ_dynarray_to_array sbJ_exports_code + let sbJ__sb_G197 call sbJ_block sbJ__sb_G196 + set-word sbJ_items 2 sbJ__sb_G197 + let sbJ__sb_G198 call sbJ_array 3 sbJ_items + call sbJ_write_antimony sbJ__sb_G198 sbJ_stream call sbJ_write_newline_and_flush_stream sbJ_stream - let sbJ__sb_G193 call sbJ_make_blob _sb_G255 8 - let sbJ__sb_G194 call sbJ_namespace_intern sbJ_namespace sbJ__sb_G193 - set-word sbJ_items 0 sbJ__sb_G194 + let sbJ__sb_G199 call sbJ_make_blob _sb_G261 8 + let sbJ__sb_G200 call sbJ_namespace_intern sbJ_namespace sbJ__sb_G199 + set-word sbJ_items 0 sbJ__sb_G200 set-word sbJ_items 1 sbJ_init_fun - let sbJ__sb_G195 call sbJ_dynarray_to_array sbJ_init_code - let sbJ__sb_G196 call sbJ_block sbJ__sb_G195 - set-word sbJ_items 2 sbJ__sb_G196 - let sbJ__sb_G197 call sbJ_array 3 sbJ_items - call sbJ_write_antimony sbJ__sb_G197 sbJ_stream + let sbJ__sb_G201 call sbJ_dynarray_to_array sbJ_init_code + let sbJ__sb_G202 call sbJ_block sbJ__sb_G201 + set-word sbJ_items 2 sbJ__sb_G202 + let sbJ__sb_G203 call sbJ_array 3 sbJ_items + call sbJ_write_antimony sbJ__sb_G203 sbJ_stream call sbJ_write_newline_and_flush_stream sbJ_stream call sbJ_close_stream sbJ_stream set @sbJ_J2anamespaceJ2a sbJ_old_ns - let sbJ__sb_G198 call sbJ_make_blob _sb_G256 4 - let sbJ__sb_G199 call sbJ_concatenate_blobs sbJ_init_name sbJ__sb_G198 - let sbJ_outfile sbJ__sb_G199 + let sbJ__sb_G204 call sbJ_make_blob _sb_G262 4 + let sbJ__sb_G205 call sbJ_concatenate_blobs sbJ_init_name sbJ__sb_G204 + let sbJ_outfile sbJ__sb_G205 call sbJ_transmute_file sbJ_state sbJ_init_name sbJ_outfile call sbJ_unlink sbJ_init_name return 0 @@ -739,12 +751,12 @@ align sbJ_compile_file: function sbJ_state sbJ_infile sbJ_outfile sbJ_tempdir block - let sbJ__sb_G257 call sbJ_cstring_from_blob sbJ_infile - let sbJ__sb_G258 call basename sbJ__sb_G257 - let sbJ_file call sbJ_blob_from_cstring sbJ__sb_G258 - let sbJ__sb_G259 call sbJ_make_blob _sb_G261 4 - let sbJ__sb_G260 call sbJ_concatenate_blobs sbJ_file sbJ__sb_G259 - let sbJ_tempfile call sbJ_path_join sbJ_tempdir sbJ__sb_G260 + let sbJ__sb_G263 call sbJ_cstring_from_blob sbJ_infile + let sbJ__sb_G264 call basename sbJ__sb_G263 + let sbJ_file call sbJ_blob_from_cstring sbJ__sb_G264 + let sbJ__sb_G265 call sbJ_make_blob _sb_G267 4 + let sbJ__sb_G266 call sbJ_concatenate_blobs sbJ_file sbJ__sb_G265 + let sbJ_tempfile call sbJ_path_join sbJ_tempdir sbJ__sb_G266 call sbJ_transmute_file sbJ_state sbJ_infile sbJ_tempfile call sbJ_voodoo_compile_file sbJ_tempfile sbJ_outfile return 0 @@ -756,15 +768,15 @@ sbJ_make_compile_module_state: function sbJ_namespace block let sbJ_state call sbJ_allocate_words 6 - let sbJ__sb_G262 call sbJ_dynarray 0 0 - set-word sbJ_state 1 sbJ__sb_G262 - let sbJ__sb_G263 call sbJ_dynarray 0 0 - set-word sbJ_state 2 sbJ__sb_G263 - let sbJ__sb_G264 call sbJ_dynarray 0 0 - set-word sbJ_state 3 sbJ__sb_G264 + let sbJ__sb_G268 call sbJ_dynarray 0 0 + set-word sbJ_state 1 sbJ__sb_G268 + let sbJ__sb_G269 call sbJ_dynarray 0 0 + set-word sbJ_state 2 sbJ__sb_G269 + let sbJ__sb_G270 call sbJ_dynarray 0 0 + set-word sbJ_state 3 sbJ__sb_G270 set-word sbJ_state 4 sbJ_namespace - let sbJ__sb_G265 call sbJ_make_dealias_state - set-word sbJ_state 5 sbJ__sb_G265 + let sbJ__sb_G271 call sbJ_make_dealias_state + set-word sbJ_state 5 sbJ__sb_G271 return sbJ_state end block end function @@ -796,49 +808,49 @@ align sbJ_transmute_stream_with_state: function sbJ_state sbJ_input sbJ_output block - let sbJ__sb_G266 call sbJ_make_voodoo_translator - let sbJ_voodoo_translator sbJ__sb_G266 + let sbJ__sb_G272 call sbJ_make_voodoo_translator + let sbJ_voodoo_translator sbJ__sb_G272 let sbJ_namespace get-word sbJ_state 4 let sbJ_old_ns @sbJ_J2anamespaceJ2a set @sbJ_J2anamespaceJ2a sbJ_namespace - let sbJ__sb_G267 call sbJ_make_blob _sb_G283 2 - let sbJ__sb_G268 call sbJ_get_namespace_absolute sbJ__sb_G267 - let sbJ__sb_G269 call sbJ_make_blob _sb_G284 4 - let sbJ__sb_G270 call sbJ_namespace_intern sbJ__sb_G268 sbJ__sb_G269 - let sbJ__sb_G271 call sbJ_symbol_namespace sbJ__sb_G270 - let sbJ__sb_G272 call sbJ_ne sbJ_namespace sbJ__sb_G271 - ifeq sbJ__sb_G272 @sbJ_true + let sbJ__sb_G273 call sbJ_make_blob _sb_G289 2 + let sbJ__sb_G274 call sbJ_get_namespace_absolute sbJ__sb_G273 + let sbJ__sb_G275 call sbJ_make_blob _sb_G290 4 + let sbJ__sb_G276 call sbJ_namespace_intern sbJ__sb_G274 sbJ__sb_G275 + let sbJ__sb_G277 call sbJ_symbol_namespace sbJ__sb_G276 + let sbJ__sb_G278 call sbJ_ne sbJ_namespace sbJ__sb_G277 + ifeq sbJ__sb_G278 @sbJ_true block call sbJ_add_default_imports sbJ_state sbJ_voodoo_translator call sbJ_add_default_aliases sbJ_state end block end if let sbJ_items auto-words 2 - let sbJ__sb_G273 call sbJ_make_blob _sb_G285 2 - let sbJ__sb_G274 call sbJ_get_namespace_absolute sbJ__sb_G273 - let sbJ__sb_G275 call sbJ_make_blob _sb_G286 6 - let sbJ__sb_G276 call sbJ_namespace_intern sbJ__sb_G274 sbJ__sb_G275 - set-word sbJ_items 0 sbJ__sb_G276 - let sbJ__sb_G277 call sbJ_make_blob _sb_G287 2 - let sbJ__sb_G278 call sbJ_get_namespace_absolute sbJ__sb_G277 - let sbJ__sb_G279 call sbJ_make_blob _sb_G288 5 - let sbJ__sb_G280 call sbJ_namespace_intern sbJ__sb_G278 sbJ__sb_G279 - set-word sbJ_items 1 sbJ__sb_G280 - let sbJ__sb_G281 call sbJ_array 2 sbJ_items - call sbJ_transmute_top_level sbJ_state sbJ_voodoo_translator sbJ__sb_G281 + let sbJ__sb_G279 call sbJ_make_blob _sb_G291 2 + let sbJ__sb_G280 call sbJ_get_namespace_absolute sbJ__sb_G279 + let sbJ__sb_G281 call sbJ_make_blob _sb_G292 6 + let sbJ__sb_G282 call sbJ_namespace_intern sbJ__sb_G280 sbJ__sb_G281 + set-word sbJ_items 0 sbJ__sb_G282 + let sbJ__sb_G283 call sbJ_make_blob _sb_G293 2 + let sbJ__sb_G284 call sbJ_get_namespace_absolute sbJ__sb_G283 + let sbJ__sb_G285 call sbJ_make_blob _sb_G294 5 + let sbJ__sb_G286 call sbJ_namespace_intern sbJ__sb_G284 sbJ__sb_G285 + set-word sbJ_items 1 sbJ__sb_G286 + let sbJ__sb_G287 call sbJ_array 2 sbJ_items + call sbJ_transmute_top_level sbJ_state sbJ_voodoo_translator sbJ__sb_G287 block - let _sb_G289 0 + let _sb_G295 0 let sbJ_code 0 -_sb_G290: +_sb_G296: set sbJ_code call sbJ_read_antimony sbJ_input - let sbJ__sb_G282 call sbJ_ne sbJ_code -1 - set _sb_G289 sbJ__sb_G282 - ifeq _sb_G289 @sbJ_false - goto _sb_G291 + let sbJ__sb_G288 call sbJ_ne sbJ_code -1 + set _sb_G295 sbJ__sb_G288 + ifeq _sb_G295 @sbJ_false + goto _sb_G297 end if call sbJ_transmute_top_level sbJ_state sbJ_voodoo_translator sbJ_code - goto _sb_G290 -_sb_G291: + goto _sb_G296 +_sb_G297: end block set @sbJ_J2anamespaceJ2a sbJ_old_ns call sbJ_voodoo_translator_write sbJ_voodoo_translator sbJ_output @@ -852,81 +864,81 @@ function sbJ_state sbJ_translator sbJ_code block let sbJ_dealiasJ2dstate get-word sbJ_state 5 set sbJ_code call sbJ_dealias sbJ_dealiasJ2dstate sbJ_code - let sbJ__sb_G292 call sbJ_type_of sbJ_code - let sbJ__sb_G293 call sbJ_eq sbJ__sb_G292 sbJ_array_t - ifeq sbJ__sb_G293 @sbJ_true + let sbJ__sb_G298 call sbJ_type_of sbJ_code + let sbJ__sb_G299 call sbJ_eq sbJ__sb_G298 sbJ_array_t + ifeq sbJ__sb_G299 @sbJ_true block let sbJ_firstJ2dword call sbJ_array_nth sbJ_code 0 - let sbJ__sb_G294 call sbJ_make_blob _sb_G341 2 - let sbJ__sb_G295 call sbJ_get_namespace_absolute sbJ__sb_G294 - let sbJ__sb_G296 call sbJ_make_blob _sb_G342 6 - let sbJ__sb_G297 call sbJ_namespace_intern sbJ__sb_G295 sbJ__sb_G296 - let sbJ__sb_G298 call sbJ_eq sbJ_firstJ2dword sbJ__sb_G297 - ifeq sbJ__sb_G298 @sbJ_true + let sbJ__sb_G300 call sbJ_make_blob _sb_G347 2 + let sbJ__sb_G301 call sbJ_get_namespace_absolute sbJ__sb_G300 + let sbJ__sb_G302 call sbJ_make_blob _sb_G348 6 + let sbJ__sb_G303 call sbJ_namespace_intern sbJ__sb_G301 sbJ__sb_G302 + let sbJ__sb_G304 call sbJ_eq sbJ_firstJ2dword sbJ__sb_G303 + ifeq sbJ__sb_G304 @sbJ_true block block - let _sb_G343 0 + let _sb_G349 0 let sbJ_exports get-word sbJ_state 3 let sbJ_len call sbJ_array_length sbJ_code let sbJ_i 1 -_sb_G344: - let sbJ__sb_G299 call sbJ_lt sbJ_i sbJ_len - set _sb_G343 sbJ__sb_G299 - ifeq _sb_G343 @sbJ_false - goto _sb_G345 +_sb_G350: + let sbJ__sb_G305 call sbJ_lt sbJ_i sbJ_len + set _sb_G349 sbJ__sb_G305 + ifeq _sb_G349 @sbJ_false + goto _sb_G351 end if - let sbJ__sb_G300 call sbJ_array_nth sbJ_code sbJ_i - call sbJ_dynarray_add sbJ_exports sbJ__sb_G300 + let sbJ__sb_G306 call sbJ_array_nth sbJ_code sbJ_i + call sbJ_dynarray_add sbJ_exports sbJ__sb_G306 set sbJ_i add sbJ_i 1 - goto _sb_G344 -_sb_G345: + goto _sb_G350 +_sb_G351: end block call sbJ_voodoo_translator_translate sbJ_translator sbJ_code end block else block - let sbJ__sb_G301 call sbJ_make_blob _sb_G346 2 - let sbJ__sb_G302 call sbJ_get_namespace_absolute sbJ__sb_G301 - let sbJ__sb_G303 call sbJ_make_blob _sb_G347 6 - let sbJ__sb_G304 call sbJ_namespace_intern sbJ__sb_G302 sbJ__sb_G303 - let sbJ__sb_G305 call sbJ_eq sbJ_firstJ2dword sbJ__sb_G304 - ifeq sbJ__sb_G305 @sbJ_true + let sbJ__sb_G307 call sbJ_make_blob _sb_G352 2 + let sbJ__sb_G308 call sbJ_get_namespace_absolute sbJ__sb_G307 + let sbJ__sb_G309 call sbJ_make_blob _sb_G353 6 + let sbJ__sb_G310 call sbJ_namespace_intern sbJ__sb_G308 sbJ__sb_G309 + let sbJ__sb_G311 call sbJ_eq sbJ_firstJ2dword sbJ__sb_G310 + ifeq sbJ__sb_G311 @sbJ_true block - let sbJ__sb_G306 get-word sbJ_state 2 - call sbJ_dynarray_add sbJ__sb_G306 sbJ_code - let sbJ__sb_G307 call sbJ_make_blob _sb_G348 2 - let sbJ__sb_G308 call sbJ_get_namespace_absolute sbJ__sb_G307 - let sbJ__sb_G309 call sbJ_make_blob _sb_G349 4 - let sbJ__sb_G310 call sbJ_namespace_intern sbJ__sb_G308 sbJ__sb_G309 - let sbJ__sb_G311 call sbJ_symbol_namespace sbJ__sb_G310 - let sbJ__sb_G312 call sbJ_ne @sbJ_J2anamespaceJ2a sbJ__sb_G311 - ifeq sbJ__sb_G312 @sbJ_true + let sbJ__sb_G312 get-word sbJ_state 2 + call sbJ_dynarray_add sbJ__sb_G312 sbJ_code + let sbJ__sb_G313 call sbJ_make_blob _sb_G354 2 + let sbJ__sb_G314 call sbJ_get_namespace_absolute sbJ__sb_G313 + let sbJ__sb_G315 call sbJ_make_blob _sb_G355 4 + let sbJ__sb_G316 call sbJ_namespace_intern sbJ__sb_G314 sbJ__sb_G315 + let sbJ__sb_G317 call sbJ_symbol_namespace sbJ__sb_G316 + let sbJ__sb_G318 call sbJ_ne @sbJ_J2anamespaceJ2a sbJ__sb_G317 + ifeq sbJ__sb_G318 @sbJ_true block block - let _sb_G350 0 + let _sb_G356 0 let sbJ_len call sbJ_array_length sbJ_code let sbJ_i 1 -_sb_G351: - let sbJ__sb_G313 call sbJ_lt sbJ_i sbJ_len - set _sb_G350 sbJ__sb_G313 - ifeq _sb_G350 @sbJ_false - goto _sb_G352 +_sb_G357: + let sbJ__sb_G319 call sbJ_lt sbJ_i sbJ_len + set _sb_G356 sbJ__sb_G319 + ifeq _sb_G356 @sbJ_false + goto _sb_G358 end if let sbJ_sym call sbJ_array_nth sbJ_code sbJ_i let sbJ_abs_sym call sbJ_absolute_symbol sbJ_sym let sbJ_items auto-words 3 - let sbJ__sb_G314 call sbJ_make_blob _sb_G353 2 - let sbJ__sb_G315 call sbJ_get_namespace_absolute sbJ__sb_G314 - let sbJ__sb_G316 call sbJ_make_blob _sb_G354 5 - let sbJ__sb_G317 call sbJ_namespace_intern sbJ__sb_G315 sbJ__sb_G316 - set-word sbJ_items 0 sbJ__sb_G317 + let sbJ__sb_G320 call sbJ_make_blob _sb_G359 2 + let sbJ__sb_G321 call sbJ_get_namespace_absolute sbJ__sb_G320 + let sbJ__sb_G322 call sbJ_make_blob _sb_G360 5 + let sbJ__sb_G323 call sbJ_namespace_intern sbJ__sb_G321 sbJ__sb_G322 + set-word sbJ_items 0 sbJ__sb_G323 set-word sbJ_items 1 sbJ_sym set-word sbJ_items 2 sbJ_abs_sym - let sbJ__sb_G318 call sbJ_array 3 sbJ_items - call sbJ_dealias sbJ_dealiasJ2dstate sbJ__sb_G318 + let sbJ__sb_G324 call sbJ_array 3 sbJ_items + call sbJ_dealias sbJ_dealiasJ2dstate sbJ__sb_G324 set sbJ_i add sbJ_i 1 - goto _sb_G351 -_sb_G352: + goto _sb_G357 +_sb_G358: end block end block end if @@ -934,52 +946,52 @@ _sb_G352: end block else block - let sbJ__sb_G319 call sbJ_make_blob _sb_G355 2 - let sbJ__sb_G320 call sbJ_get_namespace_absolute sbJ__sb_G319 - let sbJ__sb_G321 call sbJ_make_blob _sb_G356 8 - let sbJ__sb_G322 call sbJ_namespace_intern sbJ__sb_G320 sbJ__sb_G321 - let sbJ__sb_G323 call sbJ_eq sbJ_firstJ2dword sbJ__sb_G322 - ifeq sbJ__sb_G323 @sbJ_true + let sbJ__sb_G325 call sbJ_make_blob _sb_G361 2 + let sbJ__sb_G326 call sbJ_get_namespace_absolute sbJ__sb_G325 + let sbJ__sb_G327 call sbJ_make_blob _sb_G362 8 + let sbJ__sb_G328 call sbJ_namespace_intern sbJ__sb_G326 sbJ__sb_G327 + let sbJ__sb_G329 call sbJ_eq sbJ_firstJ2dword sbJ__sb_G328 + ifeq sbJ__sb_G329 @sbJ_true block call sbJ_voodoo_translator_translate sbJ_translator sbJ_code end block else block - let sbJ__sb_G324 call sbJ_make_blob _sb_G357 2 - let sbJ__sb_G325 call sbJ_get_namespace_absolute sbJ__sb_G324 - let sbJ__sb_G326 call sbJ_make_blob _sb_G358 7 - let sbJ__sb_G327 call sbJ_namespace_intern sbJ__sb_G325 sbJ__sb_G326 - let sbJ__sb_G328 call sbJ_eq sbJ_firstJ2dword sbJ__sb_G327 - ifeq sbJ__sb_G328 @sbJ_true + let sbJ__sb_G330 call sbJ_make_blob _sb_G363 2 + let sbJ__sb_G331 call sbJ_get_namespace_absolute sbJ__sb_G330 + let sbJ__sb_G332 call sbJ_make_blob _sb_G364 7 + let sbJ__sb_G333 call sbJ_namespace_intern sbJ__sb_G331 sbJ__sb_G332 + let sbJ__sb_G334 call sbJ_eq sbJ_firstJ2dword sbJ__sb_G333 + ifeq sbJ__sb_G334 @sbJ_true block call sbJ_voodoo_translator_translate sbJ_translator sbJ_code end block else block - let sbJ__sb_G329 call sbJ_make_blob _sb_G359 2 - let sbJ__sb_G330 call sbJ_get_namespace_absolute sbJ__sb_G329 - let sbJ__sb_G331 call sbJ_make_blob _sb_G360 6 - let sbJ__sb_G332 call sbJ_namespace_intern sbJ__sb_G330 sbJ__sb_G331 - let sbJ__sb_G333 call sbJ_eq sbJ_firstJ2dword sbJ__sb_G332 - ifeq sbJ__sb_G333 @sbJ_true + let sbJ__sb_G335 call sbJ_make_blob _sb_G365 2 + let sbJ__sb_G336 call sbJ_get_namespace_absolute sbJ__sb_G335 + let sbJ__sb_G337 call sbJ_make_blob _sb_G366 6 + let sbJ__sb_G338 call sbJ_namespace_intern sbJ__sb_G336 sbJ__sb_G337 + let sbJ__sb_G339 call sbJ_eq sbJ_firstJ2dword sbJ__sb_G338 + ifeq sbJ__sb_G339 @sbJ_true block call sbJ_voodoo_translator_translate sbJ_translator sbJ_code end block else block - let sbJ__sb_G334 call sbJ_make_blob _sb_G361 2 - let sbJ__sb_G335 call sbJ_get_namespace_absolute sbJ__sb_G334 - let sbJ__sb_G336 call sbJ_make_blob _sb_G362 3 - let sbJ__sb_G337 call sbJ_namespace_intern sbJ__sb_G335 sbJ__sb_G336 - let sbJ__sb_G338 call sbJ_eq sbJ_firstJ2dword sbJ__sb_G337 - ifeq sbJ__sb_G338 @sbJ_true + let sbJ__sb_G340 call sbJ_make_blob _sb_G367 2 + let sbJ__sb_G341 call sbJ_get_namespace_absolute sbJ__sb_G340 + let sbJ__sb_G342 call sbJ_make_blob _sb_G368 3 + let sbJ__sb_G343 call sbJ_namespace_intern sbJ__sb_G341 sbJ__sb_G342 + let sbJ__sb_G344 call sbJ_eq sbJ_firstJ2dword sbJ__sb_G343 + ifeq sbJ__sb_G344 @sbJ_true block call sbJ_voodoo_translator_translate sbJ_translator sbJ_code end block else block - let sbJ__sb_G339 get-word sbJ_state 1 - call sbJ_dynarray_add sbJ__sb_G339 sbJ_code + let sbJ__sb_G345 get-word sbJ_state 1 + call sbJ_dynarray_add sbJ__sb_G345 sbJ_code end block end if end block @@ -995,8 +1007,8 @@ _sb_G352: end block else block - let sbJ__sb_G340 get-word sbJ_state 1 - call sbJ_dynarray_add sbJ__sb_G340 sbJ_code + let sbJ__sb_G346 get-word sbJ_state 1 + call sbJ_dynarray_add sbJ__sb_G346 sbJ_code end block end if return 0 @@ -1007,32 +1019,32 @@ align sbJ_voodoo_compile_file: function sbJ_infile sbJ_outfile block - let sbJ__sb_G363 call sbJ_make_blob _sb_G373 7 - let sbJ__sb_G364 call sbJ_make_blob _sb_G374 7 - let sbJ_voodooc call sbJ_getenv sbJ__sb_G363 sbJ__sb_G364 - let sbJ__sb_G365 call sbJ_fork - let sbJ_pid sbJ__sb_G365 - let sbJ__sb_G366 call sbJ_eq sbJ_pid 0 - ifeq sbJ__sb_G366 @sbJ_true + let sbJ__sb_G369 call sbJ_make_blob _sb_G379 7 + let sbJ__sb_G370 call sbJ_make_blob _sb_G380 7 + let sbJ_voodooc call sbJ_getenv sbJ__sb_G369 sbJ__sb_G370 + let sbJ__sb_G371 call sbJ_fork + let sbJ_pid sbJ__sb_G371 + let sbJ__sb_G372 call sbJ_eq sbJ_pid 0 + ifeq sbJ__sb_G372 @sbJ_true block let sbJ_args auto-words 4 set-word sbJ_args 0 sbJ_voodooc - let sbJ__sb_G367 call sbJ_make_blob _sb_G375 2 - set-word sbJ_args 1 sbJ__sb_G367 + let sbJ__sb_G373 call sbJ_make_blob _sb_G381 2 + set-word sbJ_args 1 sbJ__sb_G373 set-word sbJ_args 2 sbJ_outfile set-word sbJ_args 3 sbJ_infile - let sbJ__sb_G368 get-word sbJ_args 0 - let sbJ__sb_G369 call sbJ_array 4 sbJ_args - call sbJ_execvp sbJ__sb_G368 sbJ__sb_G369 + let sbJ__sb_G374 get-word sbJ_args 0 + let sbJ__sb_G375 call sbJ_array 4 sbJ_args + call sbJ_execvp sbJ__sb_G374 sbJ__sb_G375 end block else block let sbJ_status auto-words 1 call sbJ_waitpid sbJ_pid sbJ_status 0 - let sbJ__sb_G370 shr @sbJ_status 8 - let sbJ__sb_G371 and sbJ__sb_G370 255 - let sbJ__sb_G372 call sbJ_ne sbJ__sb_G371 0 - ifeq sbJ__sb_G372 @sbJ_true + let sbJ__sb_G376 shr @sbJ_status 8 + let sbJ__sb_G377 and sbJ__sb_G376 255 + let sbJ__sb_G378 call sbJ_ne sbJ__sb_G377 0 + ifeq sbJ__sb_G378 @sbJ_true block call sbJ_error sbJ_voodooc end block diff --git a/configure b/configure index 144f0a8..d23fe37 100755 --- a/configure +++ b/configure @@ -52,6 +52,7 @@ bootstrap_libtargets="$libtargets" libantimony_sources=' antimony_reader antimony_writer +args array array_sb allocate diff --git a/src/antimony/args.sb b/src/antimony/args.sb new file mode 100644 index 0000000..bbe75e1 --- /dev/null +++ b/src/antimony/args.sb @@ -0,0 +1,26 @@ +section data +export __saved_argc __saved_argv + +var __saved_argc = 0 +var __saved_argv = 0 +var __saved_args = -1 + + +section functions +export args +import array blob_from_cstring eq false lt true + +function args { + if (eq @__saved_args -1) { + var items = auto-words @__saved_argc + loop { + var i = 0 + do + while (lt i @__saved_argc) + set-word items i (blob_from_cstring (get-word @__saved_argv i)) + set i add i 1 + } + set @__saved_args array @__saved_argc items + } + return @__saved_args +} diff --git a/src/voodoo_translator/compile_module.sb b/src/voodoo_translator/compile_module.sb index 018c53f..900ec99 100644 --- a/src/voodoo_translator/compile_module.sb +++ b/src/voodoo_translator/compile_module.sb @@ -118,11 +118,14 @@ function compile_executable_to_voodoo namespace src_path dir { blob_builder_append_blob code "section functions\n" blob_builder_append_blob code "export main\n" blob_builder_append_blob code "import sbJ_sb_init " + blob_builder_append_blob code "sbJ___saved_argc sbJ___saved_argv " blob_builder_append_blob code encoded_init blob_builder_append_blob code "\n\nalign\n" blob_builder_append_blob code "main:\n" - blob_builder_append_blob code "function\n" + blob_builder_append_blob code "function argc argv\n" blob_builder_append_blob code "call sbJ_sb_init\n" + blob_builder_append_blob code "set @sbJ___saved_argc argc\n" + blob_builder_append_blob code "set @sbJ___saved_argv argv\n" blob_builder_append_blob code "call " blob_builder_append_blob code encoded_init blob_builder_append_blob code "\nreturn 0\n" -- 2.11.4.GIT