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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 static bool IsDartUriLibURL(const char* url_name); | 86 static bool IsDartUriLibURL(const char* url_name); |
87 static bool IsDartUtfLibURL(const char* url_name); | 87 static bool IsDartUtfLibURL(const char* url_name); |
88 static Dart_Handle CanonicalizeURL(CommandLineOptions* url_mapping, | 88 static Dart_Handle CanonicalizeURL(CommandLineOptions* url_mapping, |
89 Dart_Handle library, | 89 Dart_Handle library, |
90 const char* url_str); | 90 const char* url_str); |
91 static Dart_Handle ReadStringFromFile(const char* filename); | 91 static Dart_Handle ReadStringFromFile(const char* filename); |
92 static Dart_Handle LoadSource(CommandLineOptions* url_mapping, | 92 static Dart_Handle LoadSource(CommandLineOptions* url_mapping, |
93 Dart_Handle library, | 93 Dart_Handle library, |
94 Dart_Handle url, | 94 Dart_Handle url, |
95 Dart_LibraryTag tag, | 95 Dart_LibraryTag tag, |
96 const char* filename, | 96 const char* filename); |
97 Dart_Handle import_map); | |
98 static bool PostNull(Dart_Port port_id); | 97 static bool PostNull(Dart_Port port_id); |
99 static bool PostInt32(Dart_Port port_id, int32_t value); | 98 static bool PostInt32(Dart_Port port_id, int32_t value); |
100 | 99 |
101 // Create a new Dart OSError object with the current OS error. | 100 // Create a new Dart OSError object with the current OS error. |
102 static Dart_Handle NewDartOSError(); | 101 static Dart_Handle NewDartOSError(); |
103 // Create a new Dart OSError object with the provided OS error. | 102 // Create a new Dart OSError object with the provided OS error. |
104 static Dart_Handle NewDartOSError(OSError* os_error); | 103 static Dart_Handle NewDartOSError(OSError* os_error); |
105 | 104 |
106 static const char* kDartScheme; | 105 static const char* kDartScheme; |
107 static const char* kDartExtensionScheme; | 106 static const char* kDartExtensionScheme; |
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
298 | 297 |
299 class CObjectUint8Array : public CObject { | 298 class CObjectUint8Array : public CObject { |
300 public: | 299 public: |
301 DECLARE_COBJECT_CONSTRUCTORS(Uint8Array) | 300 DECLARE_COBJECT_CONSTRUCTORS(Uint8Array) |
302 | 301 |
303 int Length() const { return cobject_->value.as_byte_array.length; } | 302 int Length() const { return cobject_->value.as_byte_array.length; } |
304 uint8_t* Buffer() const { return cobject_->value.as_byte_array.values; } | 303 uint8_t* Buffer() const { return cobject_->value.as_byte_array.values; } |
305 }; | 304 }; |
306 | 305 |
307 #endif // BIN_DARTUTILS_H_ | 306 #endif // BIN_DARTUTILS_H_ |
OLD | NEW |