hotspot/src/share/vm/opto/buildOopMap.cpp
changeset 360 21d113ecbf6a
parent 1 489c9b5090e2
child 670 ddf3e9583f2f
--- a/hotspot/src/share/vm/opto/buildOopMap.cpp	Fri Apr 11 09:56:35 2008 -0400
+++ b/hotspot/src/share/vm/opto/buildOopMap.cpp	Sun Apr 13 17:43:42 2008 -0400
@@ -315,6 +315,26 @@
         }
       }
 
+    } else if( t->isa_narrowoop() ) {
+      assert( !OptoReg::is_valid(_callees[reg]), "oop can't be callee save" );
+      // Check for a legal reg name in the oopMap and bailout if it is not.
+      if (!omap->legal_vm_reg_name(r)) {
+        regalloc->C->record_method_not_compilable("illegal oopMap register name");
+        continue;
+      }
+      if( mcall ) {
+          // Outgoing argument GC mask responsibility belongs to the callee,
+          // not the caller.  Inspect the inputs to the call, to see if
+          // this live-range is one of them.
+        uint cnt = mcall->tf()->domain()->cnt();
+        uint j;
+        for( j = TypeFunc::Parms; j < cnt; j++)
+          if( mcall->in(j) == def )
+            break;            // reaching def is an argument oop
+        if( j < cnt )         // arg oops dont go in GC map
+          continue;           // Continue on to the next register
+      }
+      omap->set_narrowoop(r);
     } else if( OptoReg::is_valid(_callees[reg])) { // callee-save?
       // It's a callee-save value
       assert( dup_check[_callees[reg]]==0, "trying to callee save same reg twice" );