src/share/vm/opto/compile.cpp

changeset 3391
069ab3f976d3
parent 3389
669f6a7d5b70
child 3396
d12a66fa3820
equal deleted inserted replaced
3390:65149e74c706 3391:069ab3f976d3
1304 // the primary supertype array and also force them to the supertype cache 1304 // the primary supertype array and also force them to the supertype cache
1305 // alias index. Since the same load can reach both, we need to merge 1305 // alias index. Since the same load can reach both, we need to merge
1306 // these 2 disparate memories into the same alias class. Since the 1306 // these 2 disparate memories into the same alias class. Since the
1307 // primary supertype array is read-only, there's no chance of confusion 1307 // primary supertype array is read-only, there's no chance of confusion
1308 // where we bypass an array load and an array store. 1308 // where we bypass an array load and an array store.
1309 int primary_supers_offset = sizeof(klassOopDesc) + Klass::primary_supers_offset_in_bytes(); 1309 int primary_supers_offset = in_bytes(Klass::primary_supers_offset());
1310 if (offset == Type::OffsetBot || 1310 if (offset == Type::OffsetBot ||
1311 (offset >= primary_supers_offset && 1311 (offset >= primary_supers_offset &&
1312 offset < (int)(primary_supers_offset + Klass::primary_super_limit() * wordSize)) || 1312 offset < (int)(primary_supers_offset + Klass::primary_super_limit() * wordSize)) ||
1313 offset == (int)(sizeof(klassOopDesc) + Klass::secondary_super_cache_offset_in_bytes())) { 1313 offset == (int)in_bytes(Klass::secondary_super_cache_offset())) {
1314 offset = sizeof(klassOopDesc) + Klass::secondary_super_cache_offset_in_bytes(); 1314 offset = in_bytes(Klass::secondary_super_cache_offset());
1315 tj = tk = TypeKlassPtr::make( TypePtr::NotNull, tk->klass(), offset ); 1315 tj = tk = TypeKlassPtr::make( TypePtr::NotNull, tk->klass(), offset );
1316 } 1316 }
1317 } 1317 }
1318 1318
1319 // Flatten all Raw pointers together. 1319 // Flatten all Raw pointers together.
1488 if (flat->offset() == java_lang_Class::klass_offset_in_bytes() 1488 if (flat->offset() == java_lang_Class::klass_offset_in_bytes()
1489 && flat->is_instptr()->klass() == env()->Class_klass()) 1489 && flat->is_instptr()->klass() == env()->Class_klass())
1490 alias_type(idx)->set_rewritable(false); 1490 alias_type(idx)->set_rewritable(false);
1491 } 1491 }
1492 if (flat->isa_klassptr()) { 1492 if (flat->isa_klassptr()) {
1493 if (flat->offset() == Klass::super_check_offset_offset_in_bytes() + (int)sizeof(oopDesc)) 1493 if (flat->offset() == in_bytes(Klass::super_check_offset_offset()))
1494 alias_type(idx)->set_rewritable(false); 1494 alias_type(idx)->set_rewritable(false);
1495 if (flat->offset() == Klass::modifier_flags_offset_in_bytes() + (int)sizeof(oopDesc)) 1495 if (flat->offset() == in_bytes(Klass::modifier_flags_offset()))
1496 alias_type(idx)->set_rewritable(false); 1496 alias_type(idx)->set_rewritable(false);
1497 if (flat->offset() == Klass::access_flags_offset_in_bytes() + (int)sizeof(oopDesc)) 1497 if (flat->offset() == in_bytes(Klass::access_flags_offset()))
1498 alias_type(idx)->set_rewritable(false); 1498 alias_type(idx)->set_rewritable(false);
1499 if (flat->offset() == Klass::java_mirror_offset_in_bytes() + (int)sizeof(oopDesc)) 1499 if (flat->offset() == in_bytes(Klass::java_mirror_offset()))
1500 alias_type(idx)->set_rewritable(false); 1500 alias_type(idx)->set_rewritable(false);
1501 } 1501 }
1502 // %%% (We would like to finalize JavaThread::threadObj_offset(), 1502 // %%% (We would like to finalize JavaThread::threadObj_offset(),
1503 // but the base pointer type is not distinctive enough to identify 1503 // but the base pointer type is not distinctive enough to identify
1504 // references into JavaThread.) 1504 // references into JavaThread.)

mercurial