Mercurial > hg > truffle
changeset 10886:1b800f44ac0c
Make HotSpotNmethod class final and set it as declared type of OptimizedCallTarget.compiledMethod.
author | Andreas Woess <andreas.woess@jku.at> |
---|---|
date | Fri, 26 Jul 2013 16:53:34 +0200 |
parents | 3f43462ce829 |
children | f11a4e137aed |
files | graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/HotSpotNmethod.java graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/OptimizedCallTarget.java |
diffstat | 2 files changed, 4 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/HotSpotNmethod.java Fri Jul 26 12:10:33 2013 +0200 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/HotSpotNmethod.java Fri Jul 26 16:53:34 2013 +0200 @@ -40,7 +40,7 @@ * instance to be anything but weak. This is due to the fact that HotSpot does not treat nmethods as * strong GC roots. */ -public class HotSpotNmethod extends HotSpotInstalledCode { +public final class HotSpotNmethod extends HotSpotInstalledCode { private static final long serialVersionUID = -1784683588947054103L;
--- a/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/OptimizedCallTarget.java Fri Jul 26 12:10:33 2013 +0200 +++ b/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/OptimizedCallTarget.java Fri Jul 26 16:53:34 2013 +0200 @@ -29,6 +29,7 @@ import com.oracle.graal.api.code.*; import com.oracle.graal.debug.*; +import com.oracle.graal.hotspot.meta.*; import com.oracle.truffle.api.*; import com.oracle.truffle.api.frame.*; import com.oracle.truffle.api.impl.*; @@ -55,7 +56,7 @@ } } - private InstalledCode compiledMethod; + private HotSpotNmethod compiledMethod; private final TruffleCompiler compiler; private int invokeCounter; @@ -136,7 +137,7 @@ public void compile() { CompilerAsserts.neverPartOfCompilation(); try { - compiledMethod = compiler.compile(this); + compiledMethod = (HotSpotNmethod) compiler.compile(this); if (compiledMethod == null) { throw new BailoutException(String.format("code installation failed (codeSize=%s)", codeSize)); } else {