 Chromium Code Reviews
 Chromium Code Reviews Issue 2184513003:
  [turbofan] Adds handling of number or oddball type feedback to SpeculativeNumberShiftLeft.  (Closed) 
  Base URL: https://chromium.googlesource.com/v8/v8.git@master
    
  
    Issue 2184513003:
  [turbofan] Adds handling of number or oddball type feedback to SpeculativeNumberShiftLeft.  (Closed) 
  Base URL: https://chromium.googlesource.com/v8/v8.git@master| 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 #include "src/code-factory.h" | 5 #include "src/code-factory.h" | 
| 6 #include "src/compilation-dependencies.h" | 6 #include "src/compilation-dependencies.h" | 
| 7 #include "src/compiler/access-builder.h" | 7 #include "src/compiler/access-builder.h" | 
| 8 #include "src/compiler/js-graph.h" | 8 #include "src/compiler/js-graph.h" | 
| 9 #include "src/compiler/js-typed-lowering.h" | 9 #include "src/compiler/js-typed-lowering.h" | 
| 10 #include "src/compiler/linkage.h" | 10 #include "src/compiler/linkage.h" | 
| (...skipping 577 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 588 r.ConvertInputsToNumber(); | 588 r.ConvertInputsToNumber(); | 
| 589 r.ConvertInputsToUI32(kSigned, kSigned); | 589 r.ConvertInputsToUI32(kSigned, kSigned); | 
| 590 return r.ChangeToPureOperator(intOp, Type::Integral32()); | 590 return r.ChangeToPureOperator(intOp, Type::Integral32()); | 
| 591 } | 591 } | 
| 592 | 592 | 
| 593 Reduction JSTypedLowering::ReduceShiftLeft(Node* node) { | 593 Reduction JSTypedLowering::ReduceShiftLeft(Node* node) { | 
| 594 if (flags() & kDisableIntegerBinaryOpReduction) return NoChange(); | 594 if (flags() & kDisableIntegerBinaryOpReduction) return NoChange(); | 
| 595 | 595 | 
| 596 JSBinopReduction r(this, node); | 596 JSBinopReduction r(this, node); | 
| 597 BinaryOperationHints::Hint feedback = r.GetNumberBinaryOperationFeedback(); | 597 BinaryOperationHints::Hint feedback = r.GetNumberBinaryOperationFeedback(); | 
| 598 if (feedback == BinaryOperationHints::kSigned32 || | 598 if (feedback == BinaryOperationHints::kSigned32 || | 
| 
Benedikt Meurer
2016/07/27 03:34:36
Nit: use feedback != BinaryOperationHints::kAny as
 
epertoso
2016/07/27 08:26:36
Done.
 | |
| 599 feedback == BinaryOperationHints::kSignedSmall) { | 599 feedback == BinaryOperationHints::kSignedSmall || | 
| 600 feedback == BinaryOperationHints::kNumberOrOddball) { | |
| 600 return r.ChangeToSpeculativeOperator( | 601 return r.ChangeToSpeculativeOperator( | 
| 601 simplified()->SpeculativeNumberShiftLeft(feedback), Type::Signed32()); | 602 simplified()->SpeculativeNumberShiftLeft(feedback), Type::Signed32()); | 
| 602 } | 603 } | 
| 603 | 604 | 
| 604 // If deoptimization is enabled we rely on type feedback. | 605 // If deoptimization is enabled we rely on type feedback. | 
| 605 if (r.BothInputsAre(Type::PlainPrimitive()) || | 606 if (r.BothInputsAre(Type::PlainPrimitive()) || | 
| 606 !(flags() & kDeoptimizationEnabled)) { | 607 !(flags() & kDeoptimizationEnabled)) { | 
| 607 r.ConvertInputsToNumber(); | 608 r.ConvertInputsToNumber(); | 
| 608 r.ConvertInputsToUI32(kSigned, kUnsigned); | 609 r.ConvertInputsToUI32(kSigned, kUnsigned); | 
| 609 return r.ChangeToPureOperator(simplified()->NumberShiftLeft(), | 610 return r.ChangeToPureOperator(simplified()->NumberShiftLeft(), | 
| (...skipping 1453 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2063 } | 2064 } | 
| 2064 | 2065 | 
| 2065 | 2066 | 
| 2066 CompilationDependencies* JSTypedLowering::dependencies() const { | 2067 CompilationDependencies* JSTypedLowering::dependencies() const { | 
| 2067 return dependencies_; | 2068 return dependencies_; | 
| 2068 } | 2069 } | 
| 2069 | 2070 | 
| 2070 } // namespace compiler | 2071 } // namespace compiler | 
| 2071 } // namespace internal | 2072 } // namespace internal | 
| 2072 } // namespace v8 | 2073 } // namespace v8 | 
| OLD | NEW |