You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by va...@apache.org on 2007/06/04 14:16:43 UTC
svn commit: r544139 - in /harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet:
bcproc.cpp cg_regs.cpp compiler.cpp
Author: varlax
Date: Mon Jun 4 05:16:43 2007
New Revision: 544139
URL: http://svn.apache.org/viewvc?view=rev&rev=544139
Log:
Applied fix for HARMONY-3382 [drlvm][jit][jet][EUT] 1 test from org.eclipse.jdt.core.tests.compiler.parser.TestAll suit fails fails due to assert in JET, regtest is pending.
Modified:
harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/bcproc.cpp
harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/cg_regs.cpp
harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/compiler.cpp
Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/bcproc.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/bcproc.cpp?view=diff&rev=544139&r1=544138&r2=544139
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/bcproc.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/bcproc.cpp Mon Jun 4 05:16:43 2007
@@ -40,7 +40,7 @@
//const bool last = m_bbinfo->last_pc == jinst.pc;
const JInst& jinst = m_insts[m_pc];
unsigned bc_size = m_infoBlock.get_bc_size();
- bool last = jinst.next>=bc_size || (m_insts[jinst.next].flags & OPF_STARTS_BB);
+ bool lastInBB = jinst.next>=bc_size || (m_insts[jinst.next].flags & OPF_STARTS_BB);
if (is_set(DBG_CHECK_STACK)) {
gen_dbg_check_stack(true);
@@ -93,8 +93,8 @@
vpark();
}
- const bool has_fall_through = !(jinst.flags & OPF_DEAD_END);
- if (last && has_fall_through && jinst.get_num_targets() == 0) {
+ const bool has_fall_through = !jinst.is_set(OPF_DEAD_END);
+ if (lastInBB && has_fall_through && jinst.get_num_targets() == 0) {
gen_bb_leave(jinst.next);
}
}
Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/cg_regs.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/cg_regs.cpp?view=diff&rev=544139&r1=544138&r2=544139
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/cg_regs.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/cg_regs.cpp Mon Jun 4 05:16:43 2007
@@ -603,9 +603,9 @@
to_eh = false;
}
else {
- const BBInfo& bbto = m_bbs[to];
// Must be BB
assert(m_bbs.find(to) != m_bbs.end());
+ const BBInfo& bbto = m_bbs[to];
// Jumps to ehandler ?
to_eh = bbto.ehandler;
// Now, check where the control flow may be transferred from the
Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/compiler.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/compiler.cpp?view=diff&rev=544139&r1=544138&r2=544139
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/compiler.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/compiler.cpp Mon Jun 4 05:16:43 2007
@@ -660,7 +660,7 @@
++ji.ref_count;
comp_create_bb(jinst.get_def_target());
}
- }
+ } // ~for
//
// mark exception handlers as leads of basic blocks
for (unsigned i=0; i<m_handlers.size(); i++) {
@@ -673,6 +673,11 @@
ji.id = id++;
}
}
+ // Sometimes, Eclipse's javac generates NOPs at the end of method AND in a basic
+ // block which is [unreachable] exception handler. In this case we have an inst which
+ // is last in the method, has fall-through, but no following block. Always set up 'OPF_DEAD_END':
+ JInst& lastInst = m_insts[bc_size-1];
+ lastInst.flags = lastInst.flags | OPF_DEAD_END;
}
void Compiler::comp_alloc_regs(void)