| 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 1248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1259 | 1259 |
| 1260 | 1260 |
| 1261 // --- Initialization and Globals --- | 1261 // --- Initialization and Globals --- |
| 1262 | 1262 |
| 1263 DART_EXPORT const char* Dart_VersionString() { | 1263 DART_EXPORT const char* Dart_VersionString() { |
| 1264 return Version::String(); | 1264 return Version::String(); |
| 1265 } | 1265 } |
| 1266 | 1266 |
| 1267 DART_EXPORT bool Dart_Initialize( | 1267 DART_EXPORT bool Dart_Initialize( |
| 1268 const uint8_t* vm_isolate_snapshot, | 1268 const uint8_t* vm_isolate_snapshot, |
| 1269 const uint8_t* instructions_snapshot, |
| 1269 Dart_IsolateCreateCallback create, | 1270 Dart_IsolateCreateCallback create, |
| 1270 Dart_IsolateInterruptCallback interrupt, | 1271 Dart_IsolateInterruptCallback interrupt, |
| 1271 Dart_IsolateUnhandledExceptionCallback unhandled, | 1272 Dart_IsolateUnhandledExceptionCallback unhandled, |
| 1272 Dart_IsolateShutdownCallback shutdown, | 1273 Dart_IsolateShutdownCallback shutdown, |
| 1273 Dart_FileOpenCallback file_open, | 1274 Dart_FileOpenCallback file_open, |
| 1274 Dart_FileReadCallback file_read, | 1275 Dart_FileReadCallback file_read, |
| 1275 Dart_FileWriteCallback file_write, | 1276 Dart_FileWriteCallback file_write, |
| 1276 Dart_FileCloseCallback file_close, | 1277 Dart_FileCloseCallback file_close, |
| 1277 Dart_EntropySource entropy_source) { | 1278 Dart_EntropySource entropy_source) { |
| 1278 const char* err_msg = Dart::InitOnce(vm_isolate_snapshot, | 1279 const char* err_msg = Dart::InitOnce(vm_isolate_snapshot, |
| 1280 instructions_snapshot, |
| 1279 create, interrupt, unhandled, shutdown, | 1281 create, interrupt, unhandled, shutdown, |
| 1280 file_open, file_read, file_write, | 1282 file_open, file_read, file_write, |
| 1281 file_close, entropy_source); | 1283 file_close, entropy_source); |
| 1282 if (err_msg != NULL) { | 1284 if (err_msg != NULL) { |
| 1283 OS::PrintErr("Dart_Initialize: %s\n", err_msg); | 1285 OS::PrintErr("Dart_Initialize: %s\n", err_msg); |
| 1284 return false; | 1286 return false; |
| 1285 } | 1287 } |
| 1286 return true; | 1288 return true; |
| 1287 } | 1289 } |
| 1288 | 1290 |
| (...skipping 4747 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6036 ASSERT(stream != NULL); | 6038 ASSERT(stream != NULL); |
| 6037 TimelineEvent* event = stream->StartEvent(); | 6039 TimelineEvent* event = stream->StartEvent(); |
| 6038 if (event != NULL) { | 6040 if (event != NULL) { |
| 6039 event->AsyncEnd(label, async_id); | 6041 event->AsyncEnd(label, async_id); |
| 6040 event->Complete(); | 6042 event->Complete(); |
| 6041 } | 6043 } |
| 6042 return Api::Success(); | 6044 return Api::Success(); |
| 6043 } | 6045 } |
| 6044 | 6046 |
| 6045 } // namespace dart | 6047 } // namespace dart |
| OLD | NEW |