| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef V8_LITHIUM_H_ | 5 #ifndef V8_LITHIUM_H_ |
| 6 #define V8_LITHIUM_H_ | 6 #define V8_LITHIUM_H_ |
| 7 | 7 |
| 8 #include <set> | 8 #include <set> |
| 9 | 9 |
| 10 #include "allocation.h" | 10 #include "allocation.h" |
| (...skipping 632 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 643 Label* GetAssemblyLabel(int block_id) const; | 643 Label* GetAssemblyLabel(int block_id) const; |
| 644 | 644 |
| 645 const ZoneList<Handle<JSFunction> >* inlined_closures() const { | 645 const ZoneList<Handle<JSFunction> >* inlined_closures() const { |
| 646 return &inlined_closures_; | 646 return &inlined_closures_; |
| 647 } | 647 } |
| 648 | 648 |
| 649 void AddInlinedClosure(Handle<JSFunction> closure) { | 649 void AddInlinedClosure(Handle<JSFunction> closure) { |
| 650 inlined_closures_.Add(closure, zone()); | 650 inlined_closures_.Add(closure, zone()); |
| 651 } | 651 } |
| 652 | 652 |
| 653 void AddDeprecationDependency(Handle<Map> map) { |
| 654 ASSERT(!map->is_deprecated()); |
| 655 if (!map->CanBeDeprecated()) return; |
| 656 ASSERT(!info_->IsStub()); |
| 657 deprecation_dependencies_.insert(map); |
| 658 } |
| 659 |
| 653 void AddStabilityDependency(Handle<Map> map) { | 660 void AddStabilityDependency(Handle<Map> map) { |
| 654 ASSERT(map->is_stable()); | 661 ASSERT(map->is_stable()); |
| 655 if (!map->CanTransition()) return; | 662 if (!map->CanTransition()) return; |
| 656 ASSERT(!info_->IsStub()); | 663 ASSERT(!info_->IsStub()); |
| 657 stability_dependencies_.insert(map); | 664 stability_dependencies_.insert(map); |
| 658 } | 665 } |
| 659 | 666 |
| 660 Zone* zone() const { return info_->zone(); } | 667 Zone* zone() const { return info_->zone(); } |
| 661 | 668 |
| 662 Handle<Code> Codegen(); | 669 Handle<Code> Codegen(); |
| (...skipping 14 matching lines...) Expand all Loading... |
| 677 typedef std::set<Handle<Map>, MapLess, MapAllocator> MapSet; | 684 typedef std::set<Handle<Map>, MapLess, MapAllocator> MapSet; |
| 678 | 685 |
| 679 void CommitDependencies(Handle<Code> code) const; | 686 void CommitDependencies(Handle<Code> code) const; |
| 680 | 687 |
| 681 CompilationInfo* info_; | 688 CompilationInfo* info_; |
| 682 HGraph* const graph_; | 689 HGraph* const graph_; |
| 683 BitVector* allocated_double_registers_; | 690 BitVector* allocated_double_registers_; |
| 684 ZoneList<LInstruction*> instructions_; | 691 ZoneList<LInstruction*> instructions_; |
| 685 ZoneList<LPointerMap*> pointer_maps_; | 692 ZoneList<LPointerMap*> pointer_maps_; |
| 686 ZoneList<Handle<JSFunction> > inlined_closures_; | 693 ZoneList<Handle<JSFunction> > inlined_closures_; |
| 694 MapSet deprecation_dependencies_; |
| 687 MapSet stability_dependencies_; | 695 MapSet stability_dependencies_; |
| 688 }; | 696 }; |
| 689 | 697 |
| 690 | 698 |
| 691 class LChunkBuilderBase BASE_EMBEDDED { | 699 class LChunkBuilderBase BASE_EMBEDDED { |
| 692 public: | 700 public: |
| 693 explicit LChunkBuilderBase(Zone* zone) | 701 explicit LChunkBuilderBase(Zone* zone) |
| 694 : argument_count_(0), | 702 : argument_count_(0), |
| 695 zone_(zone) { } | 703 zone_(zone) { } |
| 696 | 704 |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 735 private: | 743 private: |
| 736 LChunk* chunk_; | 744 LChunk* chunk_; |
| 737 | 745 |
| 738 DISALLOW_COPY_AND_ASSIGN(LPhase); | 746 DISALLOW_COPY_AND_ASSIGN(LPhase); |
| 739 }; | 747 }; |
| 740 | 748 |
| 741 | 749 |
| 742 } } // namespace v8::internal | 750 } } // namespace v8::internal |
| 743 | 751 |
| 744 #endif // V8_LITHIUM_H_ | 752 #endif // V8_LITHIUM_H_ |
| OLD | NEW |