[svn:parrot] r39626 - branches/tt761_keys_revamp/src
bacek at svn.parrot.org
bacek at svn.parrot.org
Wed Jun 17 14:27:40 UTC 2009
Author: bacek
Date: Wed Jun 17 14:27:38 2009
New Revision: 39626
URL: https://trac.parrot.org/parrot/changeset/39626
Log:
[core] Put PFConstantTable right after Bytecode and Fixup segments.
Modified:
branches/tt761_keys_revamp/src/packfile.c
Modified: branches/tt761_keys_revamp/src/packfile.c
==============================================================================
--- branches/tt761_keys_revamp/src/packfile.c Wed Jun 17 13:20:40 2009 (r39625)
+++ branches/tt761_keys_revamp/src/packfile.c Wed Jun 17 14:27:38 2009 (r39626)
@@ -2243,6 +2243,26 @@
}
}
}
+
+ /* XXX
+ * Temporary? hack to put ConstantTable in front of other segments.
+ * This is useful for Annotations because we ensure that constants used
+ * for keys already available during unpack.
+ */
+ seg = dir->segments[2];
+
+ if (seg->type != PF_CONST_SEG) {
+ size_t i;
+
+ for (i = 3; i < num_segs; i++) {
+ PackFile_Segment * const s2 = dir->segments[i];
+ if (s2->type == PF_CONST_SEG) {
+ dir->segments[2] = s2;
+ dir->segments[i] = seg;
+ break;
+ }
+ }
+ }
}
More information about the parrot-commits
mailing list