| 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/isolate_data.h" | 8 #include "bin/isolate_data.h" |
| 9 #include "include/dart_api.h" | 9 #include "include/dart_api.h" |
| 10 #include "include/dart_native_api.h" | 10 #include "include/dart_native_api.h" |
| (...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 190 IsolateData* isolate_data = | 190 IsolateData* isolate_data = |
| 191 reinterpret_cast<IsolateData*>(Dart_CurrentIsolateData()); | 191 reinterpret_cast<IsolateData*>(Dart_CurrentIsolateData()); |
| 192 return isolate_data->builtin_lib(); | 192 return isolate_data->builtin_lib(); |
| 193 } | 193 } |
| 194 | 194 |
| 195 static bool SetOriginalWorkingDirectory(); | 195 static bool SetOriginalWorkingDirectory(); |
| 196 static Dart_Handle GetCanonicalizableWorkingDirectory(); | 196 static Dart_Handle GetCanonicalizableWorkingDirectory(); |
| 197 | 197 |
| 198 static const char* MapLibraryUrl(const char* url_string); | 198 static const char* MapLibraryUrl(const char* url_string); |
| 199 | 199 |
| 200 static Dart_Handle ResolveUriInWorkingDirectory(Dart_Handle script_uri); |
| 200 static Dart_Handle ResolveScript(Dart_Handle url); | 201 static Dart_Handle ResolveScript(Dart_Handle url); |
| 201 | 202 |
| 202 // Sniffs the specified text_buffer to see if it contains the magic number | 203 // Sniffs the specified text_buffer to see if it contains the magic number |
| 203 // representing a script snapshot. If the text_buffer is a script snapshot | 204 // representing a script snapshot. If the text_buffer is a script snapshot |
| 204 // the return value is an updated pointer to the text_buffer pointing past | 205 // the return value is an updated pointer to the text_buffer pointing past |
| 205 // the magic number value. The 'buffer_len' parameter is also appropriately | 206 // the magic number value. The 'buffer_len' parameter is also appropriately |
| 206 // adjusted. | 207 // adjusted. |
| 207 static const uint8_t* SniffForMagicNumber(const uint8_t* text_buffer, | 208 static const uint8_t* SniffForMagicNumber(const uint8_t* text_buffer, |
| 208 intptr_t* buffer_len, | 209 intptr_t* buffer_len, |
| 209 bool* is_snapshot); | 210 bool* is_snapshot); |
| (...skipping 455 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 665 bool is_typed_data_; | 666 bool is_typed_data_; |
| 666 | 667 |
| 667 DISALLOW_ALLOCATION(); | 668 DISALLOW_ALLOCATION(); |
| 668 DISALLOW_COPY_AND_ASSIGN(ScopedMemBuffer); | 669 DISALLOW_COPY_AND_ASSIGN(ScopedMemBuffer); |
| 669 }; | 670 }; |
| 670 | 671 |
| 671 } // namespace bin | 672 } // namespace bin |
| 672 } // namespace dart | 673 } // namespace dart |
| 673 | 674 |
| 674 #endif // BIN_DARTUTILS_H_ | 675 #endif // BIN_DARTUTILS_H_ |
| OLD | NEW |