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