[svn:parrot] r43124 - in trunk: include/parrot src
cotto at svn.parrot.org
cotto at svn.parrot.org
Thu Dec 17 06:23:48 UTC 2009
Author: cotto
Date: Thu Dec 17 06:23:47 2009
New Revision: 43124
URL: https://trac.parrot.org/parrot/changeset/43124
Log:
[packfile] some header cleanup and removal of a decrepit and unlikely TODO
Modified:
trunk/include/parrot/packfile.h
trunk/src/packfile.c
Modified: trunk/include/parrot/packfile.h
==============================================================================
--- trunk/include/parrot/packfile.h Thu Dec 17 06:02:48 2009 (r43123)
+++ trunk/include/parrot/packfile.h Thu Dec 17 06:23:47 2009 (r43124)
@@ -133,10 +133,10 @@
typedef struct PackFile_Constant {
opcode_t type;
union {
- opcode_t integer;
- FLOATVAL number;
- STRING *string;
- PMC *key;
+ opcode_t integer;
+ FLOATVAL number;
+ STRING *string;
+ PMC *key;
} u;
} PackFile_Constant;
@@ -205,7 +205,7 @@
opcode_t itype; /* internal type/version */
opcode_t id; /* internal id */
size_t size; /* internal oparray size */
- opcode_t *data; /* oparray e.g. bytecode */
+ opcode_t *data; /* oparray e.g. bytecode */
} PackFile_Segment;
typedef INTVAL (*PackFile_map_segments_func_t)(PARROT_INTERP, PackFile_Segment *seg, void *user_data);
@@ -326,32 +326,31 @@
typedef opcode_t (*packfile_fetch_op_t)(ARGIN(const unsigned char *));
-typedef INTVAL (*packfile_fetch_iv_t)(ARGIN(const unsigned char *));
-typedef void (*packfile_fetch_nv_t)(ARGOUT(unsigned char *), ARGIN(const unsigned char *));
+typedef INTVAL (*packfile_fetch_iv_t)(ARGIN(const unsigned char *));
+typedef void (*packfile_fetch_nv_t)(ARGOUT(unsigned char *), ARGIN(const unsigned char *));
typedef struct PackFile {
/* the packfile is its own directory */
PackFile_Directory directory;
- PackFile_Directory *dirp; /* for freeing */
- const opcode_t *src; /* the possible mmap()ed start of the PF */
- size_t size; /* size in bytes */
- INTVAL is_mmap_ped; /* don't free it, munmap it at destroy */
+ PackFile_Directory *dirp; /* for freeing */
+ const opcode_t *src; /* possible mmap()ed start of the PF */
+ size_t size; /* size in bytes */
+ INTVAL is_mmap_ped; /* don't free it, munmap it at destroy */
- PackFile_Header * header;
+ PackFile_Header *header;
/* directory hold all Segments */
- /* TODO make this reallocatable */
- PackFile_funcs PackFuncs[PF_MAX_SEG];
+ PackFile_funcs PackFuncs[PF_MAX_SEG];
- PackFile_ByteCode * cur_cs; /* used during PF loading */
+ PackFile_ByteCode *cur_cs; /* used during PF loading */
- INTVAL options;
- INTVAL need_wordsize;
- INTVAL need_endianize;
-
- packfile_fetch_op_t fetch_op;
- packfile_fetch_iv_t fetch_iv;
- packfile_fetch_nv_t fetch_nv;
+ INTVAL options;
+ INTVAL need_wordsize;
+ INTVAL need_endianize;
+
+ packfile_fetch_op_t fetch_op;
+ packfile_fetch_iv_t fetch_iv;
+ packfile_fetch_nv_t fetch_nv;
} PackFile;
Modified: trunk/src/packfile.c
==============================================================================
--- trunk/src/packfile.c Thu Dec 17 06:02:48 2009 (r43123)
+++ trunk/src/packfile.c Thu Dec 17 06:23:47 2009 (r43124)
@@ -1438,7 +1438,6 @@
const PackFile_funcs funcs)
{
ASSERT_ARGS(PackFile_funcs_register)
- /* TODO dynamic registering */
pf->PackFuncs[type] = funcs;
}
More information about the parrot-commits
mailing list