Mercurial > hg > graal-jvmci-8
comparison src/share/vm/opto/parse2.cpp @ 6206:70862d781d01
7180769: assert(tboth->klass_is_exact()) failed: klass should be exact
Summary: Use class exactness as part of the condition for class compare optimization instead of assert.
Reviewed-by: twisti, roland
author | kvn |
---|---|
date | Mon, 02 Jul 2012 12:59:43 -0700 |
parents | 8f6ce6f1049b |
children | da91efe96a93 |
comparison
equal
deleted
inserted
replaced
6205:d50605d9417e | 6206:70862d781d01 |
---|---|
1276 // Found: | 1276 // Found: |
1277 // Bool(CmpP(LoadKlass(obj._klass), ConP(Foo.klass)), [eq]) | 1277 // Bool(CmpP(LoadKlass(obj._klass), ConP(Foo.klass)), [eq]) |
1278 // or the narrowOop equivalent. | 1278 // or the narrowOop equivalent. |
1279 const Type* obj_type = _gvn.type(obj); | 1279 const Type* obj_type = _gvn.type(obj); |
1280 const TypeOopPtr* tboth = obj_type->join(con_type)->isa_oopptr(); | 1280 const TypeOopPtr* tboth = obj_type->join(con_type)->isa_oopptr(); |
1281 if (tboth != NULL && tboth != obj_type && tboth->higher_equal(obj_type)) { | 1281 if (tboth != NULL && tboth->klass_is_exact() && tboth != obj_type && |
1282 tboth->higher_equal(obj_type)) { | |
1282 // obj has to be of the exact type Foo if the CmpP succeeds. | 1283 // obj has to be of the exact type Foo if the CmpP succeeds. |
1283 assert(tboth->klass_is_exact(), "klass should be exact"); | |
1284 int obj_in_map = map()->find_edge(obj); | 1284 int obj_in_map = map()->find_edge(obj); |
1285 JVMState* jvms = this->jvms(); | 1285 JVMState* jvms = this->jvms(); |
1286 if (obj_in_map >= 0 && | 1286 if (obj_in_map >= 0 && |
1287 (jvms->is_loc(obj_in_map) || jvms->is_stk(obj_in_map))) { | 1287 (jvms->is_loc(obj_in_map) || jvms->is_stk(obj_in_map))) { |
1288 TypeNode* ccast = new (C, 2) CheckCastPPNode(control(), obj, tboth); | 1288 TypeNode* ccast = new (C, 2) CheckCastPPNode(control(), obj, tboth); |