[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Dotgnu-pnet-commits] CVS: pnet/engine convert.c,1.16,1.17 cvmc_const.c
From: |
Rhys Weatherley <address@hidden> |
Subject: |
[Dotgnu-pnet-commits] CVS: pnet/engine convert.c,1.16,1.17 cvmc_const.c,1.4,1.5 engine.h,1.64,1.65 ilverify.c,1.26,1.27 lib_string.c,1.27,1.28 null_coder.c,1.14,1.15 verify.c,1.39,1.40 verify_const.c,1.3,1.4 |
Date: |
Mon, 30 Dec 2002 01:14:43 -0500 |
Update of /cvsroot/dotgnu-pnet/pnet/engine
In directory subversions:/tmp/cvs-serv15561/engine
Modified Files:
convert.c cvmc_const.c engine.h ilverify.c lib_string.c
null_coder.c verify.c verify_const.c
Log Message:
Make sure that string constants are intern'ed at verification
time, so that they are already intern'ed before the method
executes (needed to fix problems with csc-compiled switch'es).
Index: convert.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/engine/convert.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -r1.16 -r1.17
*** convert.c 16 Nov 2002 19:00:39 -0000 1.16
--- convert.c 30 Dec 2002 06:14:41 -0000 1.17
***************
*** 168,172 ****
/* Use the bytecode verifier and coder to convert the method */
if(!_ILVerify(coder, &start, method, &code,
!
ILImageIsSecure(ILProgramItem_Image(method))))
{
METADATA_UNLOCK(thread);
--- 168,172 ----
/* Use the bytecode verifier and coder to convert the method */
if(!_ILVerify(coder, &start, method, &code,
!
ILImageIsSecure(ILProgramItem_Image(method)), thread))
{
METADATA_UNLOCK(thread);
Index: cvmc_const.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/engine/cvmc_const.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -r1.4 -r1.5
*** cvmc_const.c 23 May 2002 11:42:58 -0000 1.4
--- cvmc_const.c 30 Dec 2002 06:14:41 -0000 1.5
***************
*** 66,73 ****
* Handle a string constant opcode.
*/
! static void CVMCoder_StringConstant(ILCoder *coder, ILToken token)
{
! CVM_OUT_WORD(COP_LDSTR, token);
! CVM_ADJUST(1);
}
--- 66,82 ----
* Handle a string constant opcode.
*/
! static void CVMCoder_StringConstant(ILCoder *coder, ILToken token, void
*object)
{
! if(object)
! {
! /* Push the object pointer directly, to save time at runtime */
! CVM_OUT_WORD(COP_LDTOKEN, object);
! CVM_ADJUST(1);
! }
! else
! {
! CVM_OUT_WORD(COP_LDSTR, token);
! CVM_ADJUST(1);
! }
}
Index: engine.h
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/engine/engine.h,v
retrieving revision 1.64
retrieving revision 1.65
diff -C2 -r1.64 -r1.65
*** engine.h 8 Dec 2002 11:05:06 -0000 1.64
--- engine.h 30 Dec 2002 06:14:41 -0000 1.65
***************
*** 333,337 ****
*/
int _ILVerify(ILCoder *coder, unsigned char **start, ILMethod *method,
! ILMethodCode *code, int unsafeAllowed);
/*
--- 333,337 ----
*/
int _ILVerify(ILCoder *coder, unsigned char **start, ILMethod *method,
! ILMethodCode *code, int unsafeAllowed, ILExecThread
*thread);
/*
Index: ilverify.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/engine/ilverify.c,v
retrieving revision 1.26
retrieving revision 1.27
diff -C2 -r1.26 -r1.27
*** ilverify.c 26 Sep 2002 23:12:48 -0000 1.26
--- ilverify.c 30 Dec 2002 06:14:41 -0000 1.27
***************
*** 217,221 ****
/* Verify the method */
! result = _ILVerify(&_ILNullCoder, &start, method, &code,
allowUnsafe);
if(!result)
{
--- 217,222 ----
/* Verify the method */
! result = _ILVerify(&_ILNullCoder, &start, method,
! &code, allowUnsafe, 0);
if(!result)
{
Index: lib_string.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/engine/lib_string.c,v
retrieving revision 1.27
retrieving revision 1.28
diff -C2 -r1.27 -r1.28
*** lib_string.c 30 Dec 2002 05:42:04 -0000 1.27
--- lib_string.c 30 Dec 2002 06:14:41 -0000 1.28
***************
*** 1095,1106 ****
entry->value->length * 2)))
{
! if(add || entry->value == str)
! {
! return entry->value;
! }
! else
! {
! return 0;
! }
}
entry = entry->next;
--- 1095,1099 ----
entry->value->length * 2)))
{
! return entry->value;
}
entry = entry->next;
Index: null_coder.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/engine/null_coder.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -r1.14 -r1.15
*** null_coder.c 15 Nov 2002 01:37:42 -0000 1.14
--- null_coder.c 30 Dec 2002 06:14:41 -0000 1.15
***************
*** 82,86 ****
{
}
! static void Coder_StringConstant(ILCoder *coder, ILToken token)
{
}
--- 82,86 ----
{
}
! static void Coder_StringConstant(ILCoder *coder, ILToken token, void *object)
{
}
Index: verify.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/engine/verify.c,v
retrieving revision 1.39
retrieving revision 1.40
diff -C2 -r1.39 -r1.40
*** verify.c 9 Dec 2002 13:19:18 -0000 1.39
--- verify.c 30 Dec 2002 06:14:41 -0000 1.40
***************
*** 605,609 ****
int _ILVerify(ILCoder *coder, unsigned char **start, ILMethod *method,
! ILMethodCode *code, int unsafeAllowed)
{
TempAllocator allocator;
--- 605,609 ----
int _ILVerify(ILCoder *coder, unsigned char **start, ILMethod *method,
! ILMethodCode *code, int unsafeAllowed, ILExecThread
*thread)
{
TempAllocator allocator;
Index: verify_const.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/engine/verify_const.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** verify_const.c 19 Oct 2001 06:01:12 -0000 1.3
--- verify_const.c 30 Dec 2002 06:14:41 -0000 1.4
***************
*** 110,114 ****
VERIFY_INSN_ERROR();
}
! ILCoderStringConstant(coder, (ILToken)argNum);
stack[stackSize].engineType = ILEngineType_O;
stack[stackSize].typeInfo = ILType_FromClass(stringClass);
--- 110,123 ----
VERIFY_INSN_ERROR();
}
! if(thread)
! {
! ILCoderStringConstant(coder, (ILToken)argNum,
! _ILStringInternFromImage(thread,
ILProgramItem_Image(method),
!
(ILToken)argNum));
! }
! else
! {
! ILCoderStringConstant(coder, (ILToken)argNum, 0);
! }
stack[stackSize].engineType = ILEngineType_O;
stack[stackSize].typeInfo = ILType_FromClass(stringClass);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Dotgnu-pnet-commits] CVS: pnet/engine convert.c,1.16,1.17 cvmc_const.c,1.4,1.5 engine.h,1.64,1.65 ilverify.c,1.26,1.27 lib_string.c,1.27,1.28 null_coder.c,1.14,1.15 verify.c,1.39,1.40 verify_const.c,1.3,1.4,
Rhys Weatherley <address@hidden> <=