| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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/stack_frame.h" | 5 #include "vm/stack_frame.h" |
| 6 | 6 |
| 7 #include "vm/assembler.h" | 7 #include "vm/assembler.h" |
| 8 #include "vm/deopt_instructions.h" | 8 #include "vm/deopt_instructions.h" |
| 9 #include "vm/isolate.h" | 9 #include "vm/isolate.h" |
| 10 #include "vm/object.h" | 10 #include "vm/object.h" |
| (...skipping 414 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 425 code_(Code::Handle(code.raw())), | 425 code_(Code::Handle(code.raw())), |
| 426 deopt_info_(DeoptInfo::Handle()), | 426 deopt_info_(DeoptInfo::Handle()), |
| 427 function_(Function::Handle()), | 427 function_(Function::Handle()), |
| 428 pc_(pc), | 428 pc_(pc), |
| 429 deopt_instructions_(), | 429 deopt_instructions_(), |
| 430 object_table_(Array::Handle()) { | 430 object_table_(Array::Handle()) { |
| 431 ASSERT(code_.is_optimized()); | 431 ASSERT(code_.is_optimized()); |
| 432 ASSERT(pc_ != 0); | 432 ASSERT(pc_ != 0); |
| 433 ASSERT(code.ContainsInstructionAt(pc)); | 433 ASSERT(code.ContainsInstructionAt(pc)); |
| 434 ICData::DeoptReasonId deopt_reason = ICData::kDeoptUnknown; | 434 ICData::DeoptReasonId deopt_reason = ICData::kDeoptUnknown; |
| 435 deopt_info_ = code_.GetDeoptInfoAtPc(pc, &deopt_reason); | 435 uint32_t deopt_flags = 0; |
| 436 deopt_info_ = code_.GetDeoptInfoAtPc(pc, &deopt_reason, &deopt_flags); |
| 436 if (deopt_info_.IsNull()) { | 437 if (deopt_info_.IsNull()) { |
| 437 // This is the case when a call without deopt info in optimized code | 438 // This is the case when a call without deopt info in optimized code |
| 438 // throws an exception. (e.g. in the parameter copying prologue). | 439 // throws an exception. (e.g. in the parameter copying prologue). |
| 439 // In that case there won't be any inlined frames. | 440 // In that case there won't be any inlined frames. |
| 440 function_ = code_.function(); | 441 function_ = code_.function(); |
| 441 } else { | 442 } else { |
| 442 // Unpack deopt info into instructions (translate away suffixes). | 443 // Unpack deopt info into instructions (translate away suffixes). |
| 443 const Array& deopt_table = Array::Handle(code_.deopt_info_array()); | 444 const Array& deopt_table = Array::Handle(code_.deopt_info_array()); |
| 444 ASSERT(!deopt_table.IsNull()); | 445 ASSERT(!deopt_table.IsNull()); |
| 445 deopt_info_.ToInstructions(deopt_table, &deopt_instructions_); | 446 deopt_info_.ToInstructions(deopt_table, &deopt_instructions_); |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 484 if (deopt_instr->kind() == DeoptInstr::kCallerFp) { | 485 if (deopt_instr->kind() == DeoptInstr::kCallerFp) { |
| 485 return (index - num_materializations_); | 486 return (index - num_materializations_); |
| 486 } | 487 } |
| 487 } | 488 } |
| 488 UNREACHABLE(); | 489 UNREACHABLE(); |
| 489 return 0; | 490 return 0; |
| 490 } | 491 } |
| 491 | 492 |
| 492 | 493 |
| 493 } // namespace dart | 494 } // namespace dart |
| OLD | NEW |