< prev index next >
src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotNmethod.java
Print this page
*** 20,33 ****
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package jdk.vm.ci.hotspot;
! import static jdk.vm.ci.hotspot.HotSpotJVMCIRuntime.*;
!
! import jdk.vm.ci.code.*;
! import jdk.vm.ci.meta.*;
/**
* Implementation of {@link InstalledCode} for code installed as an nmethod. The nmethod stores a
* weak reference to an instance of this class. This is necessary to keep the nmethod from being
* unloaded while the associated {@link HotSpotNmethod} instance is alive.
--- 20,35 ----
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package jdk.vm.ci.hotspot;
! import static jdk.vm.ci.hotspot.CompilerToVM.compilerToVM;
! import jdk.vm.ci.code.InstalledCode;
! import jdk.vm.ci.code.InvalidInstalledCodeException;
! import jdk.vm.ci.meta.JavaKind;
! import jdk.vm.ci.meta.JavaType;
! import jdk.vm.ci.meta.ResolvedJavaMethod;
/**
* Implementation of {@link InstalledCode} for code installed as an nmethod. The nmethod stores a
* weak reference to an instance of this class. This is necessary to keep the nmethod from being
* unloaded while the associated {@link HotSpotNmethod} instance is alive.
*** 43,80 ****
* associated with nmethods in the code cache.
*/
private final HotSpotResolvedJavaMethod method;
private final boolean isDefault;
- private final boolean isExternal;
public HotSpotNmethod(HotSpotResolvedJavaMethod method, String name, boolean isDefault) {
- this(method, name, isDefault, false);
- }
-
- public HotSpotNmethod(HotSpotResolvedJavaMethod method, String name, boolean isDefault, boolean isExternal) {
super(name);
this.method = method;
this.isDefault = isDefault;
- this.isExternal = isExternal;
}
public boolean isDefault() {
return isDefault;
}
- public boolean isExternal() {
- return isExternal;
- }
-
public ResolvedJavaMethod getMethod() {
return method;
}
@Override
public void invalidate() {
! runtime().getCompilerToVM().invalidateInstalledCode(this);
}
@Override
public String toString() {
return String.format("InstalledNmethod[method=%s, codeBlob=0x%x, isDefault=%b, name=%s]", method, getAddress(), isDefault, name);
--- 45,72 ----
* associated with nmethods in the code cache.
*/
private final HotSpotResolvedJavaMethod method;
private final boolean isDefault;
public HotSpotNmethod(HotSpotResolvedJavaMethod method, String name, boolean isDefault) {
super(name);
this.method = method;
this.isDefault = isDefault;
}
public boolean isDefault() {
return isDefault;
}
public ResolvedJavaMethod getMethod() {
return method;
}
@Override
public void invalidate() {
! compilerToVM().invalidateInstalledCode(this);
}
@Override
public String toString() {
return String.format("InstalledNmethod[method=%s, codeBlob=0x%x, isDefault=%b, name=%s]", method, getAddress(), isDefault, name);
*** 103,114 ****
}
@Override
public Object executeVarargs(Object... args) throws InvalidInstalledCodeException {
assert checkArgs(args);
! assert !isExternal();
! return runtime().getCompilerToVM().executeInstalledCode(args, this);
}
@Override
public long getStart() {
return isValid() ? super.getStart() : 0;
--- 95,105 ----
}
@Override
public Object executeVarargs(Object... args) throws InvalidInstalledCodeException {
assert checkArgs(args);
! return compilerToVM().executeInstalledCode(args, this);
}
@Override
public long getStart() {
return isValid() ? super.getStart() : 0;
< prev index next >