< prev index next >

src/hotspot/share/ci/ciEnv.hpp

Print this page

362   // May be useful to find out compile_id, comp_level, etc.
363   CompileTask* task() { return _task; }
364 
365   // Handy forwards to the task:
366   int comp_level();   // task()->comp_level()
367   uint compile_id();  // task()->compile_id()
368 
369   // Register the result of a compilation.
370   void register_method(ciMethod*                 target,
371                        int                       entry_bci,
372                        CodeOffsets*              offsets,
373                        int                       orig_pc_offset,
374                        CodeBuffer*               code_buffer,
375                        int                       frame_words,
376                        OopMapSet*                oop_map_set,
377                        ExceptionHandlerTable*    handler_table,
378                        ImplicitExceptionTable*   inc_table,
379                        AbstractCompiler*         compiler,
380                        bool                      has_unsafe_access,
381                        bool                      has_wide_vectors,


382                        RTMState                  rtm_state = NoRTM,
383                        const GrowableArrayView<RuntimeStub*>& native_invokers = GrowableArrayView<RuntimeStub*>::EMPTY);
384 
385 
386   // Access to certain well known ciObjects.
387 #define VM_CLASS_FUNC(name, ignore_s) \
388   ciInstanceKlass* name() { \
389     return _##name;\
390   }
391   VM_CLASSES_DO(VM_CLASS_FUNC)
392 #undef VM_CLASS_FUNC
393 
394   ciInstance* NullPointerException_instance() {
395     assert(_NullPointerException_instance != NULL, "initialization problem");
396     return _NullPointerException_instance;
397   }
398   ciInstance* ArithmeticException_instance() {
399     assert(_ArithmeticException_instance != NULL, "initialization problem");
400     return _ArithmeticException_instance;
401   }
402 
403   // Lazy constructors:
404   ciInstance* ArrayIndexOutOfBoundsException_instance();
405   ciInstance* ArrayStoreException_instance();
406   ciInstance* ClassCastException_instance();
407 
408   ciInstance* the_null_string();
409   ciInstance* the_min_jint_string();
410 
411   static ciSymbol* unloaded_cisymbol() {
412     return _unloaded_cisymbol;
413   }
414   static ciObjArrayKlass* unloaded_ciobjarrayklass() {
415     return _unloaded_ciobjarrayklass;
416   }
417   static ciInstanceKlass* unloaded_ciinstance_klass() {
418     return _unloaded_ciinstance_klass;
419   }
420   ciInstance* unloaded_ciinstance();
421 


422   // Note:  To find a class from its name string, use ciSymbol::make,
423   // but consider adding to vmSymbols.hpp instead.
424 
425   // converts the ciKlass* representing the holder of a method into a
426   // ciInstanceKlass*.  This is needed since the holder of a method in
427   // the bytecodes could be an array type.  Basically this converts
428   // array types into java/lang/Object and other types stay as they are.
429   static ciInstanceKlass* get_instance_klass_for_declared_method_holder(ciKlass* klass);
430 
431   // Access to the compile-lifetime allocation arena.
432   Arena*    arena() { return _arena; }
433 
434   // What is the current compilation environment?
435   static ciEnv* current() { return CompilerThread::current()->env(); }
436 
437   // Overload with current thread argument
438   static ciEnv* current(CompilerThread *thread) { return thread->env(); }
439 
440   // Per-compiler data.  (Used by C2 to publish the Compile* pointer.)
441   void* compiler_data() { return _compiler_data; }

362   // May be useful to find out compile_id, comp_level, etc.
363   CompileTask* task() { return _task; }
364 
365   // Handy forwards to the task:
366   int comp_level();   // task()->comp_level()
367   uint compile_id();  // task()->compile_id()
368 
369   // Register the result of a compilation.
370   void register_method(ciMethod*                 target,
371                        int                       entry_bci,
372                        CodeOffsets*              offsets,
373                        int                       orig_pc_offset,
374                        CodeBuffer*               code_buffer,
375                        int                       frame_words,
376                        OopMapSet*                oop_map_set,
377                        ExceptionHandlerTable*    handler_table,
378                        ImplicitExceptionTable*   inc_table,
379                        AbstractCompiler*         compiler,
380                        bool                      has_unsafe_access,
381                        bool                      has_wide_vectors,
382                        bool                      has_monitors,
383                        int                       immediate_oops_patched,
384                        RTMState                  rtm_state = NoRTM,
385                        const GrowableArrayView<RuntimeStub*>& native_invokers = GrowableArrayView<RuntimeStub*>::EMPTY);
386 
387 
388   // Access to certain well known ciObjects.
389 #define VM_CLASS_FUNC(name, ignore_s) \
390   ciInstanceKlass* name() { \
391     return _##name;\
392   }
393   VM_CLASSES_DO(VM_CLASS_FUNC)
394 #undef VM_CLASS_FUNC
395 
396   ciInstance* NullPointerException_instance() {
397     assert(_NullPointerException_instance != NULL, "initialization problem");
398     return _NullPointerException_instance;
399   }
400   ciInstance* ArithmeticException_instance() {
401     assert(_ArithmeticException_instance != NULL, "initialization problem");
402     return _ArithmeticException_instance;
403   }
404 
405   // Lazy constructors:
406   ciInstance* ArrayIndexOutOfBoundsException_instance();
407   ciInstance* ArrayStoreException_instance();
408   ciInstance* ClassCastException_instance();
409 
410   ciInstance* the_null_string();
411   ciInstance* the_min_jint_string();
412 
413   static ciSymbol* unloaded_cisymbol() {
414     return _unloaded_cisymbol;
415   }
416   static ciObjArrayKlass* unloaded_ciobjarrayklass() {
417     return _unloaded_ciobjarrayklass;
418   }
419   static ciInstanceKlass* unloaded_ciinstance_klass() {
420     return _unloaded_ciinstance_klass;
421   }
422   ciInstance* unloaded_ciinstance();
423 
424   ciKlass*  find_system_klass(ciSymbol* klass_name);
425 
426   // Note:  To find a class from its name string, use ciSymbol::make,
427   // but consider adding to vmSymbols.hpp instead.
428 
429   // converts the ciKlass* representing the holder of a method into a
430   // ciInstanceKlass*.  This is needed since the holder of a method in
431   // the bytecodes could be an array type.  Basically this converts
432   // array types into java/lang/Object and other types stay as they are.
433   static ciInstanceKlass* get_instance_klass_for_declared_method_holder(ciKlass* klass);
434 
435   // Access to the compile-lifetime allocation arena.
436   Arena*    arena() { return _arena; }
437 
438   // What is the current compilation environment?
439   static ciEnv* current() { return CompilerThread::current()->env(); }
440 
441   // Overload with current thread argument
442   static ciEnv* current(CompilerThread *thread) { return thread->env(); }
443 
444   // Per-compiler data.  (Used by C2 to publish the Compile* pointer.)
445   void* compiler_data() { return _compiler_data; }
< prev index next >