harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mfur...@apache.org
Subject svn commit: r549108 - in /harmony/enhanced/drlvm/trunk: build/make/excludes/ vm/jitrino/src/jet/ vm/jitrino/src/optimizer/ vm/tests/smoke/exception/
Date Wed, 20 Jun 2007 13:54:36 GMT
Author: mfursov
Date: Wed Jun 20 06:54:34 2007
New Revision: 549108

URL: http://svn.apache.org/viewvc?view=rev&rev=549108
Log:
Fix for HARMONY-3349
Fix for HARMONY-4115
Fix to FinalizeStackTest not to report failure when SOE is not happened
Removing not needed SOE handler from Jitrino.JET


Modified:
    harmony/enhanced/drlvm/trunk/build/make/excludes/exclude.drlvm_smoke.linux.x86.opt
    harmony/enhanced/drlvm/trunk/build/make/excludes/exclude.drlvm_smoke.linux.x86_64.opt
    harmony/enhanced/drlvm/trunk/build/make/excludes/exclude.drlvm_smoke.windows.x86.opt
    harmony/enhanced/drlvm/trunk/build/make/excludes/exclude.drlvm_smoke.windows.x86_64.opt
    harmony/enhanced/drlvm/trunk/build/make/excludes/exclude.drlvm_smoke.windows.x86_64.srv
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/cg.cpp
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/Opcode.cpp
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/deadcodeeliminator.cpp
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/escanalyzer.cpp
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/simplifier.cpp
    harmony/enhanced/drlvm/trunk/vm/tests/smoke/exception/FinalizeStackTest.java

Modified: harmony/enhanced/drlvm/trunk/build/make/excludes/exclude.drlvm_smoke.linux.x86.opt
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/build/make/excludes/exclude.drlvm_smoke.linux.x86.opt?view=diff&rev=549108&r1=549107&r2=549108
==============================================================================
--- harmony/enhanced/drlvm/trunk/build/make/excludes/exclude.drlvm_smoke.linux.x86.opt (original)
+++ harmony/enhanced/drlvm/trunk/build/make/excludes/exclude.drlvm_smoke.linux.x86.opt Wed
Jun 20 06:54:34 2007
@@ -1,10 +1,6 @@
 Check.java
 PerfCheck.java
 
-# HARMONY-3349
-gc/Finalizer.java
-gc/RunFinalizersOnExitTest.java
-
 # breaks on ubuntu 6 w/ OOME
 stress/Threads.java
 

Modified: harmony/enhanced/drlvm/trunk/build/make/excludes/exclude.drlvm_smoke.linux.x86_64.opt
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/build/make/excludes/exclude.drlvm_smoke.linux.x86_64.opt?view=diff&rev=549108&r1=549107&r2=549108
==============================================================================
--- harmony/enhanced/drlvm/trunk/build/make/excludes/exclude.drlvm_smoke.linux.x86_64.opt
(original)
+++ harmony/enhanced/drlvm/trunk/build/make/excludes/exclude.drlvm_smoke.linux.x86_64.opt
Wed Jun 20 06:54:34 2007
@@ -6,10 +6,6 @@
 gc/MultiThreads.java
 perf/MultiThreadsSimple.java
 
-# HARMONY-3349
-gc/Finalizer.java
-gc/RunFinalizersOnExitTest.java
-
 # HARMONY-2972
 StackTest.java
 exception/FinalizeStackTest.java

Modified: harmony/enhanced/drlvm/trunk/build/make/excludes/exclude.drlvm_smoke.windows.x86.opt
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/build/make/excludes/exclude.drlvm_smoke.windows.x86.opt?view=diff&rev=549108&r1=549107&r2=549108
==============================================================================
--- harmony/enhanced/drlvm/trunk/build/make/excludes/exclude.drlvm_smoke.windows.x86.opt (original)
+++ harmony/enhanced/drlvm/trunk/build/make/excludes/exclude.drlvm_smoke.windows.x86.opt Wed
Jun 20 06:54:34 2007
@@ -1,10 +1,6 @@
 Check.java
 PerfCheck.java
 
-# HARMONY-3349
-gc/Finalizer.java
-gc/RunFinalizersOnExitTest.java
-
 # HARMONY-2977
 io/Integers.java
 

Modified: harmony/enhanced/drlvm/trunk/build/make/excludes/exclude.drlvm_smoke.windows.x86_64.opt
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/build/make/excludes/exclude.drlvm_smoke.windows.x86_64.opt?view=diff&rev=549108&r1=549107&r2=549108
==============================================================================
--- harmony/enhanced/drlvm/trunk/build/make/excludes/exclude.drlvm_smoke.windows.x86_64.opt
(original)
+++ harmony/enhanced/drlvm/trunk/build/make/excludes/exclude.drlvm_smoke.windows.x86_64.opt
Wed Jun 20 06:54:34 2007
@@ -6,10 +6,6 @@
 gc/MultiThreads.java
 perf/MultiThreadsSimple.java
 
