Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(27)

Side by Side Diff: runtime/lib/object.cc

Issue 2957843002: Add gdb helper functions for creating a handle and using ToCString with RawObjects. (Closed)
Patch Set: source_set Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/bootstrap_natives.h" 5 #include "vm/bootstrap_natives.h"
6 6
7 #include "lib/invocation_mirror.h" 7 #include "lib/invocation_mirror.h"
8 #include "vm/code_patcher.h" 8 #include "vm/code_patcher.h"
9 #include "vm/exceptions.h" 9 #include "vm/exceptions.h"
10 #include "vm/heap.h" 10 #include "vm/heap.h"
11 #include "vm/native_entry.h" 11 #include "vm/native_entry.h"
12 #include "vm/object.h" 12 #include "vm/object.h"
13 #include "vm/stack_frame.h" 13 #include "vm/stack_frame.h"
14 #include "vm/symbols.h" 14 #include "vm/symbols.h"
15 15
16 namespace dart { 16 namespace dart {
17 17
18 DECLARE_FLAG(bool, trace_type_checks); 18 DECLARE_FLAG(bool, trace_type_checks);
19 19
20 // Helper function in stacktrace.cc.
21 void _printCurrentStackTrace();
22
23 DEFINE_NATIVE_ENTRY(DartAsync_fatal, 1) { 20 DEFINE_NATIVE_ENTRY(DartAsync_fatal, 1) {
24 // The dart:async library code entered an unrecoverable state. 21 // The dart:async library code entered an unrecoverable state.
25 const Instance& instance = Instance::CheckedHandle(arguments->NativeArgAt(0)); 22 const Instance& instance = Instance::CheckedHandle(arguments->NativeArgAt(0));
26 const char* msg = instance.ToCString(); 23 const char* msg = instance.ToCString();
27 OS::PrintErr("Fatal error in dart:async: %s\n", msg); 24 OS::PrintErr("Fatal error in dart:async: %s\n", msg);
28 _printCurrentStackTrace();
29 FATAL(msg); 25 FATAL(msg);
30 return Object::null(); 26 return Object::null();
31 } 27 }
32 28
33 29
34 DEFINE_NATIVE_ENTRY(Object_equals, 1) { 30 DEFINE_NATIVE_ENTRY(Object_equals, 1) {
35 // Implemented in the flow graph builder. 31 // Implemented in the flow graph builder.
36 UNREACHABLE(); 32 UNREACHABLE();
37 return Object::null(); 33 return Object::null();
38 } 34 }
(...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after
385 for (intptr_t i = split; i < len; i++) { 381 for (intptr_t i = split; i < len; i++) {
386 type = function_type_arguments.IsNull() 382 type = function_type_arguments.IsNull()
387 ? Type::DynamicType() 383 ? Type::DynamicType()
388 : function_type_arguments.TypeAt(i - split); 384 : function_type_arguments.TypeAt(i - split);
389 result.SetTypeAt(i, type); 385 result.SetTypeAt(i, type);
390 } 386 }
391 return result.Canonicalize(); 387 return result.Canonicalize();
392 } 388 }
393 389
394 } // namespace dart 390 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/BUILD.gn ('k') | runtime/lib/stacktrace.cc » ('j') | runtime/vm/gdb_helpers.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698