Mercurial > hg > graal-compiler
comparison graal/com.oracle.jvmci.hotspot/src/com/oracle/jvmci/hotspot/HotSpotMethod.java @ 21780:3d15183f3c93
Introduce Compiler interface in jvmci. Use it from jvmci.hotspot.CompilationTask
author | Gilles Duboscq <gilles.m.duboscq@oracle.com> |
---|---|
date | Wed, 03 Jun 2015 15:47:54 +0200 |
parents | f5b549811bac |
children |
comparison
equal
deleted
inserted
replaced
21779:20ace3139510 | 21780:3d15183f3c93 |
---|---|
25 import static com.oracle.jvmci.debug.Debug.*; | 25 import static com.oracle.jvmci.debug.Debug.*; |
26 import static java.util.FormattableFlags.*; | 26 import static java.util.FormattableFlags.*; |
27 | 27 |
28 import java.util.*; | 28 import java.util.*; |
29 | 29 |
30 import com.oracle.jvmci.debug.*; | |
30 import com.oracle.jvmci.meta.*; | 31 import com.oracle.jvmci.meta.*; |
31 | 32 |
32 public abstract class HotSpotMethod implements JavaMethod, Formattable { | 33 public abstract class HotSpotMethod implements JavaMethod, Formattable, JavaMethodContex { |
33 | 34 |
34 protected String name; | 35 protected String name; |
35 | 36 |
36 /** | 37 /** |
37 * Controls whether {@link #toString()} includes the qualified or simple name of the class in | 38 * Controls whether {@link #toString()} includes the qualified or simple name of the class in |
58 | 59 |
59 public void formatTo(Formatter formatter, int flags, int width, int precision) { | 60 public void formatTo(Formatter formatter, int flags, int width, int precision) { |
60 String base = (flags & ALTERNATE) == ALTERNATE ? getName() : toString(); | 61 String base = (flags & ALTERNATE) == ALTERNATE ? getName() : toString(); |
61 formatter.format(applyFormattingFlagsAndWidth(base, flags & ~ALTERNATE, width)); | 62 formatter.format(applyFormattingFlagsAndWidth(base, flags & ~ALTERNATE, width)); |
62 } | 63 } |
64 | |
65 public JavaMethod asJavaMethod() { | |
66 return this; | |
67 } | |
63 } | 68 } |