| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_XXX. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_XXX. |
| 6 | 6 |
| 7 #include "vm/flow_graph_compiler.h" | 7 #include "vm/flow_graph_compiler.h" |
| 8 | 8 |
| 9 #include "vm/cha.h" | 9 #include "vm/cha.h" |
| 10 #include "vm/dart_entry.h" | 10 #include "vm/dart_entry.h" |
| (...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 347 EmitInstructionEpilogue(instr); | 347 EmitInstructionEpilogue(instr); |
| 348 } | 348 } |
| 349 } | 349 } |
| 350 } | 350 } |
| 351 set_current_block(NULL); | 351 set_current_block(NULL); |
| 352 } | 352 } |
| 353 | 353 |
| 354 | 354 |
| 355 void FlowGraphCompiler::Bailout(const char* reason) { | 355 void FlowGraphCompiler::Bailout(const char* reason) { |
| 356 const Function& function = parsed_function_.function(); | 356 const Function& function = parsed_function_.function(); |
| 357 const Error& error = Error::Handle( | 357 Report::MessageF(Report::kBailout, |
| 358 LanguageError::NewFormatted(Error::Handle(), // No previous error. | 358 Script::Handle(function.script()), |
| 359 Script::Handle(function.script()), | 359 function.token_pos(), |
| 360 function.token_pos(), | 360 "FlowGraphCompiler Bailout: %s %s", |
| 361 LanguageError::kBailout, | 361 String::Handle(function.name()).ToCString(), |
| 362 Heap::kNew, | 362 reason); |
| 363 "FlowGraphCompiler Bailout: %s %s", | |
| 364 String::Handle(function.name()).ToCString(), | |
| 365 reason)); | |
| 366 isolate()->long_jump_base()->Jump(1, error); | |
| 367 UNREACHABLE(); | 363 UNREACHABLE(); |
| 368 } | 364 } |
| 369 | 365 |
| 370 | 366 |
| 371 void FlowGraphCompiler::EmitTrySync(Instruction* instr, intptr_t try_index) { | 367 void FlowGraphCompiler::EmitTrySync(Instruction* instr, intptr_t try_index) { |
| 372 ASSERT(is_optimizing()); | 368 ASSERT(is_optimizing()); |
| 373 Environment* env = instr->env(); | 369 Environment* env = instr->env(); |
| 374 CatchBlockEntryInstr* catch_block = | 370 CatchBlockEntryInstr* catch_block = |
| 375 flow_graph().graph_entry()->GetCatchEntry(try_index); | 371 flow_graph().graph_entry()->GetCatchEntry(try_index); |
| 376 const GrowableArray<Definition*>* idefs = catch_block->initial_definitions(); | 372 const GrowableArray<Definition*>* idefs = catch_block->initial_definitions(); |
| (...skipping 1016 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1393 } | 1389 } |
| 1394 const ICData& ic_data = ICData::ZoneHandle(isolate(), ICData::New( | 1390 const ICData& ic_data = ICData::ZoneHandle(isolate(), ICData::New( |
| 1395 parsed_function().function(), String::Handle(isolate(), target.name()), | 1391 parsed_function().function(), String::Handle(isolate(), target.name()), |
| 1396 arguments_descriptor, deopt_id, num_args_tested)); | 1392 arguments_descriptor, deopt_id, num_args_tested)); |
| 1397 ic_data.AddTarget(target); | 1393 ic_data.AddTarget(target); |
| 1398 (*deopt_id_to_ic_data_)[deopt_id] = &ic_data; | 1394 (*deopt_id_to_ic_data_)[deopt_id] = &ic_data; |
| 1399 return &ic_data; | 1395 return &ic_data; |
| 1400 } | 1396 } |
| 1401 | 1397 |
| 1402 } // namespace dart | 1398 } // namespace dart |
| OLD | NEW |