| 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 379 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 390 num_materializations_(0), | 390 num_materializations_(0), |
| 391 code_(Code::Handle(code.raw())), | 391 code_(Code::Handle(code.raw())), |
| 392 deopt_info_(DeoptInfo::Handle()), | 392 deopt_info_(DeoptInfo::Handle()), |
| 393 function_(Function::Handle()), | 393 function_(Function::Handle()), |
| 394 pc_(pc), | 394 pc_(pc), |
| 395 deopt_instructions_(), | 395 deopt_instructions_(), |
| 396 object_table_(Array::Handle()) { | 396 object_table_(Array::Handle()) { |
| 397 ASSERT(code_.is_optimized()); | 397 ASSERT(code_.is_optimized()); |
| 398 ASSERT(pc_ != 0); | 398 ASSERT(pc_ != 0); |
| 399 ASSERT(code.ContainsInstructionAt(pc)); | 399 ASSERT(code.ContainsInstructionAt(pc)); |
| 400 intptr_t deopt_reason = kDeoptUnknown; | 400 ICData::DeoptReasonId deopt_reason = ICData::kDeoptUnknown; |
| 401 deopt_info_ = code_.GetDeoptInfoAtPc(pc, &deopt_reason); | 401 deopt_info_ = code_.GetDeoptInfoAtPc(pc, &deopt_reason); |
| 402 if (deopt_info_.IsNull()) { | 402 if (deopt_info_.IsNull()) { |
| 403 // This is the case when a call without deopt info in optimized code | 403 // This is the case when a call without deopt info in optimized code |
| 404 // throws an exception. (e.g. in the parameter copying prologue). | 404 // throws an exception. (e.g. in the parameter copying prologue). |
| 405 // In that case there won't be any inlined frames. | 405 // In that case there won't be any inlined frames. |
| 406 function_ = code_.function(); | 406 function_ = code_.function(); |
| 407 } else { | 407 } else { |
| 408 // Unpack deopt info into instructions (translate away suffixes). | 408 // Unpack deopt info into instructions (translate away suffixes). |
| 409 const Array& deopt_table = Array::Handle(code_.deopt_info_array()); | 409 const Array& deopt_table = Array::Handle(code_.deopt_info_array()); |
| 410 ASSERT(!deopt_table.IsNull()); | 410 ASSERT(!deopt_table.IsNull()); |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 450 if (deopt_instr->kind() == DeoptInstr::kCallerFp) { | 450 if (deopt_instr->kind() == DeoptInstr::kCallerFp) { |
| 451 return (index - num_materializations_); | 451 return (index - num_materializations_); |
| 452 } | 452 } |
| 453 } | 453 } |
| 454 UNREACHABLE(); | 454 UNREACHABLE(); |
| 455 return 0; | 455 return 0; |
| 456 } | 456 } |
| 457 | 457 |
| 458 | 458 |
| 459 } // namespace dart | 459 } // namespace dart |
| OLD | NEW |