harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From var...@apache.org
Subject svn commit: r522818 - /harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/devirtualizer.cpp
Date Tue, 27 Mar 2007 08:56:27 GMT
Author: varlax
Date: Tue Mar 27 01:56:26 2007
New Revision: 522818

URL: http://svn.apache.org/viewvc?view=rev&rev=522818
Log:
Applied HARMONY-3242 [drlvm][jit] interface devirtualization bug
Tested on SLES10@ia32, SLES9@x64, WinXP@ia32.

Modified:
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/devirtualizer.cpp

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/devirtualizer.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/devirtualizer.cpp?view=diff&rev=522818&r1=522817&r2=522818
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/devirtualizer.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/devirtualizer.cpp Tue Mar 27 01:56:26
2007
@@ -269,12 +269,15 @@
                                                              ldSlot->getMethodDesc());
         virtualCallBlock->appendInst(ldSlot2);
         icall->setSrc(0, funPtr2);
-        // Move ldInterfaceVTable to the virtual call block
+        // Duplicate ldInterfaceVTable in virtual call block
         Inst* ldVTable = vtable->getInst();
         if (ldVTable->getOpcode() == Op_TauLdIntfcVTableAddr) {
-            ldVTable->unlink();
-            ldSlot->unlink();
-            ldVTable->insertBefore(ldSlot2);
+            Opnd* slot = ldVTable->getSrc(0);
+            Type* type = ldVTable->asTypeInst()->getTypeInfo();
+            Opnd* vtable2 = _opndManager.createSsaTmpOpnd(vtable->getType());
+            Inst* ldVTable2 = _instFactory.makeTauLdIntfcVTableAddr(vtable2, slot, type);
+            ldSlot2->setSrc(0, vtable2);
+            ldVTable2->insertBefore(ldSlot2);
         }
     }
     virtualCallBlock->appendInst(virtualCall);



Mime
View raw message