Mercurial > hg > release > icedtea7-2.3
changeset 1696:414319d21b40
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.
(transplanted from 9f1c16638724c4aec1496de89c2396d5006bcc74)
author | Gary Benson <gbenson@redhat.com> |
---|---|
date | Fri, 27 Feb 2009 14:52:57 +0000 |
parents | 9e4c300c4670 |
children | 62b9b14aff25 |
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 @@ -71,6 +71,17 @@ 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 (SharkBlock::maybe_inline_call): Inline empty methods.
--- 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) {