Branch: Tag:

1997-06-25

1997-06-25 22:47:56 by Fredrik Hübinette (Hubbe) <hubbe@hubbe.net>

Compiler hacked

Rev: bin/mktestsuite:1.4.2.1
Rev: lib/master.pike:1.43.2.2
Rev: src/ChangeLog:1.97.2.2
Rev: src/Makefile.in:1.28.2.1
Rev: src/backend.c:1.10.2.3
Rev: src/builtin_functions.c:1.36.2.1
Rev: src/builtin_functions.h:1.3.2.1
Rev: src/compilation.h:1.3.2.1
Rev: src/cpp.c:1.1.2.1
Rev: src/docode.c:1.16.2.1
Rev: src/docode.h:1.2.2.1
Rev: src/interpret.c:1.42.2.1
Rev: src/interpret.h:1.11.2.1
Rev: src/language.yacc:1.42.2.2
Rev: src/las.c:1.32.2.1
Rev: src/las.h:1.6.2.1
Rev: src/lex.c:1.21.2.2
Rev: src/lex.h:1.4.2.1
Rev: src/main.c:1.21.2.1
Rev: src/modules/files/file.c:1.37.2.3
Rev: src/object.c:1.17.2.2
Rev: src/object.h:1.9.2.2
Rev: src/peep.c:1.10.2.1
Rev: src/pike_types.c:1.21.2.1
Rev: src/program.c:1.33.2.2
Rev: src/program.h:1.14.2.2
Rev: src/program_areas.h:1.1.2.1
Rev: src/stralloc.c:1.14.2.1
Rev: src/stralloc.h:1.7.2.1
Rev: src/stuff.c:1.2.2.1
Rev: src/stuff.h:1.1.1.1.2.1
Rev: src/svalue.c:1.12.2.1
Rev: src/testsuite.in:1.40.2.2
Rev: src/version.c:1.15.2.1

109: Inside #if defined(DEBUG)
   if(b>255)    error("Instruction too big %d\n",b);   #endif -  ins_byte((unsigned char)b,A_PROGRAM); +  add_to_program((unsigned char)b);   }      static void ins_f_byte_with_arg(unsigned int a,unsigned INT32 b)
125:    if( b < 256*256)    {    ins_f_byte(F_PREFIX_CHARX256); -  ins_byte(b>>8, A_PROGRAM); +  add_to_program(b>>8);    }else if(b < 256*256*256) {    ins_f_byte(F_PREFIX_WORDX256); -  ins_byte(b >> 16, A_PROGRAM); -  ins_byte(b >> 8, A_PROGRAM); +  add_to_program(b >> 16); +  add_to_program(b >> 8);    }else{    ins_f_byte(F_PREFIX_24BITX256); -  ins_byte(b >> 24, A_PROGRAM); -  ins_byte(b >> 16, A_PROGRAM); -  ins_byte(b >> 8, A_PROGRAM); +  add_to_program(b >> 24); +  add_to_program(b >> 16); +  add_to_program(b >> 8);    }    }    ins_f_byte(a); -  ins_byte(b, A_PROGRAM); +  add_to_program(b);   }      void assemble(void)
244:    {    case F_NOP: break;    case F_ALIGN: -  while(PC % c->arg) ins_byte(0, A_PROGRAM); +  while(PC % c->arg) add_to_program(0);    break;       case F_BYTE: -  ins_byte(c->arg, A_PROGRAM); +  add_to_program(c->arg);    break;       case F_LABEL:
272:    if(c->arg > max_label || c->arg < 0) fatal("Jump to unknown label?\n");   #endif    tmp=PC; -  ins_int(jumps[c->arg],A_PROGRAM); +  ins_int(jumps[c->arg],(void(*)(char))add_to_program);    jumps[c->arg]=tmp;    break;   
348:       p->opcode=f;    p->line=cl; -  copy_shared_string(p->file, current_file); +  copy_shared_string(p->file, lex.current_file);    p->arg=b;       return p - (p_instr *)instrbuf.s.str;