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/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. | 20 // Helper function in stacktrace.cc. |
21 void _printCurrentStacktrace(); | 21 void _printCurrentStackTrace(); |
22 | 22 |
23 DEFINE_NATIVE_ENTRY(DartCore_fatal, 1) { | 23 DEFINE_NATIVE_ENTRY(DartCore_fatal, 1) { |
24 // The core library code entered an unrecoverable state. | 24 // The core library code entered an unrecoverable state. |
25 const Instance& instance = Instance::CheckedHandle(arguments->NativeArgAt(0)); | 25 const Instance& instance = Instance::CheckedHandle(arguments->NativeArgAt(0)); |
26 const char* msg = instance.ToCString(); | 26 const char* msg = instance.ToCString(); |
27 OS::PrintErr("Fatal error in dart:core\n"); | 27 OS::PrintErr("Fatal error in dart:core\n"); |
28 _printCurrentStacktrace(); | 28 _printCurrentStackTrace(); |
29 FATAL(msg); | 29 FATAL(msg); |
30 return Object::null(); | 30 return Object::null(); |
31 } | 31 } |
32 | 32 |
33 | 33 |
34 DEFINE_NATIVE_ENTRY(Object_equals, 1) { | 34 DEFINE_NATIVE_ENTRY(Object_equals, 1) { |
35 // Implemented in the flow graph builder. | 35 // Implemented in the flow graph builder. |
36 UNREACHABLE(); | 36 UNREACHABLE(); |
37 return Object::null(); | 37 return Object::null(); |
38 } | 38 } |
(...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
404 | 404 |
405 DEFINE_NATIVE_ENTRY(Internal_inquireIs64Bit, 0) { | 405 DEFINE_NATIVE_ENTRY(Internal_inquireIs64Bit, 0) { |
406 #if defined(ARCH_IS_64_BIT) | 406 #if defined(ARCH_IS_64_BIT) |
407 return Bool::True().raw(); | 407 return Bool::True().raw(); |
408 #else | 408 #else |
409 return Bool::False().raw(); | 409 return Bool::False().raw(); |
410 #endif // defined(ARCH_IS_64_BIT) | 410 #endif // defined(ARCH_IS_64_BIT) |
411 } | 411 } |
412 | 412 |
413 } // namespace dart | 413 } // namespace dart |
OLD | NEW |