| 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_CRANKSHAFT_LITHIUM_H_ | 5 #ifndef V8_CRANKSHAFT_LITHIUM_H_ |
| 6 #define V8_CRANKSHAFT_LITHIUM_H_ | 6 #define V8_CRANKSHAFT_LITHIUM_H_ |
| 7 | 7 |
| 8 #include <set> | 8 #include <set> |
| 9 | 9 |
| 10 #include "src/allocation.h" | 10 #include "src/allocation.h" |
| (...skipping 620 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 631 public: | 631 public: |
| 632 static LChunk* NewChunk(HGraph* graph); | 632 static LChunk* NewChunk(HGraph* graph); |
| 633 | 633 |
| 634 void AddInstruction(LInstruction* instruction, HBasicBlock* block); | 634 void AddInstruction(LInstruction* instruction, HBasicBlock* block); |
| 635 LConstantOperand* DefineConstantOperand(HConstant* constant); | 635 LConstantOperand* DefineConstantOperand(HConstant* constant); |
| 636 HConstant* LookupConstant(LConstantOperand* operand) const; | 636 HConstant* LookupConstant(LConstantOperand* operand) const; |
| 637 Representation LookupLiteralRepresentation(LConstantOperand* operand) const; | 637 Representation LookupLiteralRepresentation(LConstantOperand* operand) const; |
| 638 | 638 |
| 639 int ParameterAt(int index); | 639 int ParameterAt(int index); |
| 640 int GetParameterStackSlot(int index) const; | 640 int GetParameterStackSlot(int index) const; |
| 641 int spill_slot_count() const { return spill_slot_count_; } | 641 bool HasAllocatedStackSlots() const { |
| 642 return current_frame_slots_ != base_frame_slots_; |
| 643 } |
| 644 int GetSpillSlotCount() const { |
| 645 return current_frame_slots_ - base_frame_slots_; |
| 646 } |
| 647 int GetTotalFrameSlotCount() const { return current_frame_slots_; } |
| 642 CompilationInfo* info() const { return info_; } | 648 CompilationInfo* info() const { return info_; } |
| 643 HGraph* graph() const { return graph_; } | 649 HGraph* graph() const { return graph_; } |
| 644 Isolate* isolate() const { return graph_->isolate(); } | 650 Isolate* isolate() const { return graph_->isolate(); } |
| 645 const ZoneList<LInstruction*>* instructions() const { return &instructions_; } | 651 const ZoneList<LInstruction*>* instructions() const { return &instructions_; } |
| 646 void AddGapMove(int index, LOperand* from, LOperand* to); | 652 void AddGapMove(int index, LOperand* from, LOperand* to); |
| 647 LGap* GetGapAt(int index) const; | 653 LGap* GetGapAt(int index) const; |
| 648 bool IsGapAt(int index) const; | 654 bool IsGapAt(int index) const; |
| 649 int NearestGapPos(int index) const; | 655 int NearestGapPos(int index) const; |
| 650 void MarkEmptyBlocks(); | 656 void MarkEmptyBlocks(); |
| 651 const ZoneList<LPointerMap*>* pointer_maps() const { return &pointer_maps_; } | 657 const ZoneList<LPointerMap*>* pointer_maps() const { return &pointer_maps_; } |
| (...skipping 28 matching lines...) Expand all Loading... |
| 680 Handle<Code> Codegen(); | 686 Handle<Code> Codegen(); |
| 681 | 687 |
| 682 void set_allocated_double_registers(BitVector* allocated_registers); | 688 void set_allocated_double_registers(BitVector* allocated_registers); |
| 683 BitVector* allocated_double_registers() { | 689 BitVector* allocated_double_registers() { |
| 684 return allocated_double_registers_; | 690 return allocated_double_registers_; |
| 685 } | 691 } |
| 686 | 692 |
| 687 protected: | 693 protected: |
| 688 LChunk(CompilationInfo* info, HGraph* graph); | 694 LChunk(CompilationInfo* info, HGraph* graph); |
| 689 | 695 |
| 690 int spill_slot_count_; | 696 int base_frame_slots_; |
| 697 int current_frame_slots_; |
| 691 | 698 |
| 692 private: | 699 private: |
| 693 void CommitDependencies(Handle<Code> code) const; | 700 void CommitDependencies(Handle<Code> code) const; |
| 694 | 701 |
| 695 CompilationInfo* info_; | 702 CompilationInfo* info_; |
| 696 HGraph* const graph_; | 703 HGraph* const graph_; |
| 697 BitVector* allocated_double_registers_; | 704 BitVector* allocated_double_registers_; |
| 698 ZoneList<LInstruction*> instructions_; | 705 ZoneList<LInstruction*> instructions_; |
| 699 ZoneList<LPointerMap*> pointer_maps_; | 706 ZoneList<LPointerMap*> pointer_maps_; |
| 700 ZoneList<Handle<SharedFunctionInfo>> inlined_functions_; | 707 ZoneList<Handle<SharedFunctionInfo>> inlined_functions_; |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 750 LPlatformChunk* chunk_; | 757 LPlatformChunk* chunk_; |
| 751 CompilationInfo* info_; | 758 CompilationInfo* info_; |
| 752 HGraph* const graph_; | 759 HGraph* const graph_; |
| 753 Status status_; | 760 Status status_; |
| 754 | 761 |
| 755 private: | 762 private: |
| 756 Zone* zone_; | 763 Zone* zone_; |
| 757 }; | 764 }; |
| 758 | 765 |
| 759 | 766 |
| 760 int StackSlotOffset(int index); | |
| 761 | |
| 762 enum NumberUntagDMode { | 767 enum NumberUntagDMode { |
| 763 NUMBER_CANDIDATE_IS_SMI, | 768 NUMBER_CANDIDATE_IS_SMI, |
| 764 NUMBER_CANDIDATE_IS_ANY_TAGGED | 769 NUMBER_CANDIDATE_IS_ANY_TAGGED |
| 765 }; | 770 }; |
| 766 | 771 |
| 767 | 772 |
| 768 class LPhase : public CompilationPhase { | 773 class LPhase : public CompilationPhase { |
| 769 public: | 774 public: |
| 770 LPhase(const char* name, LChunk* chunk) | 775 LPhase(const char* name, LChunk* chunk) |
| 771 : CompilationPhase(name, chunk->info()), | 776 : CompilationPhase(name, chunk->info()), |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 831 InputIterator input_iterator_; | 836 InputIterator input_iterator_; |
| 832 DeepIterator env_iterator_; | 837 DeepIterator env_iterator_; |
| 833 }; | 838 }; |
| 834 | 839 |
| 835 class LInstruction; | 840 class LInstruction; |
| 836 class LCodeGen; | 841 class LCodeGen; |
| 837 } // namespace internal | 842 } // namespace internal |
| 838 } // namespace v8 | 843 } // namespace v8 |
| 839 | 844 |
| 840 #endif // V8_CRANKSHAFT_LITHIUM_H_ | 845 #endif // V8_CRANKSHAFT_LITHIUM_H_ |
| OLD | NEW |