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.
120
2001/06/
19
23:
59:
33 hubbe Exp $");
+
RCSID("$Id: docode.c,v 1.
121
2001/06/
23
10
:
33
:
11
hubbe Exp $");
#include "las.h" #include "program.h" #include "pike_types.h" #include "stralloc.h" #include "interpret.h" #include "constants.h" #include "array.h" #include "pike_macros.h" #include "pike_error.h" #include "pike_memory.h"
pike.git/src/docode.c:158:
DO_IF_DEBUG( \ if (new_label__.cleanups && \ new_label__.cleanups != (void *)(ptrdiff_t) -1) \ fatal("Cleanup frames still left in statement_label.\n")); \ } while (0) static INT32 current_switch_case; static INT32 current_switch_default; static INT32 current_switch_values_on_stack; static INT32 *current_switch_jumptable =0;
+
static int in_catch=0;
static struct pike_type *current_switch_type = NULL; void upd_int(int offset, INT32 tmp) { MEMCPY(Pike_compiler->new_program->program+offset, (char *)&tmp,sizeof(tmp)); } INT32 read_int(int offset) { return EXTRACT_INT(Pike_compiler->new_program->program+offset);
pike.git/src/docode.c:1592:
DO_CODE_BLOCK(CDR(n)); if (!name.next && current_label->emit_break_label) low_insert_label(current_label->break_label); POP_STATEMENT_LABEL; BLOCK_END; return 0; } case F_RETURN: do_docode(CAR(n),0);
-
emit0(F_RETURN);
+
emit0(
in_catch ?
F_
VOLATILE_
RETURN
: F_RETURN
);
return 0; case F_SSCANF: tmp1=do_docode(CAR(n),DO_NOT_COPY); tmp2=do_docode(CDR(n),DO_NOT_COPY | DO_LVALUE); emit1(F_SSCANF, DO_NOT_WARN((INT32)(tmp1+tmp2))); return 1; case F_CATCH: { INT32 *prev_switch_jumptable = current_switch_jumptable; tmp1=do_jump(F_CATCH,-1); PUSH_CLEANUP_FRAME(do_escape_catch, 0); PUSH_STATEMENT_LABEL; current_switch_jumptable=0; current_label->break_label=alloc_label(); if (TEST_COMPAT(7,0)) current_label->continue_label = current_label->break_label;
-
+
in_catch++;
DO_CODE_BLOCK(CAR(n));
-
+
in_catch--;
ins_label(current_label->break_label); emit0(F_THROW_ZERO); POP_STATEMENT_LABEL; current_switch_jumptable = prev_switch_jumptable; ins_label(DO_NOT_WARN((INT32)tmp1)); current_stack_depth++; POP_AND_DONT_CLEANUP;