| 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 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 249 ASSERT(IsBranch()); | 249 ASSERT(IsBranch()); |
| 250 return false_block_; | 250 return false_block_; |
| 251 } | 251 } |
| 252 | 252 |
| 253 void Negate() { condition_ = static_cast<FlagsCondition>(condition_ ^ 1); } | 253 void Negate() { condition_ = static_cast<FlagsCondition>(condition_ ^ 1); } |
| 254 | 254 |
| 255 void Commute() { | 255 void Commute() { |
| 256 switch (condition_) { | 256 switch (condition_) { |
| 257 case kEqual: | 257 case kEqual: |
| 258 case kNotEqual: | 258 case kNotEqual: |
| 259 case kOverflow: |
| 260 case kNotOverflow: |
| 259 return; | 261 return; |
| 260 case kSignedLessThan: | 262 case kSignedLessThan: |
| 261 condition_ = kSignedGreaterThan; | 263 condition_ = kSignedGreaterThan; |
| 262 return; | 264 return; |
| 263 case kSignedGreaterThanOrEqual: | 265 case kSignedGreaterThanOrEqual: |
| 264 condition_ = kSignedLessThanOrEqual; | 266 condition_ = kSignedLessThanOrEqual; |
| 265 return; | 267 return; |
| 266 case kSignedLessThanOrEqual: | 268 case kSignedLessThanOrEqual: |
| 267 condition_ = kSignedGreaterThanOrEqual; | 269 condition_ = kSignedGreaterThanOrEqual; |
| 268 return; | 270 return; |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 343 int control_count() { return descriptor->CanLazilyDeoptimize() ? 2 : 0; } | 345 int control_count() { return descriptor->CanLazilyDeoptimize() ? 2 : 0; } |
| 344 | 346 |
| 345 int fixed_and_control_count() { return fixed_count + control_count(); } | 347 int fixed_and_control_count() { return fixed_count + control_count(); } |
| 346 }; | 348 }; |
| 347 | 349 |
| 348 } // namespace compiler | 350 } // namespace compiler |
| 349 } // namespace internal | 351 } // namespace internal |
| 350 } // namespace v8 | 352 } // namespace v8 |
| 351 | 353 |
| 352 #endif // V8_COMPILER_INSTRUCTION_SELECTOR_IMPL_H_ | 354 #endif // V8_COMPILER_INSTRUCTION_SELECTOR_IMPL_H_ |
| OLD | NEW |