diff --git a/src/share/vm/opto/graphKit.cpp b/src/share/vm/opto/graphKit.cpp index 955b736eed12ce18d11288de92fb8162492b8899..995ed4e906cc91c5a0b408f669b61b5dcbbb5f73 100644 --- a/src/share/vm/opto/graphKit.cpp +++ b/src/share/vm/opto/graphKit.cpp @@ -622,11 +622,13 @@ BuildCutout::~BuildCutout() { //---------------------------PreserveReexecuteState---------------------------- PreserveReexecuteState::PreserveReexecuteState(GraphKit* kit) { + assert(!kit->stopped(), "must call stopped() before"); _kit = kit; _sp = kit->sp(); _reexecute = kit->jvms()->_reexecute; } PreserveReexecuteState::~PreserveReexecuteState() { + if (_kit->stopped()) return; _kit->jvms()->_reexecute = _reexecute; _kit->set_sp(_sp); } @@ -1123,7 +1125,7 @@ Node* GraphKit::null_check_common(Node* value, BasicType type, case T_OBJECT : { const Type *t = _gvn.type( value ); - const TypeInstPtr* tp = t->isa_instptr(); + const TypeOopPtr* tp = t->isa_oopptr(); if (tp != NULL && !tp->klass()->is_loaded() // Only for do_null_check, not any of its siblings: && !assert_null && null_control == NULL) { diff --git a/src/share/vm/opto/library_call.cpp b/src/share/vm/opto/library_call.cpp index f609eedd931f6fdbdf575069105669c517c6e5d8..cd0549cfbb898fab8946d8439f605deb76b1e9b0 100644 --- a/src/share/vm/opto/library_call.cpp +++ b/src/share/vm/opto/library_call.cpp @@ -3894,6 +3894,7 @@ void LibraryCallKit::copy_to_clone(Node* obj, Node* alloc_obj, Node* obj_size, b assert(obj_size != NULL, ""); Node* raw_obj = alloc_obj->in(1); assert(alloc_obj->is_CheckCastPP() && raw_obj->is_Proj() && raw_obj->in(0)->is_Allocate(), ""); + assert(alloc_obj->as_CheckCastPP()->type() != TypeInstPtr::NOTNULL, "should be more precise than Object"); if (ReduceBulkZeroing) { // We will be completely responsible for initializing this object - @@ -4447,6 +4448,7 @@ LibraryCallKit::generate_arraycopy(const TypePtr* adr_type, InitializeNode* init = alloc->initialization(); assert(init->is_complete(), "we just did this"); assert(dest->is_CheckCastPP(), "sanity"); + assert(dest->as_CheckCastPP()->type() != TypeInstPtr::NOTNULL, "type should be more precise than Object"); assert(dest->in(0)->in(0) == init, "dest pinned"); // Cast to Object for arraycopy.