Skip to content
Snippets Groups Projects
Select Git revision
  • 76a79e300e592d29ca47c2f90d121547c0d45a23
  • 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

docode.c

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