dotgnu-pnet-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[dotgnu-pnet-commits] pnet ChangeLog codegen/cg_decls.tc dumpasm/dump...


From: Klaus Treichel
Subject: [dotgnu-pnet-commits] pnet ChangeLog codegen/cg_decls.tc dumpasm/dump...
Date: Sun, 03 May 2009 12:20:37 +0000

CVSROOT:        /cvsroot/dotgnu-pnet
Module name:    pnet
Changes by:     Klaus Treichel <ktreichel>      09/05/03 12:20:36

Modified files:
        .              : ChangeLog 
        codegen        : cg_decls.tc 
        dumpasm        : dump_utils.c 
        ilalink        : linker.h link_field.c link_misc.c 

Log message:
        Change the keyword .capability to .permissionset for dumping declarative
        security.
        Add handling of constants attached to a property in ilalink.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/pnet/ChangeLog?cvsroot=dotgnu-pnet&r1=1.3622&r2=1.3623
http://cvs.savannah.gnu.org/viewcvs/pnet/codegen/cg_decls.tc?cvsroot=dotgnu-pnet&r1=1.63&r2=1.64
http://cvs.savannah.gnu.org/viewcvs/pnet/dumpasm/dump_utils.c?cvsroot=dotgnu-pnet&r1=1.3&r2=1.4
http://cvs.savannah.gnu.org/viewcvs/pnet/ilalink/linker.h?cvsroot=dotgnu-pnet&r1=1.36&r2=1.37
http://cvs.savannah.gnu.org/viewcvs/pnet/ilalink/link_field.c?cvsroot=dotgnu-pnet&r1=1.12&r2=1.13
http://cvs.savannah.gnu.org/viewcvs/pnet/ilalink/link_misc.c?cvsroot=dotgnu-pnet&r1=1.4&r2=1.5

Patches:
Index: ChangeLog
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/ChangeLog,v
retrieving revision 1.3622
retrieving revision 1.3623
diff -u -b -r1.3622 -r1.3623
--- ChangeLog   23 Apr 2009 18:17:08 -0000      1.3622
+++ ChangeLog   3 May 2009 12:20:32 -0000       1.3623
@@ -1,3 +1,19 @@
+2009-05-03  Klaus Treichel  <address@hidden>
+
+       * codegen/cg_decls.tc (ILGenOutputAttributes): Print the .permissionset
+       instead of the .capability keyword for decarative security attributes.
+
+       * dumpasm/dump_utils.c (ILDAsmDumpSecurity): likewise.
+
+       * ilalink/linker.h (_ILLinkerConvertConstant): Add prototype.
+
+       * ilalink/link_field.c (_ILLinkerConvertConstant): Move logic for
+       converting constants from _ILLinkerConvertMarshal to here and call
+       _ILLinkerConvertConstant in _ILLinkerConvertMarshal instead.
+
+       * ilalink/link_misc.c (_ILLinkerConvertProperty): Add conversion of
+       constants attached to a property.
+
 2009-04-23  Klaus Treichel  <address@hidden>
 
        * codegen/cg_genattr.c (DllImportAttribute): Set the correct default

Index: codegen/cg_decls.tc
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/codegen/cg_decls.tc,v
retrieving revision 1.63
retrieving revision 1.64
diff -u -b -r1.63 -r1.64
--- codegen/cg_decls.tc 16 Apr 2009 15:34:54 -0000      1.63
+++ codegen/cg_decls.tc 3 May 2009 12:20:34 -0000       1.64
@@ -83,7 +83,7 @@
                                "prejitdeny", "noncasdemand", 
"noncaslinkdemand",
                                "nocasinheritance"
                        };
-                       fputs(".capability ", stream);
+                       fputs(".permissionset ", stream);
                        fputs(actionNames[ILDeclSecurity_Type(decl) &
                                                          
IL_META_SECURITY_ACTION_MASK], stream);
                        fputs(" = (", stream);

Index: dumpasm/dump_utils.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/dumpasm/dump_utils.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- dumpasm/dump_utils.c        20 Sep 2007 20:04:17 -0000      1.3
+++ dumpasm/dump_utils.c        3 May 2009 12:20:35 -0000       1.4
@@ -141,7 +141,7 @@
        }
 
        /* Dump the security header */
