comparison graal/com.oracle.jvmci.hotspot/src/com/oracle/jvmci/hotspot/HotSpotResolvedJavaMethod.java @ 21551:5324104ac4f3

moved com.oracle.graal.hotspot.jvmci classes to com.oracle.jvmci.hotspot module (JBS:GRAAL-53)
author Doug Simon <doug.simon@oracle.com>
date Tue, 26 May 2015 17:13:37 +0200
parents
children
comparison
equal deleted inserted replaced
21550:f48a6cea31eb 21551:5324104ac4f3
1 /*
2 * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation.
8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 */
23 package com.oracle.jvmci.hotspot;
24
25 import java.lang.reflect.*;
26
27 import com.oracle.graal.api.code.*;
28 import com.oracle.graal.api.meta.*;
29
30 /**
31 * Implementation of {@link JavaMethod} for resolved HotSpot methods.
32 */
33 public interface HotSpotResolvedJavaMethod extends ResolvedJavaMethod {
34
35 /**
36 * Returns true if this method has a {@code CallerSensitive} annotation.
37 *
38 * @return true if CallerSensitive annotation present, false otherwise
39 */
40 boolean isCallerSensitive();
41
42 HotSpotResolvedObjectType getDeclaringClass();
43
44 /**
45 * Returns true if this method has a {@code ForceInline} annotation.
46 *
47 * @return true if ForceInline annotation present, false otherwise
48 */
49 boolean isForceInline();
50
51 /**
52 * Returns true if this method has a {@code DontInline} annotation.
53 *
54 * @return true if DontInline annotation present, false otherwise
55 */
56 boolean isDontInline();
57
58 /**
59 * Manually adds a DontInline annotation to this method.
60 */
61 void setNotInlineable();
62
63 /**
64 * Returns true if this method is one of the special methods that is ignored by security stack
65 * walks.
66 *
67 * @return true if special method ignored by security stack walks, false otherwise
68 */
69 boolean ignoredBySecurityStackWalk();
70
71 boolean hasBalancedMonitors();
72
73 ResolvedJavaMethod uniqueConcreteMethod(HotSpotResolvedObjectType receiver);
74
75 /**
76 * Returns whether this method has compiled code.
77 *
78 * @return true if this method has compiled code, false otherwise
79 */
80 boolean hasCompiledCode();
81
82 /**
83 * @param level
84 * @return true if the currently installed code was generated at {@code level}.
85 */
86 boolean hasCompiledCodeAtLevel(int level);
87
88 ProfilingInfo getCompilationProfilingInfo(boolean isOSR);
89
90 default boolean isDefault() {
91 if (isConstructor()) {
92 return false;
93 }
94 // Copied from java.lang.Method.isDefault()
95 int mask = Modifier.ABSTRACT | Modifier.PUBLIC | Modifier.STATIC;
96 return ((getModifiers() & mask) == Modifier.PUBLIC) && getDeclaringClass().isInterface();
97 }
98
99 /**
100 * Returns the offset of this method into the v-table. The method must have a v-table entry as
101 * indicated by {@link #isInVirtualMethodTable(ResolvedJavaType)}, otherwise an exception is
102 * thrown.
103 *
104 * @return the offset of this method into the v-table
105 */
106 int vtableEntryOffset(ResolvedJavaType resolved);
107
108 int intrinsicId();
109
110 /**
111 * Allocates a compile id for this method by asking the VM for one.
112 *
113 * @param entryBCI entry bci
114 * @return compile id
115 */
116 int allocateCompileId(int entryBCI);
117
118 boolean hasCodeAtLevel(int entryBCI, int level);
119
120 SpeculationLog getSpeculationLog();
121 }