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 "lib/stacktrace.h" | 9 #include "lib/stacktrace.h" |
10 #include "platform/assert.h" | 10 #include "platform/assert.h" |
(...skipping 6494 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6505 | 6505 |
6506 | 6506 |
6507 DART_EXPORT | 6507 DART_EXPORT |
6508 Dart_Handle Dart_LoadCompilationTrace(uint8_t* buffer, intptr_t buffer_length) { | 6508 Dart_Handle Dart_LoadCompilationTrace(uint8_t* buffer, intptr_t buffer_length) { |
6509 Thread* thread = Thread::Current(); | 6509 Thread* thread = Thread::Current(); |
6510 API_TIMELINE_DURATION; | 6510 API_TIMELINE_DURATION; |
6511 DARTSCOPE(thread); | 6511 DARTSCOPE(thread); |
6512 CHECK_NULL(buffer); | 6512 CHECK_NULL(buffer); |
6513 CompilationTraceLoader loader(thread); | 6513 CompilationTraceLoader loader(thread); |
6514 const Object& error = | 6514 const Object& error = |
6515 Object::Handle(loader.CompileTrace(reinterpret_cast<char*>(buffer))); | 6515 Object::Handle(loader.CompileTrace(buffer, buffer_length)); |
6516 if (error.IsError()) { | 6516 if (error.IsError()) { |
6517 return Api::NewHandle(T, Error::Cast(error).raw()); | 6517 return Api::NewHandle(T, Error::Cast(error).raw()); |
6518 } | 6518 } |
6519 return Api::Success(); | 6519 return Api::Success(); |
6520 } | 6520 } |
6521 | 6521 |
6522 | 6522 |
6523 DART_EXPORT | 6523 DART_EXPORT |
6524 Dart_Handle Dart_SaveJITFeedback(uint8_t** buffer, intptr_t* buffer_length) { | 6524 Dart_Handle Dart_SaveJITFeedback(uint8_t** buffer, intptr_t* buffer_length) { |
6525 #if defined(DART_PRECOMPILED_RUNTIME) | 6525 #if defined(DART_PRECOMPILED_RUNTIME) |
(...skipping 422 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6948 } | 6948 } |
6949 | 6949 |
6950 | 6950 |
6951 DART_EXPORT void Dart_DumpNativeStackTrace(void* context) { | 6951 DART_EXPORT void Dart_DumpNativeStackTrace(void* context) { |
6952 #ifndef PRODUCT | 6952 #ifndef PRODUCT |
6953 Profiler::DumpStackTrace(context); | 6953 Profiler::DumpStackTrace(context); |
6954 #endif | 6954 #endif |
6955 } | 6955 } |
6956 | 6956 |
6957 } // namespace dart | 6957 } // namespace dart |
OLD | NEW |