< prev index next >
src/share/vm/opto/graphKit.cpp
Print this page
@@ -2563,11 +2563,11 @@
// For some types like interfaces the following loadKlass is from a 1-word
// cache which is mutable so can't use immutable memory. Other
// types load from the super-class display table which is immutable.
m = mem->memory_at(C->get_alias_index(gvn->type(p2)->is_ptr()));
Node *kmem = might_be_cache ? m : C->immutable_memory();
- Node *nkls = gvn->transform(LoadKlassNode::make(*gvn, NULL, kmem, p2, gvn->type(p2)->is_ptr(), TypeKlassPtr::OBJECT_OR_NULL));
+ Node *nkls = gvn->transform(LoadKlassNode::make(*gvn, NULL, kmem, p2, gvn->type(p2)->is_ptr(), TypeKlassPtr::BOTTOM));
// Compile speed common case: ARE a subtype and we canNOT fail
if( superklass == nkls )
return C->top(); // false path is dead; no test needed.
@@ -2915,10 +2915,11 @@
// uncommon trap or exception is thrown.
Node* GraphKit::gen_checkcast(Node *obj, Node* superklass,
Node* *failure_control) {
kill_dead_locals(); // Benefit all the uncommon traps
const TypeKlassPtr *tk = _gvn.type(superklass)->is_klassptr();
+ assert(tk->is_loaded(), "must be loaded");
const Type *toop = TypeOopPtr::make_from_klass(tk->klass());
// Fast cutout: Check the case that the cast is vacuously true.
// This detects the common cases where the test will short-circuit
// away completely. We do this before we perform the null check,
@@ -3221,10 +3222,11 @@
// almost always feature constant types.
Node* GraphKit::get_layout_helper(Node* klass_node, jint& constant_value) {
const TypeKlassPtr* inst_klass = _gvn.type(klass_node)->isa_klassptr();
if (!StressReflectiveCode && inst_klass != NULL) {
ciKlass* klass = inst_klass->klass();
+ assert(klass != NULL, "klass should not be NULL");
bool xklass = inst_klass->klass_is_exact();
if (xklass || klass->is_array_klass()) {
jint lhelper = klass->layout_helper();
if (lhelper != Klass::_lh_neutral_value) {
constant_value = lhelper;
< prev index next >