| 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 6308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6319 thread->SetName(name); | 6319 thread->SetName(name); |
| 6320 } | 6320 } |
| 6321 | 6321 |
| 6322 | 6322 |
| 6323 // The precompiler is included in dart_bootstrap and dart_noopt, and | 6323 // The precompiler is included in dart_bootstrap and dart_noopt, and |
| 6324 // excluded from dart and dart_precompiled_runtime. | 6324 // excluded from dart and dart_precompiled_runtime. |
| 6325 #if !defined(DART_PRECOMPILER) | 6325 #if !defined(DART_PRECOMPILER) |
| 6326 | 6326 |
| 6327 DART_EXPORT Dart_Handle | 6327 DART_EXPORT Dart_Handle |
| 6328 Dart_Precompile(Dart_QualifiedFunctionName entry_points[], bool reset_fields) { | 6328 Dart_Precompile(Dart_QualifiedFunctionName entry_points[], bool reset_fields) { |
| 6329 UNREACHABLE(); | 6329 return Api::NewError( |
| 6330 return 0; | 6330 "This VM was built without support for AOT compilation."); |
| 6331 } | 6331 } |
| 6332 | 6332 |
| 6333 | 6333 |
| 6334 DART_EXPORT Dart_Handle | 6334 DART_EXPORT Dart_Handle |
| 6335 Dart_CreatePrecompiledSnapshotAssembly(uint8_t** assembly_buffer, | 6335 Dart_CreatePrecompiledSnapshotAssembly(uint8_t** assembly_buffer, |
| 6336 intptr_t* assembly_size) { | 6336 intptr_t* assembly_size) { |
| 6337 UNREACHABLE(); | 6337 return Api::NewError( |
| 6338 "This VM was built without support for AOT compilation."); |
| 6338 return 0; | 6339 return 0; |
| 6339 } | 6340 } |
| 6340 | 6341 |
| 6341 | 6342 |
| 6342 DART_EXPORT Dart_Handle | 6343 DART_EXPORT Dart_Handle |
| 6343 Dart_CreatePrecompiledSnapshotBlob(uint8_t** vm_isolate_snapshot_buffer, | 6344 Dart_CreatePrecompiledSnapshotBlob(uint8_t** vm_isolate_snapshot_buffer, |
| 6344 intptr_t* vm_isolate_snapshot_size, | 6345 intptr_t* vm_isolate_snapshot_size, |
| 6345 uint8_t** isolate_snapshot_buffer, | 6346 uint8_t** isolate_snapshot_buffer, |
| 6346 intptr_t* isolate_snapshot_size, | 6347 intptr_t* isolate_snapshot_size, |
| 6347 uint8_t** instructions_blob_buffer, | 6348 uint8_t** instructions_blob_buffer, |
| 6348 intptr_t* instructions_blob_size, | 6349 intptr_t* instructions_blob_size, |
| 6349 uint8_t** rodata_blob_buffer, | 6350 uint8_t** rodata_blob_buffer, |
| 6350 intptr_t* rodata_blob_size) { | 6351 intptr_t* rodata_blob_size) { |
| 6351 UNREACHABLE(); | 6352 return Api::NewError( |
| 6352 return 0; | 6353 "This VM was built without support for AOT compilation."); |
| 6353 } | 6354 } |
| 6354 | 6355 |
| 6355 #else // DART_PRECOMPILER | 6356 #else // DART_PRECOMPILER |
| 6356 | 6357 |
| 6357 DART_EXPORT Dart_Handle | 6358 DART_EXPORT Dart_Handle |
| 6358 Dart_Precompile(Dart_QualifiedFunctionName entry_points[], bool reset_fields) { | 6359 Dart_Precompile(Dart_QualifiedFunctionName entry_points[], bool reset_fields) { |
| 6359 #if defined(TARGET_ARCH_IA32) | 6360 #if defined(TARGET_ARCH_IA32) |
| 6360 return Api::NewError("Precompilation is not supported on IA32."); | 6361 return Api::NewError("Precompilation is not supported on IA32."); |
| 6361 #elif defined(TARGET_ARCH_DBC) | 6362 #elif defined(TARGET_ARCH_DBC) |
| 6362 return Api::NewError("Precompilation is not supported on DBC."); | 6363 return Api::NewError("Precompilation is not supported on DBC."); |
| (...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6597 | 6598 |
| 6598 DART_EXPORT bool Dart_IsPrecompiledRuntime() { | 6599 DART_EXPORT bool Dart_IsPrecompiledRuntime() { |
| 6599 #if defined(DART_PRECOMPILED_RUNTIME) | 6600 #if defined(DART_PRECOMPILED_RUNTIME) |
| 6600 return true; | 6601 return true; |
| 6601 #else | 6602 #else |
| 6602 return false; | 6603 return false; |
| 6603 #endif | 6604 #endif |
| 6604 } | 6605 } |
| 6605 | 6606 |
| 6606 } // namespace dart | 6607 } // namespace dart |
| OLD | NEW |