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 "include/dart_api.h" | 9 #include "include/dart_api.h" |
10 #include "platform/globals.h" | 10 #include "platform/globals.h" |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 static void SetIntegerInstanceField(Dart_Handle handle, | 62 static void SetIntegerInstanceField(Dart_Handle handle, |
63 const char* name, | 63 const char* name, |
64 intptr_t val); | 64 intptr_t val); |
65 static intptr_t GetIntegerInstanceField(Dart_Handle handle, | 65 static intptr_t GetIntegerInstanceField(Dart_Handle handle, |
66 const char* name); | 66 const char* name); |
67 static void SetStringInstanceField(Dart_Handle handle, | 67 static void SetStringInstanceField(Dart_Handle handle, |
68 const char* name, | 68 const char* name, |
69 const char* val); | 69 const char* val); |
70 static bool IsDartSchemeURL(const char* url_name); | 70 static bool IsDartSchemeURL(const char* url_name); |
71 static bool IsDartIOLibURL(const char* url_name); | 71 static bool IsDartIOLibURL(const char* url_name); |
| 72 static bool IsDartJsonLibURL(const char* url_name); |
| 73 static bool IsDartUriLibURL(const char* url_name); |
| 74 static bool IsDartUtf8LibURL(const char* url_name); |
72 static Dart_Handle CanonicalizeURL(CommandLineOptions* url_mapping, | 75 static Dart_Handle CanonicalizeURL(CommandLineOptions* url_mapping, |
73 Dart_Handle library, | 76 Dart_Handle library, |
74 const char* url_str); | 77 const char* url_str); |
75 static Dart_Handle ReadStringFromFile(const char* filename); | 78 static Dart_Handle ReadStringFromFile(const char* filename); |
76 static Dart_Handle LoadSource(CommandLineOptions* url_mapping, | 79 static Dart_Handle LoadSource(CommandLineOptions* url_mapping, |
77 Dart_Handle library, | 80 Dart_Handle library, |
78 Dart_Handle url, | 81 Dart_Handle url, |
79 Dart_LibraryTag tag, | 82 Dart_LibraryTag tag, |
80 const char* filename, | 83 const char* filename, |
81 Dart_Handle import_map); | 84 Dart_Handle import_map); |
82 static bool PostNull(Dart_Port port_id); | 85 static bool PostNull(Dart_Port port_id); |
83 static bool PostInt32(Dart_Port port_id, int32_t value); | 86 static bool PostInt32(Dart_Port port_id, int32_t value); |
84 | 87 |
85 static const char* kDartScheme; | 88 static const char* kDartScheme; |
86 static const char* kBuiltinLibURL; | 89 static const char* kBuiltinLibURL; |
87 static const char* kCoreLibURL; | 90 static const char* kCoreLibURL; |
88 static const char* kCoreImplLibURL; | 91 static const char* kCoreImplLibURL; |
89 static const char* kIOLibURL; | 92 static const char* kIOLibURL; |
| 93 static const char* kJsonLibURL; |
| 94 static const char* kUriLibURL; |
| 95 static const char* kUtf8LibURL; |
90 | 96 |
91 static const char* kIdFieldName; | 97 static const char* kIdFieldName; |
92 | 98 |
93 private: | 99 private: |
94 static const char* GetCanonicalPath(const char* reference_dir, | 100 static const char* GetCanonicalPath(const char* reference_dir, |
95 const char* filename); | 101 const char* filename); |
96 | 102 |
97 DISALLOW_ALLOCATION(); | 103 DISALLOW_ALLOCATION(); |
98 DISALLOW_IMPLICIT_CONSTRUCTORS(DartUtils); | 104 DISALLOW_IMPLICIT_CONSTRUCTORS(DartUtils); |
99 }; | 105 }; |
100 | 106 |
101 #endif // BIN_DARTUTILS_H_ | 107 #endif // BIN_DARTUTILS_H_ |
OLD | NEW |