< prev index next >

src/hotspot/share/ci/ciEnv.hpp

Print this page




 116   // The CI treats a klass as loaded if it is consistently defined in
 117   // another loader, even if it hasn't yet been loaded in all loaders
 118   // that could potentially see it via delegation.
 119   ciKlass* get_klass_by_name(ciKlass* accessing_klass,
 120                              ciSymbol* klass_name,
 121                              bool require_local);
 122 
 123   // Constant pool access.
 124   ciKlass*   get_klass_by_index(const constantPoolHandle& cpool,
 125                                 int klass_index,
 126                                 bool& is_accessible,
 127                                 ciInstanceKlass* loading_klass);
 128   ciConstant get_constant_by_index(const constantPoolHandle& cpool,
 129                                    int pool_index, int cache_index,
 130                                    ciInstanceKlass* accessor);
 131   ciField*   get_field_by_index(ciInstanceKlass* loading_klass,
 132                                 int field_index);
 133   ciMethod*  get_method_by_index(const constantPoolHandle& cpool,
 134                                  int method_index, Bytecodes::Code bc,
 135                                  ciInstanceKlass* loading_klass);


 136 
 137   // Implementation methods for loading and constant pool access.
 138   ciKlass* get_klass_by_name_impl(ciKlass* accessing_klass,
 139                                   const constantPoolHandle& cpool,
 140                                   ciSymbol* klass_name,
 141                                   bool require_local);
 142   ciKlass*   get_klass_by_index_impl(const constantPoolHandle& cpool,
 143                                      int klass_index,
 144                                      bool& is_accessible,
 145                                      ciInstanceKlass* loading_klass);
 146   ciConstant get_constant_by_index_impl(const constantPoolHandle& cpool,
 147                                         int pool_index, int cache_index,
 148                                         ciInstanceKlass* loading_klass);
 149   ciField*   get_field_by_index_impl(ciInstanceKlass* loading_klass,
 150                                      int field_index);
 151   ciMethod*  get_method_by_index_impl(const constantPoolHandle& cpool,
 152                                       int method_index, Bytecodes::Code bc,
 153                                       ciInstanceKlass* loading_klass);


 154 
 155   // Helper methods
 156   bool       check_klass_accessibility(ciKlass* accessing_klass,
 157                                       Klass* resolved_klass);
 158   Method*    lookup_method(ciInstanceKlass* accessor,
 159                            ciKlass*         holder,
 160                            Symbol*          name,
 161                            Symbol*          sig,
 162                            Bytecodes::Code  bc,
 163                            constantTag      tag);
 164 
 165   // Get a ciObject from the object factory.  Ensures uniqueness
 166   // of ciObjects.
 167   ciObject* get_object(oop o) {
 168     if (o == NULL) {
 169       return _null_object_instance;
 170     } else {
 171       return _factory->get(o);
 172     }
 173   }


 180       return _factory->get_symbol(o);
 181     }
 182   }
 183 
 184   ciMetadata* get_metadata(Metadata* o) {
 185     if (o == NULL) {
 186       return NULL;
 187     } else {
 188       return _factory->get_metadata(o);
 189     }
 190   }
 191 
 192   ciMetadata* cached_metadata(Metadata* o) {
 193     return _factory->cached_metadata(o);
 194   }
 195 
 196   ciInstance* get_instance(oop o) {
 197     if (o == NULL) return NULL;
 198     return get_object(o)->as_instance();
 199   }




 200   ciObjArrayKlass* get_obj_array_klass(Klass* o) {
 201     if (o == NULL) return NULL;
 202     return get_metadata(o)->as_obj_array_klass();
 203   }
 204   ciTypeArrayKlass* get_type_array_klass(Klass* o) {
 205     if (o == NULL) return NULL;
 206     return get_metadata(o)->as_type_array_klass();
 207   }
 208   ciKlass* get_klass(Klass* o) {
 209     if (o == NULL) return NULL;
 210     return get_metadata(o)->as_klass();
 211   }
 212   ciInstanceKlass* get_instance_klass(Klass* o) {
 213     if (o == NULL) return NULL;
 214     return get_metadata(o)->as_instance_klass();
 215   }
 216   ciMethod* get_method(Method* o) {
 217     if (o == NULL) return NULL;
 218     return get_metadata(o)->as_method();
 219   }


 456   CompileLog* log() { return _log; }
 457   void set_log(CompileLog* log) { _log = log; }
 458 
 459   // Check for changes to the system dictionary during compilation
 460   bool system_dictionary_modification_counter_changed();
 461 
 462   void record_failure(const char* reason);      // Record failure and report later
 463   void report_failure(const char* reason);      // Report failure immediately
 464   void record_method_not_compilable(const char* reason, bool all_tiers = true);
 465   void record_out_of_memory_failure();
 466 
 467   // RedefineClasses support
 468   void metadata_do(void f(Metadata*)) { _factory->metadata_do(f); }
 469 
 470   // Dump the compilation replay data for the ciEnv to the stream.
 471   void dump_replay_data(int compile_id);
 472   void dump_inline_data(int compile_id);
 473   void dump_replay_data(outputStream* out);
 474   void dump_replay_data_unsafe(outputStream* out);
 475   void dump_compile_data(outputStream* out);




 476 };
 477 
 478 #endif // SHARE_CI_CIENV_HPP


 116   // The CI treats a klass as loaded if it is consistently defined in
 117   // another loader, even if it hasn't yet been loaded in all loaders
 118   // that could potentially see it via delegation.
 119   ciKlass* get_klass_by_name(ciKlass* accessing_klass,
 120                              ciSymbol* klass_name,
 121                              bool require_local);
 122 
 123   // Constant pool access.
 124   ciKlass*   get_klass_by_index(const constantPoolHandle& cpool,
 125                                 int klass_index,
 126                                 bool& is_accessible,
 127                                 ciInstanceKlass* loading_klass);
 128   ciConstant get_constant_by_index(const constantPoolHandle& cpool,
 129                                    int pool_index, int cache_index,
 130                                    ciInstanceKlass* accessor);
 131   ciField*   get_field_by_index(ciInstanceKlass* loading_klass,
 132                                 int field_index);
 133   ciMethod*  get_method_by_index(const constantPoolHandle& cpool,
 134                                  int method_index, Bytecodes::Code bc,
 135                                  ciInstanceKlass* loading_klass);
 136   bool       is_klass_never_null(const constantPoolHandle& cpool,
 137                                  int klass_index);
 138 
 139   // Implementation methods for loading and constant pool access.
 140   ciKlass* get_klass_by_name_impl(ciKlass* accessing_klass,
 141                                   const constantPoolHandle& cpool,
 142                                   ciSymbol* klass_name,
 143                                   bool require_local);
 144   ciKlass*   get_klass_by_index_impl(const constantPoolHandle& cpool,
 145                                      int klass_index,
 146                                      bool& is_accessible,
 147                                      ciInstanceKlass* loading_klass);
 148   ciConstant get_constant_by_index_impl(const constantPoolHandle& cpool,
 149                                         int pool_index, int cache_index,
 150                                         ciInstanceKlass* loading_klass);
 151   ciField*   get_field_by_index_impl(ciInstanceKlass* loading_klass,
 152                                      int field_index);
 153   ciMethod*  get_method_by_index_impl(const constantPoolHandle& cpool,
 154                                       int method_index, Bytecodes::Code bc,
 155                                       ciInstanceKlass* loading_klass);
 156   bool       is_klass_never_null_impl(const constantPoolHandle& cpool,
 157                                       int klass_index);
 158 
 159   // Helper methods
 160   bool       check_klass_accessibility(ciKlass* accessing_klass,
 161                                       Klass* resolved_klass);
 162   Method*    lookup_method(ciInstanceKlass* accessor,
 163                            ciKlass*         holder,
 164                            Symbol*          name,
 165                            Symbol*          sig,
 166                            Bytecodes::Code  bc,
 167                            constantTag      tag);
 168 
 169   // Get a ciObject from the object factory.  Ensures uniqueness
 170   // of ciObjects.
 171   ciObject* get_object(oop o) {
 172     if (o == NULL) {
 173       return _null_object_instance;
 174     } else {
 175       return _factory->get(o);
 176     }
 177   }


 184       return _factory->get_symbol(o);
 185     }
 186   }
 187 
 188   ciMetadata* get_metadata(Metadata* o) {
 189     if (o == NULL) {
 190       return NULL;
 191     } else {
 192       return _factory->get_metadata(o);
 193     }
 194   }
 195 
 196   ciMetadata* cached_metadata(Metadata* o) {
 197     return _factory->cached_metadata(o);
 198   }
 199 
 200   ciInstance* get_instance(oop o) {
 201     if (o == NULL) return NULL;
 202     return get_object(o)->as_instance();
 203   }
 204   ciValueArrayKlass* get_value_array_klass(Klass* o) {
 205     if (o == NULL) return NULL;
 206     return get_metadata(o)->as_value_array_klass();
 207   }
 208   ciObjArrayKlass* get_obj_array_klass(Klass* o) {
 209     if (o == NULL) return NULL;
 210     return get_metadata(o)->as_obj_array_klass();
 211   }
 212   ciTypeArrayKlass* get_type_array_klass(Klass* o) {
 213     if (o == NULL) return NULL;
 214     return get_metadata(o)->as_type_array_klass();
 215   }
 216   ciKlass* get_klass(Klass* o) {
 217     if (o == NULL) return NULL;
 218     return get_metadata(o)->as_klass();
 219   }
 220   ciInstanceKlass* get_instance_klass(Klass* o) {
 221     if (o == NULL) return NULL;
 222     return get_metadata(o)->as_instance_klass();
 223   }
 224   ciMethod* get_method(Method* o) {
 225     if (o == NULL) return NULL;
 226     return get_metadata(o)->as_method();
 227   }


 464   CompileLog* log() { return _log; }
 465   void set_log(CompileLog* log) { _log = log; }
 466 
 467   // Check for changes to the system dictionary during compilation
 468   bool system_dictionary_modification_counter_changed();
 469 
 470   void record_failure(const char* reason);      // Record failure and report later
 471   void report_failure(const char* reason);      // Report failure immediately
 472   void record_method_not_compilable(const char* reason, bool all_tiers = true);
 473   void record_out_of_memory_failure();
 474 
 475   // RedefineClasses support
 476   void metadata_do(void f(Metadata*)) { _factory->metadata_do(f); }
 477 
 478   // Dump the compilation replay data for the ciEnv to the stream.
 479   void dump_replay_data(int compile_id);
 480   void dump_inline_data(int compile_id);
 481   void dump_replay_data(outputStream* out);
 482   void dump_replay_data_unsafe(outputStream* out);
 483   void dump_compile_data(outputStream* out);
 484 
 485   ciWrapper* make_never_null_wrapper(ciType* type) {
 486     return _factory->make_never_null_wrapper(type);
 487   }
 488 };
 489 
 490 #endif // SHARE_CI_CIENV_HPP
< prev index next >