Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(457)

Side by Side Diff: runtime/vm/precompiler.h

Issue 1973553003: VM precompiler: Compute and use result type of static initializers of final fields. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: rebased Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/hash_table.h" 10 #include "vm/hash_table.h"
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
267 267
268 static RawError* CompileFunction(Thread* thread, const Function& function); 268 static RawError* CompileFunction(Thread* thread, const Function& function);
269 269
270 static RawObject* EvaluateStaticInitializer(const Field& field); 270 static RawObject* EvaluateStaticInitializer(const Field& field);
271 static RawObject* ExecuteOnce(SequenceNode* fragment); 271 static RawObject* ExecuteOnce(SequenceNode* fragment);
272 272
273 private: 273 private:
274 Precompiler(Thread* thread, bool reset_fields); 274 Precompiler(Thread* thread, bool reset_fields);
275 275
276 276
277 static RawFunction* CompileStaticInitializer(const Field& field); 277 static RawFunction* CompileStaticInitializer(const Field& field,
278 bool compute_type);
278 279
279 void DoCompileAll(Dart_QualifiedFunctionName embedder_entry_points[]); 280 void DoCompileAll(Dart_QualifiedFunctionName embedder_entry_points[]);
280 void ClearAllCode(); 281 void ClearAllCode();
281 void AddRoots(Dart_QualifiedFunctionName embedder_entry_points[]); 282 void AddRoots(Dart_QualifiedFunctionName embedder_entry_points[]);
282 void AddEntryPoints(Dart_QualifiedFunctionName entry_points[]); 283 void AddEntryPoints(Dart_QualifiedFunctionName entry_points[]);
283 void Iterate(); 284 void Iterate();
284 285
285 void AddType(const AbstractType& type); 286 void AddType(const AbstractType& type);
286 void AddTypesOf(const Class& cls); 287 void AddTypesOf(const Class& cls);
287 void AddTypesOf(const Function& function); 288 void AddTypesOf(const Function& function);
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
388 return function.raw(); 389 return function.raw();
389 } 390 }
390 }; 391 };
391 392
392 typedef UnorderedHashSet<FunctionsTraits> UniqueFunctionsSet; 393 typedef UnorderedHashSet<FunctionsTraits> UniqueFunctionsSet;
393 394
394 395
395 } // namespace dart 396 } // namespace dart
396 397
397 #endif // VM_PRECOMPILER_H_ 398 #endif // VM_PRECOMPILER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698