-# HARMONY-3349
-gc/Finalizer.java
-gc/RunFinalizersOnExitTest.java
-
 # HARMONY-2972
 StackTest.java
 exception/FinalizeStackTest.java

Modified: harmony/enhanced/drlvm/trunk/build/make/excludes/exclude.drlvm_smoke.windows.x86_64.srv
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/build/make/excludes/exclude.drlvm_smoke.windows.x86_64.srv?view=diff&rev=549108&r1=549107&r2=549108
==============================================================================
--- harmony/enhanced/drlvm/trunk/build/make/excludes/exclude.drlvm_smoke.windows.x86_64.srv
(original)
+++ harmony/enhanced/drlvm/trunk/build/make/excludes/exclude.drlvm_smoke.windows.x86_64.srv
Wed Jun 20 06:54:34 2007
@@ -6,10 +6,6 @@
 gc/MultiThreads.java
 perf/MultiThreadsSimple.java
 
-# HARMONY-3349
-gc/Finalizer.java
-gc/RunFinalizersOnExitTest.java
-
 # HARMONY-2972
 StackTest.java
 exception/FinalizeStackTest.java

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/cg.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/cg.cpp?view=diff&rev=549108&r1=549107&r2=549108
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/cg.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/cg.cpp Wed Jun 20 06:54:34 2007
@@ -556,11 +556,6 @@
 
     if (idx == 0 && cs.size() != 0) {
         alu(alu_sub, sp, cs.size());
-        
-        //SOE handler -> read by maximum stack offset
-        Opnd maxStackAddr(iplatf, sp, -(int)cs.size(), ar_x, 0);
-        Opnd unusedRes(iplatf, valloc(iplatf));
-        do_mov(unusedRes, maxStackAddr);
     }
     int depth = 0;
     // 1st pass - free all register that are used for args passing

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/Opcode.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/Opcode.cpp?view=diff&rev=549108&r1=549107&r2=549108
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/Opcode.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/Opcode.cpp Wed Jun 20 06:54:34 2007
@@ -162,7 +162,7 @@
     { Op_TauCheckDivOpnds,      false, MB::Check,         MK::Exception,                
            "chkdivopnds",   "chkdivopnds %0,%1 -) %l",            }, // for signed divide
overflow in CLI (div/rem of MAXNEGINT, -1): generates an ArithmeticException
     { Op_TauCheckElemType,      false, MB::Check,         MK::Exception,                
            "chkelemtype",   "chkelemtype %0,%1 ((%2,%3)) -) %l",            }, // Array element
type check for aastore
     { Op_TauCheckFinite,        false, MB::Check,         MK::Exception,                
            "ckfinite",      "ckfinite  %s -) %l",           }, // throws ArithmeticException
if value is NaN or +- inifinity
-    { Op_NewObj,                false, MB::Exception,     MK::None,                     
            "newobj",        "newobj    %d -) %l",           }, // OutOfMemoryException
