Changeset 38aaacc2 in mainline for uspace/app/sbi/src/builtin.c
- Timestamp:
- 2010-04-23T21:41:10Z (15 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- f4f866c
- Parents:
- 074444f
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/sbi/src/builtin.c
r074444f r38aaacc2 40 40 #include <stdlib.h> 41 41 #include <assert.h> 42 #include " ancr.h"42 #include "builtin/bi_boxed.h" 43 43 #include "builtin/bi_error.h" 44 44 #include "builtin/bi_fun.h" … … 90 90 bi_fun_declare(bi); 91 91 bi_textfile_declare(bi); 92 93 /* Need to process ancestry so that symbol lookups work. */ 94 ancr_module_process(program, program->module); 95 92 } 93 94 /** Bind internal interpreter references to symbols in the program. 95 * 96 * This is performed in separate phase for several reasons. First, 97 * symbol lookups do not work until ancestry is processed. Second, 98 * this gives a chance to process the library first and thus bind 99 * to symbols defined there. 100 */ 101 void builtin_bind(builtin_t *bi) 102 { 103 bi_boxed_bind(bi); 96 104 bi_error_bind(bi); 97 105 bi_fun_bind(bi); … … 300 308 stree_ident_t *ident; 301 309 stree_fun_t *fun; 310 stree_fun_sig_t *sig; 302 311 stree_csimbr_t *csimbr; 303 312 stree_symbol_t *fun_sym; … … 310 319 fun->proc = stree_proc_new(); 311 320 fun->proc->body = NULL; 312 list_init(&fun->args); 321 sig = stree_fun_sig_new(); 322 fun->sig = sig; 323 324 list_init(&fun->sig->args); 313 325 314 326 csimbr = stree_csimbr_new(csimbr_fun); … … 348 360 proc_arg->type = NULL; /* XXX */ 349 361 350 list_append(&fun-> args, proc_arg);351 } 362 list_append(&fun->sig->args, proc_arg); 363 }
Note:
See TracChangeset
for help on using the changeset viewer.