8036588: VerifyFieldClosure fails instanceKlass:3133
authordrchase
Fri, 11 Jul 2014 19:51:36 -0400
changeset 25637 369f62cdfaba
parent 25498 52d596882831
child 25638 907806460916
8036588: VerifyFieldClosure fails instanceKlass:3133 Summary: Changed deopt live-pointer test to use returns-object instead of live-and-returns-object Reviewed-by: iveresov, kvn, jrose
hotspot/src/share/vm/opto/machnode.cpp
hotspot/src/share/vm/opto/machnode.hpp
hotspot/src/share/vm/opto/output.cpp
--- a/hotspot/src/share/vm/opto/machnode.cpp	Wed Jul 09 21:56:16 2014 +0000
+++ b/hotspot/src/share/vm/opto/machnode.cpp	Fri Jul 11 19:51:36 2014 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -639,7 +639,6 @@
 }
 #endif
 
-
 bool MachCallNode::return_value_is_used() const {
   if (tf()->range()->cnt() == TypeFunc::Parms) {
     // void return
@@ -657,6 +656,14 @@
   return false;
 }
 
+// Similar to cousin class CallNode::returns_pointer
+// Because this is used in deoptimization, we want the type info, not the data
+// flow info; the interpreter will "use" things that are dead to the optimizer.
+bool MachCallNode::returns_pointer() const {
+  const TypeTuple *r = tf()->range();
+  return (r->cnt() > TypeFunc::Parms &&
+          r->field_at(TypeFunc::Parms)->isa_ptr());
+}
 
 //------------------------------Registers--------------------------------------
 const RegMask &MachCallNode::in_RegMask(uint idx) const {
--- a/hotspot/src/share/vm/opto/machnode.hpp	Wed Jul 09 21:56:16 2014 +0000
+++ b/hotspot/src/share/vm/opto/machnode.hpp	Fri Jul 11 19:51:36 2014 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -842,6 +842,10 @@
 
   bool returns_long() const { return tf()->return_type() == T_LONG; }
   bool return_value_is_used() const;
+
+  // Similar to cousin class CallNode::returns_pointer
+  bool returns_pointer() const;
+
 #ifndef PRODUCT
   virtual void dump_spec(outputStream *st) const;
 #endif
--- a/hotspot/src/share/vm/opto/output.cpp	Wed Jul 09 21:56:16 2014 +0000
+++ b/hotspot/src/share/vm/opto/output.cpp	Fri Jul 11 19:51:36 2014 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -854,8 +854,7 @@
     }
 
     // Check if a call returns an object.
-    if (mcall->return_value_is_used() &&
-        mcall->tf()->range()->field_at(TypeFunc::Parms)->isa_ptr()) {
+    if (mcall->returns_pointer()) {
       return_oop = true;
     }
     safepoint_pc_offset += mcall->ret_addr_offset();