[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[dotgnu-pnet-commits] pnet ChangeLog engine/ilverify.c include/il_ali...
From: |
Klaus Treichel |
Subject: |
[dotgnu-pnet-commits] pnet ChangeLog engine/ilverify.c include/il_ali... |
Date: |
Thu, 31 May 2007 15:19:06 +0000 |
CVSROOT: /cvsroot/dotgnu-pnet
Module name: pnet
Changes by: Klaus Treichel <ktreichel> 07/05/31 15:19:06
Modified files:
. : ChangeLog
engine : ilverify.c
include : il_align.h
image : meta_index.c
Log message:
Fix the verifier and some gcc 4.2.0 issues.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/pnet/ChangeLog?cvsroot=dotgnu-pnet&r1=1.3463&r2=1.3464
http://cvs.savannah.gnu.org/viewcvs/pnet/engine/ilverify.c?cvsroot=dotgnu-pnet&r1=1.30&r2=1.31
http://cvs.savannah.gnu.org/viewcvs/pnet/include/il_align.h?cvsroot=dotgnu-pnet&r1=1.2&r2=1.3
http://cvs.savannah.gnu.org/viewcvs/pnet/image/meta_index.c?cvsroot=dotgnu-pnet&r1=1.11&r2=1.12
Patches:
Index: ChangeLog
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/ChangeLog,v
retrieving revision 1.3463
retrieving revision 1.3464
diff -u -b -r1.3463 -r1.3464
--- ChangeLog 30 May 2007 09:49:16 -0000 1.3463
+++ ChangeLog 31 May 2007 15:19:05 -0000 1.3464
@@ -1,3 +1,14 @@
+2007-05-31 Klaus Treichel <address@hidden>
+
+ * engine/ilverify.c: Fix the verifier.
+
+ * include/il_align.h: replace a cast fom unsingned to ILNativeUInt to
fix
+ some gcc 4.2.0 compiler warnings about casting a pointer to an integer
of
+ a smaller size.
+
+ * image/meta_index.h: Fix setting some bitfields in the ILImage for the
+ token sizes in the blobs for gcc 4.2.0.
+
2007-05-30 Klaus Treichel <address@hidden>
* cscc/csharp/cs_lookup.c: Fix the ambiguous error if a type is
resolved in
Index: engine/ilverify.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/engine/ilverify.c,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -b -r1.30 -r1.31
--- engine/ilverify.c 5 May 2005 10:16:16 -0000 1.30
+++ engine/ilverify.c 31 May 2007 15:19:05 -0000 1.31
@@ -59,7 +59,7 @@
int state, opt;
char *param;
int errors;
- ILContext *context;
+ ILExecProcess *process = 0;
/* Parse the command-line arguments */
state = 0;
@@ -104,9 +104,12 @@
ILExecInit(0);
#endif
- /* Create a context to use for image loading */
- context = ILContextCreate();
- if(!context)
+ /* Create the default appdomain for the image loading. */
+#ifdef IL_CONFIG_APPDOMAINS
+ if(!(process = ILExecProcessCreate(0)))
+#else
+ if(!(process = ILExecProcessCreate(0, 0)))
+#endif
{
fprintf(stderr, "%s: out of memory\n", progname);
return 1;
@@ -122,21 +125,21 @@
/* Verify the contents of stdin, but only once */
if(!sawStdin)
{
- errors |= verify("-", context, allowUnsafe);
+ errors |= verify("-", process->context,
allowUnsafe);
sawStdin = 1;
}
}
else
{
/* Verify the contents of a regular file */
- errors |= verify(argv[1], context, allowUnsafe);
+ errors |= verify(argv[1], process->context,
allowUnsafe);
}
++argv;
--argc;
}
- /* Destroy the context */
- ILContextDestroy(context);
+ /* Destroy the engine */
+ ILExecDeinit();
/* Done */
return errors;
@@ -229,7 +232,7 @@
/* Verify the method */
result = _ILVerify(&_ILNullCoder, &start, method,
- &code, allowUnsafe, 0);
+ &code, allowUnsafe,
ILExecThreadCurrent());
if(!result)
{
printError(image, method, "could not verify code");
Index: include/il_align.h
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/include/il_align.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- include/il_align.h 29 Oct 2004 06:40:04 -0000 1.2
+++ include/il_align.h 31 May 2007 15:19:06 -0000 1.3
@@ -40,7 +40,7 @@
}
#define _IL_ALIGN_FOR_TYPE(name) \
- ((unsigned)(&(((struct _IL_align_##name *)0)->field)))
+ ((ILNativeUInt)(&(((struct _IL_align_##name *)0)->field)))
#define _IL_ALIGN_MAX(a,b) \
((a) > (b) ? (a) : (b))
Index: image/meta_index.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/image/meta_index.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -b -r1.11 -r1.12
--- image/meta_index.c 9 Jun 2005 07:59:59 -0000 1.11
+++ image/meta_index.c 31 May 2007 15:19:06 -0000 1.12
@@ -613,10 +613,10 @@
*/
static int ParseToken(ILImage *image, int strRefSize, int blobRefSize,
int guidRefSize, const ILUInt32 *
const *desc,
- unsigned char *item, ILUInt32 *values,
+ const unsigned char *item, ILUInt32
*values,
unsigned long token)
{
- unsigned char *ptr = item;
+ const unsigned char *ptr = item;
int index = 0;
const ILUInt32 *type;
const ILUInt32 *start;
@@ -1001,6 +1001,12 @@
return IL_LOADERR_BAD_META;
}
sizeBits = index[6];
+
+ /* Determine the size of each of the token structures */
+ strRefSize = (sizeBits & IL_META_SIZE_FLAG_STRREF) ? 4 : 2;
+ guidRefSize = (sizeBits & IL_META_SIZE_FLAG_GUIDREF) ? 4 : 2;
+ blobRefSize = (sizeBits & IL_META_SIZE_FLAG_BLOBREF) ? 4 : 2;
+
typesPresent = IL_READ_UINT64(index + 8);
image->sorted = IL_READ_UINT64(index + 16);
index += 24;
@@ -1029,31 +1035,6 @@
size -= 4;
}
- /* Determine the size of each of the token structures */
- if((sizeBits & IL_META_SIZE_FLAG_STRREF) != 0)
- {
- strRefSize = 4;
- }
- else
- {
- strRefSize = 2;
- }
- if((sizeBits & IL_META_SIZE_FLAG_GUIDREF) != 0)
- {
- guidRefSize = 4;
- }
- else
- {
- guidRefSize = 2;
- }
- if((sizeBits & IL_META_SIZE_FLAG_BLOBREF) != 0)
- {
- blobRefSize = 4;
- }
- else
- {
- blobRefSize = 2;
- }
for(type = 0; type < 64; ++type)
{
if((typesPresent & (((ILUInt64)1) << type)) != 0)
@@ -1175,9 +1156,9 @@
}
/* Record the size of STRREF's and BLOBREF's for later */
- image->strRefBig = (strRefSize == 4);
- image->blobRefBig = (blobRefSize == 4);
- image->guidRefBig = (guidRefSize == 4);
+ image->strRefBig = (sizeBits & IL_META_SIZE_FLAG_STRREF) ? -1 : 0;
+ image->guidRefBig = (sizeBits & IL_META_SIZE_FLAG_GUIDREF) ? -1 : 0;
+ image->blobRefBig = (sizeBits & IL_META_SIZE_FLAG_BLOBREF) ? -1 : 0;
/* The index has been successfully parsed */
return 0;
@@ -1530,9 +1511,9 @@
{
guidRefSize = 2;
}
- image->strRefBig = (strRefSize == 4);
- image->blobRefBig = (blobRefSize == 4);
- image->guidRefBig = (guidRefSize == 4);
+ image->strRefBig = (strRefSize == 4) ? -1 : 0;
+ image->blobRefBig = (blobRefSize == 4) ? -1 : 0;
+ image->guidRefBig = (guidRefSize == 4) ? -1 : 0;
/* Compute the size of all of the token types */
for(type = 0; type < 64; ++type)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [dotgnu-pnet-commits] pnet ChangeLog engine/ilverify.c include/il_ali...,
Klaus Treichel <=