Mercurial > hg > release > icedtea-1.10
changeset 1707:fd98e848b25c
2009-02-27 Gary Benson <gbenson@redhat.com>
* ports/hotspot/src/share/vm/shark/sharkBlock.cpp
(SharkBlock::maybe_inline_call): Inline empty methods.
author | Gary Benson <gbenson@redhat.com> |
---|---|
date | Fri, 27 Feb 2009 04:08:04 -0500 |
parents | 29fdac532dd0 |
children | 9f1c16638724 |
files | ChangeLog ports/hotspot/src/share/vm/shark/sharkBlock.cpp |
diffstat | 2 files changed, 14 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Thu Feb 26 15:40:28 2009 -0500 +++ b/ChangeLog Fri Feb 27 04:08:04 2009 -0500 @@ -1,3 +1,8 @@ +2009-02-27 Gary Benson <gbenson@redhat.com> + + * ports/hotspot/src/share/vm/shark/sharkBlock.cpp + (SharkBlock::maybe_inline_call): Inline empty methods. + 2009-02-26 Deepak Bhole <dbhole@redhat.com> * IcedTeaPlugin.cc: Decode url via nsINetUtil::UnescapeString()
--- a/ports/hotspot/src/share/vm/shark/sharkBlock.cpp Thu Feb 26 15:40:28 2009 -0500 +++ b/ports/hotspot/src/share/vm/shark/sharkBlock.cpp Fri Feb 27 04:08:04 2009 -0500 @@ -2082,6 +2082,15 @@ method->has_monitor_bytecodes()) return false; + // Inlining empty methods is trivial + if (method->is_empty_method()) { + int desired_stack_depth = xstack_depth() - method->arg_size(); + while (xstack_depth() > desired_stack_depth) + pop(); + + return true; + } + // We need to scan the bytecode to do any more, so we bail out // now if the method is too big if (method->code_size() > 5)