develooper Front page | perl.perl6.internals | Postings from October 2001

RE: Sizes, again.

Thread Previous | Thread Next
From:
Andy Dougherty
Date:
October 2, 2001 10:41
Subject:
RE: Sizes, again.
Message ID:
Pine.SOL.4.10.10110021314180.20049-100000@maxwell.phys.lafayette.edu
[various discussions snipped.]

There are several reasonable approaches one could take to handling
64-bit systems.  Our biggest current problem, I think, is that
different parts appear to be taking different approaches, so that the
whole package doesn't actually work.

Here's an example.  First, I applied this trivial patch

--- parrot/packfile.c	Tue Oct  2 10:30:00 2001
+++ parrot-andy/packfile.c	Tue Oct  2 12:35:27 2001
@@ -14,7 +14,9 @@
 #include "parrot/packfile.h"
 
 
-#define TRACE_PACKFILE 0
+#ifndef TRACE_PACKFILE
+#  define TRACE_PACKFILE 0
+#endif TRACE_PACKFILE
 
 
 /******************************************************************************


and then re-Configure'd (adding -DTRACE_PACKFILE=1) and here's what I get
from ./test_prog test.pbc

    PackFile_unpack(): Magic verified.
    PackFile_unpack(): Unpacking 0 bytes for fixup table...
    PackFile_unpack(): Unpacking 0 bytes for constant table...
    PackFile_ConstTable_unpack(): Unpacking 0 constants...
    PackFile_ConstTable_unpack(): Unpacking constant 0...
    PackFile_Constant_unpack(): Type is 0 ('s')...
    PackFile_Constant_unpack(): Size is 0...
    PackFile_Constant_unpack(): Unpacking string constant...
    PackFile_Constant_unpack_string(): flags are 0x0000...
    PackFile_Constant_unpack_string(): encoding is 0...
    PackFile_Constant_unpack_string(): type is 0...
    PackFile_Constant_unpack_string(): size is 0...
    PackFile_ConstTable_unpack(): Unpacking constant 0...
    PackFile_Constant_unpack(): Type is 0 ('s')...
    PackFile_Constant_unpack(): Size is 0...
    [  . . . ]

Not particularly helpful, eh?

I think the problem is twofold:  

1.  The reading and writing of packfiles is done by two completely different
sets of functions.  Obviously, they are inconsistent in some way.  Either
one, or both, is wrong.

2.  I can't tell which is wrong because I don't know what the "right"
answer is.  Presumably, once docs/parrotbyte.pod gets written, it will
be possible to check the functions against the specs.  Until then, I'm
unsure how best to contribute.

-- 
    Andy Dougherty		doughera@lafayette.edu
    Dept. of Physics
    Lafayette College, Easton PA 18042


Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About