| 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 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 156 static Dart_Handle FilePathFromUri(Dart_Handle script_uri, | 156 static Dart_Handle FilePathFromUri(Dart_Handle script_uri, |
| 157 Dart_Handle builtin_lib); | 157 Dart_Handle builtin_lib); |
| 158 | 158 |
| 159 static Dart_Handle ResolveUri(Dart_Handle library_url, | 159 static Dart_Handle ResolveUri(Dart_Handle library_url, |
| 160 Dart_Handle url, | 160 Dart_Handle url, |
| 161 Dart_Handle builtin_lib); | 161 Dart_Handle builtin_lib); |
| 162 | 162 |
| 163 // Sniffs the specified text_buffer to see if it contains the magic number | 163 // Sniffs the specified text_buffer to see if it contains the magic number |
| 164 // representing a script snapshot. If the text_buffer is a script snapshot | 164 // representing a script snapshot. If the text_buffer is a script snapshot |
| 165 // the return value is an updated pointer to the text_buffer pointing past | 165 // the return value is an updated pointer to the text_buffer pointing past |
| 166 // the magic number value. | 166 // the magic number value. The 'buffer_len' parameter is also appropriately |
| 167 // adjusted. |
| 167 static const uint8_t* SniffForMagicNumber(const uint8_t* text_buffer, | 168 static const uint8_t* SniffForMagicNumber(const uint8_t* text_buffer, |
| 169 intptr_t* buffer_len, |
| 168 bool* is_snapshot); | 170 bool* is_snapshot); |
| 169 | 171 |
| 170 // Write a magic number to indicate a script snapshot file. | 172 // Write a magic number to indicate a script snapshot file. |
| 171 static void WriteMagicNumber(File* file); | 173 static void WriteMagicNumber(File* file); |
| 172 | 174 |
| 173 // Global state that stores the original working directory.. | 175 // Global state that stores the original working directory.. |
| 174 static const char* original_working_directory; | 176 static const char* original_working_directory; |
| 175 | 177 |
| 176 static const char* kDartScheme; | 178 static const char* kDartScheme; |
| 177 static const char* kDartExtensionScheme; | 179 static const char* kDartExtensionScheme; |
| (...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 426 void* Peer() const { return cobject_->value.as_external_byte_array.peer; } | 428 void* Peer() const { return cobject_->value.as_external_byte_array.peer; } |
| 427 Dart_WeakPersistentHandleFinalizer Callback() const { | 429 Dart_WeakPersistentHandleFinalizer Callback() const { |
| 428 return cobject_->value.as_external_byte_array.callback; | 430 return cobject_->value.as_external_byte_array.callback; |
| 429 } | 431 } |
| 430 | 432 |
| 431 private: | 433 private: |
| 432 DISALLOW_COPY_AND_ASSIGN(CObjectExternalUint8Array); | 434 DISALLOW_COPY_AND_ASSIGN(CObjectExternalUint8Array); |
| 433 }; | 435 }; |
| 434 | 436 |
| 435 #endif // BIN_DARTUTILS_H_ | 437 #endif // BIN_DARTUTILS_H_ |
| OLD | NEW |