1.1 --- a/src/share/vm/opto/callGenerator.hpp Mon Jul 23 13:04:59 2012 -0700 1.2 +++ b/src/share/vm/opto/callGenerator.hpp Tue Jul 24 10:51:00 2012 -0700 1.3 @@ -25,6 +25,7 @@ 1.4 #ifndef SHARE_VM_OPTO_CALLGENERATOR_HPP 1.5 #define SHARE_VM_OPTO_CALLGENERATOR_HPP 1.6 1.7 +#include "compiler/compileBroker.hpp" 1.8 #include "opto/callnode.hpp" 1.9 #include "opto/compile.hpp" 1.10 #include "opto/type.hpp" 1.11 @@ -44,7 +45,7 @@ 1.12 ciMethod* _method; // The method being called. 1.13 1.14 protected: 1.15 - CallGenerator(ciMethod* method); 1.16 + CallGenerator(ciMethod* method) : _method(method) {} 1.17 1.18 public: 1.19 // Accessors 1.20 @@ -111,11 +112,8 @@ 1.21 static CallGenerator* for_virtual_call(ciMethod* m, int vtable_index); // virtual, interface 1.22 static CallGenerator* for_dynamic_call(ciMethod* m); // invokedynamic 1.23 1.24 - static CallGenerator* for_method_handle_call(Node* method_handle, JVMState* jvms, ciMethod* caller, ciMethod* callee, ciCallProfile profile); 1.25 - static CallGenerator* for_invokedynamic_call( JVMState* jvms, ciMethod* caller, ciMethod* callee, ciCallProfile profile); 1.26 - 1.27 - static CallGenerator* for_method_handle_inline(Node* method_handle, JVMState* jvms, ciMethod* caller, ciMethod* callee, ciCallProfile profile); 1.28 - static CallGenerator* for_invokedynamic_inline(ciCallSite* call_site, JVMState* jvms, ciMethod* caller, ciMethod* callee, ciCallProfile profile); 1.29 + static CallGenerator* for_method_handle_call( JVMState* jvms, ciMethod* caller, ciMethod* callee); 1.30 + static CallGenerator* for_method_handle_inline(JVMState* jvms, ciMethod* caller, ciMethod* callee); 1.31 1.32 // How to generate a replace a direct call with an inline version 1.33 static CallGenerator* for_late_inline(ciMethod* m, CallGenerator* inline_cg); 1.34 @@ -145,13 +143,21 @@ 1.35 // Registry for intrinsics: 1.36 static CallGenerator* for_intrinsic(ciMethod* m); 1.37 static void register_intrinsic(ciMethod* m, CallGenerator* cg); 1.38 + 1.39 + static void print_inlining(ciMethod* callee, int inline_level, int bci, const char* msg) { 1.40 + if (PrintInlining) 1.41 + CompileTask::print_inlining(callee, inline_level, bci, msg); 1.42 + } 1.43 }; 1.44 1.45 + 1.46 +//------------------------InlineCallGenerator---------------------------------- 1.47 class InlineCallGenerator : public CallGenerator { 1.48 + protected: 1.49 + InlineCallGenerator(ciMethod* method) : CallGenerator(method) {} 1.50 + 1.51 + public: 1.52 virtual bool is_inline() const { return true; } 1.53 - 1.54 - protected: 1.55 - InlineCallGenerator(ciMethod* method) : CallGenerator(method) { } 1.56 }; 1.57 1.58