| 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 "lib/error.h" | 5 #include "lib/error.h" |
| 6 | 6 |
| 7 #include "vm/bootstrap_natives.h" | 7 #include "vm/bootstrap_natives.h" |
| 8 #include "vm/exceptions.h" | 8 #include "vm/exceptions.h" |
| 9 #include "vm/object_store.h" | 9 #include "vm/object_store.h" |
| 10 #include "vm/runtime_entry.h" | 10 #include "vm/runtime_entry.h" |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 return trace.FullStacktrace(); | 21 return trace.FullStacktrace(); |
| 22 } | 22 } |
| 23 | 23 |
| 24 | 24 |
| 25 // Get a concise and pertinent stack trace. | 25 // Get a concise and pertinent stack trace. |
| 26 // Arg0: stack trace object. | 26 // Arg0: stack trace object. |
| 27 // Return value: String that represents the concise and pertinent stack trace. | 27 // Return value: String that represents the concise and pertinent stack trace. |
| 28 DEFINE_NATIVE_ENTRY(Stacktrace_getStacktrace, 1) { | 28 DEFINE_NATIVE_ENTRY(Stacktrace_getStacktrace, 1) { |
| 29 const Stacktrace& trace = | 29 const Stacktrace& trace = |
| 30 Stacktrace::CheckedHandle(arguments->NativeArgAt(0)); | 30 Stacktrace::CheckedHandle(arguments->NativeArgAt(0)); |
| 31 return String::New(trace.ToCStringInternal()); | 31 return String::New(trace.ToCStringInternal(0)); |
| 32 } | 32 } |
| 33 | 33 |
| 34 | 34 |
| 35 // Setup a full stack trace. | 35 // Setup a full stack trace. |
| 36 // Arg0: stack trace object. | 36 // Arg0: stack trace object. |
| 37 // Return value: None. | 37 // Return value: None. |
| 38 DEFINE_NATIVE_ENTRY(Stacktrace_setupFullStacktrace, 1) { | 38 DEFINE_NATIVE_ENTRY(Stacktrace_setupFullStacktrace, 1) { |
| 39 const Stacktrace& trace = | 39 const Stacktrace& trace = |
| 40 Stacktrace::CheckedHandle(arguments->NativeArgAt(0)); | 40 Stacktrace::CheckedHandle(arguments->NativeArgAt(0)); |
| 41 const GrowableObjectArray& func_list = | 41 const GrowableObjectArray& func_list = |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 } | 94 } |
| 95 const Array& func_array = Array::Handle(Array::MakeArray(func_list)); | 95 const Array& func_array = Array::Handle(Array::MakeArray(func_list)); |
| 96 const Array& code_array = Array::Handle(Array::MakeArray(code_list)); | 96 const Array& code_array = Array::Handle(Array::MakeArray(code_list)); |
| 97 const Array& pc_offset_array = | 97 const Array& pc_offset_array = |
| 98 Array::Handle(Array::MakeArray(pc_offset_list)); | 98 Array::Handle(Array::MakeArray(pc_offset_list)); |
| 99 trace.SetCatchStacktrace(func_array, code_array, pc_offset_array); | 99 trace.SetCatchStacktrace(func_array, code_array, pc_offset_array); |
| 100 return Object::null(); | 100 return Object::null(); |
| 101 } | 101 } |
| 102 | 102 |
| 103 } // namespace dart | 103 } // namespace dart |
| OLD | NEW |