-       fputs("\t.capability ", outstream);
+       fputs("\t.permissionset ", outstream);
 
        /* Dump the type of security blob */
        ILDumpFlags(outstream, ILDeclSecurity_Type(security), ILSecurityFlags, 
0);

Index: ilalink/linker.h
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/ilalink/linker.h,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -b -r1.36 -r1.37
--- ilalink/linker.h    18 Nov 2008 20:06:06 -0000      1.36
+++ ilalink/linker.h    3 May 2009 12:20:35 -0000       1.37
@@ -311,6 +311,13 @@
                                                  ILClass *newClass);
 
 /*
+ * Convert constant data from an old item in a link
+ * image, and attach them to a new item in the final image.
+ */
+int _ILLinkerConvertConstant(ILLinker *linker, ILProgramItem *oldItem,
+                                                        ILProgramItem 
*newItem);
+
+/*
  * Convert field marshal and constant data from an old item in a link
  * image, and attach them to a new item in the final image.
  */

Index: ilalink/link_field.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/ilalink/link_field.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -b -r1.12 -r1.13
--- ilalink/link_field.c        25 Feb 2004 10:32:45 -0000      1.12
+++ ilalink/link_field.c        3 May 2009 12:20:35 -0000       1.13
@@ -172,13 +172,43 @@
        return 1;
 }
 
+int _ILLinkerConvertConstant(ILLinker *linker, ILProgramItem *oldItem,
+                                                        ILProgramItem *newItem)
+{
+       ILConstant *constant;
+
+       constant = ILConstantGetFromOwner(oldItem);
+       if(constant)
+       {
+               ILConstant *newConstant;
+               const void *blob;
+               unsigned long blobLen;
+
+               newConstant = ILConstantCreate(linker->image, 0, newItem,
+                                                                          
ILConstant_ElemType(constant));
+               if(!newConstant)
+               {
+                       _ILLinkerOutOfMemory(linker);
+                       return 0;
+               }
+               blob = ILConstantGetValue(constant, &blobLen);
+               if(blob)
+               {
+                       if(!ILConstantSetValue(newConstant, blob, blobLen))
+                       {
+                               _ILLinkerOutOfMemory(linker);
+                               return 0;
+                       }
+               }
+       }
+       return 1;
+}
+
 int _ILLinkerConvertMarshal(ILLinker *linker, ILProgramItem *oldItem,
                                                    ILProgramItem *newItem, int 
isParam)
 {
        ILFieldMarshal *marshal;
        ILFieldMarshal *newMarshal;
-       ILConstant *constant;
-       ILConstant *newConstant;
        ILFieldLayout *layout;
        ILFieldRVA *rva;
        const void *blob;
@@ -211,26 +241,10 @@
        }
 
        /* Convert the constant information */
-       constant = ILConstantGetFromOwner(oldItem);
-       if(constant)
-       {
-               newConstant = ILConstantCreate(linker->image, 0, newItem,
-                                                                          
ILConstant_ElemType(constant));
-               if(!newConstant)
-               {
-                       _ILLinkerOutOfMemory(linker);
-                       return 0;
-               }
-               blob = ILConstantGetValue(constant, &blobLen);
-               if(blob)
-               {
-                       if(!ILConstantSetValue(newConstant, blob, blobLen))
+       if(!_ILLinkerConvertConstant(linker, oldItem, newItem))
                        {
-                               _ILLinkerOutOfMemory(linker);
                                return 0;
                        }
-               }
-       }
 
        /* Bail out now if we are processing a parameter */
        if(isParam)

Index: ilalink/link_misc.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/ilalink/link_misc.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -b -r1.4 -r1.5
--- ilalink/link_misc.c 7 Jan 2003 11:57:18 -0000       1.4
+++ ilalink/link_misc.c 3 May 2009 12:20:36 -0000       1.5
@@ -77,6 +77,13 @@
                return 0;
        }
 
+       /* Convert the constant attached to the property */
+       if(!_ILLinkerConvertConstant(linker, (ILProgramItem *)property,
+                                                                (ILProgramItem 
*)newProperty))
+       {
+               return 0;
+       }
+
        /* Convert the method semantics on the property */
        if(!ConvertSemantics(linker, (ILProgramItem *)property,
                                                 (ILProgramItem *)newProperty))




reply via email to

[Prev in Thread] Current Thread [Next in Thread]