OLD | NEW |
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, 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 RUNTIME_VM_KERNEL_READER_H_ | 5 #ifndef RUNTIME_VM_KERNEL_READER_H_ |
6 #define RUNTIME_VM_KERNEL_READER_H_ | 6 #define RUNTIME_VM_KERNEL_READER_H_ |
7 | 7 |
8 #if !defined(DART_PRECOMPILED_RUNTIME) | 8 #if !defined(DART_PRECOMPILED_RUNTIME) |
9 #include <map> | 9 #include <map> |
10 | 10 |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 static void SetupFunctionParameters(TranslationHelper translation_helper_, | 60 static void SetupFunctionParameters(TranslationHelper translation_helper_, |
61 DartTypeTranslator type_translator_, | 61 DartTypeTranslator type_translator_, |
62 const dart::Class& owner, | 62 const dart::Class& owner, |
63 const dart::Function& function, | 63 const dart::Function& function, |
64 FunctionNode* kernel_function, | 64 FunctionNode* kernel_function, |
65 bool is_method, | 65 bool is_method, |
66 bool is_closure); | 66 bool is_closure); |
67 | 67 |
68 void ReadLibrary(Library* kernel_library); | 68 void ReadLibrary(Library* kernel_library); |
69 | 69 |
70 const dart::String& DartSymbol(String* str) { | 70 const dart::String& DartSymbol(intptr_t string_index) { |
71 return translation_helper_.DartSymbol(str); | 71 return translation_helper_.DartSymbol(string_index); |
72 } | 72 } |
73 | 73 |
74 uint8_t CharacterAt(String* str, intptr_t index); | 74 uint8_t CharacterAt(intptr_t string_index, intptr_t index); |
75 | 75 |
76 private: | 76 private: |
77 friend class BuildingTranslationHelper; | 77 friend class BuildingTranslationHelper; |
78 | 78 |
79 void ReadPreliminaryClass(dart::Class* klass, Class* kernel_klass); | 79 void ReadPreliminaryClass(dart::Class* klass, Class* kernel_klass); |
80 dart::Class& ReadClass(const dart::Library& library, | 80 dart::Class& ReadClass(const dart::Library& library, |
81 const dart::Class& toplevel_class, | 81 const dart::Class& toplevel_class, |
82 Class* kernel_klass); | 82 Class* kernel_klass); |
83 void ReadProcedure(const dart::Library& library, | 83 void ReadProcedure(const dart::Library& library, |
84 const dart::Class& owner, | 84 const dart::Class& owner, |
85 Procedure* procedure, | 85 Procedure* procedure, |
86 Class* kernel_klass = NULL); | 86 Class* kernel_klass = NULL); |
87 | 87 |
88 RawArray* MakeFunctionsArray(); | 88 RawArray* MakeFunctionsArray(); |
89 | 89 |
90 // If klass's script is not the script at the uri index, return a PatchClass | 90 // If klass's script is not the script at the uri index, return a PatchClass |
91 // for klass whose script corresponds to the uri index. | 91 // for klass whose script corresponds to the uri index. |
92 // Otherwise return klass. | 92 // Otherwise return klass. |
93 const Object& ClassForScriptAt(const dart::Class& klass, | 93 const Object& ClassForScriptAt(const dart::Class& klass, |
94 intptr_t source_uri_index); | 94 intptr_t source_uri_index); |
95 Script& ScriptAt(intptr_t source_uri_index, String* import_uri = NULL); | 95 Script& ScriptAt(intptr_t source_uri_index, intptr_t import_uri = -1); |
96 | 96 |
97 void GenerateFieldAccessors(const dart::Class& klass, | 97 void GenerateFieldAccessors(const dart::Class& klass, |
98 const dart::Field& field, | 98 const dart::Field& field, |
99 Field* kernel_field); | 99 Field* kernel_field); |
100 | 100 |
101 void SetupFieldAccessorFunction(const dart::Class& klass, | 101 void SetupFieldAccessorFunction(const dart::Class& klass, |
102 const dart::Function& function); | 102 const dart::Function& function); |
103 | 103 |
104 dart::Library& LookupLibrary(CanonicalName* library); | 104 dart::Library& LookupLibrary(CanonicalName* library); |
105 dart::Class& LookupClass(CanonicalName* klass); | 105 dart::Class& LookupClass(CanonicalName* klass); |
(...skipping 15 matching lines...) Expand all Loading... |
121 | 121 |
122 GrowableArray<const dart::Function*> functions_; | 122 GrowableArray<const dart::Function*> functions_; |
123 GrowableArray<const dart::Field*> fields_; | 123 GrowableArray<const dart::Field*> fields_; |
124 }; | 124 }; |
125 | 125 |
126 } // namespace kernel | 126 } // namespace kernel |
127 } // namespace dart | 127 } // namespace dart |
128 | 128 |
129 #endif // !defined(DART_PRECOMPILED_RUNTIME) | 129 #endif // !defined(DART_PRECOMPILED_RUNTIME) |
130 #endif // RUNTIME_VM_KERNEL_READER_H_ | 130 #endif // RUNTIME_VM_KERNEL_READER_H_ |
OLD | NEW |