Mercurial > hg > graal-jvmci-8
diff jvmci/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotCompiledNmethod.java @ 22773:9273bb6ba33e
Simplify code installation interface: Use CompiledCode class instead of CompilationResult and DataSection.
author | Roland Schatz <roland.schatz@oracle.com> |
---|---|
date | Fri, 15 Jan 2016 16:50:19 +0100 |
parents | 1bbd4a7c274b |
children | 5d06abd6d35b |
line wrap: on
line diff
--- a/jvmci/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotCompiledNmethod.java Fri Jan 15 15:51:01 2016 +0100 +++ b/jvmci/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotCompiledNmethod.java Fri Jan 15 16:50:19 2016 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -22,28 +22,31 @@ */ package jdk.vm.ci.hotspot; -import jdk.vm.ci.code.CompilationResult; +import jdk.vm.ci.code.site.DataPatch; +import jdk.vm.ci.code.site.Site; import jdk.vm.ci.inittimer.SuppressFBWarnings; +import jdk.vm.ci.meta.Assumptions.Assumption; +import jdk.vm.ci.meta.ResolvedJavaMethod; /** * {@link HotSpotCompiledCode} destined for installation as an nmethod. */ public final class HotSpotCompiledNmethod extends HotSpotCompiledCode { - public final HotSpotResolvedJavaMethod method; - public final int entryBCI; + protected final HotSpotResolvedJavaMethod method; + protected final int entryBCI; /** * Compilation identifier. */ - public final int id; + protected final int id; /** * Address of a native {@code JVMCIEnv} object or 0L if no such object exists. */ - public final long jvmciEnv; + protected final long jvmciEnv; - public final boolean hasUnsafeAccess; + protected final boolean hasUnsafeAccess; /** * May be set by VM if code installation fails. It will describe in more detail why installation @@ -51,13 +54,15 @@ */ @SuppressFBWarnings(value = "UWF_UNWRITTEN_FIELD", justification = "set by the VM") private String installationFailureMessage; - public HotSpotCompiledNmethod(HotSpotResolvedJavaMethod method, CompilationResult compResult, int id, long jvmciEnv) { - super(compResult); + public HotSpotCompiledNmethod(String name, byte[] targetCode, int targetCodeSize, Site[] sites, Assumption[] assumptions, ResolvedJavaMethod[] methods, Comment[] comments, byte[] dataSection, + int dataSectionAlignment, DataPatch[] dataSectionPatches, int totalFrameSize, int customStackAreaOffset, HotSpotResolvedJavaMethod method, int entryBCI, int id, long jvmciEnv, + boolean hasUnsafeAccess) { + super(name, targetCode, targetCodeSize, sites, assumptions, methods, comments, dataSection, dataSectionAlignment, dataSectionPatches, totalFrameSize, customStackAreaOffset); this.method = method; - this.entryBCI = compResult.getEntryBCI(); + this.entryBCI = entryBCI; this.id = id; this.jvmciEnv = jvmciEnv; - this.hasUnsafeAccess = compResult.hasUnsafeAccess(); + this.hasUnsafeAccess = hasUnsafeAccess; } @Override