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 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 static void SetIntegerField(Dart_Handle handle, | 90 static void SetIntegerField(Dart_Handle handle, |
91 const char* name, | 91 const char* name, |
92 intptr_t val); | 92 intptr_t val); |
93 static intptr_t GetIntegerField(Dart_Handle handle, | 93 static intptr_t GetIntegerField(Dart_Handle handle, |
94 const char* name); | 94 const char* name); |
95 static void SetStringField(Dart_Handle handle, | 95 static void SetStringField(Dart_Handle handle, |
96 const char* name, | 96 const char* name, |
97 const char* val); | 97 const char* val); |
98 static bool IsDartSchemeURL(const char* url_name); | 98 static bool IsDartSchemeURL(const char* url_name); |
99 static bool IsDartExtensionSchemeURL(const char* url_name); | 99 static bool IsDartExtensionSchemeURL(const char* url_name); |
100 static bool IsDartCryptoLibURL(const char* url_name); | |
101 static bool IsDartIOLibURL(const char* url_name); | 100 static bool IsDartIOLibURL(const char* url_name); |
102 static bool IsDartBuiltinLibURL(const char* url_name); | 101 static bool IsDartBuiltinLibURL(const char* url_name); |
103 static bool IsDartJsonLibURL(const char* url_name); | |
104 static bool IsDartUriLibURL(const char* url_name); | |
105 static bool IsDartUtfLibURL(const char* url_name); | |
106 static Dart_Handle CanonicalizeURL(CommandLineOptions* url_mapping, | 102 static Dart_Handle CanonicalizeURL(CommandLineOptions* url_mapping, |
107 Dart_Handle library, | 103 Dart_Handle library, |
108 const char* url_str); | 104 const char* url_str); |
109 static Dart_Handle ReadStringFromFile(const char* filename); | 105 static Dart_Handle ReadStringFromFile(const char* filename); |
110 static Dart_Handle LibraryTagHandler(Dart_LibraryTag tag, | 106 static Dart_Handle LibraryTagHandler(Dart_LibraryTag tag, |
111 Dart_Handle library, | 107 Dart_Handle library, |
112 Dart_Handle url); | 108 Dart_Handle url); |
113 static Dart_Handle LoadScript(const char* script_uri, | 109 static Dart_Handle LoadScript(const char* script_uri, |
114 Dart_Handle builtin_lib); | 110 Dart_Handle builtin_lib); |
115 static Dart_Handle LoadSource(CommandLineOptions* url_mapping, | 111 static Dart_Handle LoadSource(CommandLineOptions* url_mapping, |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
159 Dart_Handle builtin_lib); | 155 Dart_Handle builtin_lib); |
160 | 156 |
161 // Global state that stores the original working directory.. | 157 // Global state that stores the original working directory.. |
162 static const char* original_working_directory; | 158 static const char* original_working_directory; |
163 | 159 |
164 static const char* kDartScheme; | 160 static const char* kDartScheme; |
165 static const char* kDartExtensionScheme; | 161 static const char* kDartExtensionScheme; |
166 static const char* kASyncLibURL; | 162 static const char* kASyncLibURL; |
167 static const char* kBuiltinLibURL; | 163 static const char* kBuiltinLibURL; |
168 static const char* kCoreLibURL; | 164 static const char* kCoreLibURL; |
169 static const char* kCryptoLibURL; | |
170 static const char* kIOLibURL; | 165 static const char* kIOLibURL; |
171 static const char* kIOLibPatchURL; | 166 static const char* kIOLibPatchURL; |
172 static const char* kJsonLibURL; | |
173 static const char* kUriLibURL; | 167 static const char* kUriLibURL; |
174 static const char* kUtfLibURL; | 168 static const char* kUtfLibURL; |
175 static const char* kIsolateLibURL; | 169 static const char* kIsolateLibURL; |
176 static const char* kScalarlistLibURL; | 170 static const char* kScalarlistLibURL; |
177 static const char* kWebLibURL; | 171 static const char* kWebLibURL; |
178 | 172 |
179 static const char* kIdFieldName; | 173 static const char* kIdFieldName; |
180 | 174 |
181 private: | 175 private: |
182 static const char* GetCanonicalPath(const char* reference_dir, | 176 static const char* GetCanonicalPath(const char* reference_dir, |
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
414 void* Peer() const { return cobject_->value.as_external_byte_array.peer; } | 408 void* Peer() const { return cobject_->value.as_external_byte_array.peer; } |
415 Dart_WeakPersistentHandleFinalizer Callback() const { | 409 Dart_WeakPersistentHandleFinalizer Callback() const { |
416 return cobject_->value.as_external_byte_array.callback; | 410 return cobject_->value.as_external_byte_array.callback; |
417 } | 411 } |
418 | 412 |
419 private: | 413 private: |
420 DISALLOW_COPY_AND_ASSIGN(CObjectExternalUint8Array); | 414 DISALLOW_COPY_AND_ASSIGN(CObjectExternalUint8Array); |
421 }; | 415 }; |
422 | 416 |
423 #endif // BIN_DARTUTILS_H_ | 417 #endif // BIN_DARTUTILS_H_ |
OLD | NEW |