Branch: Tag:

1998-11-22

1998-11-22 11:08:52 by Fredrik Hübinette (Hubbe) <hubbe@hubbe.net>

New module: Perl

Rev: src/ChangeLog:1.157
Rev: src/README:1.8
Rev: src/acconfig.h:1.35
Rev: src/array.c:1.42
Rev: src/array.h:1.14
Rev: src/backend.c:1.40
Rev: src/builtin_functions.c:1.140
Rev: src/callback.c:1.15
Rev: src/compilation.h:1.13
Rev: src/configure.in:1.254
Rev: src/cpp.c:1.30
Rev: src/docode.c:1.42
Rev: src/dynamic_buffer.c:1.9
Rev: src/encode.c:1.26
Rev: src/error.c:1.22
Rev: src/error.h:1.25
Rev: src/fd_control.c:1.22
Rev: src/fdlib.h:1.21
Rev: src/gc.c:1.39
Rev: src/gc.h:1.20
Rev: src/global.h:1.26
Rev: src/hashtable.c:1.5
Rev: src/interpret.c:1.111
Rev: src/interpret.h:1.24
Rev: src/language.yacc:1.108
Rev: src/las.c:1.71
Rev: src/las.h:1.17
Rev: src/lex.c:1.58
Rev: src/lex.h:1.12
Rev: src/main.c:1.60
Rev: src/mapping.c:1.37
Rev: src/modules/Odbc/odbc.c:1.12
Rev: src/modules/Perl/.cvsignore:1.1
Rev: src/modules/Perl/Makefile.in:1.1
Rev: src/modules/Perl/configure.in:1.1
Rev: src/modules/Perl/perlmod.c:1.1
Rev: src/modules/Perl/testsuite.in:1.1
Rev: src/modules/Postgres/postgres.c:1.10
Rev: src/modules/Regexp/pike_regexp.c:1.13
Rev: src/modules/call_out/call_out.c:1.23
Rev: src/modules/files/file.c:1.128
Rev: src/modules/files/socket.c:1.40
Rev: src/modules/spider/spider.c:1.76
Rev: src/modules/sprintf/sprintf.c:1.31
Rev: src/multiset.c:1.12
Rev: src/object.c:1.53
Rev: src/opcodes.c:1.32
Rev: src/operators.c:1.44
Rev: src/peep.c:1.25
Rev: src/pike_memory.c:1.28
Rev: src/pike_types.c:1.49
Rev: src/pike_types.h:1.16
Rev: src/port.c:1.18
Rev: src/port.h:1.20
Rev: src/program.c:1.105
Rev: src/program.h:1.46
Rev: src/signal_handler.c:1.89
Rev: src/stralloc.c:1.50
Rev: src/stralloc.h:1.26
Rev: src/svalue.c:1.39
Rev: src/svalue.h:1.19
Rev: src/threads.c:1.85
Rev: src/threads.h:1.60

13:   #include "dmalloc.h"   #include "stuff.h"    - RCSID("$Id: peep.c,v 1.24 1998/05/12 23:51:26 hubbe Exp $"); + RCSID("$Id: peep.c,v 1.25 1998/11/22 11:03:07 hubbe Exp $");      struct p_instr_s   {
58:   {    p_instr *p;    - #ifdef DEBUG + #ifdef PIKE_DEBUG    if(!hasarg(f) && b)    fatal("hasarg(%d) is wrong!\n",f);   #endif
66:    p=(p_instr *)low_make_buf_space(sizeof(p_instr), &instrbuf);       - #ifdef DEBUG + #ifdef PIKE_DEBUG    if(!instrbuf.s.len)    fatal("Low make buf space failed!!!!!!\n");   #endif
81:      int insert_opcode2(int f,int current_line, struct pike_string *current_file)   { - #ifdef DEBUG + #ifdef PIKE_DEBUG    if(hasarg(f))    fatal("hasarg(%d) is wrong!\n",f);   #endif
92:   void update_arg(int instr,INT32 arg)   {    p_instr *p; - #ifdef DEBUG + #ifdef PIKE_DEBUG    if(instr > (long)instrbuf.s.len / (long)sizeof(p_instr) || instr < 0)    fatal("update_arg outside known space.\n");   #endif
105:      void ins_f_byte(unsigned int b)   { - #ifdef DEBUG + #ifdef PIKE_DEBUG    if(store_linenumbers && b<F_MAX_OPCODE)    ADD_COMPILED(b); - #endif /* DEBUG */ + #endif /* PIKE_DEBUG */       b-=F_OFFSET; - #ifdef DEBUG + #ifdef PIKE_DEBUG    if(b>255)    error("Instruction too big %d\n",b);   #endif
235:    c=(p_instr *)instrbuf.s.str;    for(e=0;e<length;e++)    { - #ifdef DEBUG + #ifdef PIKE_DEBUG    if(a_flag > 2 && store_linenumbers)    {    if(hasarg(c->opcode))
264:    break;       case F_LABEL: - #ifdef DEBUG + #ifdef PIKE_DEBUG    if(c->arg > max_label || c->arg < 0)    fatal("max_label calculation failed!\n");   
280:    case I_ISJUMP:    ins_f_byte(c->opcode);    case I_ISPOINTER: - #ifdef DEBUG + #ifdef PIKE_DEBUG    if(c->arg > max_label || c->arg < 0) fatal("Jump to unknown label?\n");   #endif    tmp=PC;
296:    ins_f_byte(c->opcode);    break;    - #ifdef DEBUG + #ifdef PIKE_DEBUG    default:    fatal("Unknown instruction type.\n");   #endif
312:       while(jumps[e]!=-1)    { - #ifdef DEBUG + #ifdef PIKE_DEBUG    if(labels[e]==-1)    fatal("Hyperspace error: unknown jump point.\n");   #endif
340:   {    p_instr *p;    - #ifdef DEBUG + #ifdef PIKE_DEBUG    if(!hasarg(f) && b)    fatal("hasarg(%d) is wrong!\n",f);   #endif
353:    p-=fifo_len;    }    - #ifdef DEBUG + #ifdef PIKE_DEBUG    if(!instrbuf.s.len)    fatal("Low make buf space failed!!!!!!\n");   #endif
368:      int insopt2(int f, int cl, struct pike_string *cf)   { - #ifdef DEBUG + #ifdef PIKE_DEBUG    if(hasarg(f))    fatal("hasarg(%d) is wrong!\n",f);   #endif
379:   {    if(fifo_len > (long)instrbuf.s.len / (long)sizeof(p_instr))    fifo_len=(long)instrbuf.s.len / (long)sizeof(p_instr); - #ifdef DEBUG + #ifdef PIKE_DEBUG    if(eye < 0)    fatal("Popped beyond start of code.\n");   
454:       d=n;    if(d>fifo_len) d=fifo_len; - #ifdef DEBUG + #ifdef PIKE_DEBUG    if((long)d > (long)instrbuf.s.len / (long)sizeof(p_instr))    fatal("Popping out of instructions.\n");   #endif
514:      static void asm_opt(void)   { - #ifdef DEBUG + #ifdef PIKE_DEBUG    if(a_flag > 3)    {    p_instr *c;
536:   #include "peep_engine.c"       - #ifdef DEBUG + #ifdef PIKE_DEBUG    if(a_flag > 4)    {    p_instr *c;