< prev index next >

src/share/vm/ci/ciMethod.hpp

Print this page




  76   bool _uses_monitors;
  77   bool _balanced_monitors;
  78   bool _is_c1_compilable;
  79   bool _is_c2_compilable;
  80   bool _can_be_statically_bound;
  81 
  82   // Lazy fields, filled in on demand
  83   address              _code;
  84   ciExceptionHandler** _exception_handlers;
  85 
  86   // Optional liveness analyzer.
  87   MethodLiveness* _liveness;
  88 #if defined(COMPILER2) || defined(SHARK)
  89   ciTypeFlow*         _flow;
  90   BCEscapeAnalyzer*   _bcea;
  91 #endif
  92 
  93   ciMethod(methodHandle h_m, ciInstanceKlass* holder);
  94   ciMethod(ciInstanceKlass* holder, ciSymbol* name, ciSymbol* signature, ciInstanceKlass* accessor);
  95 
  96   Method* get_Method() const {
  97     Method* m = (Method*)_metadata;
  98     assert(m != NULL, "illegal use of unloaded method");
  99     return m;
 100   }
 101 
 102   oop loader() const                             { return _holder->loader(); }
 103 
 104   const char* type_string()                      { return "ciMethod"; }
 105 
 106   void print_impl(outputStream* st);
 107 
 108   void load_code();
 109 
 110   void check_is_loaded() const                   { assert(is_loaded(), "not loaded"); }
 111 
 112   bool ensure_method_data(methodHandle h_m);
 113 
 114   void code_at_put(int bci, Bytecodes::Code code) {
 115     Bytecodes::check(code);
 116     assert(0 <= bci && bci < code_size(), "valid bci");
 117     address bcp = _code + bci;
 118     *bcp = code;
 119   }
 120 
 121   // Check bytecode and profile data collected are compatible


 139     check_is_loaded();
 140     return _signature->size() + (_flags.is_static() ? 0 : 1);
 141   }
 142   // Report the number of elements on stack when invoking this method.
 143   // This is different than the regular arg_size because invokedynamic
 144   // has an implicit receiver.
 145   int invoke_arg_size(Bytecodes::Code code) const {
 146     if (is_loaded()) {
 147       return arg_size();
 148     } else {
 149       int arg_size = _signature->size();
 150       // Add a receiver argument, maybe:
 151       if (code != Bytecodes::_invokestatic &&
 152           code != Bytecodes::_invokedynamic) {
 153         arg_size++;
 154       }
 155       return arg_size;
 156     }
 157   }
 158 





 159 
 160   // Method code and related information.
 161   address code()                                 { if (_code == NULL) load_code(); return _code; }
 162   int code_size() const                          { check_is_loaded(); return _code_size; }
 163   int max_stack() const                          { check_is_loaded(); return _max_stack; }
 164   int max_locals() const                         { check_is_loaded(); return _max_locals; }
 165   vmIntrinsics::ID intrinsic_id() const          { check_is_loaded(); return _intrinsic_id; }
 166   bool has_exception_handlers() const            { check_is_loaded(); return _handler_count > 0; }
 167   int exception_table_length() const             { check_is_loaded(); return _handler_count; }
 168   int interpreter_invocation_count() const       { check_is_loaded(); return _interpreter_invocation_count; }
 169   int interpreter_throwout_count() const         { check_is_loaded(); return _interpreter_throwout_count; }
 170   int size_of_parameters() const                 { check_is_loaded(); return _size_of_parameters; }
 171 
 172   // Code size for inlining decisions.
 173   int code_size_for_inlining();
 174 
 175   bool caller_sensitive()   const { return get_Method()->caller_sensitive();   }
 176   bool force_inline()       const { return get_Method()->force_inline();       }
 177   bool dont_inline()        const { return get_Method()->dont_inline();        }
 178 




  76   bool _uses_monitors;
  77   bool _balanced_monitors;
  78   bool _is_c1_compilable;
  79   bool _is_c2_compilable;
  80   bool _can_be_statically_bound;
  81 
  82   // Lazy fields, filled in on demand
  83   address              _code;
  84   ciExceptionHandler** _exception_handlers;
  85 
  86   // Optional liveness analyzer.
  87   MethodLiveness* _liveness;
  88 #if defined(COMPILER2) || defined(SHARK)
  89   ciTypeFlow*         _flow;
  90   BCEscapeAnalyzer*   _bcea;
  91 #endif
  92 
  93   ciMethod(methodHandle h_m, ciInstanceKlass* holder);
  94   ciMethod(ciInstanceKlass* holder, ciSymbol* name, ciSymbol* signature, ciInstanceKlass* accessor);
  95 






  96   oop loader() const                             { return _holder->loader(); }
  97 
  98   const char* type_string()                      { return "ciMethod"; }
  99 
 100   void print_impl(outputStream* st);
 101 
 102   void load_code();
 103 
 104   void check_is_loaded() const                   { assert(is_loaded(), "not loaded"); }
 105 
 106   bool ensure_method_data(methodHandle h_m);
 107 
 108   void code_at_put(int bci, Bytecodes::Code code) {
 109     Bytecodes::check(code);
 110     assert(0 <= bci && bci < code_size(), "valid bci");
 111     address bcp = _code + bci;
 112     *bcp = code;
 113   }
 114 
 115   // Check bytecode and profile data collected are compatible


 133     check_is_loaded();
 134     return _signature->size() + (_flags.is_static() ? 0 : 1);
 135   }
 136   // Report the number of elements on stack when invoking this method.
 137   // This is different than the regular arg_size because invokedynamic
 138   // has an implicit receiver.
 139   int invoke_arg_size(Bytecodes::Code code) const {
 140     if (is_loaded()) {
 141       return arg_size();
 142     } else {
 143       int arg_size = _signature->size();
 144       // Add a receiver argument, maybe:
 145       if (code != Bytecodes::_invokestatic &&
 146           code != Bytecodes::_invokedynamic) {
 147         arg_size++;
 148       }
 149       return arg_size;
 150     }
 151   }
 152 
 153   Method* get_Method() const {
 154     Method* m = (Method*)_metadata;
 155     assert(m != NULL, "illegal use of unloaded method");
 156     return m;
 157   }
 158 
 159   // Method code and related information.
 160   address code()                                 { if (_code == NULL) load_code(); return _code; }
 161   int code_size() const                          { check_is_loaded(); return _code_size; }
 162   int max_stack() const                          { check_is_loaded(); return _max_stack; }
 163   int max_locals() const                         { check_is_loaded(); return _max_locals; }
 164   vmIntrinsics::ID intrinsic_id() const          { check_is_loaded(); return _intrinsic_id; }
 165   bool has_exception_handlers() const            { check_is_loaded(); return _handler_count > 0; }
 166   int exception_table_length() const             { check_is_loaded(); return _handler_count; }
 167   int interpreter_invocation_count() const       { check_is_loaded(); return _interpreter_invocation_count; }
 168   int interpreter_throwout_count() const         { check_is_loaded(); return _interpreter_throwout_count; }
 169   int size_of_parameters() const                 { check_is_loaded(); return _size_of_parameters; }
 170 
 171   // Code size for inlining decisions.
 172   int code_size_for_inlining();
 173 
 174   bool caller_sensitive()   const { return get_Method()->caller_sensitive();   }
 175   bool force_inline()       const { return get_Method()->force_inline();       }
 176   bool dont_inline()        const { return get_Method()->dont_inline();        }
 177 


< prev index next >