"Brent Dax" <[EMAIL PROTECTED]> writes:

[...]
> Optional?
> 
> # =item Add bytecode to segment
> # 
> # Add in actual bytecode to the segment.
> 
> Not optional.  :^)

really?
There may be reasons to have no bytecode. This segment could not be
run. This rises the question: If there are multiple segments, which
bytecode is run. I would say the bytecode in the first segment from
the beginning. Then only in the first segment the bytecode is
non-optional.

[...]

> # =item Add binary data chunk to segment
> # 
> # Add in some raw binary data to the bytecode segment
> 
> Optional?
> 
> Can you have multiple raw chunks?  Can they have symbolic names?
> Symbolic type names?

I second that.

> Are the other chunks essentially subclasses of this one?

I have implemented a first draft of this (perl #18056). The diffrence
is that I called the directory items PackFile_Segment.

> Is there some kind of directory that tells you stuff about these chunks?
> If there is, I can imagine two basic formats:
> 
> SEGMENT 1
>       DIRECTORY
>               CHUNK 1
>                       OFFSET: 100 (4 bytes)
>                       SIZE:   55 (4 bytes)
>                       NAME:   "src" (7 bytes)
>                       TYPE:   "Parrot::Source Code" (23 bytes)
>               CHUNK 2
>                       OFFSET: 155
>                       SIZE:   524
>                       NAME:   "bc"
>                       TYPE:   "Parrot::Bytecode"
>               ...
>       CHUNK 1
>               use strict;
>               use warnings;
>               print "Hello World!\n";
>               exit;
>       CHUNK 2
>               101011101...
> 
> Or
> 
> SEGMENT 1
>       DIRECTORY
>               CHUNK 1 OFFSET: 100
>               CHUNK 2 OFFSET: 189
>       CHUNK 1:
>               SIZE: 55
>               NAME: "src"
>               TYPE: "Parrot::Source Code"
>               DATA: ...
>       CHUNK 2:
>               SIZE: 524
>               NAME: "bc"
>               TYPE: "Parrot::Bytecode"
>               DATA: ...

I like the first one more: The data necessary to unpack a chunk is
localized in the first chunk (the DIRECTORY). Only this part of the
file needs to be read first. In the second case the metadata is
scattered over the whole file.

I will start modifing my patch to the new format.

bye
b.
-- 
Juergen Boemmels                        [EMAIL PROTECTED]
Fachbereich Physik                      Tel: ++49-(0)631-205-2817
Universitaet Kaiserslautern             Fax: ++49-(0)631-205-3906
PGP Key fingerprint = 9F 56 54 3D 45 C1 32 6F  23 F6 C7 2F 85 93 DD 47

Reply via email to