Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(78)

Side by Side Diff: runtime/vm/dart_api_impl.cc

Issue 1560663002: Drop precompiler-related code from dart_precompiled binary. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: addressed comment Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « runtime/dart-runtime.gyp ('k') | runtime/vm/stub_code.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "vm/class_finalizer.h" 10 #include "vm/class_finalizer.h"
(...skipping 5883 matching lines...) Expand 10 before | Expand all | Expand 10 after
5894 ASSERT(stream != NULL); 5894 ASSERT(stream != NULL);
5895 TimelineEvent* event = stream->StartEvent(); 5895 TimelineEvent* event = stream->StartEvent();
5896 if (event != NULL) { 5896 if (event != NULL) {
5897 event->AsyncEnd(label, async_id); 5897 event->AsyncEnd(label, async_id);
5898 event->Complete(); 5898 event->Complete();
5899 } 5899 }
5900 return Api::Success(); 5900 return Api::Success();
5901 } 5901 }
5902 5902
5903 5903
5904 #if defined(DART_PRECOMPILED)
5905
5904 DART_EXPORT Dart_Handle Dart_Precompile( 5906 DART_EXPORT Dart_Handle Dart_Precompile(
5905 Dart_QualifiedFunctionName entry_points[], 5907 Dart_QualifiedFunctionName entry_points[],
5906 bool reset_fields) { 5908 bool reset_fields) {
5909 UNREACHABLE();
5910 return 0;
5911 }
5912
5913
5914 DART_EXPORT Dart_Handle Dart_CreatePrecompiledSnapshot(
5915 uint8_t** vm_isolate_snapshot_buffer,
5916 intptr_t* vm_isolate_snapshot_size,
5917 uint8_t** isolate_snapshot_buffer,
5918 intptr_t* isolate_snapshot_size,
5919 uint8_t** instructions_snapshot_buffer,
5920 intptr_t* instructions_snapshot_size) {
5921 UNREACHABLE();
5922 return 0;
5923 }
5924
5925 #else // DART_PRECOMPILED
5926
5927 DART_EXPORT Dart_Handle Dart_Precompile(
5928 Dart_QualifiedFunctionName entry_points[],
5929 bool reset_fields) {
5907 API_TIMELINE_BEGIN_END; 5930 API_TIMELINE_BEGIN_END;
5908 DARTSCOPE(Thread::Current()); 5931 DARTSCOPE(Thread::Current());
5909 if (!FLAG_precompilation) { 5932 if (!FLAG_precompilation) {
5910 return Dart_NewApiError("Flag --precompilation was not specified."); 5933 return Dart_NewApiError("Flag --precompilation was not specified.");
5911 } 5934 }
5912 Dart_Handle result = Api::CheckAndFinalizePendingClasses(T); 5935 Dart_Handle result = Api::CheckAndFinalizePendingClasses(T);
5913 if (::Dart_IsError(result)) { 5936 if (::Dart_IsError(result)) {
5914 return result; 5937 return result;
5915 } 5938 }
5916 CHECK_CALLBACK_STATE(T); 5939 CHECK_CALLBACK_STATE(T);
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
5966 isolate_snapshot_buffer, 5989 isolate_snapshot_buffer,
5967 instructions_snapshot_buffer, 5990 instructions_snapshot_buffer,
5968 ApiReallocate); 5991 ApiReallocate);
5969 writer.WriteFullSnapshot(); 5992 writer.WriteFullSnapshot();
5970 *vm_isolate_snapshot_size = writer.VmIsolateSnapshotSize(); 5993 *vm_isolate_snapshot_size = writer.VmIsolateSnapshotSize();
5971 *isolate_snapshot_size = writer.IsolateSnapshotSize(); 5994 *isolate_snapshot_size = writer.IsolateSnapshotSize();
5972 *instructions_snapshot_size = writer.InstructionsSnapshotSize(); 5995 *instructions_snapshot_size = writer.InstructionsSnapshotSize();
5973 5996
5974 return Api::Success(); 5997 return Api::Success();
5975 } 5998 }
5999 #endif // DART_PRECOMPILED
5976 6000
5977 6001
5978 DART_EXPORT bool Dart_IsRunningPrecompiledCode() { 6002 DART_EXPORT bool Dart_IsRunningPrecompiledCode() {
5979 return Dart::IsRunningPrecompiledCode(); 6003 return Dart::IsRunningPrecompiledCode();
5980 } 6004 }
5981 6005
5982 } // namespace dart 6006 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/dart-runtime.gyp ('k') | runtime/vm/stub_code.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698