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.
43
2001
/
02
/
25
18
:
19
:
03
hubbe
Exp $");
+
RCSID("$Id: docode.c,v 1.
44
2003
/
09
/
19
13
:
56
:
53
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:189:
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:515:
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:958:
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_ARRAY_LVALUE: tmp1=do_docode(CAR(n),DO_LVALUE); #ifdef PIKE_DEBUG if(tmp1 & 1) fatal("Very internal compiler error.\n"); #endif emit(F_ARRAY_LVALUE, tmp1>>1); return 2;
pike.git/src/docode.c:1149:
{ 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();