Skip to content
Snippets Groups Projects
Select Git revision
  • 31999d1567fd04bf994ecb332391a2bc8880c249
  • master default protected
  • 9.0
  • 8.0
  • 7.8
  • 7.6
  • 7.4
  • 7.2
  • 7.0
  • 0.6
  • rosuav/latex-markdown-renderer
  • rxnpatch/rxnpatch
  • marcus/gobject-introspection
  • rxnpatch/8.0
  • rosuav/pre-listening-ports
  • nt-tools
  • rosuav/async-annotations
  • rosuav/pgsql-ssl
  • rxnpatch/rxnpatch-broken/2023-10-06T094250
  • grubba/fdlib
  • grubba/wip/sakura/8.0
  • v8.0.2000
  • v8.0.1998
  • v8.0.1996
  • v8.0.1994
  • v8.0.1992
  • v8.0.1990
  • v8.0.1988
  • v8.0.1986
  • rxnpatch/clusters/8.0/2025-04-29T124414
  • rxnpatch/2025-04-29T124414
  • v8.0.1984
  • v8.0.1982
  • v8.0.1980
  • v8.0.1978
  • v8.0.1976
  • v8.0.1974
  • v8.0.1972
  • v8.0.1970
  • v8.0.1968
  • v8.0.1966
41 results

lex.c

Blame
  • 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