Mercurial > hg > graal-jvmci-8
comparison graal/com.oracle.jvmci.code/src/com/oracle/jvmci/code/CodeCacheProvider.java @ 21706:4c00096fc415
moved CodeCacheProvider.disassemble(...) from API to CFGPrinterObserver
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Wed, 03 Jun 2015 16:52:41 +0200 |
parents | 36cf15e3219e |
children |
comparison
equal
deleted
inserted
replaced
21705:729e6acde6c0 | 21706:4c00096fc415 |
---|---|
20 * or visit www.oracle.com if you need additional information or have any | 20 * or visit www.oracle.com if you need additional information or have any |
21 * questions. | 21 * questions. |
22 */ | 22 */ |
23 package com.oracle.jvmci.code; | 23 package com.oracle.jvmci.code; |
24 | 24 |
25 import com.oracle.jvmci.code.CompilationResult.Call; | |
26 import com.oracle.jvmci.code.CompilationResult.DataPatch; | |
27 import com.oracle.jvmci.code.CompilationResult.Mark; | |
28 import com.oracle.jvmci.code.DataSection.Data; | |
25 import com.oracle.jvmci.meta.*; | 29 import com.oracle.jvmci.meta.*; |
26 import com.oracle.jvmci.code.CompilationResult.DataPatch; | |
27 import com.oracle.jvmci.code.DataSection.Data; | |
28 | 30 |
29 /** | 31 /** |
30 * Access to code cache related details and requirements. | 32 * Access to code cache related details and requirements. |
31 */ | 33 */ |
32 public interface CodeCacheProvider { | 34 public interface CodeCacheProvider { |
52 * failed | 54 * failed |
53 */ | 55 */ |
54 InstalledCode setDefaultMethod(ResolvedJavaMethod method, CompilationResult compResult); | 56 InstalledCode setDefaultMethod(ResolvedJavaMethod method, CompilationResult compResult); |
55 | 57 |
56 /** | 58 /** |
57 * Returns a disassembly of some compiled code. | 59 * Gets a name for a {@link Mark} mark. |
58 * | |
59 * @param compResult some compiled code | |
60 * @param installedCode the result of installing the code in {@code compResult} or null if the | |
61 * code has not yet been installed | |
62 * | |
63 * @return a disassembly. This will be of length 0 if the runtime does not support | |
64 * disassembling. | |
65 */ | 60 */ |
66 String disassemble(CompilationResult compResult, InstalledCode installedCode); | 61 default String getMarkName(Mark mark) { |
62 return String.valueOf(mark.id); | |
63 } | |
64 | |
65 /** | |
66 * Gets a name for the {@linkplain Call#target target} of a {@link Call}. | |
67 */ | |
68 default String getTargetName(Call call) { | |
69 return String.valueOf(call.target); | |
70 } | |
67 | 71 |
68 /** | 72 /** |
69 * Gets the register configuration to use when compiling a given method. | 73 * Gets the register configuration to use when compiling a given method. |
70 */ | 74 */ |
71 RegisterConfig getRegisterConfig(); | 75 RegisterConfig getRegisterConfig(); |