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 #ifndef BIN_DARTUTILS_H_ | 5 #ifndef BIN_DARTUTILS_H_ |
6 #define BIN_DARTUTILS_H_ | 6 #define BIN_DARTUTILS_H_ |
7 | 7 |
8 #include "bin/builtin.h" | 8 #include "bin/builtin.h" |
9 #include "bin/utils.h" | 9 #include "bin/utils.h" |
10 #include "include/dart_api.h" | 10 #include "include/dart_api.h" |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 static bool IsDartUriLibURL(const char* url_name); | 77 static bool IsDartUriLibURL(const char* url_name); |
78 static bool IsDartUtfLibURL(const char* url_name); | 78 static bool IsDartUtfLibURL(const char* url_name); |
79 static Dart_Handle CanonicalizeURL(CommandLineOptions* url_mapping, | 79 static Dart_Handle CanonicalizeURL(CommandLineOptions* url_mapping, |
80 Dart_Handle library, | 80 Dart_Handle library, |
81 const char* url_str); | 81 const char* url_str); |
82 static Dart_Handle ReadStringFromFile(const char* filename); | 82 static Dart_Handle ReadStringFromFile(const char* filename); |
83 static Dart_Handle LoadSource(CommandLineOptions* url_mapping, | 83 static Dart_Handle LoadSource(CommandLineOptions* url_mapping, |
84 Dart_Handle library, | 84 Dart_Handle library, |
85 Dart_Handle url, | 85 Dart_Handle url, |
86 Dart_LibraryTag tag, | 86 Dart_LibraryTag tag, |
87 const char* filename, | 87 const char* filename); |
88 Dart_Handle import_map); | |
89 static bool PostNull(Dart_Port port_id); | 88 static bool PostNull(Dart_Port port_id); |
90 static bool PostInt32(Dart_Port port_id, int32_t value); | 89 static bool PostInt32(Dart_Port port_id, int32_t value); |
91 | 90 |
92 // Create a new Dart OSError object with the current OS error. | 91 // Create a new Dart OSError object with the current OS error. |
93 static Dart_Handle NewDartOSError(); | 92 static Dart_Handle NewDartOSError(); |
94 // Create a new Dart OSError object with the provided OS error. | 93 // Create a new Dart OSError object with the provided OS error. |
95 static Dart_Handle NewDartOSError(OSError* os_error); | 94 static Dart_Handle NewDartOSError(OSError* os_error); |
96 | 95 |
97 static const char* kDartScheme; | 96 static const char* kDartScheme; |
98 static const char* kDartExtensionScheme; | 97 static const char* kDartExtensionScheme; |
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
288 | 287 |
289 class CObjectUint8Array : public CObject { | 288 class CObjectUint8Array : public CObject { |
290 public: | 289 public: |
291 DECLARE_COBJECT_CONSTRUCTORS(Uint8Array) | 290 DECLARE_COBJECT_CONSTRUCTORS(Uint8Array) |
292 | 291 |
293 int Length() const { return cobject_->value.as_byte_array.length; } | 292 int Length() const { return cobject_->value.as_byte_array.length; } |
294 uint8_t* Buffer() const { return cobject_->value.as_byte_array.values; } | 293 uint8_t* Buffer() const { return cobject_->value.as_byte_array.values; } |
295 }; | 294 }; |
296 | 295 |
297 #endif // BIN_DARTUTILS_H_ | 296 #endif // BIN_DARTUTILS_H_ |
OLD | NEW |