[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Dotgnu-pnet-commits] CVS: pnet/cscc/csharp cs_lvalue.tc,1.27,1.28 cs_op
From: |
Rhys Weatherley <address@hidden> |
Subject: |
[Dotgnu-pnet-commits] CVS: pnet/cscc/csharp cs_lvalue.tc,1.27,1.28 cs_oper.tc,1.30,1.31 |
Date: |
Wed, 20 Nov 2002 16:08:51 -0500 |
Update of /cvsroot/dotgnu-pnet/pnet/cscc/csharp
In directory subversions:/tmp/cvs-serv14597/cscc/csharp
Modified Files:
cs_lvalue.tc cs_oper.tc
Log Message:
Replace calls to "Array.get_Length" with "ldlen" on simple arrays.
Index: cs_lvalue.tc
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/cscc/csharp/cs_lvalue.tc,v
retrieving revision 1.27
retrieving revision 1.28
diff -C2 -r1.27 -r1.28
*** cs_lvalue.tc 19 Nov 2002 02:18:18 -0000 1.27
--- cs_lvalue.tc 20 Nov 2002 21:08:49 -0000 1.28
***************
*** 1024,1029 ****
}
! /* Resolve the member */
name = ILQualIdentName(node->expr2, 0);
value2 = CSResolveMemberNameQuiet(info, (ILNode *)node, value, name, 0);
--- 1024,1043 ----
}
! /* Convert the second subexpression into a name */
name = ILQualIdentName(node->expr2, 0);
+
+ /* Check for the special case of "array.Length" */
+ if(CSSemIsValue(value) && !strcmp(name, "Length") &&
+ ILType_IsSimpleArray(CSSemGetType(value)))
+ {
+ *parent = ILNode_ArrayLength_create(node->expr1);
+ yysetfilename(*parent, yygetfilename(node));
+ yysetlinenum(*parent, yygetlinenum(node));
+ *parent = ILNode_CastSimple_create(*parent,
ILMachineType_Int32);
+ CSSemSetRValue(value, ILType_Int32);
+ return value;
+ }
+
+ /* Resolve the member */
value2 = CSResolveMemberNameQuiet(info, (ILNode *)node, value, name, 0);
Index: cs_oper.tc
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/cscc/csharp/cs_oper.tc,v
retrieving revision 1.30
retrieving revision 1.31
diff -C2 -r1.30 -r1.31
*** cs_oper.tc 20 Nov 2002 11:36:54 -0000 1.30
--- cs_oper.tc 20 Nov 2002 21:08:49 -0000 1.31
***************
*** 2502,2503 ****
--- 2502,2510 ----
}
+ /*
+ * Perform semantic analysis for the array length operator.
+ */
+ ILNode_SemAnalysis(ILNode_ArrayLength)
+ {
+ return CSSemValueDefault;
+ }
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Dotgnu-pnet-commits] CVS: pnet/cscc/csharp cs_lvalue.tc,1.27,1.28 cs_oper.tc,1.30,1.31,
Rhys Weatherley <address@hidden> <=
- Prev by Date:
[Dotgnu-pnet-commits] CVS: pnet/codegen cg_misc.tc,1.42,1.43 cg_nodes.tc,1.69,1.70 jv_misc.tc,1.26,1.27
- Next by Date:
[Dotgnu-pnet-commits] CVS: pnet/support spawn.c,1.3,1.4
- Previous by thread:
[Dotgnu-pnet-commits] CVS: pnet/codegen cg_misc.tc,1.42,1.43 cg_nodes.tc,1.69,1.70 jv_misc.tc,1.26,1.27
- Next by thread:
[Dotgnu-pnet-commits] CVS: pnet/support spawn.c,1.3,1.4
- Index(es):