59 #include "oops/method.hpp" 60 #endif 61 62 // ciMethod 63 // 64 // This class represents a Method* in the HotSpot virtual 65 // machine. 66 67 68 // ------------------------------------------------------------------ 69 // ciMethod::ciMethod 70 // 71 // Loaded method. 72 ciMethod::ciMethod(methodHandle h_m, ciInstanceKlass* holder) : 73 ciMetadata(h_m()), 74 _holder(holder), 75 _has_injected_profile(false) 76 { 77 assert(h_m() != NULL, "no null method"); 78 79 // These fields are always filled in in loaded methods. 80 _flags = ciFlags(h_m()->access_flags()); 81 82 // Easy to compute, so fill them in now. 83 _max_stack = h_m()->max_stack(); 84 _max_locals = h_m()->max_locals(); 85 _code_size = h_m()->code_size(); 86 _intrinsic_id = h_m()->intrinsic_id(); 87 _handler_count = h_m()->exception_table_length(); 88 _size_of_parameters = h_m()->size_of_parameters(); 89 _uses_monitors = h_m()->access_flags().has_monitor_bytecodes(); 90 _balanced_monitors = !_uses_monitors || h_m()->access_flags().is_monitor_matching(); 91 _is_c1_compilable = !h_m()->is_not_c1_compilable(); 92 _is_c2_compilable = !h_m()->is_not_c2_compilable(); 93 // Lazy fields, filled in on demand. Require allocation. 94 _code = NULL; 95 _exception_handlers = NULL; 96 _liveness = NULL; 97 _method_blocks = NULL; 98 #if defined(COMPILER2) || defined(SHARK) | 59 #include "oops/method.hpp" 60 #endif 61 62 // ciMethod 63 // 64 // This class represents a Method* in the HotSpot virtual 65 // machine. 66 67 68 // ------------------------------------------------------------------ 69 // ciMethod::ciMethod 70 // 71 // Loaded method. 72 ciMethod::ciMethod(methodHandle h_m, ciInstanceKlass* holder) : 73 ciMetadata(h_m()), 74 _holder(holder), 75 _has_injected_profile(false) 76 { 77 assert(h_m() != NULL, "no null method"); 78 79 if (TraceMethodUsage) { 80 h_m()->trace_usage(Thread::current()); 81 } 82 83 // These fields are always filled in in loaded methods. 84 _flags = ciFlags(h_m()->access_flags()); 85 86 // Easy to compute, so fill them in now. 87 _max_stack = h_m()->max_stack(); 88 _max_locals = h_m()->max_locals(); 89 _code_size = h_m()->code_size(); 90 _intrinsic_id = h_m()->intrinsic_id(); 91 _handler_count = h_m()->exception_table_length(); 92 _size_of_parameters = h_m()->size_of_parameters(); 93 _uses_monitors = h_m()->access_flags().has_monitor_bytecodes(); 94 _balanced_monitors = !_uses_monitors || h_m()->access_flags().is_monitor_matching(); 95 _is_c1_compilable = !h_m()->is_not_c1_compilable(); 96 _is_c2_compilable = !h_m()->is_not_c2_compilable(); 97 // Lazy fields, filled in on demand. Require allocation. 98 _code = NULL; 99 _exception_handlers = NULL; 100 _liveness = NULL; 101 _method_blocks = NULL; 102 #if defined(COMPILER2) || defined(SHARK) |