[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[dotgnu-pnet-commits] pnet ChangeLog codegen/cg_output.c
From: |
Klaus Treichel |
Subject: |
[dotgnu-pnet-commits] pnet ChangeLog codegen/cg_output.c |
Date: |
Mon, 15 Oct 2007 19:31:07 +0000 |
CVSROOT: /cvsroot/dotgnu-pnet
Module name: pnet
Changes by: Klaus Treichel <ktreichel> 07/10/15 19:31:07
Modified files:
. : ChangeLog
codegen : cg_output.c
Log message:
Use the number of dimensions of the last nested array for the number of
args
in the ctor call.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/pnet/ChangeLog?cvsroot=dotgnu-pnet&r1=1.3508&r2=1.3509
http://cvs.savannah.gnu.org/viewcvs/pnet/codegen/cg_output.c?cvsroot=dotgnu-pnet&r1=1.25&r2=1.26
Patches:
Index: ChangeLog
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/ChangeLog,v
retrieving revision 1.3508
retrieving revision 1.3509
diff -u -b -r1.3508 -r1.3509
--- ChangeLog 14 Oct 2007 19:48:15 -0000 1.3508
+++ ChangeLog 15 Oct 2007 19:31:07 -0000 1.3509
@@ -1,3 +1,9 @@
+2007-10-15 Klaus Treichel <address@hidden>
+
+ * codegen/cg_output.c: Use the number of dimensions of the last nested
+ array to specify the number of args for the ctor in ILGenArrayCtor
instead
+ of the first one.
+
2007-10-14 Klaus Treichel <address@hidden>
* cscc/csharp/cs_grammar.y: Redo the creation of extended types like
Index: codegen/cg_output.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/codegen/cg_output.c,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -b -r1.25 -r1.26
--- codegen/cg_output.c 7 Jul 2004 23:47:36 -0000 1.25
+++ codegen/cg_output.c 15 Oct 2007 19:31:07 -0000 1.26
@@ -25,6 +25,21 @@
extern "C" {
#endif
+static ILType *GetLastNestedArray(ILType *arrayType)
+{
+ while(arrayType)
+ {
+ ILType *elementType = ILTypeGetElemType(arrayType);
+
+ if(!ILType_IsArray(elementType))
+ {
+ break;
+ }
+ arrayType = elementType;
+ }
+ return arrayType;
+}
+
void ILGenSimple(ILGenInfo *info, int opcode)
{
if(info->asmOutput)
@@ -495,6 +510,7 @@
fputs("\tnewobj\tinstance void ", info->asmOutput);
ILDumpType(info->asmOutput, info->image, type,
IL_DUMP_QUOTE_NAMES);
fputs("::.ctor(", info->asmOutput);
+ type = GetLastNestedArray(type);
dim = ILTypeGetRank(type);
while(dim > 0)
{
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [dotgnu-pnet-commits] pnet ChangeLog codegen/cg_output.c,
Klaus Treichel <=