| OLD | NEW |
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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_COMPILER_INSTRUCTION_SELECTOR_IMPL_H_ | 5 #ifndef V8_COMPILER_INSTRUCTION_SELECTOR_IMPL_H_ |
| 6 #define V8_COMPILER_INSTRUCTION_SELECTOR_IMPL_H_ | 6 #define V8_COMPILER_INSTRUCTION_SELECTOR_IMPL_H_ |
| 7 | 7 |
| 8 #include "src/compiler/instruction.h" | 8 #include "src/compiler/instruction.h" |
| 9 #include "src/compiler/instruction-selector.h" | 9 #include "src/compiler/instruction-selector.h" |
| 10 #include "src/compiler/linkage.h" | 10 #include "src/compiler/linkage.h" |
| (...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 236 | 236 |
| 237 InstructionSelector* selector_; | 237 InstructionSelector* selector_; |
| 238 }; | 238 }; |
| 239 | 239 |
| 240 | 240 |
| 241 // The flags continuation is a way to combine a branch or a materialization | 241 // The flags continuation is a way to combine a branch or a materialization |
| 242 // of a boolean value with an instruction that sets the flags register. | 242 // of a boolean value with an instruction that sets the flags register. |
| 243 // The whole instruction is treated as a unit by the register allocator, and | 243 // The whole instruction is treated as a unit by the register allocator, and |
| 244 // thus no spills or moves can be introduced between the flags-setting | 244 // thus no spills or moves can be introduced between the flags-setting |
| 245 // instruction and the branch or set it should be combined with. | 245 // instruction and the branch or set it should be combined with. |
| 246 class FlagsContinuation FINAL { | 246 class FlagsContinuation final { |
| 247 public: | 247 public: |
| 248 FlagsContinuation() : mode_(kFlags_none) {} | 248 FlagsContinuation() : mode_(kFlags_none) {} |
| 249 | 249 |
| 250 // Creates a new flags continuation from the given condition and true/false | 250 // Creates a new flags continuation from the given condition and true/false |
| 251 // blocks. | 251 // blocks. |
| 252 FlagsContinuation(FlagsCondition condition, BasicBlock* true_block, | 252 FlagsContinuation(FlagsCondition condition, BasicBlock* true_block, |
| 253 BasicBlock* false_block) | 253 BasicBlock* false_block) |
| 254 : mode_(kFlags_branch), | 254 : mode_(kFlags_branch), |
| 255 condition_(condition), | 255 condition_(condition), |
| 256 true_block_(true_block), | 256 true_block_(true_block), |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 377 : (frame_state_descriptor->GetTotalSize() + | 377 : (frame_state_descriptor->GetTotalSize() + |
| 378 1); // Include deopt id. | 378 1); // Include deopt id. |
| 379 } | 379 } |
| 380 }; | 380 }; |
| 381 | 381 |
| 382 } // namespace compiler | 382 } // namespace compiler |
| 383 } // namespace internal | 383 } // namespace internal |
| 384 } // namespace v8 | 384 } // namespace v8 |
| 385 | 385 |
| 386 #endif // V8_COMPILER_INSTRUCTION_SELECTOR_IMPL_H_ | 386 #endif // V8_COMPILER_INSTRUCTION_SELECTOR_IMPL_H_ |
| OLD | NEW |