--- old/src/jdk.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/site/Mark.java 2016-05-18 23:01:51.000000000 +0200 +++ new/src/jdk.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/site/Mark.java 2016-05-18 23:01:51.000000000 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 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 @@ -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[]", pcOffset); + return String.format("%d[]", pcOffset); } else if (id instanceof Integer) { return String.format("%d[]", pcOffset, Integer.toHexString((Integer) id)); } else {