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 RUNTIME_VM_PRECOMPILER_H_ | 5 #ifndef RUNTIME_VM_PRECOMPILER_H_ |
6 #define RUNTIME_VM_PRECOMPILER_H_ | 6 #define RUNTIME_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 427 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
438 void TryApplyFeedback(const Function& func, FlowGraph* graph); | 438 void TryApplyFeedback(const Function& func, FlowGraph* graph); |
439 void TryApplyFeedback(ParsedJSONArray* js_icdatas, const ICData& ic); | 439 void TryApplyFeedback(ParsedJSONArray* js_icdatas, const ICData& ic); |
440 | 440 |
441 private: | 441 private: |
442 explicit Precompiler(Thread* thread); | 442 explicit Precompiler(Thread* thread); |
443 | 443 |
444 void LoadFeedback(uint8_t* jit_feedback, intptr_t jit_feedback_length); | 444 void LoadFeedback(uint8_t* jit_feedback, intptr_t jit_feedback_length); |
445 ParsedJSONObject* LookupFeedback(const Function& function); | 445 ParsedJSONObject* LookupFeedback(const Function& function); |
446 | 446 |
447 void DoCompileAll(Dart_QualifiedFunctionName embedder_entry_points[]); | 447 void DoCompileAll(Dart_QualifiedFunctionName embedder_entry_points[]); |
448 void ClearAllCode(); | |
449 void AddRoots(Dart_QualifiedFunctionName embedder_entry_points[]); | 448 void AddRoots(Dart_QualifiedFunctionName embedder_entry_points[]); |
450 void AddEntryPoints(Dart_QualifiedFunctionName entry_points[]); | 449 void AddEntryPoints(Dart_QualifiedFunctionName entry_points[]); |
451 void Iterate(); | 450 void Iterate(); |
452 | 451 |
453 void AddType(const AbstractType& type); | 452 void AddType(const AbstractType& type); |
454 void AddTypesOf(const Class& cls); | 453 void AddTypesOf(const Class& cls); |
455 void AddTypesOf(const Function& function); | 454 void AddTypesOf(const Function& function); |
456 void AddTypeArguments(const TypeArguments& args); | 455 void AddTypeArguments(const TypeArguments& args); |
457 void AddCalleesOf(const Function& function); | 456 void AddCalleesOf(const Function& function); |
458 void AddConstObject(const Instance& instance); | 457 void AddConstObject(const Instance& instance); |
(...skipping 27 matching lines...) Expand all Loading... |
486 void DedupLists(); | 485 void DedupLists(); |
487 void DedupInstructions(); | 486 void DedupInstructions(); |
488 void ResetPrecompilerState(); | 487 void ResetPrecompilerState(); |
489 | 488 |
490 void CollectDynamicFunctionNames(); | 489 void CollectDynamicFunctionNames(); |
491 | 490 |
492 void PrecompileStaticInitializers(); | 491 void PrecompileStaticInitializers(); |
493 void PrecompileConstructors(); | 492 void PrecompileConstructors(); |
494 | 493 |
495 void FinalizeAllClasses(); | 494 void FinalizeAllClasses(); |
496 void SortClasses(); | |
497 void RemapClassIds(intptr_t* old_to_new_cid); | |
498 void RehashTypes(); | |
499 void VerifyJITFeedback(); | 495 void VerifyJITFeedback(); |
500 RawScript* LookupScript(const char* uri); | 496 RawScript* LookupScript(const char* uri); |
501 intptr_t MapCid(intptr_t feedback_cid); | 497 intptr_t MapCid(intptr_t feedback_cid); |
502 | 498 |
503 Thread* thread() const { return thread_; } | 499 Thread* thread() const { return thread_; } |
504 Zone* zone() const { return zone_; } | 500 Zone* zone() const { return zone_; } |
505 Isolate* isolate() const { return isolate_; } | 501 Isolate* isolate() const { return isolate_; } |
506 | 502 |
507 Thread* thread_; | 503 Thread* thread_; |
508 Zone* zone_; | 504 Zone* zone_; |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
565 } | 561 } |
566 static RawObject* NewKey(const Function& function) { return function.raw(); } | 562 static RawObject* NewKey(const Function& function) { return function.raw(); } |
567 }; | 563 }; |
568 | 564 |
569 typedef UnorderedHashSet<FunctionsTraits> UniqueFunctionsSet; | 565 typedef UnorderedHashSet<FunctionsTraits> UniqueFunctionsSet; |
570 | 566 |
571 | 567 |
572 } // namespace dart | 568 } // namespace dart |
573 | 569 |
574 #endif // RUNTIME_VM_PRECOMPILER_H_ | 570 #endif // RUNTIME_VM_PRECOMPILER_H_ |
OLD | NEW |