Mercurial > hg > graal-compiler
comparison src/share/vm/ci/ciEnv.hpp @ 7126:ce248dc0a656
removed all Graal modifications to ci and c1
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Mon, 03 Dec 2012 17:54:05 +0100 |
parents | 2cb439954abf |
children | 836a62f43af9 |
comparison
equal
deleted
inserted
replaced
7125:1baf7f1e3f23 | 7126:ce248dc0a656 |
---|---|
43 class ciEnv : StackObj { | 43 class ciEnv : StackObj { |
44 CI_PACKAGE_ACCESS_TO | 44 CI_PACKAGE_ACCESS_TO |
45 | 45 |
46 friend class CompileBroker; | 46 friend class CompileBroker; |
47 friend class Dependencies; // for get_object, during logging | 47 friend class Dependencies; // for get_object, during logging |
48 #ifdef GRAAL | |
49 friend class CodeInstaller; | |
50 #endif | |
51 | 48 |
52 static fileStream* _replay_data_stream; | 49 static fileStream* _replay_data_stream; |
53 | 50 |
54 private: | 51 private: |
55 Arena* _arena; // Alias for _ciEnv_arena except in init_shared_objects() | 52 Arena* _arena; // Alias for _ciEnv_arena except in init_shared_objects() |
103 ciInstance* _ClassCastException_instance; | 100 ciInstance* _ClassCastException_instance; |
104 | 101 |
105 ciInstance* _the_null_string; // The Java string "null" | 102 ciInstance* _the_null_string; // The Java string "null" |
106 ciInstance* _the_min_jint_string; // The Java string "-2147483648" | 103 ciInstance* _the_min_jint_string; // The Java string "-2147483648" |
107 | 104 |
108 public: | |
109 | |
110 // Look up a klass by name from a particular class loader (the accessor's). | 105 // Look up a klass by name from a particular class loader (the accessor's). |
111 // If require_local, result must be defined in that class loader, or NULL. | 106 // If require_local, result must be defined in that class loader, or NULL. |
112 // If !require_local, a result from remote class loader may be reported, | 107 // If !require_local, a result from remote class loader may be reported, |
113 // if sufficient class loader constraints exist such that initiating | 108 // if sufficient class loader constraints exist such that initiating |
114 // a class loading request from the given loader is bound to return | 109 // a class loading request from the given loader is bound to return |
134 ciField* get_field_by_index(ciInstanceKlass* loading_klass, | 129 ciField* get_field_by_index(ciInstanceKlass* loading_klass, |
135 int field_index); | 130 int field_index); |
136 ciMethod* get_method_by_index(constantPoolHandle cpool, | 131 ciMethod* get_method_by_index(constantPoolHandle cpool, |
137 int method_index, Bytecodes::Code bc, | 132 int method_index, Bytecodes::Code bc, |
138 ciInstanceKlass* loading_klass); | 133 ciInstanceKlass* loading_klass); |
139 | |
140 private: | |
141 | 134 |
142 // Implementation methods for loading and constant pool access. | 135 // Implementation methods for loading and constant pool access. |
143 ciKlass* get_klass_by_name_impl(ciKlass* accessing_klass, | 136 ciKlass* get_klass_by_name_impl(ciKlass* accessing_klass, |
144 constantPoolHandle cpool, | 137 constantPoolHandle cpool, |
145 ciSymbol* klass_name, | 138 ciSymbol* klass_name, |
164 InstanceKlass* holder, | 157 InstanceKlass* holder, |
165 Symbol* name, | 158 Symbol* name, |
166 Symbol* sig, | 159 Symbol* sig, |
167 Bytecodes::Code bc); | 160 Bytecodes::Code bc); |
168 | 161 |
169 public: | |
170 // Get a ciObject from the object factory. Ensures uniqueness | 162 // Get a ciObject from the object factory. Ensures uniqueness |
171 // of ciObjects. | 163 // of ciObjects. |
172 ciObject* get_object(oop o) { | 164 ciObject* get_object(oop o) { |
173 if (o == NULL) { | 165 if (o == NULL) { |
174 return _null_object_instance; | 166 return _null_object_instance; |
175 } else { | 167 } else { |
176 return _factory->get(o); | 168 return _factory->get(o); |
177 } | 169 } |
178 } | 170 } |
179 private: | |
180 | 171 |
181 ciSymbol* get_symbol(Symbol* o) { | 172 ciSymbol* get_symbol(Symbol* o) { |
182 if (o == NULL) { | 173 if (o == NULL) { |
183 ShouldNotReachHere(); | 174 ShouldNotReachHere(); |
184 return NULL; | 175 return NULL; |
360 // Handy forwards to the task: | 351 // Handy forwards to the task: |
361 int comp_level(); // task()->comp_level() | 352 int comp_level(); // task()->comp_level() |
362 uint compile_id(); // task()->compile_id() | 353 uint compile_id(); // task()->compile_id() |
363 | 354 |
364 // Register the result of a compilation. | 355 // Register the result of a compilation. |
365 nmethod* register_method(ciMethod* target, | 356 void register_method(ciMethod* target, |
366 int entry_bci, | 357 int entry_bci, |
367 CodeOffsets* offsets, | 358 CodeOffsets* offsets, |
368 int orig_pc_offset, | 359 int orig_pc_offset, |
369 CodeBuffer* code_buffer, | 360 CodeBuffer* code_buffer, |
370 int frame_words, | 361 int frame_words, |
428 | 419 |
429 // Access to the compile-lifetime allocation arena. | 420 // Access to the compile-lifetime allocation arena. |
430 Arena* arena() { return _arena; } | 421 Arena* arena() { return _arena; } |
431 | 422 |
432 // What is the current compilation environment? | 423 // What is the current compilation environment? |
433 static ciEnv* current() { return JavaThread::current()->env(); } | 424 static ciEnv* current() { return CompilerThread::current()->env(); } |
434 | 425 |
435 // Overload with current thread argument | 426 // Overload with current thread argument |
436 static ciEnv* current(JavaThread *thread) { return thread->env(); } | 427 static ciEnv* current(CompilerThread *thread) { return thread->env(); } |
437 | 428 |
438 // Per-compiler data. (Used by C2 to publish the Compile* pointer.) | 429 // Per-compiler data. (Used by C2 to publish the Compile* pointer.) |
439 void* compiler_data() { return _compiler_data; } | 430 void* compiler_data() { return _compiler_data; } |
440 void set_compiler_data(void* x) { _compiler_data = x; } | 431 void set_compiler_data(void* x) { _compiler_data = x; } |
441 | 432 |