src/share/vm/c1/c1_GraphBuilder.cpp

changeset 1939
b812ff5abc73
parent 1934
e9ff18c4ace7
child 1957
136b78722a08
equal deleted inserted replaced
1938:02e771df338e 1939:b812ff5abc73
2528 } 2528 }
2529 } while (!bailed_out() && !scope_data()->is_work_list_empty()); 2529 } while (!bailed_out() && !scope_data()->is_work_list_empty());
2530 } 2530 }
2531 2531
2532 2532
2533 bool GraphBuilder::_is_initialized = false;
2534 bool GraphBuilder::_can_trap [Bytecodes::number_of_java_codes]; 2533 bool GraphBuilder::_can_trap [Bytecodes::number_of_java_codes];
2535 bool GraphBuilder::_is_async[Bytecodes::number_of_java_codes]; 2534 bool GraphBuilder::_is_async[Bytecodes::number_of_java_codes];
2536 2535
2537 void GraphBuilder::initialize() { 2536 void GraphBuilder::initialize() {
2538 // make sure initialization happens only once (need a
2539 // lock here, if we allow the compiler to be re-entrant)
2540 if (is_initialized()) return;
2541 _is_initialized = true;
2542
2543 // the following bytecodes are assumed to potentially 2537 // the following bytecodes are assumed to potentially
2544 // throw exceptions in compiled code - note that e.g. 2538 // throw exceptions in compiled code - note that e.g.
2545 // monitorexit & the return bytecodes do not throw 2539 // monitorexit & the return bytecodes do not throw
2546 // exceptions since monitor pairing proved that they 2540 // exceptions since monitor pairing proved that they
2547 // succeed (if monitor pairing succeeded) 2541 // succeed (if monitor pairing succeeded)
2853 CHECK_BAILOUT(); 2847 CHECK_BAILOUT();
2854 2848
2855 BlockList* bci2block = blm.bci2block(); 2849 BlockList* bci2block = blm.bci2block();
2856 BlockBegin* start_block = bci2block->at(0); 2850 BlockBegin* start_block = bci2block->at(0);
2857 2851
2858 assert(is_initialized(), "GraphBuilder must have been initialized");
2859 push_root_scope(scope, bci2block, start_block); 2852 push_root_scope(scope, bci2block, start_block);
2860 2853
2861 // setup state for std entry 2854 // setup state for std entry
2862 _initial_state = state_at_entry(); 2855 _initial_state = state_at_entry();
2863 start_block->merge(_initial_state); 2856 start_block->merge(_initial_state);

mercurial