Mercurial > hg > graal-jvmci-8
diff jvmci/jdk.vm.ci.code/src/jdk/vm/ci/code/site/Mark.java @ 23393:1d4ce2d19e52
clean up and minimize JVMCI (JDK-8156835)
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Thu, 12 May 2016 20:57:31 +0200 |
parents | 9273bb6ba33e |
children |
line wrap: on
line diff
--- a/jvmci/jdk.vm.ci.code/src/jdk/vm/ci/code/site/Mark.java Thu May 12 11:06:49 2016 +0200 +++ b/jvmci/jdk.vm.ci.code/src/jdk/vm/ci/code/site/Mark.java Thu May 12 20:57:31 2016 +0200 @@ -25,13 +25,23 @@ import java.util.Objects; /** - * Represents a mark in the machine code that can be used by the runtime for its own purposes. A - * mark can reference other marks. + * Associates arbitrary information with a position in machine code. For example, HotSpot specific + * code in a compiler backend may use this to denote the position of a safepoint, exception handler + * entry point, verified entry point etc. */ public final class Mark extends Site { + /** + * An object denoting extra semantic information about the machine code position of this mark. + */ public final Object id; + /** + * Creates a mark that associates {@code id} with the machine code position {@code pcOffset}. + * + * @param pcOffset + * @param id + */ public Mark(int pcOffset, Object id) { super(pcOffset); this.id = id; @@ -40,7 +50,7 @@ @Override public String toString() { if (id == null) { - return String.format("%d[<mar>]", pcOffset); + return String.format("%d[<mark>]", pcOffset); } else if (id instanceof Integer) { return String.format("%d[<mark with id %s>]", pcOffset, Integer.toHexString((Integer) id)); } else {