Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/sbi/src/builtin.c

    r38aaacc2 r23de644  
    4040#include <stdlib.h>
    4141#include <assert.h>
    42 #include "builtin/bi_boxed.h"
     42#include "ancr.h"
    4343#include "builtin/bi_error.h"
    4444#include "builtin/bi_fun.h"
     
    9090        bi_fun_declare(bi);
    9191        bi_textfile_declare(bi);
    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);
     92
     93        /* Need to process ancestry so that symbol lookups work. */
     94        ancr_module_process(program, program->module);
     95
    10496        bi_error_bind(bi);
    10597        bi_fun_bind(bi);
     
    308300        stree_ident_t *ident;
    309301        stree_fun_t *fun;
    310         stree_fun_sig_t *sig;
    311302        stree_csimbr_t *csimbr;
    312303        stree_symbol_t *fun_sym;
     
    319310        fun->proc = stree_proc_new();
    320311        fun->proc->body = NULL;
    321         sig = stree_fun_sig_new();
    322         fun->sig = sig;
    323 
    324         list_init(&fun->sig->args);
     312        list_init(&fun->args);
    325313
    326314        csimbr = stree_csimbr_new(csimbr_fun);
     
    360348        proc_arg->type = NULL; /* XXX */
    361349
    362         list_append(&fun->sig->args, proc_arg);
    363 }
     350        list_append(&fun->args, proc_arg);
     351}
Note: See TracChangeset for help on using the changeset viewer.