harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From var...@apache.org
Subject svn commit: r572291 - /harmony/enhanced/drlvm/trunk/vm/jitrino/src/translator/java/JavaLabelPrepass.cpp
Date Mon, 03 Sep 2007 12:21:47 GMT
Author: varlax
Date: Mon Sep  3 05:21:46 2007
New Revision: 572291

URL: http://svn.apache.org/viewvc?rev=572291&view=rev
Log:
Applied Harmony-4702 [drlvm][jit][opt] type merge for stack vars in prepass is too restrictive
+ fixed incorrect type assumption in catch handler stateinfo.

Modified:
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/translator/java/JavaLabelPrepass.cpp

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/translator/java/JavaLabelPrepass.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/translator/java/JavaLabelPrepass.cpp?rev=572291&r1=572290&r2=572291&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/translator/java/JavaLabelPrepass.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/translator/java/JavaLabelPrepass.cpp Mon Sep
 3 05:21:46 2007
@@ -340,7 +340,6 @@
         } else {
             slot = &hi->push(exceptionType);
             StateInfo::setNonNull(slot);
-            StateInfo::setExactType(slot);
         }
         assert(prepass.getNumVars() + 1 == (unsigned)hi->stackDepth);
         slot->vars = new (memManager) SlotVar(
@@ -731,7 +730,11 @@
         VariableIncarnation* var = getOrCreateVarInc(currentOffset, i, type);
 
         // Do not merge stack vars of incompatible types
-        if (sv && (sv->getVarIncarnation()->getDeclaredType() == var->getDeclaredType()))
{
+        if (sv) {
+            assert(sv->getVarIncarnation()->getDeclaredType());
+            assert(var->getDeclaredType());
+            UNUSED Type* commonType = typeManager.getCommonType(sv->getVarIncarnation()->getDeclaredType(),var->getDeclaredType());
+            assert(commonType);
             VariableIncarnation::linkAndMergeIncarnations(sv->getVarIncarnation(),var,&typeManager);
             var->setMultipleDefs();
         } else {



Mime
View raw message