+    { Op_NewObj,                false, MB::Exception,     MK::Exception,                
            "newobj",        "newobj    %d -) %l",           }, // OutOfMemoryException
     { Op_NewArray,              false, MB::Exception,     MK::Exception,                
            "newarray",      "newarray  %d[%0] -) %l",       }, // OutOfMemoryException, NegativeArraySizeException
     { Op_NewMultiArray,         false, MB::Exception,     MK::Exception,                
            "newmultiarray", "newmultiarray %d[%s] -) %l",   }, // OutOfMemoryException, NegativeArraySizeException
     { Op_TauMonitorEnter,       true,  MB::StoreOrSync,   MK::None,                     
            "monenter",      "monenter  %0 ((%1))",                 }, // (opnd must be non-null)

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/deadcodeeliminator.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/deadcodeeliminator.cpp?view=diff&rev=549108&r1=549107&r2=549108
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/deadcodeeliminator.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/deadcodeeliminator.cpp Wed Jun 20
06:54:34 2007
@@ -96,9 +96,15 @@
     if (operation.isNonEssential()) {
         return true;
     } else {
-        if (inst->getOpcode() == Op_StVar) {
+        Opcode opCode = inst->getOpcode();
+        if (opCode == Op_StVar) {
             // StVar is non-essential if the variable to which it stores is in SSA form
             return inst->getDst()->isSsaVarOpnd();
+        } else if (opCode == Op_NewObj) {
+            Type* dstType = inst->getDst()->getType();
+            assert(!dstType->isUnresolvedObject());
+            // Objects that have finalizers must not be swept
+            return !dstType->asNamedType()->isFinalizable();
         }
         return false;
     }

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/escanalyzer.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/escanalyzer.cpp?view=diff&rev=549108&r1=549107&r2=549108
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/escanalyzer.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/escanalyzer.cpp Wed Jun 20 06:54:34
2007
@@ -297,7 +297,7 @@
 
     cngEdges=new (eaMemManager) CnGEdges(eaMemManager);   // Common part of connection graph
(edges)
     instrExam2();
-
+    
     if (_cngedges) {
         Log::out() <<"printCnGEdges: "; 
         mh.printFullName(Log::out()); 
@@ -952,6 +952,26 @@
                             FieldDesc* fd=inst->asFieldAccessInst()->getFieldDesc();
                             if (fd->getParentType()->isSystemString()&&strcmp(fd->getName(),"value")==0)
{
                                 addEdge(cgnode,cgn_src,ET_DEFER,inst);
+                            }
+                            if (method_ea_level == 0 && cgn_src->nInst->getOpcode()==Op_NewObj)
{
+                                //fail if instance type is not compatible with 
+                                //store/load type. Incompatibility can be the result of not
cleaned dead code.
+                                //see HARMONY-4115 for details.
+                                Inst* instantceInst = cgn_src->nInst;
+                                ObjectType* instanceType = instantceInst->asTypeInst()->getTypeInfo()->asObjectType();
+                                assert(instanceType!=NULL);
+                                ObjectType* fieldObjectType = fd->getParentType()->asObjectType();
+                                assert(fieldObjectType!=NULL);
+                                if (!instanceType->isSubClassOf(fieldObjectType)) {
+                                    if (Log::isEnabled()) {
+                                        Log::out()<<"FAILURE: instance type: "<<instanceType->getName();
+                                        Log::out()<<" is not compatible with field
object type: "<<fieldObjectType->getName()<<std::endl;
+                                        Log::out()<<"Instance inst: ";instantceInst->print(Log::out());
+                                        Log::out()<<" field inst: ";inst->print(Log::out());
Log::out()<<std::endl;
+                                    }
+                                    assert(0);
+                                    Jitrino::crash("Jitrino failure:escape: illegal HIR sequence");
+                                }
                             }
                         }
                     }

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/simplifier.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/simplifier.cpp?view=diff&rev=549108&r1=549107&r2=549108
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/simplifier.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/simplifier.cpp Wed Jun 20 06:54:34
2007
@@ -2721,18 +2721,30 @@
             // We can't assume x == x.  E.g., Nan != Nan
             return false;
         switch (mod) {
-        case Cmp_EQ:    
-        case Cmp_GTE:   
-        case Cmp_GTE_Un:
-            isTaken = true;
-            return true;
-        case Cmp_NE_Un: 
-        case Cmp_GT:    
-        case Cmp_GT_Un: 
-            isTaken = false;
-            return true;
-    default:
-        break;
+            case Cmp_EQ:    
+            case Cmp_GTE:   
+            case Cmp_GTE_Un:
+                isTaken = true;
+                return true;
+            case Cmp_NE_Un: 
+            case Cmp_GT:    
+            case Cmp_GT_Un: 
+                isTaken = false;
+                return true;
+            default:
+                break;
+        }
+    } else if (Type::isVTablePtr(instType)) {
+        Inst* src1DefInst = propagateCopy(src1)->getInst();
+        Inst* src2DefInst = propagateCopy(src2)->getInst();
+        if (src1DefInst->getOpcode() == Op_GetVTableAddr && src2DefInst->getOpcode()
== Op_GetVTableAddr) {
+            Type* src1ObjType = src1DefInst->asTypeInst()->getTypeInfo();
+            Type* src2ObjType = src2DefInst->asTypeInst()->getTypeInfo();
+            if (!src1ObjType->isUnresolvedType() && !src2ObjType->isUnresolvedType())
{
+                isTaken = (src1ObjType == src2ObjType && mod == Cmp_EQ) 
+                        || (src1ObjType != src2ObjType && mod == Cmp_NE_Un);
+                return true;
+            }
         }
     }
     return false;

Modified: harmony/enhanced/drlvm/trunk/vm/tests/smoke/exception/FinalizeStackTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/tests/smoke/exception/FinalizeStackTest.java?view=diff&rev=549108&r1=549107&r2=549108
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/tests/smoke/exception/FinalizeStackTest.java (original)
+++ harmony/enhanced/drlvm/trunk/vm/tests/smoke/exception/FinalizeStackTest.java Wed Jun 20
06:54:34 2007
@@ -38,7 +38,6 @@
     public static void main(String[] args) {
         try {
             new FinalizeStackTest(MAX_DEPTH);
-            System.out.println("FAIL");
         } catch (StackOverflowError soe) {
             System.out.println("PASS : " + soe);
         } catch (Throwable th) {



Mime
View raw message