[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[dotgnu-pnet-commits] pnet ChangeLog engine/cvmc_call.c engine/cvmc_s...
From: |
Klaus Treichel |
Subject: |
[dotgnu-pnet-commits] pnet ChangeLog engine/cvmc_call.c engine/cvmc_s... |
Date: |
Sun, 22 Oct 2006 18:01:09 +0000 |
CVSROOT: /cvsroot/dotgnu-pnet
Module name: pnet
Changes by: Klaus Treichel <ktreichel> 06/10/22 18:01:09
Modified files:
. : ChangeLog
engine : cvmc_call.c cvmc_stack.c jitc_obj.c verify.c
verify_call.c verify_obj.c verify_ptr.c
ilasm : ilasm_output.c ilasm_scanner.l
image : opdef.c
include : il_coder.h il_opcodes.h
Log message:
2006-10-22 Klaus Treichel <address@hidden>
* engine/cvmc_call.c, engine/cvmc_stack.c: Handle the new
engine type
ILEngineType_CM (controlled-mutability managed pointer),
* engine/verify.c: Initialize the new flag vor the readonly.
prefix.
* engine/verify_call.c, engine/verify_obj.c,
engine/verify_ptr.c: Handle
the new engine type ILEngineType_CM (controlled-mutability
managed pointer),
Implement the unbox.any and readonly. opcodes. Start with tha
handling of
the no. and constrained. opcodes.
* engine/jitc_obj.c: Fix a bug in the ldfld opcode in the case
that the
object is a value type on the stack.
* ilasm/ilasm_output.c: Remove the wrong ann.live and ann.ref
opcodes
which opcodes have other standard meanings now.
* ilasm/ilasm_scanner.l: Remove the wrong ann.live and ann.ref
opcodes
and add the readonly., no. and constrained. opcodes.
* image/opdef.c: Remove the wrong ann.live and ann.ref opcodes
and add
the readonly., no. and constrained. opcodes.
* include/il_coder.h: Add the controlled-mutability managed
pointer needed
for the readonly prefix to the engine types.
* include/il_opcodes.c: Remove the wrong ann.live and ann.ref
opcodes which
opcodes have other standard meanings now and add the readonly.,
no. and
constrained. opcodes. Add the allowed flags for the no. prefix.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/pnet/ChangeLog?cvsroot=dotgnu-pnet&r1=1.3379&r2=1.3380
http://cvs.savannah.gnu.org/viewcvs/pnet/engine/cvmc_call.c?cvsroot=dotgnu-pnet&r1=1.32&r2=1.33
http://cvs.savannah.gnu.org/viewcvs/pnet/engine/cvmc_stack.c?cvsroot=dotgnu-pnet&r1=1.8&r2=1.9
http://cvs.savannah.gnu.org/viewcvs/pnet/engine/jitc_obj.c?cvsroot=dotgnu-pnet&r1=1.23&r2=1.24
http://cvs.savannah.gnu.org/viewcvs/pnet/engine/verify.c?cvsroot=dotgnu-pnet&r1=1.50&r2=1.51
http://cvs.savannah.gnu.org/viewcvs/pnet/engine/verify_call.c?cvsroot=dotgnu-pnet&r1=1.54&r2=1.55
http://cvs.savannah.gnu.org/viewcvs/pnet/engine/verify_obj.c?cvsroot=dotgnu-pnet&r1=1.27&r2=1.28
http://cvs.savannah.gnu.org/viewcvs/pnet/engine/verify_ptr.c?cvsroot=dotgnu-pnet&r1=1.18&r2=1.19
http://cvs.savannah.gnu.org/viewcvs/pnet/ilasm/ilasm_output.c?cvsroot=dotgnu-pnet&r1=1.22&r2=1.23
http://cvs.savannah.gnu.org/viewcvs/pnet/ilasm/ilasm_scanner.l?cvsroot=dotgnu-pnet&r1=1.13&r2=1.14
http://cvs.savannah.gnu.org/viewcvs/pnet/image/opdef.c?cvsroot=dotgnu-pnet&r1=1.5&r2=1.6
http://cvs.savannah.gnu.org/viewcvs/pnet/include/il_coder.h?cvsroot=dotgnu-pnet&r1=1.51&r2=1.52
http://cvs.savannah.gnu.org/viewcvs/pnet/include/il_opcodes.h?cvsroot=dotgnu-pnet&r1=1.6&r2=1.7
Patches:
Index: ChangeLog
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/ChangeLog,v
retrieving revision 1.3379
retrieving revision 1.3380
diff -u -b -r1.3379 -r1.3380
--- ChangeLog 20 Oct 2006 19:30:54 -0000 1.3379
+++ ChangeLog 22 Oct 2006 18:01:08 -0000 1.3380
@@ -1,3 +1,34 @@
+2006-10-22 Klaus Treichel <address@hidden>
+
+ * engine/cvmc_call.c, engine/cvmc_stack.c: Handle the new engine type
+ ILEngineType_CM (controlled-mutability managed pointer),
+
+ * engine/verify.c: Initialize the new flag vor the readonly. prefix.
+
+ * engine/verify_call.c, engine/verify_obj.c, engine/verify_ptr.c: Handle
+ the new engine type ILEngineType_CM (controlled-mutability managed
pointer),
+ Implement the unbox.any and readonly. opcodes. Start with tha handling
of
+ the no. and constrained. opcodes.
+
+ * engine/jitc_obj.c: Fix a bug in the ldfld opcode in the case that the
+ object is a value type on the stack.
+
+ * ilasm/ilasm_output.c: Remove the wrong ann.live and ann.ref opcodes
+ which opcodes have other standard meanings now.
+
+ * ilasm/ilasm_scanner.l: Remove the wrong ann.live and ann.ref opcodes
+ and add the readonly., no. and constrained. opcodes.
+
+ * image/opdef.c: Remove the wrong ann.live and ann.ref opcodes and add
+ the readonly., no. and constrained. opcodes.
+
+ * include/il_coder.h: Add the controlled-mutability managed pointer
needed
+ for the readonly prefix to the engine types.
+
+ * include/il_opcodes.c: Remove the wrong ann.live and ann.ref opcodes
which
+ opcodes have other standard meanings now and add the readonly., no. and
+ constrained. opcodes. Add the allowed flags for the no. prefix.
+
2006-10-20 Klaus Treichel <address@hidden>
* include/il_meta.h, include/il_program.h, image/marshal.c: Add
Index: engine/cvmc_call.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/engine/cvmc_call.c,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -b -r1.32 -r1.33
--- engine/cvmc_call.c 23 Aug 2005 10:45:52 -0000 1.32
+++ engine/cvmc_call.c 22 Oct 2006 18:01:08 -0000 1.33
@@ -495,6 +495,7 @@
break;
case ILEngineType_M:
+ case ILEngineType_CM:
case ILEngineType_O:
case ILEngineType_T:
case ILEngineType_I4:
Index: engine/cvmc_stack.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/engine/cvmc_stack.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -b -r1.8 -r1.9
--- engine/cvmc_stack.c 23 Aug 2005 10:45:52 -0000 1.8
+++ engine/cvmc_stack.c 22 Oct 2006 18:01:08 -0000 1.9
@@ -35,6 +35,7 @@
{
case ILEngineType_I4:
case ILEngineType_M:
+ case ILEngineType_CM:
case ILEngineType_T:
case ILEngineType_O:
{
Index: engine/jitc_obj.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/engine/jitc_obj.c,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -b -r1.23 -r1.24
--- engine/jitc_obj.c 17 Oct 2006 12:24:18 -0000 1.23
+++ engine/jitc_obj.c 22 Oct 2006 18:01:08 -0000 1.24
@@ -340,9 +340,22 @@
}
#endif
_ILJitStackPop(jitCoder, ptr);
+ if(ptrType == ILEngineType_MV)
+ {
+ /* We load a field from a valuetype on the stack. */
+ value = jit_insn_address_of(jitCoder->jitFunction,
+
_ILJitStackItemValue(ptr));
+ _ILJitStackItemSetValue(ptr, value);
+ value = _ILJitLoadField(jitCoder,
+ &ptr,
+ fieldType,
field->offset, 0);
+ }
+ else
+ {
value = _ILJitLoadField(jitCoder,
&ptr,
fieldType,
field->offset, 1);
+ }
_ILJitStackPushValue(jitCoder, value);
}
Index: engine/verify.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/engine/verify.c,v
retrieving revision 1.50
retrieving revision 1.51
diff -u -b -r1.50 -r1.51
--- engine/verify.c 30 Aug 2006 17:33:25 -0000 1.50
+++ engine/verify.c 22 Oct 2006 18:01:08 -0000 1.51
@@ -700,6 +700,7 @@
result = 0;
labelList = 0;
hasRethrow = 0;
+ isReadOnly = 0;
/* Initialize the memory allocator that is used for temporary
allocation during bytecode verification */
Index: engine/verify_call.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/engine/verify_call.c,v
retrieving revision 1.54
retrieving revision 1.55
diff -u -b -r1.54 -r1.55
--- engine/verify_call.c 15 Oct 2006 09:32:28 -0000 1.54
+++ engine/verify_call.c 22 Oct 2006 18:01:08 -0000 1.55
@@ -675,7 +675,8 @@
/* The "this" parameter must be a
pointer */
paramType = ILClassToType(owner);
if(item->engineType == ILEngineType_T ||
- item->engineType == ILEngineType_M)
+ item->engineType == ILEngineType_M ||
+ item->engineType == ILEngineType_CM)
{
if(!ILTypeIdentical(item->typeInfo, paramType))
{
@@ -955,6 +956,13 @@
}
}
break;
+
+ case ILEngineType_CM:
+ {
+ /* Controlled-mutability managed pointers are
not allowed here. */
+ return -1;
+ }
+ break;
}
}
Index: engine/verify_obj.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/engine/verify_obj.c,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -b -r1.27 -r1.28
--- engine/verify_obj.c 23 Aug 2005 10:45:52 -0000 1.27
+++ engine/verify_obj.c 22 Oct 2006 18:01:08 -0000 1.28
@@ -207,6 +207,7 @@
ILField *fieldInfo;
ILMethod *methodInfo;
ILProgramItem *item;
+ILClass *stackItemClass;
#else /* IL_VERIFY_CODE */
@@ -216,13 +217,21 @@
(unsafeAllowed && \
((type) == ILEngineType_I || (type) ==
ILEngineType_I4)))
+#define IsCPSrcPointer(type,typeInfo,classInfo) \
+ ((((type) == ILEngineType_M || \
+ (type) == ILEngineType_CM || \
+ (type) == ILEngineType_T) && \
+ ILTypeIdentical(typeInfo, ILClassToType(classInfo)))
|| \
+ (unsafeAllowed && \
+ ((type) == ILEngineType_I || (type) ==
ILEngineType_I4)))
+
case IL_OP_CPOBJ:
{
/* Copy a value type */
classInfo = GetValueTypeToken(method, pc);
if(classInfo &&
IsCPPointer(STK_BINARY_1, stack[stackSize - 2].typeInfo, classInfo)
&&
- IsCPPointer(STK_BINARY_2, stack[stackSize - 1].typeInfo, classInfo))
+ IsCPSrcPointer(STK_BINARY_2, stack[stackSize - 1].typeInfo,
classInfo))
{
ILCoderCopyObject(coder, STK_BINARY_1, STK_BINARY_2, classInfo);
stackSize -= 2;
@@ -330,6 +339,58 @@
}
break;
+case IL_OP_UNBOX_ANY:
+{
+ classInfo = GetClassToken(method, pc);
+
+ /* Unbox a value from an object */
+ if(classInfo && STK_UNARY == ILEngineType_O)
+ {
+ classType = ILClassToType(classInfo);
+ if(ILType_IsClass(classType))
+ {
+ /* Cast the value to the required type first. This
takes
+ care of throwing the "InvalidCastException" if the
value
+ is not of the correct class */
+ if(!IsSubClass(stack[stackSize - 1].typeInfo,
classInfo))
+ {
+ ILCoderCastClass(coder, classInfo, 1);
+ }
+ stack[stackSize - 1].typeInfo = classType;
+ }
+ else
+ {
+ if(!(AssignCompatible(method, &(stack[stackSize - 1]),
+ classType,
+
unsafeAllowed)))
+ {
+ /* To throw the InvalitCastException in this
case. */
+ ILCoderCastClass(coder, classInfo, 1);
+ }
+ /* Unbox the object to produce a managed pointer */
+ stackItemClass =
ILClassFromType(ILProgramItem_Image(method),
+
0,
+
stack[stackSize - 1].typeInfo, 0);
+ if(!stackItemClass)
+ {
+ ThrowSystem("System", "TypeLoadException");
+ }
+ /* First get the pointer to the value */
+ ILCoderUnbox(coder, stackItemClass);
+ stack[stackSize - 1].engineType = ILEngineType_M;
+ /* We have to dereference the value in this case. */
+ ILCoderPtrAccessManaged(coder, IL_OP_LDOBJ,
stackItemClass);
+ stack[stackSize - 1].engineType =
TypeToEngineType(classType);
+ stack[stackSize - 1].typeInfo = classType;
+ }
+ }
+ else
+ {
+ VERIFY_TYPE_ERROR();
+ }
+}
+break;
+
case IL_OP_LDFLD:
{
/* Load the contents of an object field. Note: according to the
@@ -367,6 +428,7 @@
}
else if(!unsafeAllowed &&
(STK_UNARY == ILEngineType_M ||
+ STK_UNARY == ILEngineType_CM ||
STK_UNARY == ILEngineType_T))
{
/* Accessing a field within a pointer to a managed
value */
@@ -418,6 +480,7 @@
(STK_UNARY == ILEngineType_I ||
STK_UNARY == ILEngineType_I4 ||
STK_UNARY == ILEngineType_M ||
+ STK_UNARY == ILEngineType_CM ||
STK_UNARY == ILEngineType_T))
{
/* Accessing a field within an unmanaged pointer.
@@ -481,6 +544,7 @@
}
}
else if(STK_UNARY == ILEngineType_M ||
+ STK_UNARY == ILEngineType_CM ||
STK_UNARY == ILEngineType_T)
{
/* Accessing a field within a pointer to a managed
value */
@@ -587,6 +651,7 @@
}
else if(!unsafeAllowed &&
(STK_BINARY_1 == ILEngineType_M ||
+ STK_BINARY_1 == ILEngineType_CM ||
STK_BINARY_1 == ILEngineType_T))
{
/* Accessing a field within a pointer to a managed
value */
@@ -617,6 +682,7 @@
(STK_BINARY_1 == ILEngineType_I ||
STK_BINARY_1 == ILEngineType_I4 ||
STK_BINARY_1 == ILEngineType_M ||
+ STK_BINARY_1 == ILEngineType_CM ||
STK_BINARY_1 == ILEngineType_T))
{
/* Accessing a field within an unmanaged pointer.
Index: engine/verify_ptr.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/engine/verify_ptr.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -b -r1.18 -r1.19
--- engine/verify_ptr.c 13 Oct 2006 10:03:53 -0000 1.18
+++ engine/verify_ptr.c 22 Oct 2006 18:01:08 -0000 1.19
@@ -184,13 +184,16 @@
ILType *elemType;
ILClass *classInfo;
ILType *classType;
+ILBool isReadOnly;
#else /* IL_VERIFY_CODE */
#define VERIFY_LDIND(name,type,engineType) \
case IL_OP_LDIND_##name: \
{ \
- if(STK_UNARY == ILEngineType_M || STK_UNARY == ILEngineType_T) \
+ if(STK_UNARY == ILEngineType_M || \
+ STK_UNARY == ILEngineType_CM || \
+ STK_UNARY == ILEngineType_T) \
{ \
if(unsafeAllowed || \
PtrCompatible(stack[stackSize - 1].typeInfo, (type))) \
@@ -329,7 +332,9 @@
case IL_OP_LDIND_REF:
{
/* Load an object reference from a pointer */
- if(STK_UNARY == ILEngineType_M || STK_UNARY == ILEngineType_T)
+ if(STK_UNARY == ILEngineType_M ||
+ STK_UNARY == ILEngineType_CM ||
+ STK_UNARY == ILEngineType_T)
{
if(IsObjectRef(stack[stackSize - 1].typeInfo))
{
@@ -406,7 +411,9 @@
/* Load a value type from a pointer */
classInfo = GetValueTypeToken(method, pc);
classType = (classInfo ? ILClassToType(classInfo) : 0);
- if(STK_UNARY == ILEngineType_M || STK_UNARY == ILEngineType_T)
+ if(STK_UNARY == ILEngineType_M ||
+ STK_UNARY == ILEngineType_CM ||
+ STK_UNARY == ILEngineType_T)
{
if(classInfo &&
ILTypeIdentical(stack[stackSize - 1].typeInfo, classType))
@@ -553,6 +560,86 @@
}
break;
+case IL_OP_PREFIX + IL_PREFIX_OP_NO:
+{
+ /* Process a "no" prefix for pointer access */
+ if(unsafeAllowed)
+ {
+ /* The no prefix is allowed in unsafe code only. */
+ if(pc[2] & IL_PREFIX_OP_NO_TYPECHECK)
+ {
+ if(!(pc[3] == IL_OP_LDELEMA || pc[3] == IL_OP_LDELEM
||
+ pc[3] == IL_OP_STELEM || pc[3] ==
IL_OP_CASTCLASS ||
+ pc[3] == IL_OP_UNBOX))
+ {
+ VERIFY_INSN_ERROR();
+ }
+ }
+ if(pc[2] & IL_PREFIX_OP_NO_RANGECHECK)
+ {
+ if(!(pc[3] == IL_OP_LDELEMA || pc[3] ==
IL_OP_LDELEM_I1 ||
+ pc[3] == IL_OP_LDELEM_U1 || pc[3] ==
IL_OP_LDELEM_I2 ||
+ pc[3] == IL_OP_LDELEM_U2 || pc[3] ==
IL_OP_LDELEM_I4 ||
+ pc[3] == IL_OP_LDELEM_U4 || pc[3] ==
IL_OP_LDELEM_I8 ||
+ pc[3] == IL_OP_LDELEM_I || pc[3] ==
IL_OP_LDELEM_R4 ||
+ pc[3] == IL_OP_LDELEM_R8 || pc[3] ==
IL_OP_LDELEM_REF ||
+ pc[3] == IL_OP_STELEM_I || pc[3] ==
IL_OP_STELEM_I1 ||
+ pc[3] == IL_OP_STELEM_I2 || pc[3] ==
IL_OP_STELEM_I4 ||
+ pc[3] == IL_OP_STELEM_I8 || pc[3] ==
IL_OP_STELEM_R4 ||
+ pc[3] == IL_OP_STELEM_R8 || pc[3] ==
IL_OP_STELEM_REF))
+ {
+ VERIFY_INSN_ERROR();
+ }
+
+ }
+ if(pc[2] & IL_PREFIX_OP_NO_RANGECHECK)
+ {
+ if(!(pc[3] == IL_OP_LDFLD || pc[3] == IL_OP_STFLD
||
+ pc[3] == IL_OP_CALLVIRT || pc[3] ==
IL_OP_LDELEMA ||
+ pc[3] == IL_OP_LDELEM_I1 || pc[3] ==
IL_OP_LDELEM_U1 ||
+ pc[3] == IL_OP_LDELEM_I2 || pc[3] ==
IL_OP_LDELEM_U2 ||
+ pc[3] == IL_OP_LDELEM_I4 || pc[3] ==
IL_OP_LDELEM_U4 ||
+ pc[3] == IL_OP_LDELEM_I8 || pc[3] ==
IL_OP_LDELEM_I ||
+ pc[3] == IL_OP_LDELEM_R4 || pc[3] ==
IL_OP_LDELEM_R8 ||
+ pc[3] == IL_OP_LDELEM_REF || pc[3] ==
IL_OP_STELEM_I ||
+ pc[3] == IL_OP_STELEM_I1 || pc[3] ==
IL_OP_STELEM_I2 ||
+ pc[3] == IL_OP_STELEM_I4 || pc[3] ==
IL_OP_STELEM_I8 ||
+ pc[3] == IL_OP_STELEM_R4 || pc[3] ==
IL_OP_STELEM_R8 ||
+ pc[3] == IL_OP_STELEM_REF ||
+ (pc[3] == IL_OP_PREFIX && pc[4] ==
IL_PREFIX_OP_LDVIRTFTN)))
+ {
+ VERIFY_INSN_ERROR();
+ }
+ }
+ if(pc[2] & ~(IL_PREFIX_OP_NO_TYPECHECK |
IL_PREFIX_OP_NO_RANGECHECK |
+ IL_PREFIX_OP_NO_RANGECHECK))
+ {
+ VERIFY_INSN_ERROR();
+ }
+ /* TODO: Handle this opcode in the coder. */
+ }
+ else
+ {
+ VERIFY_INSN_ERROR();
+ }
+}
+break;
+
+case IL_OP_PREFIX + IL_PREFIX_OP_READONLY:
+{
+ /* Process a "readonly" prefix for array access */
+ if(pc[2] == IL_OP_LDELEMA)
+ {
+ /* TODO: Handle this in the ldelema instruction so that a */
+ /* controlled-mutability managed pointer. */
+ isReadOnly = 1;
+ }
+ else
+ {
+ VERIFY_INSN_ERROR();
+ }
+}
+
case IL_OP_NEWARR:
{
/* Create a new array */
@@ -653,6 +740,8 @@
(elemType = ArrayElementType(stack[stackSize - 2].typeInfo)) != 0)
{
classType = GetTypeToken(method, pc);
+ if(!isReadOnly)
+ {
if(classType &&
(elemType == ILType_Void || ILTypeIdentical(elemType,
classType)))
{
@@ -671,6 +760,18 @@
}
else
{
+ /* Perform no type check in this case. */
+ /* But push an controlled-mutability managed pointer on
the stack. */
+ ILCoderArrayAccess(coder, opcode, STK_BINARY_2,
classType);
+ stack[stackSize - 2].engineType = ILEngineType_CM;
+ stack[stackSize - 2].typeInfo = classType;
+ --stackSize;
+ }
+ /* And reset the readonly prefix. */
+ isReadOnly = 0;
+ }
+ else
+ {
VERIFY_TYPE_ERROR();
}
}
Index: ilasm/ilasm_output.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/ilasm/ilasm_output.c,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -b -r1.22 -r1.23
--- ilasm/ilasm_output.c 12 Jun 2004 13:13:41 -0000 1.22
+++ ilasm/ilasm_output.c 22 Oct 2006 18:01:08 -0000 1.23
@@ -358,24 +358,11 @@
switch(opcode)
{
case IL_OP_ANN_DEAD:
- case 0xFE00 | IL_PREFIX_OP_ANN_LIVE:
{
OutLongVar(opcode, 0, 0, num);
}
break;
- case 0xFE00 | IL_PREFIX_OP_ANN_REF:
- {
- OutLongVar(opcode, IL_OP_ANN_REF_S, 0, num);
- }
- break;
-
- case IL_OP_ANN_REF_S:
- {
- OutShortVar(0xFE00 | IL_PREFIX_OP_ANN_REF, opcode, 0,
num);
- }
- break;
-
case 0xFE00 | IL_PREFIX_OP_LDARG:
{
OutLongVar(0xFE00 | IL_PREFIX_OP_LDARG, IL_OP_LDARG_S,
Index: ilasm/ilasm_scanner.l
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/ilasm/ilasm_scanner.l,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -b -r1.13 -r1.14
--- ilasm/ilasm_scanner.l 10 Mar 2003 12:04:54 -0000 1.13
+++ ilasm/ilasm_scanner.l 22 Oct 2006 18:01:09 -0000 1.14
@@ -665,10 +665,10 @@
"volatile." { OPCODE_NONE_P(VOLATILE); }
"volatile" { OPCODE_NONE_P(VOLATILE); } /*
Alias */
"xor" { OPCODE_NONE(XOR); }
+"readonly." { OPCODE_NONE_P(READONLY); }
+"readonly" { OPCODE_NONE_P(READONLY); } /*
Alias */
"ann.dead" { OPCODE_VAR(ANN_DEAD); } /*
Local var opcodes */
-"ann.live" { OPCODE_VAR_P(ANN_LIVE); }
-"ann.ref" { OPCODE_VAR_P(ANN_REF); }
"ann.ref.s" { OPCODE_VAR(ANN_REF_S); }
"ldarg" { OPCODE_VAR_P(LDARG); }
"ldarg.s" { OPCODE_VAR(LDARG_S); }
@@ -697,6 +697,10 @@
return I_INT; }
"unaligned" { yylval.opcode = 0xFE00 |
IL_PREFIX_OP_UNALIGNED;
return I_INT; } /*
Alias */
+"no." { yylval.opcode = 0xFE00 |
IL_PREFIX_OP_NO;
+ return I_INT; }
+"no" { yylval.opcode = 0xFE00 |
IL_PREFIX_OP_NO;
+ return I_INT; } /*
Alias */
"ann.data" { OPCODE_BRANCH_P(ANN_DATA); } /*
Branch opcodes */
"ann.data.s" { OPCODE_BRANCH(ANN_DATA_S); }
@@ -766,6 +770,8 @@
"sizeof" { OPCODE_TYPE_P(SIZEOF); }
"stobj" { OPCODE_TYPE(STOBJ); }
"unbox" { OPCODE_TYPE(UNBOX); }
+"constrained." { OPCODE_TYPE_P(CONSTRAINED); }
+"constrained" { OPCODE_TYPE_P(CONSTRAINED); } /* Alias */
"ldstr" { yylval.opcode = IL_OP_LDSTR;
/* String opcodes */
return I_STRING; }
Index: image/opdef.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/image/opdef.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -b -r1.5 -r1.6
--- image/opdef.c 18 Feb 2003 05:25:08 -0000 1.5
+++ image/opdef.c 22 Oct 2006 18:01:09 -0000 1.6
@@ -350,18 +350,18 @@
OPDEF("volatile.", 0, 0, IL_OPCODE_ARGS_NONE, 2)
OPDEF("tail.", 0, 0, IL_OPCODE_ARGS_NONE, 2)
OPDEF("initobj", 1, 0, IL_OPCODE_ARGS_TOKEN, 6)
-OPDEF("ann.live", 0, 0, IL_OPCODE_ARGS_ANN_LIVE, 4)
+OPDEF("constrained.", 0, 0, IL_OPCODE_ARGS_TOKEN, 6)
OPDEF("cpblk", 3, 0, IL_OPCODE_ARGS_NONE, 2)
OPDEF("initblk", 3, 0, IL_OPCODE_ARGS_NONE, 2)
-OPDEF("ann.ref", 0, 0, IL_OPCODE_ARGS_ANN_REF, 4)
+OPDEF("no.", 0, 0, IL_OPCODE_ARGS_UINT8, 3)
OPDEF("rethrow", 0, 0, IL_OPCODE_ARGS_NONE, 2)
OPDEF("unused_prefix_1B", 0, 0, IL_OPCODE_ARGS_INVALID, 2)
OPDEF("sizeof", 0, 1, IL_OPCODE_ARGS_TOKEN, 6)
OPDEF("refanytype", 1, 1, IL_OPCODE_ARGS_NONE, 2)
+OPDEF("readonly.", 0, 0, IL_OPCODE_ARGS_NONE, 2)
-OPDEF("unused_prefix_1E", 0, 0, IL_OPCODE_ARGS_INVALID, 2)
OPDEF("unused_prefix_1F", 0, 0, IL_OPCODE_ARGS_INVALID, 2)
OPDEF("unused_prefix_20", 0, 0, IL_OPCODE_ARGS_INVALID, 2)
OPDEF("unused_prefix_21", 0, 0, IL_OPCODE_ARGS_INVALID, 2)
Index: include/il_coder.h
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/include/il_coder.h,v
retrieving revision 1.51
retrieving revision 1.52
diff -u -b -r1.51 -r1.52
--- include/il_coder.h 15 Oct 2006 09:32:28 -0000 1.51
+++ include/il_coder.h 22 Oct 2006 18:01:09 -0000 1.52
@@ -48,16 +48,17 @@
*/
typedef enum
{
- ILEngineType_I4,
- ILEngineType_I8,
- ILEngineType_I,
- ILEngineType_F,
- ILEngineType_M,
- ILEngineType_O,
- ILEngineType_T,
- ILEngineType_MV,
- ILEngineType_Invalid,
- ILEngineType_TypedRef,
+ ILEngineType_I4, /* Int32 value. */
+ ILEngineType_I8, /* Int64 value. */
+ ILEngineType_I, /* Native integer. */
+ ILEngineType_F, /* Native float. */
+ ILEngineType_M, /* Managed reference. */
+ ILEngineType_O, /* Object reference. */
+ ILEngineType_T, /* Typed reference. */
+ ILEngineType_MV, /* structure or value type. */
+ ILEngineType_Invalid, /* Invalid. Used for void return values. */
+ ILEngineType_TypedRef, /* TypeRef structure. */
+ ILEngineType_CM /* Controlled-mutability managed
pointer. */
} ILEngineType;
#define ILEngineType_ValidTypes 8
Index: include/il_opcodes.h
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/include/il_opcodes.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -b -r1.6 -r1.7
--- include/il_opcodes.h 18 Feb 2003 05:25:08 -0000 1.6
+++ include/il_opcodes.h 22 Oct 2006 18:01:09 -0000 1.7
@@ -321,10 +321,10 @@
#define IL_PREFIX_OP_VOLATILE 0x13
#define IL_PREFIX_OP_TAIL 0x14
#define IL_PREFIX_OP_INITOBJ 0x15
-#define IL_PREFIX_OP_ANN_LIVE 0x16
+#define IL_PREFIX_OP_CONSTRAINED 0x16
#define IL_PREFIX_OP_CPBLK 0x17
#define IL_PREFIX_OP_INITBLK 0x18
-#define IL_PREFIX_OP_ANN_REF 0x19
+#define IL_PREFIX_OP_NO 0x19
#define IL_PREFIX_OP_RETHROW 0x1A
#define IL_PREFIX_OP_UNUSED_PREFIX_1B 0x1B /* !! */
@@ -332,7 +332,7 @@
#define IL_PREFIX_OP_SIZEOF 0x1C
#define IL_PREFIX_OP_REFANYTYPE 0x1D
-#define IL_PREFIX_OP_UNUSED_PREFIX_1E 0x1E /* !! */
+#define IL_PREFIX_OP_READONLY 0x1E
#define IL_PREFIX_OP_UNUSED_PREFIX_1F 0x1F
#define IL_PREFIX_OP_UNUSED_PREFIX_20 0x20
#define IL_PREFIX_OP_UNUSED_PREFIX_21 0x21
@@ -341,6 +341,14 @@
#define IL_PREFIX_OP_ANN_ARG 0x23
/* !! - not defined */
/*
+ * Valid values for tne IL_PREFIX_OP_NO opcode.
+ * They may be ored together.
+ */
+#define IL_PREFIX_OP_NO_TYPECHECK 0x01
+#define IL_PREFIX_OP_NO_RANGECHECK 0x02
+#define IL_PREFIX_OP_NO_NULLCHECK 0x04
+
+/*
* Information about an opcode.
*/
typedef struct
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [dotgnu-pnet-commits] pnet ChangeLog engine/cvmc_call.c engine/cvmc_s...,
Klaus Treichel <=