--- old/src/jdk.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/InstalledCode.java 2015-11-02 17:05:44.000000000 -1000 +++ new/src/jdk.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/InstalledCode.java 2015-11-02 17:05:44.000000000 -1000 @@ -29,14 +29,19 @@ public class InstalledCode { /** - * Raw address of this code blob. + * Raw address address of entity representing this installed code. */ - private long address; + protected long address; + + /** + * Raw address of entryPoint of this installed code. + */ + protected long entryPoint; /** * Counts how often the address field was reassigned. */ - private long version; + protected long version; protected final String name; @@ -44,27 +49,29 @@ this.name = name; } - public final void setAddress(long address) { - this.address = address; - version++; - } - /** - * @return the address of this code blob + * @return the address of entity representing this installed code. */ public final long getAddress() { return address; } /** - * @return the address of this code blob + * @return the address of the normal entry point of the installed code. + */ + public final long getEntryPoint() { + return entryPoint; + } + + /** + * @return the version number of this installed code */ public final long getVersion() { return version; } /** - * Returns the name of this code blob. + * Returns the name of this installed code. */ public String getName() { return name; @@ -79,31 +86,32 @@ } /** - * Returns the number of instruction bytes for this code. + * @return true if the code represented by this object is still valid for invocation, false + * otherwise (may happen due to deopt, etc.) */ - public long getCodeSize() { - return 0; + public boolean isValid() { + return entryPoint != 0; } /** - * Returns a copy of this installed code if it is {@linkplain #isValid() valid}, null otherwise. + * @return true if the code represented by this object still exists and might have live + * activations, false otherwise (may happen due to deopt, etc.) */ - public byte[] getCode() { - return null; + public boolean isAlive() { + return address != 0; } /** - * @return true if the code represented by this object is still valid, false otherwise (may - * happen due to deopt, etc.) + * Returns a copy of this installed code if it is {@linkplain #isValid() valid}, null otherwise. */ - public boolean isValid() { - return address != 0; + public byte[] getCode() { + return null; } /** * Invalidates this installed code such that any subsequent * {@linkplain #executeVarargs(Object...) invocation} will throw an - * {@link InvalidInstalledCodeException}. + * {@link InvalidInstalledCodeException} and all existing invocations will be deoptimized. */ public void invalidate() { throw new UnsupportedOperationException();