Chromium Code Reviews| 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 5901 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 5912 ASSERT(stream != NULL); | 5912 ASSERT(stream != NULL); |
| 5913 TimelineEvent* event = stream->StartEvent(); | 5913 TimelineEvent* event = stream->StartEvent(); |
| 5914 if (event != NULL) { | 5914 if (event != NULL) { |
| 5915 event->AsyncEnd(label, async_id); | 5915 event->AsyncEnd(label, async_id); |
| 5916 event->Complete(); | 5916 event->Complete(); |
| 5917 } | 5917 } |
| 5918 return Api::Success(); | 5918 return Api::Success(); |
| 5919 } | 5919 } |
| 5920 | 5920 |
| 5921 | 5921 |
| 5922 #if defined(DART_PRECOMPILED_RUNTIME) | 5922 #if !defined(DART_PRECOMPILER) |
| 5923 | 5923 |
| 5924 DART_EXPORT Dart_Handle Dart_Precompile( | 5924 DART_EXPORT Dart_Handle Dart_Precompile( |
| 5925 Dart_QualifiedFunctionName entry_points[], | 5925 Dart_QualifiedFunctionName entry_points[], |
| 5926 bool reset_fields) { | 5926 bool reset_fields) { |
| 5927 UNREACHABLE(); | 5927 UNREACHABLE(); |
| 5928 return 0; | 5928 return 0; |
| 5929 } | 5929 } |
| 5930 | 5930 |
| 5931 | 5931 |
| 5932 DART_EXPORT Dart_Handle Dart_CreatePrecompiledSnapshot( | 5932 DART_EXPORT Dart_Handle Dart_CreatePrecompiledSnapshot( |
| 5933 uint8_t** vm_isolate_snapshot_buffer, | 5933 uint8_t** vm_isolate_snapshot_buffer, |
| 5934 intptr_t* vm_isolate_snapshot_size, | 5934 intptr_t* vm_isolate_snapshot_size, |
| 5935 uint8_t** isolate_snapshot_buffer, | 5935 uint8_t** isolate_snapshot_buffer, |
| 5936 intptr_t* isolate_snapshot_size, | 5936 intptr_t* isolate_snapshot_size, |
| 5937 uint8_t** instructions_snapshot_buffer, | 5937 uint8_t** instructions_snapshot_buffer, |
| 5938 intptr_t* instructions_snapshot_size) { | 5938 intptr_t* instructions_snapshot_size) { |
| 5939 UNREACHABLE(); | 5939 UNREACHABLE(); |
| 5940 return 0; | 5940 return 0; |
| 5941 } | 5941 } |
| 5942 | 5942 |
| 5943 #else // DART_PRECOMPILED_RUNTIME | 5943 #else // DART_PRECOMPILER |
| 5944 | 5944 |
| 5945 DART_EXPORT Dart_Handle Dart_Precompile( | 5945 DART_EXPORT Dart_Handle Dart_Precompile( |
| 5946 Dart_QualifiedFunctionName entry_points[], | 5946 Dart_QualifiedFunctionName entry_points[], |
| 5947 bool reset_fields) { | 5947 bool reset_fields) { |
| 5948 API_TIMELINE_BEGIN_END; | 5948 API_TIMELINE_BEGIN_END; |
| 5949 DARTSCOPE(Thread::Current()); | 5949 DARTSCOPE(Thread::Current()); |
| 5950 if (!FLAG_precompilation) { | 5950 if (!FLAG_precompilation) { |
| 5951 return Dart_NewApiError("Flag --precompilation was not specified."); | 5951 return Dart_NewApiError("Flag --precompilation was not specified."); |
| 5952 } | 5952 } |
| 5953 Dart_Handle result = Api::CheckAndFinalizePendingClasses(T); | 5953 Dart_Handle result = Api::CheckAndFinalizePendingClasses(T); |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 6007 isolate_snapshot_buffer, | 6007 isolate_snapshot_buffer, |
| 6008 instructions_snapshot_buffer, | 6008 instructions_snapshot_buffer, |
| 6009 ApiReallocate); | 6009 ApiReallocate); |
| 6010 writer.WriteFullSnapshot(); | 6010 writer.WriteFullSnapshot(); |
| 6011 *vm_isolate_snapshot_size = writer.VmIsolateSnapshotSize(); | 6011 *vm_isolate_snapshot_size = writer.VmIsolateSnapshotSize(); |
| 6012 *isolate_snapshot_size = writer.IsolateSnapshotSize(); | 6012 *isolate_snapshot_size = writer.IsolateSnapshotSize(); |
| 6013 *instructions_snapshot_size = writer.InstructionsSnapshotSize(); | 6013 *instructions_snapshot_size = writer.InstructionsSnapshotSize(); |
| 6014 | 6014 |
| 6015 return Api::Success(); | 6015 return Api::Success(); |
| 6016 } | 6016 } |
| 6017 #endif // DART_PRECOMPILED_RUNTIME | 6017 #endif // DART_PRECOMPILED_RUNTIME |
|
rmacnak
2016/02/02 22:38:56
DART_PRECOMPILER
Florian Schneider
2016/02/03 01:25:43
Done.
| |
| 6018 | 6018 |
| 6019 | 6019 |
| 6020 DART_EXPORT bool Dart_IsRunningPrecompiledCode() { | 6020 DART_EXPORT bool Dart_IsRunningPrecompiledCode() { |
| 6021 return Dart::IsRunningPrecompiledCode(); | 6021 return Dart::IsRunningPrecompiledCode(); |
| 6022 } | 6022 } |
| 6023 | 6023 |
| 6024 } // namespace dart | 6024 } // namespace dart |
| OLD | NEW |