Changeset 38aaacc2 in mainline for uspace/app/sbi/src/builtin.c


Ignore:
Timestamp:
2010-04-23T21:41:10Z (14 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
f4f866c
Parents:
074444f
Message:

Update SBI to rev. 207.

File:
1 edited

Legend:

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

    r074444f r38aaacc2  
    4040#include <stdlib.h>
    4141#include <assert.h>
    42 #include "ancr.h"
     42#include "builtin/bi_boxed.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         /* 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 */
     101void builtin_bind(builtin_t *bi)
     102{
     103        bi_boxed_bind(bi);
    96104        bi_error_bind(bi);
    97105        bi_fun_bind(bi);
     
    300308        stree_ident_t *ident;
    301309        stree_fun_t *fun;
     310        stree_fun_sig_t *sig;
    302311        stree_csimbr_t *csimbr;
    303312        stree_symbol_t *fun_sym;
     
    310319        fun->proc = stree_proc_new();
    311320        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);
    313325
    314326        csimbr = stree_csimbr_new(csimbr_fun);
     
    348360        proc_arg->type = NULL; /* XXX */
    349361
    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.