pike.git / src / docode.c

version» Context lines:

pike.git/src/docode.c:189:   int do_jump(int token,INT32 lbl)   {    struct compilation *c = THIS_COMPILATION;    if(lbl==-1) lbl=alloc_label();    emit1(token, lbl);    return lbl;   }         #define LBLCACHESIZE 4711 - #define CURRENT_INSTR ((long)instrbuf.s.len / (long)sizeof(p_instr)) + #define CURRENT_INSTR (buffer_content_length(&instrbuf) / sizeof(p_instr))   #define MAX_UNWIND 100      static int lbl_cache[LBLCACHESIZE];      static int do_branch(INT32 lbl)   {    struct compilation *c = THIS_COMPILATION;    if(lbl==-1)    {    lbl=alloc_label();    }else{    INT32 last,pos=lbl_cache[lbl % LBLCACHESIZE];    if(pos < (last=CURRENT_INSTR) && (CURRENT_INSTR - pos) < MAX_UNWIND)    { - #define BUF ((p_instr *)instrbuf.s.str) + #define BUF ((p_instr *)buffer_ptr(&instrbuf))    if(BUF[pos].opcode == F_LABEL && BUF[pos].arg == lbl)    {    for(;pos < last;pos++)    {    if(BUF[pos].opcode != F_LABEL)    {    insert_opcode2(BUF[pos].opcode,    BUF[pos].arg,    BUF[pos].arg2,    BUF[pos].line,
pike.git/src/docode.c:2936:   /* Used by eval_low() to build code for constant expressions. */   INT32 docode(node *n)   {    INT32 entry_point;    int label_no_save = label_no;    dynamic_buffer instrbuf_save = instrbuf;    int stack_depth_save = current_stack_depth;    struct statement_label *label_save = current_label;    struct cleanup_frame *top_cleanups_save = top_statement_label_dummy.cleanups;    -  instrbuf.s.str=0; +     label_no=1;    current_stack_depth = 0;    current_label = &top_statement_label_dummy; /* Fix these two to */    top_statement_label_dummy.cleanups = 0; /* please F_PUSH_ARRAY. */    init_bytecode();       insert_opcode0(F_ENTRY, n->line_number, n->current_file);    /* FIXME: Should we check that do_docode() returns 1? */    do_docode(n,0);    insert_opcode0(F_DUMB_RETURN, n->line_number, n->current_file);    entry_point = assemble(0); /* Don't store linenumbers. */       instrbuf=instrbuf_save;    label_no = label_no_save;    current_stack_depth = stack_depth_save;    current_label = label_save;    top_statement_label_dummy.cleanups = top_cleanups_save;    return entry_point;   }