[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Dotgnu-pnet-commits] CVS: pnet/ilasm ilasm_build.c, 1.23, 1.24 ilasm_bu
From: |
Rhys Weatherley <address@hidden> |
Subject: |
[Dotgnu-pnet-commits] CVS: pnet/ilasm ilasm_build.c, 1.23, 1.24 ilasm_build.h, 1.10, 1.11 ilasm_grammar.y, 1.37, 1.38 |
Date: |
Fri, 05 Sep 2003 03:45:13 -0400 |
Update of /cvsroot/dotgnu-pnet/pnet/ilasm
In directory subversions:/tmp/cvs-serv24142/ilasm
Modified Files:
ilasm_build.c ilasm_build.h ilasm_grammar.y
Log Message:
Convert instances of "SecurityPermissionAttribute" into security declarations;
update the compiler and assembler to process security declarations.
Index: ilasm_build.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/ilasm/ilasm_build.c,v
retrieving revision 1.23
retrieving revision 1.24
diff -C2 -r1.23 -r1.24
*** ilasm_build.c 13 Apr 2003 23:17:06 -0000 1.23
--- ilasm_build.c 5 Sep 2003 07:45:11 -0000 1.24
***************
*** 1029,1032 ****
--- 1029,1059 ----
}
+ void ILAsmSecurityCreate(ILInt64 action, const void *str, int len)
+ {
+ ILProgramItem *owner;
+ ILDeclSecurity *decl;
+
+ /* Get the owner for the security blob */
+ owner = ILProgramItem_FromToken(ILAsmImage, ILAsmLastToken);
+ if(!owner)
+ {
+ ILAsmPrintMessage(ILAsmFilename, ILAsmLineNum,
+ "unknown owner for security
declaration");
+ ILAsmErrors = 1;
+ return;
+ }
+
+ /* Create the security blob */
+ decl = ILDeclSecurityCreate(ILAsmImage, 0, owner, (ILUInt32)action);
+ if(!decl)
+ {
+ ILAsmOutOfMemory();
+ }
+ if(!ILDeclSecuritySetBlob(decl, str, len))
+ {
+ ILAsmOutOfMemory();
+ }
+ }
+
ILParameter *ILAsmFindParameter(ILMethod *method, ILUInt32 paramNum)
{
Index: ilasm_build.h
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/ilasm/ilasm_build.h,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -r1.10 -r1.11
*** ilasm_build.h 10 Mar 2003 20:52:32 -0000 1.10
--- ilasm_build.h 5 Sep 2003 07:45:11 -0000 1.11
***************
*** 210,213 ****
--- 210,218 ----
/*
+ * Create a declarative security blob for the current item.
+ */
+ void ILAsmSecurityCreate(ILInt64 action, const void *str, int len);
+
+ /*
* Find a numbered parameter for a particular method.
* Returns NULL if not found.
Index: ilasm_grammar.y
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/ilasm/ilasm_grammar.y,v
retrieving revision 1.37
retrieving revision 1.38
diff -C2 -r1.37 -r1.38
*** ilasm_grammar.y 14 Jul 2003 11:31:34 -0000 1.37
--- ilasm_grammar.y 5 Sep 2003 07:45:11 -0000 1.38
***************
*** 3865,3879 ****
/*
! * Security declarations. Currently these are supported only
! * so that the output of "ildasm" can be parsed. They aren't
! * written to the final object file.
*/
SecurityDeclaration
: D_PERMISSION SecurityAction ClassName '(' NameValuePairs ')'
! | D_CAPABILITY SecurityAction SQUOTE_STRING
! | D_CAPABILITY SecurityAction '=' Bytes
! | D_PERMISSIONSET SecurityAction SQUOTE_STRING
! | D_PERMISSIONSET SecurityAction '=' Bytes
;
--- 3865,3887 ----
/*
! * Security declarations.
*/
SecurityDeclaration
: D_PERMISSION SecurityAction ClassName '(' NameValuePairs ')'
! | D_CAPABILITY SecurityAction SQUOTE_STRING {
! ILIntString unicode = PackUnicodeString($3);
! ILAsmSecurityCreate($2, unicode.string,
unicode.len);
! }
! | D_CAPABILITY SecurityAction '=' Bytes {
! ILAsmSecurityCreate($2, $4.string, $4.len);
! }
! | D_PERMISSIONSET SecurityAction SQUOTE_STRING {
! ILIntString unicode = PackUnicodeString($3);
! ILAsmSecurityCreate($2, unicode.string,
unicode.len);
! }
! | D_PERMISSIONSET SecurityAction '=' Bytes {
! ILAsmSecurityCreate($2, $4.string, $4.len);
! }
;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Dotgnu-pnet-commits] CVS: pnet/ilasm ilasm_build.c, 1.23, 1.24 ilasm_build.h, 1.10, 1.11 ilasm_grammar.y, 1.37, 1.38,
Rhys Weatherley <address@hidden> <=