[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Dotgnu-pnet-commits] CVS: pnet/engine lib_array.c, 1.26, 1.27 lookup.c,
From: |
Rhys Weatherley <address@hidden> |
Subject: |
[Dotgnu-pnet-commits] CVS: pnet/engine lib_array.c, 1.26, 1.27 lookup.c, 1.10, 1.11 verify_ptr.c, 1.15, 1.16 |
Date: |
Wed, 16 Jul 2003 19:44:17 -0400 |
Update of /cvsroot/dotgnu-pnet/pnet/engine
In directory subversions:/tmp/cvs-serv923/engine
Modified Files:
lib_array.c lookup.c verify_ptr.c
Log Message:
Add the function "ILTypeFindOrCreateArray", which will attempt to locate an
array type in the synthetic hash before creating a new one; this is used to
prevent unlimited memory growth in loop bodies that allocate arrays.
Index: lib_array.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/engine/lib_array.c,v
retrieving revision 1.26
retrieving revision 1.27
diff -C2 -r1.26 -r1.27
*** lib_array.c 15 May 2003 05:06:34 -0000 1.26
--- lib_array.c 16 Jul 2003 23:44:14 -0000 1.27
***************
*** 2397,2402 ****
/* Create the array type and class structures */
elemType = ILClassToType((ILClass *)elementType);
! type = ILTypeCreateArray(thread->process->context, (unsigned long)rank,
! elemType);
if(!type)
{
--- 2397,2402 ----
/* Create the array type and class structures */
elemType = ILClassToType((ILClass *)elementType);
! type = ILTypeFindOrCreateArray
! (thread->process->context, (unsigned long)rank,
elemType);
if(!type)
{
***************
*** 2615,2620 ****
rank = lengths->length;
elemType = ILClassToType((ILClass *)elementType);
! type = ILTypeCreateArray(thread->process->context, (unsigned long)rank,
! elemType);
if(!type)
{
--- 2615,2628 ----
rank = lengths->length;
elemType = ILClassToType((ILClass *)elementType);
! if(lowerBounds)
! {
! type = ILTypeCreateArray
! (thread->process->context, (unsigned long)rank,
elemType);
! }
! else
! {
! type = ILTypeFindOrCreateArray
! (thread->process->context, (unsigned long)rank,
elemType);
! }
if(!type)
{
Index: lookup.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/engine/lookup.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -r1.10 -r1.11
*** lookup.c 17 Feb 2003 05:20:31 -0000 1.10
--- lookup.c 16 Jul 2003 23:44:14 -0000 1.11
***************
*** 291,295 ****
if(type != ILType_Invalid)
{
! return
ILTypeCreateArray(thread->process->context, 1, type);
}
}
--- 291,296 ----
if(type != ILType_Invalid)
{
! return ILTypeFindOrCreateArray
! (thread->process->context, 1, type);
}
}
***************
*** 311,315 ****
if(type != ILType_Invalid)
{
! return
ILTypeCreateArray(thread->process->context, len, type);
}
}
--- 312,317 ----
if(type != ILType_Invalid)
{
! return ILTypeFindOrCreateArray
! (thread->process->context, len, type);
}
}
Index: verify_ptr.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/engine/verify_ptr.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -r1.15 -r1.16
*** verify_ptr.c 13 Apr 2003 11:05:03 -0000 1.15
--- verify_ptr.c 16 Jul 2003 23:44:14 -0000 1.16
***************
*** 557,561 ****
(STK_UNARY == ILEngineType_I || STK_UNARY == ILEngineType_I4))
{
! classType = ILTypeCreateArray
(ILImageToContext(ILProgramItem_Image(method)),
1, classType);
if(!classType)
--- 557,561 ----
(STK_UNARY == ILEngineType_I || STK_UNARY == ILEngineType_I4))
{
! classType = ILTypeFindOrCreateArray
(ILImageToContext(ILProgramItem_Image(method)),
1, classType);
if(!classType)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Dotgnu-pnet-commits] CVS: pnet/engine lib_array.c, 1.26, 1.27 lookup.c, 1.10, 1.11 verify_ptr.c, 1.15, 1.16,
Rhys Weatherley <address@hidden> <=