[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Dotgnu-pnet-commits] CVS: pnet/codegen cg_misc.tc,1.42,1.43 cg_nodes.tc
From: |
Rhys Weatherley <address@hidden> |
Subject: |
[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 |
Date: |
Wed, 20 Nov 2002 16:08:51 -0500 |
Update of /cvsroot/dotgnu-pnet/pnet/codegen
In directory subversions:/tmp/cvs-serv14597/codegen
Modified Files:
cg_misc.tc cg_nodes.tc jv_misc.tc
Log Message:
Replace calls to "Array.get_Length" with "ldlen" on simple arrays.
Index: cg_misc.tc
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/codegen/cg_misc.tc,v
retrieving revision 1.42
retrieving revision 1.43
diff -C2 -r1.42 -r1.43
*** cg_misc.tc 15 Nov 2002 01:37:42 -0000 1.42
--- cg_misc.tc 20 Nov 2002 21:08:49 -0000 1.43
***************
*** 395,398 ****
--- 395,406 ----
/*
+ * Get the type of an array length operator.
+ */
+ ILNode_GetType(ILNode_ArrayLength)
+ {
+ return ILMachineType_NativeInt;
+ }
+
+ /*
* Generate discard code for a comma or argument list expression.
*/
***************
*** 1755,1758 ****
--- 1763,1776 ----
/* Return the value's machine type to the caller */
return machineType;
+ }
+
+ /*
+ * Generate value code for an array length operator.
+ */
+ ILNode_GenValue(ILNode_ArrayLength)
+ {
+ ILNode_GenValue(node->expr, info);
+ ILGenSimple(info, IL_OP_LDLEN);
+ return ILMachineType_NativeInt;
}
Index: cg_nodes.tc
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/codegen/cg_nodes.tc,v
retrieving revision 1.69
retrieving revision 1.70
diff -C2 -r1.69 -r1.70
*** cg_nodes.tc 17 Nov 2002 01:04:56 -0000 1.69
--- cg_nodes.tc 20 Nov 2002 21:08:49 -0000 1.70
***************
*** 451,454 ****
--- 451,455 ----
%nocreate ILType *type = {0};
}
+ %node ILNode_ArrayLength ILNode_UnaryExpression
/*
Index: jv_misc.tc
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/codegen/jv_misc.tc,v
retrieving revision 1.26
retrieving revision 1.27
diff -C2 -r1.26 -r1.27
*** jv_misc.tc 27 Sep 2002 01:24:30 -0000 1.26
--- jv_misc.tc 20 Nov 2002 21:08:49 -0000 1.27
***************
*** 1707,1710 ****
--- 1707,1720 ----
/*
+ * Generate value code for an array length operator.
+ */
+ JavaGenValue(ILNode_ArrayLength)
+ {
+ JavaGenValue(node->expr, info);
+ ILGenSimple(info, JAVA_OP_ARRAYLENGTH);
+ return ILMachineType_NativeInt;
+ }
+
+ /*
* Generate the "then" branch for a comma expression.
*/
[Prev in Thread] |
Current Thread |
[Next in 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,
Rhys Weatherley <address@hidden> <=
- Prev by Date:
[Dotgnu-pnet-commits] CVS: pnet ChangeLog,1.1862,1.1863
- Next by Date:
[Dotgnu-pnet-commits] CVS: pnet/cscc/csharp cs_lvalue.tc,1.27,1.28 cs_oper.tc,1.30,1.31
- Previous by thread:
[Dotgnu-pnet-commits] CVS: pnet ChangeLog,1.1862,1.1863
- Next by thread:
[Dotgnu-pnet-commits] CVS: pnet/cscc/csharp cs_lvalue.tc,1.27,1.28 cs_oper.tc,1.30,1.31
- Index(es):