| 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 "include/dart_api.h" | 5 #include "include/dart_api.h" |
| 6 #include "include/dart_mirrors_api.h" | 6 #include "include/dart_mirrors_api.h" |
| 7 #include "include/dart_native_api.h" | 7 #include "include/dart_native_api.h" |
| 8 | 8 |
| 9 #include "platform/assert.h" | 9 #include "platform/assert.h" |
| 10 #include "lib/stacktrace.h" | 10 #include "lib/stacktrace.h" |
| (...skipping 6686 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6697 uint8_t** isolate_snapshot_instructions_buffer, | 6697 uint8_t** isolate_snapshot_instructions_buffer, |
| 6698 intptr_t* isolate_snapshot_instructions_size) { | 6698 intptr_t* isolate_snapshot_instructions_size) { |
| 6699 #if defined(TARGET_ARCH_IA32) | 6699 #if defined(TARGET_ARCH_IA32) |
| 6700 return Api::NewError("AOT compilation is not supported on IA32."); | 6700 return Api::NewError("AOT compilation is not supported on IA32."); |
| 6701 #elif defined(TARGET_ARCH_DBC) | 6701 #elif defined(TARGET_ARCH_DBC) |
| 6702 return Api::NewError("AOT compilation is not supported on DBC."); | 6702 return Api::NewError("AOT compilation is not supported on DBC."); |
| 6703 #elif !defined(DART_PRECOMPILER) | 6703 #elif !defined(DART_PRECOMPILER) |
| 6704 return Api::NewError( | 6704 return Api::NewError( |
| 6705 "This VM was built without support for AOT compilation."); | 6705 "This VM was built without support for AOT compilation."); |
| 6706 #else | 6706 #else |
| 6707 if (FLAG_dwarf_stack_traces) { | |
| 6708 return Api::NewError( | |
| 6709 "--dwarf_stack_traces requires creating an AOT snapshot as assembly."); | |
| 6710 } | |
| 6711 | |
| 6712 API_TIMELINE_DURATION; | 6707 API_TIMELINE_DURATION; |
| 6713 DARTSCOPE(Thread::Current()); | 6708 DARTSCOPE(Thread::Current()); |
| 6714 Isolate* I = T->isolate(); | 6709 Isolate* I = T->isolate(); |
| 6715 if (I->compilation_allowed()) { | 6710 if (I->compilation_allowed()) { |
| 6716 return Api::NewError( | 6711 return Api::NewError( |
| 6717 "Isolate is not precompiled. " | 6712 "Isolate is not precompiled. " |
| 6718 "Did you forget to call Dart_Precompile?"); | 6713 "Did you forget to call Dart_Precompile?"); |
| 6719 } | 6714 } |
| 6720 ASSERT(FLAG_load_deferred_eagerly); | 6715 ASSERT(FLAG_load_deferred_eagerly); |
| 6721 if (vm_snapshot_data_buffer == NULL) { | 6716 if (vm_snapshot_data_buffer == NULL) { |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6834 } | 6829 } |
| 6835 | 6830 |
| 6836 | 6831 |
| 6837 DART_EXPORT void Dart_DumpNativeStackTrace(void* context) { | 6832 DART_EXPORT void Dart_DumpNativeStackTrace(void* context) { |
| 6838 #ifndef PRODUCT | 6833 #ifndef PRODUCT |
| 6839 Profiler::DumpStackTrace(context); | 6834 Profiler::DumpStackTrace(context); |
| 6840 #endif | 6835 #endif |
| 6841 } | 6836 } |
| 6842 | 6837 |
| 6843 } // namespace dart | 6838 } // namespace dart |
| OLD | NEW |