Mercurial > hg > truffle
comparison src/share/vm/opto/callGenerator.hpp @ 6275:957c266d8bc5
Merge with http://hg.openjdk.java.net/hsx/hsx24/hotspot/
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Tue, 21 Aug 2012 10:39:19 +0200 |
parents | 716a2c5c0656 1d7922586cf6 |
children | e522a00b91aa |
comparison
equal
deleted
inserted
replaced
5891:fd8832ae511d | 6275:957c266d8bc5 |
---|---|
23 */ | 23 */ |
24 | 24 |
25 #ifndef SHARE_VM_OPTO_CALLGENERATOR_HPP | 25 #ifndef SHARE_VM_OPTO_CALLGENERATOR_HPP |
26 #define SHARE_VM_OPTO_CALLGENERATOR_HPP | 26 #define SHARE_VM_OPTO_CALLGENERATOR_HPP |
27 | 27 |
28 #include "compiler/compileBroker.hpp" | |
28 #include "opto/callnode.hpp" | 29 #include "opto/callnode.hpp" |
29 #include "opto/compile.hpp" | 30 #include "opto/compile.hpp" |
30 #include "opto/type.hpp" | 31 #include "opto/type.hpp" |
31 #include "runtime/deoptimization.hpp" | 32 #include "runtime/deoptimization.hpp" |
32 | 33 |
42 | 43 |
43 private: | 44 private: |
44 ciMethod* _method; // The method being called. | 45 ciMethod* _method; // The method being called. |
45 | 46 |
46 protected: | 47 protected: |
47 CallGenerator(ciMethod* method); | 48 CallGenerator(ciMethod* method) : _method(method) {} |
48 | 49 |
49 public: | 50 public: |
50 // Accessors | 51 // Accessors |
51 ciMethod* method() const { return _method; } | 52 ciMethod* method() const { return _method; } |
52 | 53 |
109 // How to generate vanilla out-of-line call sites: | 110 // How to generate vanilla out-of-line call sites: |
110 static CallGenerator* for_direct_call(ciMethod* m, bool separate_io_projs = false); // static, special | 111 static CallGenerator* for_direct_call(ciMethod* m, bool separate_io_projs = false); // static, special |
111 static CallGenerator* for_virtual_call(ciMethod* m, int vtable_index); // virtual, interface | 112 static CallGenerator* for_virtual_call(ciMethod* m, int vtable_index); // virtual, interface |
112 static CallGenerator* for_dynamic_call(ciMethod* m); // invokedynamic | 113 static CallGenerator* for_dynamic_call(ciMethod* m); // invokedynamic |
113 | 114 |
114 static CallGenerator* for_method_handle_call(Node* method_handle, JVMState* jvms, ciMethod* caller, ciMethod* callee, ciCallProfile profile); | 115 static CallGenerator* for_method_handle_call( JVMState* jvms, ciMethod* caller, ciMethod* callee); |
115 static CallGenerator* for_invokedynamic_call( JVMState* jvms, ciMethod* caller, ciMethod* callee, ciCallProfile profile); | 116 static CallGenerator* for_method_handle_inline(JVMState* jvms, ciMethod* caller, ciMethod* callee); |
116 | |
117 static CallGenerator* for_method_handle_inline(Node* method_handle, JVMState* jvms, ciMethod* caller, ciMethod* callee, ciCallProfile profile); | |
118 static CallGenerator* for_invokedynamic_inline(ciCallSite* call_site, JVMState* jvms, ciMethod* caller, ciMethod* callee, ciCallProfile profile); | |
119 | 117 |
120 // How to generate a replace a direct call with an inline version | 118 // How to generate a replace a direct call with an inline version |
121 static CallGenerator* for_late_inline(ciMethod* m, CallGenerator* inline_cg); | 119 static CallGenerator* for_late_inline(ciMethod* m, CallGenerator* inline_cg); |
122 | 120 |
123 // How to make a call but defer the decision whether to inline or not. | 121 // How to make a call but defer the decision whether to inline or not. |
143 Deoptimization::DeoptAction action); | 141 Deoptimization::DeoptAction action); |
144 | 142 |
145 // Registry for intrinsics: | 143 // Registry for intrinsics: |
146 static CallGenerator* for_intrinsic(ciMethod* m); | 144 static CallGenerator* for_intrinsic(ciMethod* m); |
147 static void register_intrinsic(ciMethod* m, CallGenerator* cg); | 145 static void register_intrinsic(ciMethod* m, CallGenerator* cg); |
146 | |
147 static void print_inlining(ciMethod* callee, int inline_level, int bci, const char* msg) { | |
148 if (PrintInlining) | |
149 CompileTask::print_inlining(callee, inline_level, bci, msg); | |
150 } | |
148 }; | 151 }; |
149 | 152 |
153 | |
154 //------------------------InlineCallGenerator---------------------------------- | |
150 class InlineCallGenerator : public CallGenerator { | 155 class InlineCallGenerator : public CallGenerator { |
156 protected: | |
157 InlineCallGenerator(ciMethod* method) : CallGenerator(method) {} | |
158 | |
159 public: | |
151 virtual bool is_inline() const { return true; } | 160 virtual bool is_inline() const { return true; } |
152 | |
153 protected: | |
154 InlineCallGenerator(ciMethod* method) : CallGenerator(method) { } | |
155 }; | 161 }; |
156 | 162 |
157 | 163 |
158 //---------------------------WarmCallInfo-------------------------------------- | 164 //---------------------------WarmCallInfo-------------------------------------- |
159 // A struct to collect information about a given call site. | 165 // A struct to collect information about a given call site. |