| 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 6590 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6601 } | 6601 } |
| 6602 } | 6602 } |
| 6603 | 6603 |
| 6604 js_stream.Steal(reinterpret_cast<char**>(buffer), buffer_length); | 6604 js_stream.Steal(reinterpret_cast<char**>(buffer), buffer_length); |
| 6605 return Api::Success(); | 6605 return Api::Success(); |
| 6606 #endif | 6606 #endif |
| 6607 } | 6607 } |
| 6608 | 6608 |
| 6609 DART_EXPORT void Dart_SortClasses() { | 6609 DART_EXPORT void Dart_SortClasses() { |
| 6610 DARTSCOPE(Thread::Current()); | 6610 DARTSCOPE(Thread::Current()); |
| 6611 // We don't have mechanisms to change class-ids that are embedded in code and |
| 6612 // ICData. |
| 6613 ClassFinalizer::ClearAllCode(); |
| 6614 // Make sure that ICData etc. that have been cleared are also removed from |
| 6615 // the heap so that they are not found by the heap verifier. |
| 6616 Isolate::Current()->heap()->CollectAllGarbage(); |
| 6611 ClassFinalizer::SortClasses(); | 6617 ClassFinalizer::SortClasses(); |
| 6612 ClassFinalizer::ClearAllCode(); | |
| 6613 } | 6618 } |
| 6614 | 6619 |
| 6615 DART_EXPORT Dart_Handle | 6620 DART_EXPORT Dart_Handle |
| 6616 Dart_Precompile(Dart_QualifiedFunctionName entry_points[], | 6621 Dart_Precompile(Dart_QualifiedFunctionName entry_points[], |
| 6617 uint8_t* jit_feedback, | 6622 uint8_t* jit_feedback, |
| 6618 intptr_t jit_feedback_length) { | 6623 intptr_t jit_feedback_length) { |
| 6619 #if defined(TARGET_ARCH_IA32) | 6624 #if defined(TARGET_ARCH_IA32) |
| 6620 return Api::NewError("AOT compilation is not supported on IA32."); | 6625 return Api::NewError("AOT compilation is not supported on IA32."); |
| 6621 #elif defined(TARGET_ARCH_DBC) | 6626 #elif defined(TARGET_ARCH_DBC) |
| 6622 return Api::NewError("AOT compilation is not supported on DBC."); | 6627 return Api::NewError("AOT compilation is not supported on DBC."); |
| (...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6831 } | 6836 } |
| 6832 | 6837 |
| 6833 | 6838 |
| 6834 DART_EXPORT void Dart_DumpNativeStackTrace(void* context) { | 6839 DART_EXPORT void Dart_DumpNativeStackTrace(void* context) { |
| 6835 #ifndef PRODUCT | 6840 #ifndef PRODUCT |
| 6836 Profiler::DumpStackTrace(context); | 6841 Profiler::DumpStackTrace(context); |
| 6837 #endif | 6842 #endif |
| 6838 } | 6843 } |
| 6839 | 6844 |
| 6840 } // namespace dart | 6845 } // namespace dart |
| OLD | NEW |