< prev index next >

src/share/vm/opto/escape.cpp

Print this page

        

@@ -3163,10 +3163,16 @@
       } else if (use->Opcode() == Op_EncodeISOArray) {
         if (use->in(MemNode::Memory) == n || use->in(3) == n) {
           // EncodeISOArray overwrites destination array
           memnode_worklist.append_if_missing(use);
         }
+      } else if (use->Opcode() == Op_Return) {
+        Node* klass = use->in(TypeFunc::Parms);
+        const TypeKlassPtr* tkls = igvn->type(klass)->isa_klassptr();
+        ciValueKlass* vk = tkls->klass()->as_value_klass();
+        assert(_compile->tf()->returns_value_type_as_fields(), "must return a value type");
+        assert(vk->contains_oops(), "returned value type must contain a reference field");
       } else {
         uint op = use->Opcode();
         if ((op == Op_StrCompressedCopy || op == Op_StrInflatedCopy) &&
             (use->in(MemNode::Memory) == n)) {
           // They overwrite memory edge corresponding to destination array,
< prev index next >