| 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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 | 44 |
| 45 static Dart_Handle LoadLibrary(Dart_Handle url, BuiltinLibraryId id); | 45 static Dart_Handle LoadLibrary(Dart_Handle url, BuiltinLibraryId id); |
| 46 static BuiltinLibraryId FindId(const char* url_string); | 46 static BuiltinLibraryId FindId(const char* url_string); |
| 47 | 47 |
| 48 // 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 |
| 49 // load it. | 49 // load it. |
| 50 static Dart_Handle LoadAndCheckLibrary(BuiltinLibraryId id); | 50 static Dart_Handle LoadAndCheckLibrary(BuiltinLibraryId id); |
| 51 | 51 |
| 52 static Dart_Handle SetLoadPort(Dart_Port port); | 52 static Dart_Handle SetLoadPort(Dart_Port port); |
| 53 | 53 |
| 54 static Dart_Port LoadPort() { |
| 55 ASSERT(load_port_ != ILLEGAL_PORT); |
| 56 return load_port_; |
| 57 } |
| 58 |
| 54 private: | 59 private: |
| 55 // Map specified URI to an actual file name from 'source_paths' and read | 60 // Map specified URI to an actual file name from 'source_paths' and read |
| 56 // the file. | 61 // the file. |
| 57 static Dart_Handle GetSource(const char** source_paths, const char* uri); | 62 static Dart_Handle GetSource(const char** source_paths, const char* uri); |
| 58 | 63 |
| 59 // Native method support. | 64 // Native method support. |
| 60 static Dart_NativeFunction NativeLookup(Dart_Handle name, | 65 static Dart_NativeFunction NativeLookup(Dart_Handle name, |
| 61 int argument_count, | 66 int argument_count, |
| 62 bool* auto_setup_scope); | 67 bool* auto_setup_scope); |
| 63 | 68 |
| (...skipping 27 matching lines...) Expand all Loading... |
| 91 static builtin_lib_props builtin_libraries_[]; | 96 static builtin_lib_props builtin_libraries_[]; |
| 92 | 97 |
| 93 DISALLOW_ALLOCATION(); | 98 DISALLOW_ALLOCATION(); |
| 94 DISALLOW_IMPLICIT_CONSTRUCTORS(Builtin); | 99 DISALLOW_IMPLICIT_CONSTRUCTORS(Builtin); |
| 95 }; | 100 }; |
| 96 | 101 |
| 97 } // namespace bin | 102 } // namespace bin |
| 98 } // namespace dart | 103 } // namespace dart |
| 99 | 104 |
| 100 #endif // BIN_BUILTIN_H_ | 105 #endif // BIN_BUILTIN_H_ |
| OLD | NEW |