changeset 1073:8e954aedbb81

6889869: assert(!Interpreter::bytecode_should_reexecute(code),"should not reexecute") Reviewed-by: jrose, kvn, cfang, twisti
author never
date Wed, 14 Oct 2009 10:36:57 -0700
parents ce590301ae2a
children 23862fc517bb
files src/share/vm/code/debugInfoRec.cpp src/share/vm/code/pcDesc.hpp
diffstat 2 files changed, 9 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/vm/code/debugInfoRec.cpp	Tue Oct 13 22:32:31 2009 -0700
+++ b/src/share/vm/code/debugInfoRec.cpp	Wed Oct 14 10:36:57 2009 -0700
@@ -356,8 +356,7 @@
     // search forward until it finds last.
     // In addition, it does not matter if the last PcDesc
     // is for a safepoint or not.
-    if (_prev_safepoint_pc < prev->pc_offset() &&
-        prev->scope_decode_offset() == last->scope_decode_offset()) {
+    if (_prev_safepoint_pc < prev->pc_offset() && prev->is_same_info(last)) {
       assert(prev == last-1, "sane");
       prev->set_pc_offset(pc_offset);
       _pcs_length -= 1;
--- a/src/share/vm/code/pcDesc.hpp	Tue Oct 13 22:32:31 2009 -0700
+++ b/src/share/vm/code/pcDesc.hpp	Wed Oct 14 10:36:57 2009 -0700
@@ -39,6 +39,7 @@
     struct {
       unsigned int reexecute: 1;
     } bits;
+    bool operator ==(const PcDescFlags& other) { return word == other.word; }
   } _flags;
 
  public:
@@ -64,6 +65,13 @@
   bool     should_reexecute()              const { return _flags.bits.reexecute; }
   void set_should_reexecute(bool z)              { _flags.bits.reexecute = z;    }
 
+  // Does pd refer to the same information as pd?
+  bool is_same_info(const PcDesc* pd) {
+    return _scope_decode_offset == pd->_scope_decode_offset &&
+      _obj_decode_offset == pd->_obj_decode_offset &&
+      _flags == pd->_flags;
+  }
+
   // Returns the real pc
   address real_pc(const nmethod* code) const;