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

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

Issue 2138633002: [turbofan] Introduce CheckedInt32Div and CheckedInt32Mod operators. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Comments 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/redundancy-elimination.cc ('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 596 matching lines...) Expand 10 before | Expand all | Expand 10 after
607 return machine()->Int32LessThanOrEqual(); 607 return machine()->Int32LessThanOrEqual();
608 default: 608 default:
609 UNREACHABLE(); 609 UNREACHABLE();
610 return nullptr; 610 return nullptr;
611 } 611 }
612 } 612 }
613 613
614 const Operator* RepresentationChanger::Int32OverflowOperatorFor( 614 const Operator* RepresentationChanger::Int32OverflowOperatorFor(
615 IrOpcode::Value opcode) { 615 IrOpcode::Value opcode) {
616 switch (opcode) { 616 switch (opcode) {
617 case IrOpcode::kSpeculativeNumberAdd: // Fall through. 617 case IrOpcode::kSpeculativeNumberAdd:
618 return simplified()->CheckedInt32Add(); 618 return simplified()->CheckedInt32Add();
619 case IrOpcode::kSpeculativeNumberSubtract: // Fall through. 619 case IrOpcode::kSpeculativeNumberSubtract:
620 return simplified()->CheckedInt32Sub(); 620 return simplified()->CheckedInt32Sub();
621 case IrOpcode::kSpeculativeNumberDivide:
622 return simplified()->CheckedInt32Div();
623 case IrOpcode::kSpeculativeNumberModulus:
624 return simplified()->CheckedInt32Mod();
621 default: 625 default:
622 UNREACHABLE(); 626 UNREACHABLE();
623 return nullptr; 627 return nullptr;
624 } 628 }
625 } 629 }
626 630
627 const Operator* RepresentationChanger::Uint32OperatorFor( 631 const Operator* RepresentationChanger::Uint32OperatorFor(
628 IrOpcode::Value opcode) { 632 IrOpcode::Value opcode) {
629 switch (opcode) { 633 switch (opcode) {
630 case IrOpcode::kNumberAdd: 634 case IrOpcode::kNumberAdd:
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
786 } 790 }
787 791
788 Node* RepresentationChanger::InsertChangeTaggedToFloat64(Node* node) { 792 Node* RepresentationChanger::InsertChangeTaggedToFloat64(Node* node) {
789 return jsgraph()->graph()->NewNode(simplified()->ChangeTaggedToFloat64(), 793 return jsgraph()->graph()->NewNode(simplified()->ChangeTaggedToFloat64(),
790 node); 794 node);
791 } 795 }
792 796
793 } // namespace compiler 797 } // namespace compiler
794 } // namespace internal 798 } // namespace internal
795 } // namespace v8 799 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/redundancy-elimination.cc ('k') | src/compiler/simplified-lowering.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698