OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 public: | 53 public: |
54 explicit HBasicBlock(HGraph* graph); | 54 explicit HBasicBlock(HGraph* graph); |
55 virtual ~HBasicBlock() { } | 55 virtual ~HBasicBlock() { } |
56 | 56 |
57 // Simple accessors. | 57 // Simple accessors. |
58 int block_id() const { return block_id_; } | 58 int block_id() const { return block_id_; } |
59 void set_block_id(int id) { block_id_ = id; } | 59 void set_block_id(int id) { block_id_ = id; } |
60 HGraph* graph() const { return graph_; } | 60 HGraph* graph() const { return graph_; } |
61 const ZoneList<HPhi*>* phis() const { return &phis_; } | 61 const ZoneList<HPhi*>* phis() const { return &phis_; } |
62 HInstruction* first() const { return first_; } | 62 HInstruction* first() const { return first_; } |
| 63 HInstruction* last() const { return last_; } |
| 64 void set_last(HInstruction* instr) { last_ = instr; } |
63 HInstruction* GetLastInstruction(); | 65 HInstruction* GetLastInstruction(); |
64 HControlInstruction* end() const { return end_; } | 66 HControlInstruction* end() const { return end_; } |
65 HLoopInformation* loop_information() const { return loop_information_; } | 67 HLoopInformation* loop_information() const { return loop_information_; } |
66 const ZoneList<HBasicBlock*>* predecessors() const { return &predecessors_; } | 68 const ZoneList<HBasicBlock*>* predecessors() const { return &predecessors_; } |
67 bool HasPredecessor() const { return predecessors_.length() > 0; } | 69 bool HasPredecessor() const { return predecessors_.length() > 0; } |
68 const ZoneList<HBasicBlock*>* dominated_blocks() const { | 70 const ZoneList<HBasicBlock*>* dominated_blocks() const { |
69 return &dominated_blocks_; | 71 return &dominated_blocks_; |
70 } | 72 } |
71 const ZoneList<int>* deleted_phis() const { | 73 const ZoneList<int>* deleted_phis() const { |
72 return &deleted_phis_; | 74 return &deleted_phis_; |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
141 private: | 143 private: |
142 void RegisterPredecessor(HBasicBlock* pred); | 144 void RegisterPredecessor(HBasicBlock* pred); |
143 void AddDominatedBlock(HBasicBlock* block); | 145 void AddDominatedBlock(HBasicBlock* block); |
144 | 146 |
145 HSimulate* CreateSimulate(int id); | 147 HSimulate* CreateSimulate(int id); |
146 | 148 |
147 int block_id_; | 149 int block_id_; |
148 HGraph* graph_; | 150 HGraph* graph_; |
149 ZoneList<HPhi*> phis_; | 151 ZoneList<HPhi*> phis_; |
150 HInstruction* first_; | 152 HInstruction* first_; |
151 HInstruction* last_; // Last non-control instruction of the block. | 153 HInstruction* last_; |
152 HControlInstruction* end_; | 154 HControlInstruction* end_; |
153 HLoopInformation* loop_information_; | 155 HLoopInformation* loop_information_; |
154 ZoneList<HBasicBlock*> predecessors_; | 156 ZoneList<HBasicBlock*> predecessors_; |
155 HBasicBlock* dominator_; | 157 HBasicBlock* dominator_; |
156 ZoneList<HBasicBlock*> dominated_blocks_; | 158 ZoneList<HBasicBlock*> dominated_blocks_; |
157 HEnvironment* last_environment_; | 159 HEnvironment* last_environment_; |
158 // Outgoing parameter count at block exit, set during lithium translation. | 160 // Outgoing parameter count at block exit, set during lithium translation. |
159 int argument_count_; | 161 int argument_count_; |
160 // Instruction indices into the lithium code stream. | 162 // Instruction indices into the lithium code stream. |
161 int first_instruction_index_; | 163 int first_instruction_index_; |
(...skipping 657 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
819 CaseClause* clause); | 821 CaseClause* clause); |
820 | 822 |
821 HValue* BuildContextChainWalk(Variable* var); | 823 HValue* BuildContextChainWalk(Variable* var); |
822 | 824 |
823 void AddCheckConstantFunction(Call* expr, | 825 void AddCheckConstantFunction(Call* expr, |
824 HValue* receiver, | 826 HValue* receiver, |
825 Handle<Map> receiver_map, | 827 Handle<Map> receiver_map, |
826 bool smi_and_map_check); | 828 bool smi_and_map_check); |
827 | 829 |
828 | 830 |
829 HBasicBlock* BuildTypeSwitch(ZoneMapList* maps, | 831 HBasicBlock* BuildTypeSwitch(HValue* receiver, |
830 ZoneList<HSubgraph*>* subgraphs, | 832 ZoneMapList* maps, |
831 HValue* receiver, | 833 ZoneList<HSubgraph*>* body_graphs, |
| 834 HSubgraph* default_graph, |
832 int join_id); | 835 int join_id); |
833 | 836 |
834 TypeFeedbackOracle* oracle_; | 837 TypeFeedbackOracle* oracle_; |
835 HGraph* graph_; | 838 HGraph* graph_; |
836 HSubgraph* current_subgraph_; | 839 HSubgraph* current_subgraph_; |
837 IterationStatement* peeled_statement_; | 840 IterationStatement* peeled_statement_; |
838 // Expression context of the currently visited subexpression. NULL when | 841 // Expression context of the currently visited subexpression. NULL when |
839 // visiting statements. | 842 // visiting statements. |
840 AstContext* ast_context_; | 843 AstContext* ast_context_; |
841 | 844 |
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1063 const char* filename_; | 1066 const char* filename_; |
1064 HeapStringAllocator string_allocator_; | 1067 HeapStringAllocator string_allocator_; |
1065 StringStream trace_; | 1068 StringStream trace_; |
1066 int indent_; | 1069 int indent_; |
1067 }; | 1070 }; |
1068 | 1071 |
1069 | 1072 |
1070 } } // namespace v8::internal | 1073 } } // namespace v8::internal |
1071 | 1074 |
1072 #endif // V8_HYDROGEN_H_ | 1075 #endif // V8_HYDROGEN_H_ |
OLD | NEW |