hotspot/src/share/vm/c1/c1_Compilation.cpp
changeset 33451 0712796e4039
parent 33160 c59f1676d27e
child 35071 a0910b1d3e0d
equal deleted inserted replaced
33450:08222df07d0d 33451:0712796e4039
    32 #include "c1/c1_RangeCheckElimination.hpp"
    32 #include "c1/c1_RangeCheckElimination.hpp"
    33 #include "c1/c1_ValueMap.hpp"
    33 #include "c1/c1_ValueMap.hpp"
    34 #include "c1/c1_ValueStack.hpp"
    34 #include "c1/c1_ValueStack.hpp"
    35 #include "code/debugInfoRec.hpp"
    35 #include "code/debugInfoRec.hpp"
    36 #include "compiler/compileLog.hpp"
    36 #include "compiler/compileLog.hpp"
       
    37 #include "compiler/compilerDirectives.hpp"
    37 #include "runtime/sharedRuntime.hpp"
    38 #include "runtime/sharedRuntime.hpp"
    38 
    39 
    39 typedef enum {
    40 typedef enum {
    40   _t_compile,
    41   _t_compile,
    41     _t_setup,
    42     _t_setup,
   416     in_bytes(frame_map()->framesize_in_bytes()) / sizeof(intptr_t),
   417     in_bytes(frame_map()->framesize_in_bytes()) / sizeof(intptr_t),
   417     debug_info_recorder()->_oopmaps,
   418     debug_info_recorder()->_oopmaps,
   418     exception_handler_table(),
   419     exception_handler_table(),
   419     implicit_exception_table(),
   420     implicit_exception_table(),
   420     compiler(),
   421     compiler(),
   421     _env->comp_level(),
       
   422     has_unsafe_access(),
   422     has_unsafe_access(),
   423     SharedRuntime::is_wide_vector(max_vector_size())
   423     SharedRuntime::is_wide_vector(max_vector_size()),
       
   424     directive()
   424   );
   425   );
   425 }
   426 }
   426 
   427 
   427 
   428 
   428 void Compilation::compile_method() {
   429 void Compilation::compile_method() {
   443   if (_env->jvmti_can_hotswap_or_post_breakpoint()) {
   444   if (_env->jvmti_can_hotswap_or_post_breakpoint()) {
   444     // We can assert evol_method because method->can_be_compiled is true.
   445     // We can assert evol_method because method->can_be_compiled is true.
   445     dependency_recorder()->assert_evol_method(method());
   446     dependency_recorder()->assert_evol_method(method());
   446   }
   447   }
   447 
   448 
   448   if (method()->break_at_execute()) {
   449   if (directive()->BreakAtCompileOption) {
   449     BREAKPOINT;
   450     BREAKPOINT;
   450   }
   451   }
   451 
   452 
   452 #ifndef PRODUCT
   453 #ifndef PRODUCT
   453   if (PrintCFGToFile) {
   454   if (PrintCFGToFile) {
   532   }
   533   }
   533 }
   534 }
   534 
   535 
   535 
   536 
   536 Compilation::Compilation(AbstractCompiler* compiler, ciEnv* env, ciMethod* method,
   537 Compilation::Compilation(AbstractCompiler* compiler, ciEnv* env, ciMethod* method,
   537                          int osr_bci, BufferBlob* buffer_blob)
   538                          int osr_bci, BufferBlob* buffer_blob, DirectiveSet* directive)
   538 : _compiler(compiler)
   539 : _compiler(compiler)
   539 , _env(env)
   540 , _env(env)
       
   541 , _directive(directive)
   540 , _log(env->log())
   542 , _log(env->log())
   541 , _method(method)
   543 , _method(method)
   542 , _osr_bci(osr_bci)
   544 , _osr_bci(osr_bci)
   543 , _hir(NULL)
   545 , _hir(NULL)
   544 , _max_spills(-1)
   546 , _max_spills(-1)
   585 
   587 
   586 Compilation::~Compilation() {
   588 Compilation::~Compilation() {
   587   _env->set_compiler_data(NULL);
   589   _env->set_compiler_data(NULL);
   588 }
   590 }
   589 
   591 
   590 
       
   591 void Compilation::add_exception_handlers_for_pco(int pco, XHandlers* exception_handlers) {
   592 void Compilation::add_exception_handlers_for_pco(int pco, XHandlers* exception_handlers) {
   592 #ifndef PRODUCT
   593 #ifndef PRODUCT
   593   if (PrintExceptionHandlers && Verbose) {
   594   if (PrintExceptionHandlers && Verbose) {
   594     tty->print_cr("  added exception scope for pco %d", pco);
   595     tty->print_cr("  added exception scope for pco %d", pco);
   595   }
   596   }