| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 163 // Simulate (caller's environment) | 163 // Simulate (caller's environment) |
| 164 // Goto (target block) | 164 // Goto (target block) |
| 165 bool IsInlineReturnTarget() const { return is_inline_return_target_; } | 165 bool IsInlineReturnTarget() const { return is_inline_return_target_; } |
| 166 void MarkAsInlineReturnTarget(HBasicBlock* inlined_entry_block) { | 166 void MarkAsInlineReturnTarget(HBasicBlock* inlined_entry_block) { |
| 167 is_inline_return_target_ = true; | 167 is_inline_return_target_ = true; |
| 168 inlined_entry_block_ = inlined_entry_block; | 168 inlined_entry_block_ = inlined_entry_block; |
| 169 } | 169 } |
| 170 HBasicBlock* inlined_entry_block() { return inlined_entry_block_; } | 170 HBasicBlock* inlined_entry_block() { return inlined_entry_block_; } |
| 171 | 171 |
| 172 bool IsDeoptimizing() const { return is_deoptimizing_; } | 172 bool IsDeoptimizing() const { return is_deoptimizing_; } |
| 173 void MarkAsDeoptimizing() { is_deoptimizing_ = true; } | 173 void MarkAsDeoptimizing(); |
| 174 |
| 175 void MarkUnreachable(); |
| 176 bool IsUnreachable() const { return !is_reachable_; } |
| 177 bool IsReachable() const { return is_reachable_; } |
| 174 | 178 |
| 175 bool IsLoopSuccessorDominator() const { | 179 bool IsLoopSuccessorDominator() const { |
| 176 return dominates_loop_successors_; | 180 return dominates_loop_successors_; |
| 177 } | 181 } |
| 178 void MarkAsLoopSuccessorDominator() { | 182 void MarkAsLoopSuccessorDominator() { |
| 179 dominates_loop_successors_ = true; | 183 dominates_loop_successors_ = true; |
| 180 } | 184 } |
| 181 | 185 |
| 182 inline Zone* zone() const; | 186 inline Zone* zone() const; |
| 183 | 187 |
| (...skipping 22 matching lines...) Expand all Loading... |
| 206 HEnvironment* last_environment_; | 210 HEnvironment* last_environment_; |
| 207 // Outgoing parameter count at block exit, set during lithium translation. | 211 // Outgoing parameter count at block exit, set during lithium translation. |
| 208 int argument_count_; | 212 int argument_count_; |
| 209 // Instruction indices into the lithium code stream. | 213 // Instruction indices into the lithium code stream. |
| 210 int first_instruction_index_; | 214 int first_instruction_index_; |
| 211 int last_instruction_index_; | 215 int last_instruction_index_; |
| 212 ZoneList<int> deleted_phis_; | 216 ZoneList<int> deleted_phis_; |
| 213 HBasicBlock* parent_loop_header_; | 217 HBasicBlock* parent_loop_header_; |
| 214 // For blocks marked as inline return target: the block with HEnterInlined. | 218 // For blocks marked as inline return target: the block with HEnterInlined. |
| 215 HBasicBlock* inlined_entry_block_; | 219 HBasicBlock* inlined_entry_block_; |
| 220 bool is_reachable_ : 1; |
| 216 bool is_inline_return_target_ : 1; | 221 bool is_inline_return_target_ : 1; |
| 217 bool is_deoptimizing_ : 1; | 222 bool is_deoptimizing_ : 1; |
| 218 bool dominates_loop_successors_ : 1; | 223 bool dominates_loop_successors_ : 1; |
| 219 bool is_osr_entry_ : 1; | 224 bool is_osr_entry_ : 1; |
| 220 }; | 225 }; |
| 221 | 226 |
| 222 | 227 |
| 223 class HPredecessorIterator BASE_EMBEDDED { | 228 class HPredecessorIterator BASE_EMBEDDED { |
| 224 public: | 229 public: |
| 225 explicit HPredecessorIterator(HBasicBlock* block) | 230 explicit HPredecessorIterator(HBasicBlock* block) |
| (...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 447 } | 452 } |
| 448 | 453 |
| 449 void RecordUint32Instruction(HInstruction* instr) { | 454 void RecordUint32Instruction(HInstruction* instr) { |
| 450 ASSERT(uint32_instructions_ == NULL || !uint32_instructions_->is_empty()); | 455 ASSERT(uint32_instructions_ == NULL || !uint32_instructions_->is_empty()); |
| 451 if (uint32_instructions_ == NULL) { | 456 if (uint32_instructions_ == NULL) { |
| 452 uint32_instructions_ = new(zone()) ZoneList<HInstruction*>(4, zone()); | 457 uint32_instructions_ = new(zone()) ZoneList<HInstruction*>(4, zone()); |
| 453 } | 458 } |
| 454 uint32_instructions_->Add(instr, zone()); | 459 uint32_instructions_->Add(instr, zone()); |
| 455 } | 460 } |
| 456 | 461 |
| 462 void MarkHasUnreachableCode() { has_unreachable_code_ = true; } |
| 463 bool HasUnreachableCode() const { return has_unreachable_code_; } |
| 464 |
| 457 void IncrementInNoSideEffectsScope() { no_side_effects_scope_count_++; } | 465 void IncrementInNoSideEffectsScope() { no_side_effects_scope_count_++; } |
| 458 void DecrementInNoSideEffectsScope() { no_side_effects_scope_count_--; } | 466 void DecrementInNoSideEffectsScope() { no_side_effects_scope_count_--; } |
| 459 bool IsInsideNoSideEffectsScope() { return no_side_effects_scope_count_ > 0; } | 467 bool IsInsideNoSideEffectsScope() { return no_side_effects_scope_count_ > 0; } |
| 460 | 468 |
| 461 private: | 469 private: |
| 462 HConstant* GetConstant(SetOncePointer<HConstant>* pointer, | 470 HConstant* GetConstant(SetOncePointer<HConstant>* pointer, |
| 463 int32_t integer_value); | 471 int32_t integer_value); |
| 464 | 472 |
| 465 template<class Phase> | 473 template<class Phase> |
| 466 void Run() { | 474 void Run() { |
| (...skipping 23 matching lines...) Expand all Loading... |
| 490 SetOncePointer<HConstant> constant_the_hole_; | 498 SetOncePointer<HConstant> constant_the_hole_; |
| 491 SetOncePointer<HConstant> constant_null_; | 499 SetOncePointer<HConstant> constant_null_; |
| 492 SetOncePointer<HConstant> constant_invalid_context_; | 500 SetOncePointer<HConstant> constant_invalid_context_; |
| 493 SetOncePointer<HArgumentsObject> arguments_object_; | 501 SetOncePointer<HArgumentsObject> arguments_object_; |
| 494 | 502 |
| 495 HOsrBuilder* osr_; | 503 HOsrBuilder* osr_; |
| 496 | 504 |
| 497 CompilationInfo* info_; | 505 CompilationInfo* info_; |
| 498 Zone* zone_; | 506 Zone* zone_; |
| 499 | 507 |
| 508 bool has_unreachable_code_; |
| 500 bool is_recursive_; | 509 bool is_recursive_; |
| 501 bool use_optimistic_licm_; | 510 bool use_optimistic_licm_; |
| 502 bool has_soft_deoptimize_; | 511 bool has_soft_deoptimize_; |
| 503 bool depends_on_empty_array_proto_elements_; | 512 bool depends_on_empty_array_proto_elements_; |
| 504 int type_change_checksum_; | 513 int type_change_checksum_; |
| 505 int maximum_environment_size_; | 514 int maximum_environment_size_; |
| 506 int no_side_effects_scope_count_; | 515 int no_side_effects_scope_count_; |
| 507 | 516 |
| 508 DISALLOW_COPY_AND_ASSIGN(HGraph); | 517 DISALLOW_COPY_AND_ASSIGN(HGraph); |
| 509 }; | 518 }; |
| (...skipping 1812 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2322 } | 2331 } |
| 2323 | 2332 |
| 2324 private: | 2333 private: |
| 2325 HGraphBuilder* builder_; | 2334 HGraphBuilder* builder_; |
| 2326 }; | 2335 }; |
| 2327 | 2336 |
| 2328 | 2337 |
| 2329 } } // namespace v8::internal | 2338 } } // namespace v8::internal |
| 2330 | 2339 |
| 2331 #endif // V8_HYDROGEN_H_ | 2340 #endif // V8_HYDROGEN_H_ |
| OLD | NEW |