OLD | NEW |
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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 VM_PRECOMPILER_H_ | 5 #ifndef VM_PRECOMPILER_H_ |
6 #define VM_PRECOMPILER_H_ | 6 #define VM_PRECOMPILER_H_ |
7 | 7 |
8 #include "vm/allocation.h" | 8 #include "vm/allocation.h" |
9 #include "vm/hash_map.h" | 9 #include "vm/hash_map.h" |
10 #include "vm/object.h" | 10 #include "vm/object.h" |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 } | 71 } |
72 | 72 |
73 private: | 73 private: |
74 Zone* zone_; | 74 Zone* zone_; |
75 DirectChainedHashMap<SymbolPair> map_; | 75 DirectChainedHashMap<SymbolPair> map_; |
76 }; | 76 }; |
77 | 77 |
78 | 78 |
79 class Precompiler : public ValueObject { | 79 class Precompiler : public ValueObject { |
80 public: | 80 public: |
81 static RawError* CompileAll(); | 81 static RawError* CompileAll( |
| 82 Dart_QualifiedFunctionName embedder_entry_points[]); |
82 | 83 |
83 private: | 84 private: |
84 explicit Precompiler(Thread* thread); | 85 explicit Precompiler(Thread* thread); |
85 | 86 |
86 void DoCompileAll(); | 87 void DoCompileAll(Dart_QualifiedFunctionName embedder_entry_points[]); |
87 void ClearAllCode(); | 88 void ClearAllCode(); |
88 void AddRoots(); | 89 void AddRoots(Dart_QualifiedFunctionName embedder_entry_points[]); |
| 90 void AddEntryPoints(Dart_QualifiedFunctionName entry_points[]); |
89 void Iterate(); | 91 void Iterate(); |
90 void CleanUp(); | 92 void CleanUp(); |
91 | 93 |
92 void AddCalleesOf(const Function& function); | 94 void AddCalleesOf(const Function& function); |
93 void AddField(const Field& field); | 95 void AddField(const Field& field); |
94 void AddFunction(const Function& function); | 96 void AddFunction(const Function& function); |
95 void AddClass(const Class& cls); | 97 void AddClass(const Class& cls); |
96 void AddSelector(const String& selector); | 98 void AddSelector(const String& selector); |
97 bool IsSent(const String& selector); | 99 bool IsSent(const String& selector); |
98 | 100 |
(...skipping 19 matching lines...) Expand all Loading... |
118 const GrowableObjectArray& libraries_; | 120 const GrowableObjectArray& libraries_; |
119 const GrowableObjectArray& pending_functions_; | 121 const GrowableObjectArray& pending_functions_; |
120 const GrowableObjectArray& collected_closures_; | 122 const GrowableObjectArray& collected_closures_; |
121 SymbolSet sent_selectors_; | 123 SymbolSet sent_selectors_; |
122 Error& error_; | 124 Error& error_; |
123 }; | 125 }; |
124 | 126 |
125 } // namespace dart | 127 } // namespace dart |
126 | 128 |
127 #endif // VM_PRECOMPILER_H_ | 129 #endif // VM_PRECOMPILER_H_ |
OLD | NEW |