annotate src/share/vm/code/compiledIC.hpp @ 1972:f95d63e2154a

6989984: Use standard include model for Hospot Summary: Replaced MakeDeps and the includeDB files with more standardized solutions. Reviewed-by: coleenp, kvn, kamg
author stefank
date Tue, 23 Nov 2010 13:22:55 -0800
parents c18cbe5936b8
children b92c45f2bc75
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
a61af66fc99e Initial load
duke
parents:
diff changeset
1 /*
1972
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
2 * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
0
a61af66fc99e Initial load
duke
parents:
diff changeset
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
a61af66fc99e Initial load
duke
parents:
diff changeset
4 *
a61af66fc99e Initial load
duke
parents:
diff changeset
5 * This code is free software; you can redistribute it and/or modify it
a61af66fc99e Initial load
duke
parents:
diff changeset
6 * under the terms of the GNU General Public License version 2 only, as
a61af66fc99e Initial load
duke
parents:
diff changeset
7 * published by the Free Software Foundation.
a61af66fc99e Initial load
duke
parents:
diff changeset
8 *
a61af66fc99e Initial load
duke
parents:
diff changeset
9 * This code is distributed in the hope that it will be useful, but WITHOUT
a61af66fc99e Initial load
duke
parents:
diff changeset
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
a61af66fc99e Initial load
duke
parents:
diff changeset
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
a61af66fc99e Initial load
duke
parents:
diff changeset
12 * version 2 for more details (a copy is included in the LICENSE file that
a61af66fc99e Initial load
duke
parents:
diff changeset
13 * accompanied this code).
a61af66fc99e Initial load
duke
parents:
diff changeset
14 *
a61af66fc99e Initial load
duke
parents:
diff changeset
15 * You should have received a copy of the GNU General Public License version
a61af66fc99e Initial load
duke
parents:
diff changeset
16 * 2 along with this work; if not, write to the Free Software Foundation,
a61af66fc99e Initial load
duke
parents:
diff changeset
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
a61af66fc99e Initial load
duke
parents:
diff changeset
18 *
1552
c18cbe5936b8 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 0
diff changeset
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
c18cbe5936b8 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 0
diff changeset
20 * or visit www.oracle.com if you need additional information or have any
c18cbe5936b8 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 0
diff changeset
21 * questions.
0
a61af66fc99e Initial load
duke
parents:
diff changeset
22 *
a61af66fc99e Initial load
duke
parents:
diff changeset
23 */
a61af66fc99e Initial load
duke
parents:
diff changeset
24
1972
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
25 #ifndef SHARE_VM_CODE_COMPILEDIC_HPP
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
26 #define SHARE_VM_CODE_COMPILEDIC_HPP
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
27
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
28 #include "interpreter/linkResolver.hpp"
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
29 #include "oops/compiledICHolderKlass.hpp"
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
30 #include "oops/compiledICHolderOop.hpp"
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
31 #include "oops/klassOop.hpp"
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
32 #ifdef TARGET_ARCH_x86
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
33 # include "nativeInst_x86.hpp"
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
34 #endif
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
35 #ifdef TARGET_ARCH_sparc
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
36 # include "nativeInst_sparc.hpp"
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
37 #endif
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
38 #ifdef TARGET_ARCH_zero
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
39 # include "nativeInst_zero.hpp"
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
40 #endif
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
41
0
a61af66fc99e Initial load
duke
parents:
diff changeset
42 //-----------------------------------------------------------------------------
a61af66fc99e Initial load
duke
parents:
diff changeset
43 // The CompiledIC represents a compiled inline cache.
a61af66fc99e Initial load
duke
parents:
diff changeset
44 //
a61af66fc99e Initial load
duke
parents:
diff changeset
45 // In order to make patching of the inline cache MT-safe, we only allow the following
a61af66fc99e Initial load
duke
parents:
diff changeset
46 // transitions (when not at a safepoint):
a61af66fc99e Initial load
duke
parents:
diff changeset
47 //
a61af66fc99e Initial load
duke
parents:
diff changeset
48 //
a61af66fc99e Initial load
duke
parents:
diff changeset
49 // [1] --<-- Clean -->--- [1]
a61af66fc99e Initial load
duke
parents:
diff changeset
50 // / (null) \
a61af66fc99e Initial load
duke
parents:
diff changeset
51 // / \ /-<-\
a61af66fc99e Initial load
duke
parents:
diff changeset
52 // / [2] \ / \
a61af66fc99e Initial load
duke
parents:
diff changeset
53 // Interpreted ---------> Monomorphic | [3]
a61af66fc99e Initial load
duke
parents:
diff changeset
54 // (compiledICHolderOop) (klassOop) |
a61af66fc99e Initial load
duke
parents:
diff changeset
55 // \ / \ /
a61af66fc99e Initial load
duke
parents:
diff changeset
56 // [4] \ / [4] \->-/
a61af66fc99e Initial load
duke
parents:
diff changeset
57 // \->- Megamorphic -<-/
a61af66fc99e Initial load
duke
parents:
diff changeset
58 // (methodOop)
a61af66fc99e Initial load
duke
parents:
diff changeset
59 //
a61af66fc99e Initial load
duke
parents:
diff changeset
60 // The text in paranteses () refere to the value of the inline cache receiver (mov instruction)
a61af66fc99e Initial load
duke
parents:
diff changeset
61 //
a61af66fc99e Initial load
duke
parents:
diff changeset
62 // The numbers in square brackets refere to the kind of transition:
a61af66fc99e Initial load
duke
parents:
diff changeset
63 // [1]: Initial fixup. Receiver it found from debug information
a61af66fc99e Initial load
duke
parents:
diff changeset
64 // [2]: Compilation of a method
a61af66fc99e Initial load
duke
parents:
diff changeset
65 // [3]: Recompilation of a method (note: only entry is changed. The klassOop must stay the same)
a61af66fc99e Initial load
duke
parents:
diff changeset
66 // [4]: Inline cache miss. We go directly to megamorphic call.
a61af66fc99e Initial load
duke
parents:
diff changeset
67 //
a61af66fc99e Initial load
duke
parents:
diff changeset
68 // The class automatically inserts transition stubs (using the InlineCacheBuffer) when an MT-unsafe
a61af66fc99e Initial load
duke
parents:
diff changeset
69 // transition is made to a stub.
a61af66fc99e Initial load
duke
parents:
diff changeset
70 //
a61af66fc99e Initial load
duke
parents:
diff changeset
71 class CompiledIC;
a61af66fc99e Initial load
duke
parents:
diff changeset
72
a61af66fc99e Initial load
duke
parents:
diff changeset
73 class CompiledICInfo {
a61af66fc99e Initial load
duke
parents:
diff changeset
74 friend class CompiledIC;
a61af66fc99e Initial load
duke
parents:
diff changeset
75 private:
a61af66fc99e Initial load
duke
parents:
diff changeset
76 address _entry; // entry point for call
a61af66fc99e Initial load
duke
parents:
diff changeset
77 Handle _cached_oop; // Value of cached_oop (either in stub or inline cache)
a61af66fc99e Initial load
duke
parents:
diff changeset
78 bool _is_optimized; // it is an optimized virtual call (i.e., can be statically bound)
a61af66fc99e Initial load
duke
parents:
diff changeset
79 bool _to_interpreter; // Call it to interpreter
a61af66fc99e Initial load
duke
parents:
diff changeset
80 public:
a61af66fc99e Initial load
duke
parents:
diff changeset
81 address entry() const { return _entry; }
a61af66fc99e Initial load
duke
parents:
diff changeset
82 Handle cached_oop() const { return _cached_oop; }
a61af66fc99e Initial load
duke
parents:
diff changeset
83 bool is_optimized() const { return _is_optimized; }
a61af66fc99e Initial load
duke
parents:
diff changeset
84 };
a61af66fc99e Initial load
duke
parents:
diff changeset
85
a61af66fc99e Initial load
duke
parents:
diff changeset
86 class CompiledIC: public ResourceObj {
a61af66fc99e Initial load
duke
parents:
diff changeset
87 friend class InlineCacheBuffer;
a61af66fc99e Initial load
duke
parents:
diff changeset
88 friend class ICStub;
a61af66fc99e Initial load
duke
parents:
diff changeset
89
a61af66fc99e Initial load
duke
parents:
diff changeset
90
a61af66fc99e Initial load
duke
parents:
diff changeset
91 private:
a61af66fc99e Initial load
duke
parents:
diff changeset
92 NativeCall* _ic_call; // the call instruction
a61af66fc99e Initial load
duke
parents:
diff changeset
93 oop* _oop_addr; // patchable oop cell for this IC
a61af66fc99e Initial load
duke
parents:
diff changeset
94 RelocIterator _oops; // iteration over any and all set-oop instructions
a61af66fc99e Initial load
duke
parents:
diff changeset
95 bool _is_optimized; // an optimized virtual call (i.e., no compiled IC)
a61af66fc99e Initial load
duke
parents:
diff changeset
96
a61af66fc99e Initial load
duke
parents:
diff changeset
97 CompiledIC(NativeCall* ic_call);
a61af66fc99e Initial load
duke
parents:
diff changeset
98 CompiledIC(Relocation* ic_reloc); // Must be of virtual_call_type/opt_virtual_call_type
a61af66fc99e Initial load
duke
parents:
diff changeset
99
a61af66fc99e Initial load
duke
parents:
diff changeset
100 // low-level inline-cache manipulation. Cannot be accessed directly, since it might not be MT-safe
a61af66fc99e Initial load
duke
parents:
diff changeset
101 // to change an inline-cache. These changes the underlying inline-cache directly. They *newer* make
a61af66fc99e Initial load
duke
parents:
diff changeset
102 // changes to a transition stub.
a61af66fc99e Initial load
duke
parents:
diff changeset
103 void set_ic_destination(address entry_point);
a61af66fc99e Initial load
duke
parents:
diff changeset
104 void set_cached_oop(oop cache);
a61af66fc99e Initial load
duke
parents:
diff changeset
105
a61af66fc99e Initial load
duke
parents:
diff changeset
106 // Reads the location of the transition stub. This will fail with an assertion, if no transition stub is
a61af66fc99e Initial load
duke
parents:
diff changeset
107 // associated with the inline cache.
a61af66fc99e Initial load
duke
parents:
diff changeset
108 address stub_address() const;
a61af66fc99e Initial load
duke
parents:
diff changeset
109 bool is_in_transition_state() const; // Use InlineCacheBuffer
a61af66fc99e Initial load
duke
parents:
diff changeset
110
a61af66fc99e Initial load
duke
parents:
diff changeset
111 public:
a61af66fc99e Initial load
duke
parents:
diff changeset
112 // conversion (machine PC to CompiledIC*)
a61af66fc99e Initial load
duke
parents:
diff changeset
113 friend CompiledIC* CompiledIC_before(address return_addr);
a61af66fc99e Initial load
duke
parents:
diff changeset
114 friend CompiledIC* CompiledIC_at(address call_site);
a61af66fc99e Initial load
duke
parents:
diff changeset
115 friend CompiledIC* CompiledIC_at(Relocation* call_site);
a61af66fc99e Initial load
duke
parents:
diff changeset
116
a61af66fc99e Initial load
duke
parents:
diff changeset
117 // Return the cached_oop/destination associated with this inline cache. If the cache currently points
a61af66fc99e Initial load
duke
parents:
diff changeset
118 // to a transition stub, it will read the values from the transition stub.
a61af66fc99e Initial load
duke
parents:
diff changeset
119 oop cached_oop() const;
a61af66fc99e Initial load
duke
parents:
diff changeset
120 address ic_destination() const;
a61af66fc99e Initial load
duke
parents:
diff changeset
121
a61af66fc99e Initial load
duke
parents:
diff changeset
122 bool is_optimized() const { return _is_optimized; }
a61af66fc99e Initial load
duke
parents:
diff changeset
123
a61af66fc99e Initial load
duke
parents:
diff changeset
124 // State
a61af66fc99e Initial load
duke
parents:
diff changeset
125 bool is_clean() const;
a61af66fc99e Initial load
duke
parents:
diff changeset
126 bool is_megamorphic() const;
a61af66fc99e Initial load
duke
parents:
diff changeset
127 bool is_call_to_compiled() const;
a61af66fc99e Initial load
duke
parents:
diff changeset
128 bool is_call_to_interpreted() const;
a61af66fc99e Initial load
duke
parents:
diff changeset
129
a61af66fc99e Initial load
duke
parents:
diff changeset
130 address end_of_call() { return _ic_call->return_address(); }
a61af66fc99e Initial load
duke
parents:
diff changeset
131
a61af66fc99e Initial load
duke
parents:
diff changeset
132 // MT-safe patching of inline caches. Note: Only safe to call is_xxx when holding the CompiledIC_ock
a61af66fc99e Initial load
duke
parents:
diff changeset
133 // so you are guaranteed that no patching takes place. The same goes for verify.
a61af66fc99e Initial load
duke
parents:
diff changeset
134 //
a61af66fc99e Initial load
duke
parents:
diff changeset
135 // Note: We do not provide any direct access to the stub code, to prevent parts of the code
a61af66fc99e Initial load
duke
parents:
diff changeset
136 // to manipulate the inline cache in MT-unsafe ways.
a61af66fc99e Initial load
duke
parents:
diff changeset
137 //
a61af66fc99e Initial load
duke
parents:
diff changeset
138 // They all takes a TRAP argument, since they can cause a GC if the inline-cache buffer is full.
a61af66fc99e Initial load
duke
parents:
diff changeset
139 //
a61af66fc99e Initial load
duke
parents:
diff changeset
140 void set_to_clean(); // Can only be called during a safepoint operation
a61af66fc99e Initial load
duke
parents:
diff changeset
141 void set_to_monomorphic(const CompiledICInfo& info);
a61af66fc99e Initial load
duke
parents:
diff changeset
142 void set_to_megamorphic(CallInfo* call_info, Bytecodes::Code bytecode, TRAPS);
a61af66fc99e Initial load
duke
parents:
diff changeset
143
a61af66fc99e Initial load
duke
parents:
diff changeset
144 static void compute_monomorphic_entry(methodHandle method, KlassHandle receiver_klass,
a61af66fc99e Initial load
duke
parents:
diff changeset
145 bool is_optimized, bool static_bound, CompiledICInfo& info, TRAPS);
a61af66fc99e Initial load
duke
parents:
diff changeset
146
a61af66fc99e Initial load
duke
parents:
diff changeset
147 // Location
a61af66fc99e Initial load
duke
parents:
diff changeset
148 address instruction_address() const { return _ic_call->instruction_address(); }
a61af66fc99e Initial load
duke
parents:
diff changeset
149
a61af66fc99e Initial load
duke
parents:
diff changeset
150 // Misc
a61af66fc99e Initial load
duke
parents:
diff changeset
151 void print() PRODUCT_RETURN;
a61af66fc99e Initial load
duke
parents:
diff changeset
152 void print_compiled_ic() PRODUCT_RETURN;
a61af66fc99e Initial load
duke
parents:
diff changeset
153 void verify() PRODUCT_RETURN;
a61af66fc99e Initial load
duke
parents:
diff changeset
154 };
a61af66fc99e Initial load
duke
parents:
diff changeset
155
a61af66fc99e Initial load
duke
parents:
diff changeset
156 inline CompiledIC* CompiledIC_before(address return_addr) {
a61af66fc99e Initial load
duke
parents:
diff changeset
157 CompiledIC* c_ic = new CompiledIC(nativeCall_before(return_addr));
a61af66fc99e Initial load
duke
parents:
diff changeset
158 c_ic->verify();
a61af66fc99e Initial load
duke
parents:
diff changeset
159 return c_ic;
a61af66fc99e Initial load
duke
parents:
diff changeset
160 }
a61af66fc99e Initial load
duke
parents:
diff changeset
161
a61af66fc99e Initial load
duke
parents:
diff changeset
162 inline CompiledIC* CompiledIC_at(address call_site) {
a61af66fc99e Initial load
duke
parents:
diff changeset
163 CompiledIC* c_ic = new CompiledIC(nativeCall_at(call_site));
a61af66fc99e Initial load
duke
parents:
diff changeset
164 c_ic->verify();
a61af66fc99e Initial load
duke
parents:
diff changeset
165 return c_ic;
a61af66fc99e Initial load
duke
parents:
diff changeset
166 }
a61af66fc99e Initial load
duke
parents:
diff changeset
167
a61af66fc99e Initial load
duke
parents:
diff changeset
168 inline CompiledIC* CompiledIC_at(Relocation* call_site) {
a61af66fc99e Initial load
duke
parents:
diff changeset
169 CompiledIC* c_ic = new CompiledIC(call_site);
a61af66fc99e Initial load
duke
parents:
diff changeset
170 c_ic->verify();
a61af66fc99e Initial load
duke
parents:
diff changeset
171 return c_ic;
a61af66fc99e Initial load
duke
parents:
diff changeset
172 }
a61af66fc99e Initial load
duke
parents:
diff changeset
173
a61af66fc99e Initial load
duke
parents:
diff changeset
174
a61af66fc99e Initial load
duke
parents:
diff changeset
175 //-----------------------------------------------------------------------------
a61af66fc99e Initial load
duke
parents:
diff changeset
176 // The CompiledStaticCall represents a call to a static method in the compiled
a61af66fc99e Initial load
duke
parents:
diff changeset
177 //
a61af66fc99e Initial load
duke
parents:
diff changeset
178 // Transition diagram of a static call site is somewhat simpler than for an inlined cache:
a61af66fc99e Initial load
duke
parents:
diff changeset
179 //
a61af66fc99e Initial load
duke
parents:
diff changeset
180 //
a61af66fc99e Initial load
duke
parents:
diff changeset
181 // -----<----- Clean ----->-----
a61af66fc99e Initial load
duke
parents:
diff changeset
182 // / \
a61af66fc99e Initial load
duke
parents:
diff changeset
183 // / \
a61af66fc99e Initial load
duke
parents:
diff changeset
184 // compilled code <------------> interpreted code
a61af66fc99e Initial load
duke
parents:
diff changeset
185 //
a61af66fc99e Initial load
duke
parents:
diff changeset
186 // Clean: Calls directly to runtime method for fixup
a61af66fc99e Initial load
duke
parents:
diff changeset
187 // Compiled code: Calls directly to compiled code
a61af66fc99e Initial load
duke
parents:
diff changeset
188 // Interpreted code: Calls to stub that set methodOop reference
a61af66fc99e Initial load
duke
parents:
diff changeset
189 //
a61af66fc99e Initial load
duke
parents:
diff changeset
190 //
a61af66fc99e Initial load
duke
parents:
diff changeset
191 class CompiledStaticCall;
a61af66fc99e Initial load
duke
parents:
diff changeset
192
a61af66fc99e Initial load
duke
parents:
diff changeset
193 class StaticCallInfo {
a61af66fc99e Initial load
duke
parents:
diff changeset
194 private:
a61af66fc99e Initial load
duke
parents:
diff changeset
195 address _entry; // Entrypoint
a61af66fc99e Initial load
duke
parents:
diff changeset
196 methodHandle _callee; // Callee (used when calling interpreter)
a61af66fc99e Initial load
duke
parents:
diff changeset
197 bool _to_interpreter; // call to interpreted method (otherwise compiled)
a61af66fc99e Initial load
duke
parents:
diff changeset
198
a61af66fc99e Initial load
duke
parents:
diff changeset
199 friend class CompiledStaticCall;
a61af66fc99e Initial load
duke
parents:
diff changeset
200 public:
a61af66fc99e Initial load
duke
parents:
diff changeset
201 address entry() const { return _entry; }
a61af66fc99e Initial load
duke
parents:
diff changeset
202 methodHandle callee() const { return _callee; }
a61af66fc99e Initial load
duke
parents:
diff changeset
203 };
a61af66fc99e Initial load
duke
parents:
diff changeset
204
a61af66fc99e Initial load
duke
parents:
diff changeset
205
a61af66fc99e Initial load
duke
parents:
diff changeset
206 class CompiledStaticCall: public NativeCall {
a61af66fc99e Initial load
duke
parents:
diff changeset
207 friend class CompiledIC;
a61af66fc99e Initial load
duke
parents:
diff changeset
208
a61af66fc99e Initial load
duke
parents:
diff changeset
209 // Also used by CompiledIC
a61af66fc99e Initial load
duke
parents:
diff changeset
210 void set_to_interpreted(methodHandle callee, address entry);
a61af66fc99e Initial load
duke
parents:
diff changeset
211 bool is_optimized_virtual();
a61af66fc99e Initial load
duke
parents:
diff changeset
212
a61af66fc99e Initial load
duke
parents:
diff changeset
213 public:
a61af66fc99e Initial load
duke
parents:
diff changeset
214 friend CompiledStaticCall* compiledStaticCall_before(address return_addr);
a61af66fc99e Initial load
duke
parents:
diff changeset
215 friend CompiledStaticCall* compiledStaticCall_at(address native_call);
a61af66fc99e Initial load
duke
parents:
diff changeset
216 friend CompiledStaticCall* compiledStaticCall_at(Relocation* call_site);
a61af66fc99e Initial load
duke
parents:
diff changeset
217
a61af66fc99e Initial load
duke
parents:
diff changeset
218 // State
a61af66fc99e Initial load
duke
parents:
diff changeset
219 bool is_clean() const;
a61af66fc99e Initial load
duke
parents:
diff changeset
220 bool is_call_to_compiled() const;
a61af66fc99e Initial load
duke
parents:
diff changeset
221 bool is_call_to_interpreted() const;
a61af66fc99e Initial load
duke
parents:
diff changeset
222
a61af66fc99e Initial load
duke
parents:
diff changeset
223 // Clean static call (will force resolving on next use)
a61af66fc99e Initial load
duke
parents:
diff changeset
224 void set_to_clean();
a61af66fc99e Initial load
duke
parents:
diff changeset
225
a61af66fc99e Initial load
duke
parents:
diff changeset
226 // Set state. The entry must be the same, as computed by compute_entry.
a61af66fc99e Initial load
duke
parents:
diff changeset
227 // Computation and setting is split up, since the actions are separate during
a61af66fc99e Initial load
duke
parents:
diff changeset
228 // a OptoRuntime::resolve_xxx.
a61af66fc99e Initial load
duke
parents:
diff changeset
229 void set(const StaticCallInfo& info);
a61af66fc99e Initial load
duke
parents:
diff changeset
230
a61af66fc99e Initial load
duke
parents:
diff changeset
231 // Compute entry point given a method
a61af66fc99e Initial load
duke
parents:
diff changeset
232 static void compute_entry(methodHandle m, StaticCallInfo& info);
a61af66fc99e Initial load
duke
parents:
diff changeset
233
a61af66fc99e Initial load
duke
parents:
diff changeset
234 // Stub support
a61af66fc99e Initial load
duke
parents:
diff changeset
235 address find_stub();
a61af66fc99e Initial load
duke
parents:
diff changeset
236 static void set_stub_to_clean(static_stub_Relocation* static_stub);
a61af66fc99e Initial load
duke
parents:
diff changeset
237
a61af66fc99e Initial load
duke
parents:
diff changeset
238 // Misc.
a61af66fc99e Initial load
duke
parents:
diff changeset
239 void print() PRODUCT_RETURN;
a61af66fc99e Initial load
duke
parents:
diff changeset
240 void verify() PRODUCT_RETURN;
a61af66fc99e Initial load
duke
parents:
diff changeset
241 };
a61af66fc99e Initial load
duke
parents:
diff changeset
242
a61af66fc99e Initial load
duke
parents:
diff changeset
243
a61af66fc99e Initial load
duke
parents:
diff changeset
244 inline CompiledStaticCall* compiledStaticCall_before(address return_addr) {
a61af66fc99e Initial load
duke
parents:
diff changeset
245 CompiledStaticCall* st = (CompiledStaticCall*)nativeCall_before(return_addr);
a61af66fc99e Initial load
duke
parents:
diff changeset
246 st->verify();
a61af66fc99e Initial load
duke
parents:
diff changeset
247 return st;
a61af66fc99e Initial load
duke
parents:
diff changeset
248 }
a61af66fc99e Initial load
duke
parents:
diff changeset
249
a61af66fc99e Initial load
duke
parents:
diff changeset
250 inline CompiledStaticCall* compiledStaticCall_at(address native_call) {
a61af66fc99e Initial load
duke
parents:
diff changeset
251 CompiledStaticCall* st = (CompiledStaticCall*)native_call;
a61af66fc99e Initial load
duke
parents:
diff changeset
252 st->verify();
a61af66fc99e Initial load
duke
parents:
diff changeset
253 return st;
a61af66fc99e Initial load
duke
parents:
diff changeset
254 }
a61af66fc99e Initial load
duke
parents:
diff changeset
255
a61af66fc99e Initial load
duke
parents:
diff changeset
256 inline CompiledStaticCall* compiledStaticCall_at(Relocation* call_site) {
a61af66fc99e Initial load
duke
parents:
diff changeset
257 return compiledStaticCall_at(call_site->addr());
a61af66fc99e Initial load
duke
parents:
diff changeset
258 }
1972
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
259
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
260 #endif // SHARE_VM_CODE_COMPILEDIC_HPP