harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mloe...@apache.org
Subject svn commit: r576365 - in /harmony/enhanced/drlvm/trunk/vm/vmcore/src/verifier-3363: Pass1.cpp Pass2.cpp context.h
Date Mon, 17 Sep 2007 11:02:19 GMT
Author: mloenko
Date: Mon Sep 17 04:02:17 2007
New Revision: 576365

URL: http://svn.apache.org/viewvc?rev=576365&view=rev
Log:
fix for one remaining failing test from HARMONY-4760 (14 VTSVM tests fail with VerifyError)

Modified:
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/verifier-3363/Pass1.cpp
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/verifier-3363/Pass2.cpp
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/verifier-3363/context.h

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/verifier-3363/Pass1.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/verifier-3363/Pass1.cpp?rev=576365&r1=576364&r2=576365&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/verifier-3363/Pass1.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/verifier-3363/Pass1.cpp Mon Sep 17 04:02:17
2007
@@ -424,7 +424,7 @@
                     return error(VF_ErrorBranch, "jump out of method or to the middle of
an instruction");
                 }
 
-                if( instr_direct(pi) ) {
+                if( instr_direct(pi, opcode, m_bytecode, instr) ) {
                     //TODO: though the spec does not require to check the dead code for correctness
                     //RI seems to check it and some Harmony negative tests have broken dead
code
 
@@ -438,7 +438,7 @@
                     // go to the next instruction
                     instr += instr_len;
                 }
-            } else if( instr_direct(pi) ) {
+            } else if( instr_direct(pi, opcode, m_bytecode, instr) ) {
                 dead_code_stack.push(instr+instr_len);
 
                 // it is not a jump ==> it is return or throw or ret

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/verifier-3363/Pass2.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/verifier-3363/Pass2.cpp?rev=576365&r1=576364&r2=576365&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/verifier-3363/Pass2.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/verifier-3363/Pass2.cpp Mon Sep 17 04:02:17
2007
@@ -1902,13 +1902,13 @@
 
                     if( props.isMultiway(target) || instr_is_jsr(opcode) ) {
                         //TODO: need to test commented out optimization
-                        //&& (!instr_direct(pi) || props.isDataflowPassed(target))
+                        //&& (!instr_direct(pi, opcode, m_bytecode, instr) || props.isDataflowPassed(target))
                         if( (tcr=new_generic_vector_constraint(target)) != VF_OK ) {
                             return tcr;
                         }
                     }
 
-                    if( instr_direct(pi) ) {
+                    if( instr_direct(pi, opcode, m_bytecode, instr) ) {
                         //goto, goto_w
                         if( !props.isDataflowPassed(target) ) {
                             if( target < instr ) next_start_pc = 0;
@@ -1987,7 +1987,7 @@
                     }
 
                     instr += instr_len;
-                } else if( instr_direct(pi) ) {
+                } else if( instr_direct(pi, opcode, m_bytecode, instr) ) {
                     // it is not a jump ==> it is ret, return or throw
                     return VF_OK;
                 } else if( instr_is_switch(pi) ) {

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/verifier-3363/context.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/verifier-3363/context.h?rev=576365&r1=576364&r2=576365&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/verifier-3363/context.h (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/verifier-3363/context.h Mon Sep 17 04:02:17
2007
@@ -559,8 +559,8 @@
         }
 
         //whether this instruction GOTO, RETURN, ATHROW, or RET
-        static int instr_direct(ParseInfo &pi) {
-            return pi.flags & PI_DIRECT;
+        static int instr_direct(ParseInfo &pi, OpCode opcode, byte* code, Address instr)
{
+            return (pi.flags & PI_DIRECT) || (opcode == OP_WIDE && code[instr
+ 1] == OP_RET);
         }
 
         //whether this instruction a *SWITCH



Mime
View raw message