Select Git revision
-
Henrik (Grubba) Grubbström authored
Rev: src/lex.c:1.55
Henrik (Grubba) Grubbström authoredRev: src/lex.c:1.55
lex.c 21.71 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: lex.c,v 1.55 1998/06/07 12:26:51 grubba Exp $");
#include "language.h"
#include "array.h"
#include "lex.h"
#include "stralloc.h"
#include "dynamic_buffer.h"
#include "constants.h"
#include "hashtable.h"
#include "stuff.h"
#include "pike_memory.h"
#include "interpret.h"
#include "error.h"
#include "object.h"
#include "las.h"
#include "operators.h"
#include "opcodes.h"
#include "builtin_functions.h"
#include "main.h"
#include "mapping.h"
#include "pike_macros.h"
#ifdef HAVE_SYS_PARAM_H
#include <sys/param.h>
#endif
#include <ctype.h>
#include <math.h>
#include <fcntl.h>
#include <errno.h>
#include "time_stuff.h"
#define LEXDEBUG 0
#ifdef INSTR_PROFILING
int last_instruction=0;
#endif
void exit_lex(void)
{
#ifdef DEBUG
if(p_flag)
{
int e;
fprintf(stderr,"Opcode usage: (opcode, runned, compiled)\n");
for(e=0;e<F_MAX_OPCODE-F_OFFSET;e++)
{
fprintf(stderr,":: %-30s %8ld %8ld\n",
low_get_f_name(e+F_OFFSET,0),
(long)instrs[e].runs,
(long)instrs[e].compiles);
}
#ifdef INSTR_PROFILING
for(e=0;e<F_MAX_OPCODE-F_OFFSET;e++)
{
int d;
for(d=0;d<256;d++)
if(instrs[e].reruns[d])
fprintf(stderr,"%010ld::%s - %s\n",instrs[e].reruns[d],low_get_f_name(e+F_OFFSET,0),low_get_f_name(d+F_OFFSET,0));
}
#endif
}
#endif