Mercurial > hg > icedtea7
changeset 1879:2493b242458e
2009-06-05 Gary Benson <gbenson@redhat.com>
* ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp
(SharkTopLevelBlock::do_full_instance_check): Add class argument.
* ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp
(SharkTopLevelBlock::do_instance_check): Removed constant pool check.
(SharkTopLevelBlock::do_full_instance_check): Removed constant
pool lookup.
author | Gary Benson <gbenson@redhat.com> |
---|---|
date | Fri, 05 Jun 2009 08:17:22 -0400 |
parents | 99fc93351f7f |
children | 8783e4b809e0 |
files | ChangeLog ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp |
diffstat | 3 files changed, 18 insertions(+), 16 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Fri Jun 05 12:12:00 2009 +0100 +++ b/ChangeLog Fri Jun 05 08:17:22 2009 -0400 @@ -1,3 +1,12 @@ +2009-06-05 Gary Benson <gbenson@redhat.com> + + * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp + (SharkTopLevelBlock::do_full_instance_check): Add class argument. + * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp + (SharkTopLevelBlock::do_instance_check): Removed constant pool check. + (SharkTopLevelBlock::do_full_instance_check): Removed constant + pool lookup. + 2009-06-05 Gary Benson <gbenson@redhat.com> * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp
--- a/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp Fri Jun 05 12:12:00 2009 +0100 +++ b/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp Fri Jun 05 08:17:22 2009 -0400 @@ -1166,23 +1166,17 @@ void SharkTopLevelBlock::do_instance_check() { - constantTag tag = - target()->holder()->constant_pool_tag_at(iter()->get_klass_index()); - if (!tag.is_klass()) { - assert(tag.is_unresolved_klass(), "should be"); + bool will_link; + ciKlass *klass = iter()->get_klass(will_link); + + if (will_link) + do_full_instance_check(klass); + else do_trapping_instance_check(); - } - else { - do_full_instance_check(); - } } -void SharkTopLevelBlock::do_full_instance_check() +void SharkTopLevelBlock::do_full_instance_check(ciKlass* klass) { - bool will_link; - ciKlass *klass = iter()->get_klass(will_link); - assert(will_link, "should do"); - BasicBlock *not_null = function()->CreateBlock("not_null"); BasicBlock *subtype_check = function()->CreateBlock("subtype_check"); BasicBlock *is_instance = function()->CreateBlock("is_instance"); @@ -1208,8 +1202,7 @@ // Get the class we're checking against builder()->SetInsertPoint(not_null); - SharkConstantPool constants(this); - Value *check_klass = constants.object_at(iter()->get_klass_index()); + Value *check_klass = builder()->CreateInlineOop(klass); // Get the class of the object being tested Value *object_klass = builder()->CreateValueOfStructEntry(
--- a/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp Fri Jun 05 12:12:00 2009 +0100 +++ b/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp Fri Jun 05 08:17:22 2009 -0400 @@ -386,7 +386,7 @@ // checkcast and instanceof private: - void do_full_instance_check(); + void do_full_instance_check(ciKlass* klass); void do_trapping_instance_check(); void do_instance_check();