| 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 "vm/class_finalizer.h" | 10 #include "vm/class_finalizer.h" |
| (...skipping 1106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1117 Dart_IsolateShutdownCallback shutdown, | 1117 Dart_IsolateShutdownCallback shutdown, |
| 1118 Dart_FileOpenCallback file_open, | 1118 Dart_FileOpenCallback file_open, |
| 1119 Dart_FileReadCallback file_read, | 1119 Dart_FileReadCallback file_read, |
| 1120 Dart_FileWriteCallback file_write, | 1120 Dart_FileWriteCallback file_write, |
| 1121 Dart_FileCloseCallback file_close, | 1121 Dart_FileCloseCallback file_close, |
| 1122 Dart_EntropySource entropy_source, | 1122 Dart_EntropySource entropy_source, |
| 1123 Dart_GetVMServiceAssetsArchive get_service_assets) { | 1123 Dart_GetVMServiceAssetsArchive get_service_assets) { |
| 1124 if ((instructions_snapshot != NULL) && !FLAG_precompilation) { | 1124 if ((instructions_snapshot != NULL) && !FLAG_precompilation) { |
| 1125 return strdup("Flag --precompilation was not specified."); | 1125 return strdup("Flag --precompilation was not specified."); |
| 1126 } | 1126 } |
| 1127 if (interrupt != NULL) { |
| 1128 return strdup("Dart_Initialize: " |
| 1129 "Setting of interrupt callback is not supported."); |
| 1130 } |
| 1131 if (unhandled != NULL) { |
| 1132 return strdup("Dart_Initialize: " |
| 1133 "Setting of unhandled exception callback is not supported."); |
| 1134 } |
| 1127 const char* err_msg = Dart::InitOnce(vm_isolate_snapshot, | 1135 const char* err_msg = Dart::InitOnce(vm_isolate_snapshot, |
| 1128 instructions_snapshot, | 1136 instructions_snapshot, |
| 1129 create, interrupt, unhandled, shutdown, | 1137 create, shutdown, |
| 1130 file_open, file_read, file_write, | 1138 file_open, file_read, file_write, |
| 1131 file_close, entropy_source, | 1139 file_close, entropy_source, |
| 1132 get_service_assets); | 1140 get_service_assets); |
| 1133 if (err_msg != NULL) { | 1141 if (err_msg != NULL) { |
| 1134 return strdup(err_msg); | 1142 return strdup(err_msg); |
| 1135 } | 1143 } |
| 1136 return NULL; | 1144 return NULL; |
| 1137 } | 1145 } |
| 1138 | 1146 |
| 1139 | 1147 |
| (...skipping 4779 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5919 ApiReallocate); | 5927 ApiReallocate); |
| 5920 writer.WriteFullSnapshot(); | 5928 writer.WriteFullSnapshot(); |
| 5921 *vm_isolate_snapshot_size = writer.VmIsolateSnapshotSize(); | 5929 *vm_isolate_snapshot_size = writer.VmIsolateSnapshotSize(); |
| 5922 *isolate_snapshot_size = writer.IsolateSnapshotSize(); | 5930 *isolate_snapshot_size = writer.IsolateSnapshotSize(); |
| 5923 *instructions_snapshot_size = writer.InstructionsSnapshotSize(); | 5931 *instructions_snapshot_size = writer.InstructionsSnapshotSize(); |
| 5924 | 5932 |
| 5925 return Api::Success(); | 5933 return Api::Success(); |
| 5926 } | 5934 } |
| 5927 | 5935 |
| 5928 } // namespace dart | 5936 } // namespace dart |
| OLD | NEW |