Mercurial > hg > release > icedtea-1.9
changeset 1708:9f1c16638724
2009-02-27 Gary Benson <gbenson@redhat.com>
* ports/hotspot/src/share/vm/shark/sharkState.cpp
(SharkEntryState::initialize): Mark the receiver as
zero-checked for non-static methods.
* ports/hotspot/src/share/vm/shark/sharkValue.hpp
(SharkValue::jint_constant): Mark non-zero constants
as zero-checked.
(SharkValue::jlong_constant): Likewise.
author | Gary Benson <gbenson@redhat.com> |
---|---|
date | Fri, 27 Feb 2009 14:52:57 +0000 |
parents | fd98e848b25c |
children | ffde78306a6a |
files | ChangeLog ports/hotspot/src/share/vm/shark/sharkState.cpp ports/hotspot/src/share/vm/shark/sharkValue.hpp |
diffstat | 3 files changed, 25 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Fri Feb 27 04:08:04 2009 -0500 +++ b/ChangeLog Fri Feb 27 14:52:57 2009 +0000 @@ -1,3 +1,14 @@ +2009-02-27 Gary Benson <gbenson@redhat.com> + + * ports/hotspot/src/share/vm/shark/sharkState.cpp + (SharkEntryState::initialize): Mark the receiver as + zero-checked for non-static methods. + + * ports/hotspot/src/share/vm/shark/sharkValue.hpp + (SharkValue::jint_constant): Mark non-zero constants + as zero-checked. + (SharkValue::jlong_constant): Likewise. + 2009-02-27 Gary Benson <gbenson@redhat.com> * ports/hotspot/src/share/vm/shark/sharkBlock.cpp
--- a/ports/hotspot/src/share/vm/shark/sharkState.cpp Fri Feb 27 04:08:04 2009 -0500 +++ b/ports/hotspot/src/share/vm/shark/sharkState.cpp Fri Feb 27 14:52:57 2009 +0000 @@ -94,6 +94,12 @@ set_local(i, value); } + // Non-static methods have a guaranteed non-null receiver + if (!function()->target()->is_static()) { + assert(local(0)->is_jobject(), "should be"); + local(0)->set_zero_checked(true); + } + // Expression stack assert(!stack_depth_at_entry(), "entry block shouldn't have stack"); }
--- a/ports/hotspot/src/share/vm/shark/sharkValue.hpp Fri Feb 27 04:08:04 2009 -0500 +++ b/ports/hotspot/src/share/vm/shark/sharkValue.hpp Fri Feb 27 14:52:57 2009 +0000 @@ -149,11 +149,17 @@ public: static SharkValue* jint_constant(jint value) { - return create_jint(LLVMValue::jint_constant(value)); + SharkValue *result = create_jint(LLVMValue::jint_constant(value)); + if (value != 0) + result->set_zero_checked(true); + return result; } static SharkValue* jlong_constant(jlong value) { - return create_jlong(LLVMValue::jlong_constant(value)); + SharkValue *result = create_jlong(LLVMValue::jlong_constant(value)); + if (value != 0) + result->set_zero_checked(true); + return result; } static SharkValue* jfloat_constant(jfloat value) {