pike.git
/
src
/
docode.c
version
»
Context lines:
10
20
40
80
file
none
3
pike.git/src/docode.c:1:
/*\ ||| This file a part of Pike, and is copyright by Fredrik Hubinette ||| Pike is distributed as GPL (General Public License) ||| See the files COPYING and DISCLAIMER for more information. \*/ #include "global.h"
-
RCSID("$Id: docode.c,v 1.
23
1997
/09/
22
01
:
01
:
15
hubbe
Exp $");
+
RCSID("$Id: docode.c,v 1.
24
2003
/09/
19
13
:
57
:
49
grubba
Exp $");
#include "las.h" #include "program.h" #include "language.h" #include "pike_types.h" #include "stralloc.h" #include "interpret.h" #include "constants.h" #include "array.h" #include "pike_macros.h" #include "error.h"
pike.git/src/docode.c:262:
ret=0; if(car_is_node(n)) ret += count_cases(CAR(n)); if(cdr_is_node(n)) ret += count_cases(CDR(n)); return ret; } } static int do_docode2(node *n,int flags) { INT32 tmp1,tmp2,tmp3;
+
int ret;
if(!n) return 0; if(flags & DO_LVALUE) { switch(n->token) { default: yyerror("Illegal lvalue."); emit(F_NUMBER,0);
pike.git/src/docode.c:561:
do_jump_when_non_zero(CAR(n),tmp2); ins_label(current_break); current_switch_jumptable = prev_switch_jumptable; current_break=break_save; current_continue=continue_save; return 0; } case ' ':
-
return
do_docode(CAR(n),0)
+do
_docode(CDR(n),DO_LVALUE);
+
ret
=
do_docode(CAR(n),0)
;
+
return ret + do
_docode(CDR(n),DO_LVALUE);
case F_FOREACH: { INT32 *prev_switch_jumptable = current_switch_jumptable; INT32 break_save = current_break; INT32 continue_save = current_continue; current_switch_jumptable=0; current_break=alloc_label(); current_continue=alloc_label();
pike.git/src/docode.c:971:
emit2(F_THROW_ZERO); ins_label(tmp1); current_break=break_save; current_continue=continue_save; current_switch_jumptable = prev_switch_jumptable; return 1; } case F_LVALUE_LIST:
-
return
do_docode(CAR(n),DO_LVALUE)
+do
_docode(CDR(n),DO_LVALUE);
+
ret
=
do_docode(CAR(n),DO_LVALUE)
;
+
return ret + do
_docode(CDR(n),DO_LVALUE);
case F_ARROW: if(CDR(n)->token != F_CONSTANT || CDR(n)->u.sval.type!=T_STRING) fatal("Bugg in F_ARROW, index not string."); if(flags & DO_LVALUE) { /* FIXME!!!! */ tmp1=do_docode(CAR(n), 0); emit(F_ARROW_STRING, store_prog_string(CDR(n)->u.sval.u.string)); return 2;
pike.git/src/docode.c:1090:
{ emit(F_GLOBAL_LVALUE,n->u.number); return 2; }else{ emit(F_GLOBAL,n->u.number); } } return 1; case F_VAL_LVAL:
-
return
do_docode(CAR(n),flags)
+do
_docode(CDR(n),flags | DO_LVALUE);
+
ret
=
do_docode(CAR(n),flags)
;
+
return ret + do
_docode(CDR(n),flags | DO_LVALUE);
default: fatal("Infernal compiler error (unknown parse-tree-token).\n"); return 0; /* make gcc happy */ } } void do_code_block(node *n) { init_bytecode();