Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(155)

Side by Side Diff: src/compiler/representation-change.cc

Issue 2149493002: [turbofan] Introduce CheckedUint32Div and CheckUint32Mod operators. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Address comment Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/compiler/representation-change.h ('k') | src/compiler/simplified-lowering.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 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/compiler/representation-change.h" 5 #include "src/compiler/representation-change.h"
6 6
7 #include <sstream> 7 #include <sstream>
8 8
9 #include "src/base/bits.h" 9 #include "src/base/bits.h"
10 #include "src/code-factory.h" 10 #include "src/code-factory.h"
(...skipping 645 matching lines...) Expand 10 before | Expand all | Expand 10 after
656 case IrOpcode::kNumberClz32: 656 case IrOpcode::kNumberClz32:
657 return machine()->Word32Clz(); 657 return machine()->Word32Clz();
658 case IrOpcode::kNumberImul: 658 case IrOpcode::kNumberImul:
659 return machine()->Int32Mul(); 659 return machine()->Int32Mul();
660 default: 660 default:
661 UNREACHABLE(); 661 UNREACHABLE();
662 return nullptr; 662 return nullptr;
663 } 663 }
664 } 664 }
665 665
666 const Operator* RepresentationChanger::Uint32OverflowOperatorFor(
667 IrOpcode::Value opcode) {
668 switch (opcode) {
669 case IrOpcode::kSpeculativeNumberDivide:
670 return simplified()->CheckedUint32Div();
671 case IrOpcode::kSpeculativeNumberModulus:
672 return simplified()->CheckedUint32Mod();
673 default:
674 UNREACHABLE();
675 return nullptr;
676 }
677 }
666 678
667 const Operator* RepresentationChanger::Float64OperatorFor( 679 const Operator* RepresentationChanger::Float64OperatorFor(
668 IrOpcode::Value opcode) { 680 IrOpcode::Value opcode) {
669 switch (opcode) { 681 switch (opcode) {
670 case IrOpcode::kSpeculativeNumberAdd: 682 case IrOpcode::kSpeculativeNumberAdd:
671 case IrOpcode::kNumberAdd: 683 case IrOpcode::kNumberAdd:
672 return machine()->Float64Add(); 684 return machine()->Float64Add();
673 case IrOpcode::kSpeculativeNumberSubtract: 685 case IrOpcode::kSpeculativeNumberSubtract:
674 case IrOpcode::kNumberSubtract: 686 case IrOpcode::kNumberSubtract:
675 return machine()->Float64Sub(); 687 return machine()->Float64Sub();
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
790 } 802 }
791 803
792 Node* RepresentationChanger::InsertChangeTaggedToFloat64(Node* node) { 804 Node* RepresentationChanger::InsertChangeTaggedToFloat64(Node* node) {
793 return jsgraph()->graph()->NewNode(simplified()->ChangeTaggedToFloat64(), 805 return jsgraph()->graph()->NewNode(simplified()->ChangeTaggedToFloat64(),
794 node); 806 node);
795 } 807 }
796 808
797 } // namespace compiler 809 } // namespace compiler
798 } // namespace internal 810 } // namespace internal
799 } // namespace v8 811 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/representation-change.h ('k') | src/compiler/simplified-lowering.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698