src/hotspot/share/ci/ciMethod.cpp
changeset 53595 8462b295c08b
parent 53582 881c5fbeb849
child 54721 3661ad97da8f
equal deleted inserted replaced
53594:47a8fdf84424 53595:8462b295c08b
    88   _balanced_monitors  = !_uses_monitors || h_m()->access_flags().is_monitor_matching();
    88   _balanced_monitors  = !_uses_monitors || h_m()->access_flags().is_monitor_matching();
    89   _is_c1_compilable   = !h_m()->is_not_c1_compilable();
    89   _is_c1_compilable   = !h_m()->is_not_c1_compilable();
    90   _is_c2_compilable   = !h_m()->is_not_c2_compilable();
    90   _is_c2_compilable   = !h_m()->is_not_c2_compilable();
    91   _can_be_parsed      = true;
    91   _can_be_parsed      = true;
    92   _has_reserved_stack_access = h_m()->has_reserved_stack_access();
    92   _has_reserved_stack_access = h_m()->has_reserved_stack_access();
       
    93   _is_overpass        = h_m()->is_overpass();
    93   // Lazy fields, filled in on demand.  Require allocation.
    94   // Lazy fields, filled in on demand.  Require allocation.
    94   _code               = NULL;
    95   _code               = NULL;
    95   _exception_handlers = NULL;
    96   _exception_handlers = NULL;
    96   _liveness           = NULL;
    97   _liveness           = NULL;
    97   _method_blocks = NULL;
    98   _method_blocks = NULL;
   717   if (!UseCHA)  return NULL;
   718   if (!UseCHA)  return NULL;
   718 
   719 
   719   VM_ENTRY_MARK;
   720   VM_ENTRY_MARK;
   720 
   721 
   721   // Disable CHA for default methods for now
   722   // Disable CHA for default methods for now
   722   if (root_m->get_Method()->is_default_method()) {
   723   if (root_m->is_default_method()) {
   723     return NULL;
   724     return NULL;
   724   }
   725   }
   725 
   726 
   726   methodHandle target;
   727   methodHandle target;
   727   {
   728   {
   757     // methods in other packages.
   758     // methods in other packages.
   758     // %%% TO DO: Work out logic for package-private methods
   759     // %%% TO DO: Work out logic for package-private methods
   759     // with the same name but different vtable indexes.
   760     // with the same name but different vtable indexes.
   760     return NULL;
   761     return NULL;
   761   }
   762   }
       
   763   assert(!target()->is_abstract(), "not allowed");
   762   return CURRENT_THREAD_ENV->get_method(target());
   764   return CURRENT_THREAD_ENV->get_method(target());
   763 }
   765 }
   764 
   766 
   765 // ------------------------------------------------------------------
   767 // ------------------------------------------------------------------
   766 // ciMethod::resolve_invoke
   768 // ciMethod::resolve_invoke
   870 ciMethod* ciMethod::get_method_at_bci(int bci, bool &will_link, ciSignature* *declared_signature) {
   872 ciMethod* ciMethod::get_method_at_bci(int bci, bool &will_link, ciSignature* *declared_signature) {
   871   ciBytecodeStream iter(this);
   873   ciBytecodeStream iter(this);
   872   iter.reset_to_bci(bci);
   874   iter.reset_to_bci(bci);
   873   iter.next();
   875   iter.next();
   874   return iter.get_method(will_link, declared_signature);
   876   return iter.get_method(will_link, declared_signature);
       
   877 }
       
   878 
       
   879 // ------------------------------------------------------------------
       
   880 ciKlass* ciMethod::get_declared_method_holder_at_bci(int bci) {
       
   881   ciBytecodeStream iter(this);
       
   882   iter.reset_to_bci(bci);
       
   883   iter.next();
       
   884   return iter.get_declared_method_holder();
   875 }
   885 }
   876 
   886 
   877 // ------------------------------------------------------------------
   887 // ------------------------------------------------------------------
   878 // Adjust a CounterData count to be commensurate with
   888 // Adjust a CounterData count to be commensurate with
   879 // interpreter_invocation_count.  If the MDO exists for
   889 // interpreter_invocation_count.  If the MDO exists for