| 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" |
| 11 #include "vm/object.h" | 11 #include "vm/object.h" |
| 12 #include "vm/object_store.h" | 12 #include "vm/object_store.h" |
| 13 #include "vm/stack_frame.h" | 13 #include "vm/stack_frame.h" |
| 14 #include "vm/stub_code.h" | 14 #include "vm/stub_code.h" |
| 15 #include "vm/symbols.h" | 15 #include "vm/symbols.h" |
| 16 | 16 |
| 17 namespace dart { | 17 namespace dart { |
| 18 | 18 |
| 19 DEFINE_FLAG(bool, print_stacktrace_at_throw, false, | 19 DEFINE_FLAG(bool, print_stacktrace_at_throw, false, |
| 20 "Prints a stack trace everytime a throw occurs."); | 20 "Prints a stack trace everytime a throw occurs."); |
| 21 DEFINE_FLAG(bool, heap_profile_out_of_memory, false, | 21 DEFINE_FLAG(bool, heap_profile_out_of_memory, false, |
| 22 "Writes a heap profile on unhandled out-of-memory exceptions."); | 22 "Writes a heap profile on unhandled out-of-memory exceptions."); |
| 23 DECLARE_FLAG(bool, heap_profile_out_of_memory); | |
| 24 | 23 |
| 25 | 24 |
| 26 const char* Exceptions::kCastErrorDstName = "type cast"; | 25 const char* Exceptions::kCastErrorDstName = "type cast"; |
| 27 | 26 |
| 28 | 27 |
| 29 // Iterate through the stack frames and try to find a frame with an | 28 // Iterate through the stack frames and try to find a frame with an |
| 30 // exception handler. Once found, set the pc, sp and fp so that execution | 29 // exception handler. Once found, set the pc, sp and fp so that execution |
| 31 // can continue in that frame. | 30 // can continue in that frame. |
| 32 static bool FindExceptionHandler(uword* handler_pc, | 31 static bool FindExceptionHandler(uword* handler_pc, |
| 33 uword* handler_sp, | 32 uword* handler_sp, |
| (...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 440 case kIsolateSpawn: | 439 case kIsolateSpawn: |
| 441 library = Library::IsolateLibrary(); | 440 library = Library::IsolateLibrary(); |
| 442 class_name = Symbols::New("IsolateSpawnException"); | 441 class_name = Symbols::New("IsolateSpawnException"); |
| 443 break; | 442 break; |
| 444 } | 443 } |
| 445 | 444 |
| 446 return DartLibraryCalls::ExceptionCreate(library, class_name, arguments); | 445 return DartLibraryCalls::ExceptionCreate(library, class_name, arguments); |
| 447 } | 446 } |
| 448 | 447 |
| 449 } // namespace dart | 448 } // namespace dart |
| OLD | NEW |