OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 "bin/dartutils.h" | 5 #include "bin/dartutils.h" |
6 | 6 |
7 #include "bin/file.h" | 7 #include "bin/file.h" |
8 #include "include/dart_api.h" | 8 #include "include/dart_api.h" |
9 #include "platform/assert.h" | 9 #include "platform/assert.h" |
10 #include "platform/globals.h" | 10 #include "platform/globals.h" |
11 | 11 |
12 const char* DartUtils::kDartScheme = "dart:"; | 12 const char* DartUtils::kDartScheme = "dart:"; |
13 const char* DartUtils::kDartExtensionScheme = "dart-ext:"; | 13 const char* DartUtils::kDartExtensionScheme = "dart-ext:"; |
14 const char* DartUtils::kBuiltinLibURL = "dart:builtin"; | 14 const char* DartUtils::kBuiltinLibURL = "dart:builtin"; |
15 const char* DartUtils::kCoreLibURL = "dart:core"; | 15 const char* DartUtils::kCoreLibURL = "dart:core"; |
16 const char* DartUtils::kCoreImplLibURL = "dart:coreimpl"; | 16 const char* DartUtils::kCoreImplLibURL = "dart:coreimpl"; |
17 const char* DartUtils::kIOLibURL = "dart:io"; | 17 const char* DartUtils::kIOLibURL = "dart:io"; |
18 const char* DartUtils::kJsonLibURL = "dart:json"; | 18 const char* DartUtils::kJsonLibURL = "dart:json"; |
19 const char* DartUtils::kUriLibURL = "dart:uri"; | 19 const char* DartUtils::kUriLibURL = "dart:uri"; |
20 const char* DartUtils::kUtf8LibURL = "dart:utf8"; | 20 const char* DartUtils::kUtf8LibURL = "dart:utf8"; |
| 21 const char* DartUtils::kIsolateLibURL = "dart:isolate"; |
21 | 22 |
22 | 23 |
23 const char* DartUtils::kIdFieldName = "_id"; | 24 const char* DartUtils::kIdFieldName = "_id"; |
24 | 25 |
25 | 26 |
26 static const char* MapLibraryUrl(CommandLineOptions* url_mapping, | 27 static const char* MapLibraryUrl(CommandLineOptions* url_mapping, |
27 const char* url_string) { | 28 const char* url_string) { |
28 ASSERT(url_mapping != NULL); | 29 ASSERT(url_mapping != NULL); |
29 // We need to check if the passed in url is found in the url_mapping array, | 30 // We need to check if the passed in url is found in the url_mapping array, |
30 // in that case use the mapped entry. | 31 // in that case use the mapped entry. |
(...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
371 return cobject; | 372 return cobject; |
372 } | 373 } |
373 | 374 |
374 | 375 |
375 Dart_CObject* CObject::NewByteArray(int length) { | 376 Dart_CObject* CObject::NewByteArray(int length) { |
376 Dart_CObject* cobject = New(Dart_CObject::kByteArray, length); | 377 Dart_CObject* cobject = New(Dart_CObject::kByteArray, length); |
377 cobject->value.as_byte_array.length = length; | 378 cobject->value.as_byte_array.length = length; |
378 cobject->value.as_byte_array.values = reinterpret_cast<uint8_t*>(cobject + 1); | 379 cobject->value.as_byte_array.values = reinterpret_cast<uint8_t*>(cobject + 1); |
379 return cobject; | 380 return cobject; |
380 } | 381 } |
OLD | NEW |