| OLD | NEW |
| 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, 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/exceptions.h" | 5 #include "vm/exceptions.h" |
| 6 | 6 |
| 7 #include "vm/dart_api_impl.h" | 7 #include "vm/dart_api_impl.h" |
| 8 #include "vm/dart_entry.h" | 8 #include "vm/dart_entry.h" |
| 9 #include "vm/debugger.h" | 9 #include "vm/debugger.h" |
| 10 #include "vm/flags.h" | 10 #include "vm/flags.h" |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 // For optimized frames, extract all the inlined functions if any | 56 // For optimized frames, extract all the inlined functions if any |
| 57 // into the stack trace. | 57 // into the stack trace. |
| 58 InlinedFunctionsInDartFrameIterator optimized_frames(frame); | 58 InlinedFunctionsInDartFrameIterator optimized_frames(frame); |
| 59 while (true) { | 59 while (true) { |
| 60 uword pc = 0; | 60 uword pc = 0; |
| 61 func = optimized_frames.GetNextFunction(&pc); | 61 func = optimized_frames.GetNextFunction(&pc); |
| 62 if (func.IsNull()) { | 62 if (func.IsNull()) { |
| 63 break; | 63 break; |
| 64 } | 64 } |
| 65 ASSERT(pc != 0); | 65 ASSERT(pc != 0); |
| 66 code = func.unoptimized_code(); | |
| 67 offset = Smi::New(pc - code.EntryPoint()); | |
| 68 if (ShouldShowFunction(func)) { | 66 if (ShouldShowFunction(func)) { |
| 67 code = func.unoptimized_code(); |
| 68 offset = Smi::New(pc - code.EntryPoint()); |
| 69 ASSERT(0 <= offset.Value() && offset.Value() < code.Size()); |
| 69 func_list.Add(func); | 70 func_list.Add(func); |
| 70 code_list.Add(code); | 71 code_list.Add(code); |
| 71 pc_offset_list.Add(offset); | 72 pc_offset_list.Add(offset); |
| 72 } | 73 } |
| 73 } | 74 } |
| 74 } else { | 75 } else { |
| 75 offset = Smi::New(frame->pc() - code.EntryPoint()); | 76 offset = Smi::New(frame->pc() - code.EntryPoint()); |
| 76 func = code.function(); | 77 func = code.function(); |
| 77 if (ShouldShowFunction(func)) { | 78 if (ShouldShowFunction(func)) { |
| 78 func_list.Add(func); | 79 func_list.Add(func); |
| (...skipping 398 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 477 case kIsolateUnhandledException: | 478 case kIsolateUnhandledException: |
| 478 library = Library::IsolateLibrary(); | 479 library = Library::IsolateLibrary(); |
| 479 class_name = &Symbols::IsolateUnhandledException(); | 480 class_name = &Symbols::IsolateUnhandledException(); |
| 480 break; | 481 break; |
| 481 } | 482 } |
| 482 | 483 |
| 483 return DartLibraryCalls::ExceptionCreate(library, *class_name, arguments); | 484 return DartLibraryCalls::ExceptionCreate(library, *class_name, arguments); |
| 484 } | 485 } |
| 485 | 486 |
| 486 } // namespace dart | 487 } // namespace dart |
| OLD | NEW |