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 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
193 | 193 |
194 InstructionSelector* selector_; | 194 InstructionSelector* selector_; |
195 }; | 195 }; |
196 | 196 |
197 | 197 |
198 // The flags continuation is a way to combine a branch or a materialization | 198 // The flags continuation is a way to combine a branch or a materialization |
199 // of a boolean value with an instruction that sets the flags register. | 199 // of a boolean value with an instruction that sets the flags register. |
200 // The whole instruction is treated as a unit by the register allocator, and | 200 // The whole instruction is treated as a unit by the register allocator, and |
201 // thus no spills or moves can be introduced between the flags-setting | 201 // thus no spills or moves can be introduced between the flags-setting |
202 // instruction and the branch or set it should be combined with. | 202 // instruction and the branch or set it should be combined with. |
203 class FlagsContinuation V8_FINAL { | 203 class FlagsContinuation FINAL { |
204 public: | 204 public: |
205 FlagsContinuation() : mode_(kFlags_none) {} | 205 FlagsContinuation() : mode_(kFlags_none) {} |
206 | 206 |
207 // Creates a new flags continuation from the given condition and true/false | 207 // Creates a new flags continuation from the given condition and true/false |
208 // blocks. | 208 // blocks. |
209 FlagsContinuation(FlagsCondition condition, BasicBlock* true_block, | 209 FlagsContinuation(FlagsCondition condition, BasicBlock* true_block, |
210 BasicBlock* false_block) | 210 BasicBlock* false_block) |
211 : mode_(kFlags_branch), | 211 : mode_(kFlags_branch), |
212 condition_(condition), | 212 condition_(condition), |
213 true_block_(true_block), | 213 true_block_(true_block), |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
347 ? 0 | 347 ? 0 |
348 : (frame_state_descriptor->size() + 1); | 348 : (frame_state_descriptor->size() + 1); |
349 } | 349 } |
350 }; | 350 }; |
351 | 351 |
352 } // namespace compiler | 352 } // namespace compiler |
353 } // namespace internal | 353 } // namespace internal |
354 } // namespace v8 | 354 } // namespace v8 |
355 | 355 |
356 #endif // V8_COMPILER_INSTRUCTION_SELECTOR_IMPL_H_ | 356 #endif // V8_COMPILER_INSTRUCTION_SELECTOR_IMPL_H_ |
OLD | NEW |