cvsuser     03/02/01 11:05:52

  Modified:    languages/imcc main.c
               .        packfile.c pdump.c
  Log:
  packfile #7
  
  Revision  Changes    Path
  1.12      +2 -3      parrot/languages/imcc/main.c
  
  Index: main.c
  ===================================================================
  RCS file: /cvs/public/parrot/languages/imcc/main.c,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -w -r1.11 -r1.12
  --- main.c    31 Jan 2003 10:54:08 -0000      1.11
  +++ main.c    1 Feb 2003 19:05:42 -0000       1.12
  @@ -184,8 +184,6 @@
       struct Parrot_Interp *interpreter = Parrot_new();
   
       Parrot_init(interpreter, (void*)&stacktop);
  -    pf = PackFile_new(0);
  -    interpreter->code = pf;
       interpreter->DOD_block_level++;
   
       sourcefile = parseflags(interpreter, &argc, &argv);
  @@ -238,7 +236,6 @@
               info(1,"\n");
       }
       if (run_pbc == 2) {
  -        PackFile_destroy(pf);
           pf = Parrot_readbc(interpreter, sourcefile);
           if (!pf)
               fatal(1, "main", "Packfile loading failed\n");
  @@ -248,6 +245,8 @@
       else {
           int per_pbc = write_pbc | run_pbc;
           info(1, "using optimization '%s'\n", optimizer_opt);
  +        pf = PackFile_new(0);
  +        Parrot_loadbc(interpreter, pf);
   
           line = 1;
           emit_open(per_pbc, per_pbc ? (void*)interpreter : (void*)output);
  
  
  
  1.72      +4 -4      parrot/packfile.c
  
  Index: packfile.c
  ===================================================================
  RCS file: /cvs/public/parrot/packfile.c,v
  retrieving revision 1.71
  retrieving revision 1.72
  diff -u -w -r1.71 -r1.72
  --- packfile.c        1 Feb 2003 13:33:54 -0000       1.71
  +++ packfile.c        1 Feb 2003 19:05:51 -0000       1.72
  @@ -7,7 +7,7 @@
   ** This program is free software. It is subject to the same
   ** license as Parrot itself.
   **
  -** $Id: packfile.c,v 1.71 2003/02/01 13:33:54 leo Exp $
  +** $Id: packfile.c,v 1.72 2003/02/01 19:05:51 leo Exp $
   **
   ** History:
   **  Rework by Melvin; new bytecode format, make bytecode portable.
  @@ -210,9 +210,9 @@
   
   static void cvt_num12_num8_le(unsigned char *dest, unsigned char *src)
   {
  -    cvt_num12_num8(dest, src);
  -    /* TODO endianize */
  -    internal_exception(1, "TODO cvt_num12_num8_le\n");
  +    unsigned char b[8];
  +    cvt_num12_num8(b, src);
  +    fetch_buf_le_8(dest, b);
   }
   /***************************************
   
  
  
  
  1.21      +2 -2      parrot/pdump.c
  
  Index: pdump.c
  ===================================================================
  RCS file: /cvs/public/parrot/pdump.c,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -w -r1.20 -r1.21
  --- pdump.c   29 Jan 2003 09:15:15 -0000      1.20
  +++ pdump.c   1 Feb 2003 19:05:51 -0000       1.21
  @@ -1,7 +1,7 @@
   /* pdump.c
    *  Copyright: (When this is determined...it will go here)
    *  CVS Info
  - *     $Id: pdump.c,v 1.20 2003/01/29 09:15:15 leo Exp $
  + *     $Id: pdump.c,v 1.21 2003/02/01 19:05:51 leo Exp $
    *  Overview:
    *     A program to dump pack files to human readable form.
    *  Data Structure and Algorithms:
  @@ -153,7 +153,7 @@
           printf("Can't read PBC\n");
           return 1;
       }
  -    interpreter->code = pf;
  +    Parrot_loadbc(interpreter, pf);
       if (convert) {
           size_t size;
           opcode_t *pack;
  
  
  


Reply via email to