cvsuser 03/11/21 06:26:05
Modified: . PBC_COMPAT
src packfile.c packout.c
t/native_pbc number_1.pbc number_2.pbc
Log:
PackFile-18
* incompatible PBC change:
* the unused size field in front of each packfile constant is history
Revision Changes Path
1.5 +1 -0 parrot/PBC_COMPAT
Index: PBC_COMPAT
===================================================================
RCS file: /cvs/public/parrot/PBC_COMPAT,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -w -r1.4 -r1.5
--- PBC_COMPAT 31 Oct 2003 11:31:02 -0000 1.4
+++ PBC_COMPAT 21 Nov 2003 14:26:01 -0000 1.5
@@ -24,6 +24,7 @@
# please insert tab separated entries at the top of the list
+2003.11.21 leo remove unused size fields in front of PF constants
2003.10.31 leo 0.0.13 release
2003.10.24 dan add bogus opcode
2003.10.24 leo start using this file for fingerprinting
1.119 +3 -8 parrot/src/packfile.c
Index: packfile.c
===================================================================
RCS file: /cvs/public/parrot/src/packfile.c,v
retrieving revision 1.118
retrieving revision 1.119
diff -u -w -r1.118 -r1.119
--- packfile.c 21 Nov 2003 13:50:30 -0000 1.118
+++ packfile.c 21 Nov 2003 14:26:03 -0000 1.119
@@ -7,7 +7,7 @@
** This program is free software. It is subject to the same
** license as Parrot itself.
**
-** $Id: packfile.c,v 1.118 2003/11/21 13:50:30 leo Exp $
+** $Id: packfile.c,v 1.119 2003/11/21 14:26:03 leo Exp $
**
** History:
** Rework by Melvin; new bytecode format, make bytecode portable.
@@ -1861,8 +1861,8 @@
return 0;
}
- /* Tack on space for the initial type and size fields */
- return packed_size + 2;
+ /* Tack on space for the initial type field */
+ return packed_size + 1;
}
/***************************************
@@ -1872,7 +1872,6 @@
Unpack a PackFile Constant from a block of memory. The format is:
opcode_t type
- opcode_t size
* data
Returns cursor if everything is OK, else zero (0).
@@ -1887,17 +1886,13 @@
struct PackFile_Constant *self, opcode_t *cursor)
{
opcode_t type;
- opcode_t size;
struct PackFile *pf = constt->base.pf;
type = PF_fetch_opcode(pf, &cursor);
- /* FIXME:leo size is unused */
- size = PF_fetch_opcode(pf, &cursor);
#if TRACE_PACKFILE
PIO_eprintf(NULL, "PackFile_Constant_unpack(): Type is %ld ('%c')...\n",
type, (char)type);
- PIO_eprintf(NULL, "PackFile_Constant_unpack(): Size is %ld...\n", size);
#endif
switch (type) {
1.30 +1 -6 parrot/src/packout.c
Index: packout.c
===================================================================
RCS file: /cvs/public/parrot/src/packout.c,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -w -r1.29 -r1.30
--- packout.c 21 Nov 2003 13:50:31 -0000 1.29
+++ packout.c 21 Nov 2003 14:26:03 -0000 1.30
@@ -7,7 +7,7 @@
** This program is free software. It is subject to the same
** license as Parrot itself.
**
-** $Id: packout.c,v 1.29 2003/11/21 13:50:31 leo Exp $
+** $Id: packout.c,v 1.30 2003/11/21 14:26:03 leo Exp $
** History:
** Rework by Melvin; new bytecode format, make bytecode portable.
** (Do endian conversion and wordsize transforms on the fly.)
@@ -176,7 +176,6 @@
case PFC_NUMBER:
padded_size = (sizeof(FLOATVAL) + sizeof(opcode_t) - 1) /
sizeof(opcode_t);
- *cursor++ = padded_size;
mem_sys_memcopy(cursor, &self->u.number, sizeof(FLOATVAL));
cursor += padded_size;
break;
@@ -191,7 +190,6 @@
/* Include space for flags, encoding, type, and size fields. */
packed_size = 4 + padded_size / sizeof(opcode_t);
- *cursor++ = packed_size;
*cursor++ = PObj_get_FLAGS(self->u.string); /* only constant_FLAG */
*cursor++ = self->u.string->encoding->index;
*cursor++ = self->u.string->type->index;
@@ -234,7 +232,6 @@
size_t len;
char *s = ((struct Parrot_Sub*)PMC_sub(key))->packed;
len = strlen(s) + 1;
- *cursor++ = (len + sizeof(opcode_t) - 1) / sizeof(opcode_t);
strcpy((char *) cursor, s);
#if TRACE_PACKFILE_PMC
@@ -252,8 +249,6 @@
packed_size = sizeof(opcode_t);
for (i = 0, key = self->u.key; key; key = PMC_data(key), i++)
packed_size += 2 * sizeof(opcode_t);
- /* size */
- *cursor++ = packed_size;
/* number of key components */
*cursor++ = i;
/* and now type / value per component */
1.16 +3 -3 parrot/t/native_pbc/number_1.pbc
<<Binary file>>
1.16 +3 -3 parrot/t/native_pbc/number_2.pbc
<<Binary file>>