[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Dotgnu-pnet-commits] CVS: pnet/codegen cg_nodes.tc,1.78,1.79 cg_lvalue
From: |
Gopal.V <address@hidden> |
Subject: |
[Dotgnu-pnet-commits] CVS: pnet/codegen cg_nodes.tc,1.78,1.79 cg_lvalue.tc,1.20,1.21 |
Date: |
Thu, 29 May 2003 12:58:38 -0400 |
Update of /cvsroot/dotgnu-pnet/pnet/codegen
In directory subversions:/tmp/cvs-serv22769/codegen
Modified Files:
cg_nodes.tc cg_lvalue.tc
Log Message:
Implement Base element access for C# (semanalysis) and IL (codegen)
Index: cg_nodes.tc
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/codegen/cg_nodes.tc,v
retrieving revision 1.78
retrieving revision 1.79
diff -C2 -r1.78 -r1.79
*** cg_nodes.tc 7 May 2003 13:12:05 -0000 1.78
--- cg_nodes.tc 29 May 2003 16:58:33 -0000 1.79
***************
*** 589,592 ****
--- 589,593 ----
ILType *elemType;
ILMachineType machineType;
+ int baseAccess;
%nocreate long saveStack = {0};
}
Index: cg_lvalue.tc
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/codegen/cg_lvalue.tc,v
retrieving revision 1.20
retrieving revision 1.21
diff -C2 -r1.20 -r1.21
*** cg_lvalue.tc 15 Feb 2003 02:14:52 -0000 1.20
--- cg_lvalue.tc 29 May 2003 16:58:33 -0000 1.21
***************
*** 259,263 ****
ILNode_GenValue(ILNode_BaseElement)
{
! /* TODO */
return node->machineType;
}
--- 259,263 ----
ILNode_GenValue(ILNode_BaseElement)
{
! /* Should be handled by IndexerAccess */
return node->machineType;
}
***************
*** 390,394 ****
ILNode_GenValue(node->object, info);
ILNode_GenValue(node->indices, info);
! ILGenCallMethod(info, node->getMethod);
info->stackHeight = saveStack + 1;
return node->machineType;
--- 390,401 ----
ILNode_GenValue(node->object, info);
ILNode_GenValue(node->indices, info);
! if(node->baseAccess)
! {
! ILGenCallByMethod(info, node->getMethod);
! }
! else
! {
! ILGenCallMethod(info, node->getMethod);
! }
info->stackHeight = saveStack + 1;
return node->machineType;
***************
*** 439,443 ****
ILNode_Prepare(ILNode_BaseElement)
{
! /* TODO */
return node->machineType;
}
--- 446,450 ----
ILNode_Prepare(ILNode_BaseElement)
{
! /* Should be handled by IndexerAccess */
return node->machineType;
}
***************
*** 615,619 ****
ILNode_GetAndPrepare(ILNode_BaseElement)
{
! /* TODO */
return node->machineType;
}
--- 622,626 ----
ILNode_GetAndPrepare(ILNode_BaseElement)
{
! /* Should be handled by IndexerAccess */
return node->machineType;
}
***************
*** 1017,1021 ****
/* Get the indexer element and save it */
tempValueVar = ILGenTempTypedVar(info, node->elemType);
! ILGenCallMethod(info, node->getMethod);
ILGenAdjust(info, -numArgs);
ILGenSimple(info, IL_OP_DUP);
--- 1024,1035 ----
/* Get the indexer element and save it */
tempValueVar = ILGenTempTypedVar(info, node->elemType);
! if(node->baseAccess)
! {
! ILGenCallByMethod(info, node->getMethod);
! }
! else
! {
! ILGenCallMethod(info, node->getMethod);
! }
ILGenAdjust(info, -numArgs);
ILGenSimple(info, IL_OP_DUP);
***************
*** 1051,1055 ****
ILGenAdjust(info, 1);
}
! ILGenCallMethod(info, node->getMethod);
ILGenAdjust(info, -numArgs);
}
--- 1065,1076 ----
ILGenAdjust(info, 1);
}
! if(node->baseAccess)
! {
! ILGenCallByMethod(info, node->getMethod);
! }
! else
! {
! ILGenCallMethod(info, node->getMethod);
! }
ILGenAdjust(info, -numArgs);
}
***************
*** 1141,1145 ****
ILNode_Store(ILNode_BaseAccess)
{
! /* TODO */
}
--- 1162,1166 ----
ILNode_Store(ILNode_BaseAccess)
{
! /* Should be handled by IndexerAccess */
}
***************
*** 1149,1153 ****
ILNode_Store(ILNode_BaseElement)
{
! /* TODO */
}
--- 1170,1174 ----
ILNode_Store(ILNode_BaseElement)
{
! /* Should be handled by IndexerAccess */
}
***************
*** 1355,1359 ****
ILGenStoreLocal(info, tempVar);
ILGenAdjust(info, -1);
! ILGenCallMethod(info, node->setMethod);
info->stackHeight = node->saveStack;
ILGenLoadLocal(info, tempVar);
--- 1376,1387 ----
ILGenStoreLocal(info, tempVar);
ILGenAdjust(info, -1);
! if(node->baseAccess)
! {
! ILGenCallByMethod(info, node->setMethod);
! }
! else
! {
! ILGenCallMethod(info, node->setMethod);
! }
info->stackHeight = node->saveStack;
ILGenLoadLocal(info, tempVar);
***************
*** 1363,1367 ****
else
{
! ILGenCallMethod(info, node->setMethod);
info->stackHeight = node->saveStack;
}
--- 1391,1402 ----
else
{
! if(node->baseAccess)
! {
! ILGenCallByMethod(info, node->setMethod);
! }
! else
! {
! ILGenCallMethod(info, node->setMethod);
! }
info->stackHeight = node->saveStack;
}
***************
*** 1436,1440 ****
ILNode_GenRef(ILNode_BaseElement)
{
! /* TODO */
}
--- 1471,1475 ----
ILNode_GenRef(ILNode_BaseElement)
{
! /* Should be handled by IndexerAccess */
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Dotgnu-pnet-commits] CVS: pnet/codegen cg_nodes.tc,1.78,1.79 cg_lvalue.tc,1.20,1.21,
Gopal.V <address@hidden> <=
- Prev by Date:
[Dotgnu-pnet-commits] CVS: pnet/cscc/csharp cs_lvalue.tc,1.44,1.45 cs_internal.h,1.15,1.16 cs_lookup.c,1.26,1.27
- Next by Date:
[Dotgnu-pnet-commits] CVS: pnet ChangeLog,1.2381,1.2382
- Previous by thread:
[Dotgnu-pnet-commits] CVS: pnet/cscc/csharp cs_lvalue.tc,1.44,1.45 cs_internal.h,1.15,1.16 cs_lookup.c,1.26,1.27
- Next by thread:
[Dotgnu-pnet-commits] CVS: pnet ChangeLog,1.2381,1.2382
- Index(es):