1218 kill_dead_locals(); 1219 // Build the FastLockNode 1220 _synch_lock = shared_lock(lock_obj); 1221 } 1222 1223 // Feed profiling data for parameters to the type system so it can 1224 // propagate it as speculative types 1225 record_profiled_parameters_for_speculation(); 1226 1227 if (depth() == 1) { 1228 increment_and_test_invocation_counter(Tier2CompileThreshold); 1229 } 1230 } 1231 1232 //------------------------------init_blocks------------------------------------ 1233 // Initialize our parser map to contain the types/monitors at method entry. 1234 void Parse::init_blocks() { 1235 // Create the blocks. 1236 _block_count = flow()->block_count(); 1237 _blocks = NEW_RESOURCE_ARRAY(Block, _block_count); 1238 Copy::zero_to_bytes(_blocks, sizeof(Block)*_block_count); 1239 1240 int rpo; 1241 1242 // Initialize the structs. 1243 for (rpo = 0; rpo < block_count(); rpo++) { 1244 Block* block = rpo_at(rpo); 1245 block->init_node(this, rpo); 1246 } 1247 1248 // Collect predecessor and successor information. 1249 for (rpo = 0; rpo < block_count(); rpo++) { 1250 Block* block = rpo_at(rpo); 1251 block->init_graph(this); 1252 } 1253 } 1254 1255 //-------------------------------init_node------------------------------------- 1256 void Parse::Block::init_node(Parse* outer, int rpo) { 1257 _flow = outer->flow()->rpo_at(rpo); 1258 _pred_count = 0; 1259 _preds_parsed = 0; 1260 _count = 0; 1261 assert(pred_count() == 0 && preds_parsed() == 0, "sanity"); 1262 assert(!(is_merged() || is_parsed() || is_handler() || has_merged_backedge()), "sanity"); 1263 assert(_live_locals.size() == 0, "sanity"); 1264 1265 // entry point has additional predecessor 1266 if (flow()->is_start()) _pred_count++; 1267 assert(flow()->is_start() == (this == outer->start_block()), ""); 1268 } 1269 1270 //-------------------------------init_graph------------------------------------ 1271 void Parse::Block::init_graph(Parse* outer) { 1272 // Create the successor list for this parser block. 1273 GrowableArray<ciTypeFlow::Block*>* tfs = flow()->successors(); 1274 GrowableArray<ciTypeFlow::Block*>* tfe = flow()->exceptions(); 1275 int ns = tfs->length(); 1276 int ne = tfe->length(); 1277 _num_successors = ns; 1278 _all_successors = ns+ne; 1279 _successors = (ns+ne == 0) ? NULL : NEW_RESOURCE_ARRAY(Block*, ns+ne); 1280 int p = 0; | 1218 kill_dead_locals(); 1219 // Build the FastLockNode 1220 _synch_lock = shared_lock(lock_obj); 1221 } 1222 1223 // Feed profiling data for parameters to the type system so it can 1224 // propagate it as speculative types 1225 record_profiled_parameters_for_speculation(); 1226 1227 if (depth() == 1) { 1228 increment_and_test_invocation_counter(Tier2CompileThreshold); 1229 } 1230 } 1231 1232 //------------------------------init_blocks------------------------------------ 1233 // Initialize our parser map to contain the types/monitors at method entry. 1234 void Parse::init_blocks() { 1235 // Create the blocks. 1236 _block_count = flow()->block_count(); 1237 _blocks = NEW_RESOURCE_ARRAY(Block, _block_count); 1238 1239 // Initialize the structs. 1240 for (int rpo = 0; rpo < block_count(); rpo++) { 1241 Block* block = rpo_at(rpo); 1242 new(block) Block(this, rpo); 1243 } 1244 1245 // Collect predecessor and successor information. 1246 for (int rpo = 0; rpo < block_count(); rpo++) { 1247 Block* block = rpo_at(rpo); 1248 block->init_graph(this); 1249 } 1250 } 1251 1252 //-------------------------------init_node------------------------------------- 1253 Parse::Block::Block(Parse* outer, int rpo) : _live_locals() { 1254 _flow = outer->flow()->rpo_at(rpo); 1255 _pred_count = 0; 1256 _preds_parsed = 0; 1257 _count = 0; 1258 _is_parsed = false; 1259 _is_handler = false; 1260 _has_merged_backedge = false; 1261 _start_map = NULL; 1262 _num_successors = 0; 1263 _all_successors = 0; 1264 _successors = NULL; 1265 assert(pred_count() == 0 && preds_parsed() == 0, "sanity"); 1266 assert(!(is_merged() || is_parsed() || is_handler() || has_merged_backedge()), "sanity"); 1267 assert(_live_locals.size() == 0, "sanity"); 1268 1269 // entry point has additional predecessor 1270 if (flow()->is_start()) _pred_count++; 1271 assert(flow()->is_start() == (this == outer->start_block()), ""); 1272 } 1273 1274 //-------------------------------init_graph------------------------------------ 1275 void Parse::Block::init_graph(Parse* outer) { 1276 // Create the successor list for this parser block. 1277 GrowableArray<ciTypeFlow::Block*>* tfs = flow()->successors(); 1278 GrowableArray<ciTypeFlow::Block*>* tfe = flow()->exceptions(); 1279 int ns = tfs->length(); 1280 int ne = tfe->length(); 1281 _num_successors = ns; 1282 _all_successors = ns+ne; 1283 _successors = (ns+ne == 0) ? NULL : NEW_RESOURCE_ARRAY(Block*, ns+ne); 1284 int p = 0; |