Mercurial > hg > truffle
diff c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotMethodResolved.java @ 1433:efba53f86c4f
various fixes and enhancements
* correct refmap->oopmap conversion (register numbering, stack slot numbering)
* fixes for inlining (correct scoping in exception handler lookup, NPE in scope conversion)
* support for "jump to runtime stub" (patching code needs to be aware of jmp instruction)
* provide more information about methods (to allow inlining: has_balanced_monitors, etc.)
* fixes to signature type lookup
* isSubTypeOf: correct handling of array classes
* RiType: componentType/arrayOf
* prologue: inline cache check, icmiss stub
* klass state check (resolved but not initialized) in newinstance
* card table write barriers
* c1x classes are optional (to allow running c1 without them)
* correct for stored frame pointer in calling conventions (methods with arguments on stack)
* getType(Class<?>) for some basic types, used for optimizations and folding
* RiMethod/RiType: throw exception instead of silent failure on unsupported operations
* RiType: resolved/unresolved array type support
* refactoring: new on-demand template generation mechanism
* optimizations: template specialization for no_null_check, given length, etc.
author | Lukas Stadler <lukas.stadler@oracle.com> |
---|---|
date | Thu, 16 Sep 2010 19:42:20 -0700 |
parents | abc670a709dc |
children | 20a3896518ac |
line wrap: on
line diff
--- a/c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotMethodResolved.java Wed Sep 01 17:13:38 2010 -0700 +++ b/c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotMethodResolved.java Thu Sep 16 19:42:20 2010 -0700 @@ -17,6 +17,8 @@ */ package com.sun.hotspot.c1x; +import java.lang.reflect.*; + import com.sun.cri.ri.*; /** @@ -37,6 +39,7 @@ private RiExceptionHandler[] exceptionHandlers; private RiSignature signature; private RiType holder; + private Boolean hasBalancedMonitors; public HotSpotMethodResolved(long vmId, String name) { this.vmId = vmId; @@ -53,8 +56,7 @@ @Override public boolean canBeStaticallyBound() { - // TODO Auto-generated method stub - return false; + return isLeafMethod() || Modifier.isStatic(accessFlags()); } @Override @@ -75,13 +77,15 @@ @Override public boolean hasBalancedMonitors() { - // TODO Auto-generated method stub - return false; + if (hasBalancedMonitors == null) { + hasBalancedMonitors = Compiler.getVMEntries().RiMethod_hasBalancedMonitors(vmId); + } + return hasBalancedMonitors; } @Override public RiType holder() { - if (holder == null ) { + if (holder == null) { holder = Compiler.getVMEntries().RiMethod_holder(vmId); } return holder; @@ -99,14 +103,12 @@ @Override public boolean isLeafMethod() { - // TODO Auto-generated method stub - return false; + return Modifier.isFinal(accessFlags()) || Modifier.isPrivate(accessFlags()); } @Override public boolean isOverridden() { - // TODO Auto-generated method stub - return false; + throw new UnsupportedOperationException("isOverridden"); } @Override @@ -116,13 +118,11 @@ @Override public String jniSymbol() { - // TODO Auto-generated method stub - return null; + throw new UnsupportedOperationException("jniSymbol"); } @Override public Object liveness(int bci) { - // TODO Auto-generated method stub return null; } @@ -144,7 +144,6 @@ @Override public RiMethodProfile methodData() { - // TODO Auto-generated method stub return null; }