harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From var...@apache.org
Subject svn commit: r541292 - /harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/helper_inliner.cpp
Date Thu, 24 May 2007 12:54:18 GMT
Author: varlax
Date: Thu May 24 05:54:17 2007
New Revision: 541292

URL: http://svn.apache.org/viewvc?view=rev&rev=541292
Log:
Applied HARMONY-3911 [drlvm][jit] wrong array element size calculated for allocArray helper
inlining

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

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/helper_inliner.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/helper_inliner.cpp?view=diff&rev=541292&r1=541291&r2=541292
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/helper_inliner.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/helper_inliner.cpp Thu May 24 05:54:17
2007
@@ -429,13 +429,17 @@
 #endif
     int allocationHandle = (int)(POINTER_SIZE_INT)arrayType->getAllocationHandle();
     Type* elemType = arrayType->getElementType();
-    int elemSize = 4; //TODO: check if references are compressed!
-    if (elemType->isDouble() || elemType->isInt8()) {
-        elemSize = 8;
+    int elemSize = 0; //TODO: check if references are compressed!
+    if (elemType->isBoolean() || elemType->isInt1()) {
+        elemSize = 1;
     } else if (elemType->isInt2() || elemType->isChar()) {
         elemSize = 2;
-    } else  if (elemType->isInt1()) {
-        elemSize = 1;
+    } else if (elemType->isInt4() || elemType->isSingle()) {
+        elemSize = 4;
+    } else if (elemType->isInt8() || elemType->isDouble()) {
+        elemSize = 8;
+    } else {
+        elemSize = 4;
     }
 
     Opnd* tauSafeOpnd = opndManager->createSsaTmpOpnd(typeManager->getTauType());



Mime
View raw message