Select Git revision
-
Fredrik Hübinette (Hubbe) authored
Rev: src/docode.c:1.35 Rev: src/language.yacc:1.69 Rev: src/lex.c:1.48
Fredrik Hübinette (Hubbe) authoredRev: src/docode.c:1.35 Rev: src/language.yacc:1.69 Rev: src/lex.c:1.48
docode.c 25.67 KiB
/*\
||| 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.35 1998/04/06 03:51:54 hubbe 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"
#include "memory.h"
#include "svalue.h"
#include "main.h"
#include "lex.h"
#include "builtin_functions.h"
#include "peep.h"
#include "docode.h"
#include "operators.h"
#include "object.h"
INT32 current_break=-1;
INT32 current_continue=-1;
static INT32 current_switch_case;
static INT32 current_switch_default;
static INT32 current_switch_values_on_stack;
static INT32 *current_switch_jumptable =0;
void upd_int(int offset, INT32 tmp)
{
MEMCPY(new_program->program+offset, (char *)&tmp,sizeof(tmp));
}
INT32 read_int(int offset)
{
return EXTRACT_INT(new_program->program+offset);
}
int store_linenumbers=1;
/*
* A mechanism to remember addresses on a stack.
*/
int comp_stackp;
INT32 comp_stack[COMPILER_STACK_SIZE];
void push_address(void)
{
if (comp_stackp >= COMPILER_STACK_SIZE)
{
yyerror("Compiler stack overflow");
comp_stackp++;
return;
}
comp_stack[comp_stackp++] = PC;
}
void push_explicit(INT32 address)
{
if (comp_stackp >= COMPILER_STACK_SIZE)
{
yyerror("Compiler stack overflow");
comp_stackp++;