| 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_BUILTIN_H_ | 5 #ifndef BIN_BUILTIN_H_ |
| 6 #define BIN_BUILTIN_H_ | 6 #define BIN_BUILTIN_H_ |
| 7 | 7 |
| 8 #include <stdio.h> | 8 #include <stdio.h> |
| 9 #include <stdlib.h> | 9 #include <stdlib.h> |
| 10 | 10 |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 | 36 |
| 37 // Get source corresponding to built in library specified in 'id'. | 37 // Get source corresponding to built in library specified in 'id'. |
| 38 static Dart_Handle Source(BuiltinLibraryId id); | 38 static Dart_Handle Source(BuiltinLibraryId id); |
| 39 | 39 |
| 40 // Get source of part file specified in 'uri'. | 40 // Get source of part file specified in 'uri'. |
| 41 static Dart_Handle PartSource(BuiltinLibraryId id, const char* part_uri); | 41 static Dart_Handle PartSource(BuiltinLibraryId id, const char* part_uri); |
| 42 | 42 |
| 43 // Setup native resolver method built in library specified in 'id'. | 43 // Setup native resolver method built in library specified in 'id'. |
| 44 static void SetNativeResolver(BuiltinLibraryId id); | 44 static void SetNativeResolver(BuiltinLibraryId id); |
| 45 | 45 |
| 46 static Dart_Handle LoadLibrary(Dart_Handle url, BuiltinLibraryId id); |
| 47 |
| 46 // Check if built in library specified in 'id' is already loaded, if not | 48 // Check if built in library specified in 'id' is already loaded, if not |
| 47 // load it. | 49 // load it. |
| 48 static Dart_Handle LoadAndCheckLibrary(BuiltinLibraryId id); | 50 static Dart_Handle LoadAndCheckLibrary(BuiltinLibraryId id); |
| 49 | 51 |
| 50 private: | 52 private: |
| 51 // Map specified URI to an actual file name from 'source_paths' and read | 53 // Map specified URI to an actual file name from 'source_paths' and read |
| 52 // the file. | 54 // the file. |
| 53 static Dart_Handle GetSource(const char** source_paths, const char* uri); | 55 static Dart_Handle GetSource(const char** source_paths, const char* uri); |
| 54 | 56 |
| 55 // Native method support. | 57 // Native method support. |
| (...skipping 17 matching lines...) Expand all Loading... |
| 73 static builtin_lib_props builtin_libraries_[]; | 75 static builtin_lib_props builtin_libraries_[]; |
| 74 | 76 |
| 75 DISALLOW_ALLOCATION(); | 77 DISALLOW_ALLOCATION(); |
| 76 DISALLOW_IMPLICIT_CONSTRUCTORS(Builtin); | 78 DISALLOW_IMPLICIT_CONSTRUCTORS(Builtin); |
| 77 }; | 79 }; |
| 78 | 80 |
| 79 } // namespace bin | 81 } // namespace bin |
| 80 } // namespace dart | 82 } // namespace dart |
| 81 | 83 |
| 82 #endif // BIN_BUILTIN_H_ | 84 #endif // BIN_BUILTIN_H_ |
| OLD | NEW |