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

Side by Side Diff: src/compiler/verifier.cc

Issue 2309953002: [turbofan] Introduce dedicated NumberToBoolean operator. (Closed)
Patch Set: Fix unittest. Created 4 years, 3 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/typer.cc ('k') | test/unittests/compiler/js-typed-lowering-unittest.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 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/compiler/verifier.h" 5 #include "src/compiler/verifier.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <deque> 8 #include <deque>
9 #include <queue> 9 #include <queue>
10 #include <sstream> 10 #include <sstream>
(...skipping 779 matching lines...) Expand 10 before | Expand all | Expand 10 after
790 case IrOpcode::kNumberSin: 790 case IrOpcode::kNumberSin:
791 case IrOpcode::kNumberSinh: 791 case IrOpcode::kNumberSinh:
792 case IrOpcode::kNumberSqrt: 792 case IrOpcode::kNumberSqrt:
793 case IrOpcode::kNumberTan: 793 case IrOpcode::kNumberTan:
794 case IrOpcode::kNumberTanh: 794 case IrOpcode::kNumberTanh:
795 case IrOpcode::kNumberTrunc: 795 case IrOpcode::kNumberTrunc:
796 // Number -> Number 796 // Number -> Number
797 CheckValueInputIs(node, 0, Type::Number()); 797 CheckValueInputIs(node, 0, Type::Number());
798 CheckTypeIs(node, Type::Number()); 798 CheckTypeIs(node, Type::Number());
799 break; 799 break;
800 case IrOpcode::kNumberToBoolean:
801 // Number -> Boolean
802 CheckValueInputIs(node, 0, Type::Number());
803 CheckTypeIs(node, Type::Boolean());
804 break;
800 case IrOpcode::kNumberToInt32: 805 case IrOpcode::kNumberToInt32:
801 // Number -> Signed32 806 // Number -> Signed32
802 CheckValueInputIs(node, 0, Type::Number()); 807 CheckValueInputIs(node, 0, Type::Number());
803 CheckTypeIs(node, Type::Signed32()); 808 CheckTypeIs(node, Type::Signed32());
804 break; 809 break;
805 case IrOpcode::kNumberToUint32: 810 case IrOpcode::kNumberToUint32:
806 // Number -> Unsigned32 811 // Number -> Unsigned32
807 CheckValueInputIs(node, 0, Type::Number()); 812 CheckValueInputIs(node, 0, Type::Number());
808 CheckTypeIs(node, Type::Unsigned32()); 813 CheckTypeIs(node, Type::Unsigned32());
809 break; 814 break;
(...skipping 771 matching lines...) Expand 10 before | Expand all | Expand 10 after
1581 replacement->op()->EffectOutputCount() > 0); 1586 replacement->op()->EffectOutputCount() > 0);
1582 DCHECK(!NodeProperties::IsFrameStateEdge(edge) || 1587 DCHECK(!NodeProperties::IsFrameStateEdge(edge) ||
1583 replacement->opcode() == IrOpcode::kFrameState); 1588 replacement->opcode() == IrOpcode::kFrameState);
1584 } 1589 }
1585 1590
1586 #endif // DEBUG 1591 #endif // DEBUG
1587 1592
1588 } // namespace compiler 1593 } // namespace compiler
1589 } // namespace internal 1594 } // namespace internal
1590 } // namespace v8 1595 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/typer.cc ('k') | test/unittests/compiler/js-typed-lowering-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698