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

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

Issue 2035383003: [turbofan] Type feedback for numeric comparisons. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fixes Created 4 years, 6 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
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 666 matching lines...) Expand 10 before | Expand all | Expand 10 after
677 break; 677 break;
678 case IrOpcode::kNumberLessThan: 678 case IrOpcode::kNumberLessThan:
679 case IrOpcode::kNumberLessThanOrEqual: 679 case IrOpcode::kNumberLessThanOrEqual:
680 // (Number, Number) -> Boolean 680 // (Number, Number) -> Boolean
681 CheckValueInputIs(node, 0, Type::NumberOrUndefined()); 681 CheckValueInputIs(node, 0, Type::NumberOrUndefined());
682 CheckValueInputIs(node, 1, Type::NumberOrUndefined()); 682 CheckValueInputIs(node, 1, Type::NumberOrUndefined());
683 CheckUpperIs(node, Type::Boolean()); 683 CheckUpperIs(node, Type::Boolean());
684 break; 684 break;
685 case IrOpcode::kSpeculativeNumberAdd: 685 case IrOpcode::kSpeculativeNumberAdd:
686 case IrOpcode::kSpeculativeNumberSubtract: 686 case IrOpcode::kSpeculativeNumberSubtract:
687 CheckUpperIs(node, Type::Number());
688 break;
689 case IrOpcode::kSpeculativeNumberEqual:
690 case IrOpcode::kSpeculativeNumberLessThan:
691 case IrOpcode::kSpeculativeNumberLessThanOrEqual:
692 CheckUpperIs(node, Type::Boolean());
687 break; 693 break;
688 case IrOpcode::kNumberAdd: 694 case IrOpcode::kNumberAdd:
689 case IrOpcode::kNumberSubtract: 695 case IrOpcode::kNumberSubtract:
690 case IrOpcode::kNumberMultiply: 696 case IrOpcode::kNumberMultiply:
691 case IrOpcode::kNumberDivide: 697 case IrOpcode::kNumberDivide:
692 // (Number, Number) -> Number 698 // (Number, Number) -> Number
693 CheckValueInputIs(node, 0, Type::NumberOrUndefined()); 699 CheckValueInputIs(node, 0, Type::NumberOrUndefined());
694 CheckValueInputIs(node, 1, Type::NumberOrUndefined()); 700 CheckValueInputIs(node, 1, Type::NumberOrUndefined());
695 // CheckUpperIs(node, Type::Number()); 701 // CheckUpperIs(node, Type::Number());
696 break; 702 break;
(...skipping 712 matching lines...) Expand 10 before | Expand all | Expand 10 after
1409 replacement->op()->EffectOutputCount() > 0); 1415 replacement->op()->EffectOutputCount() > 0);
1410 DCHECK(!NodeProperties::IsFrameStateEdge(edge) || 1416 DCHECK(!NodeProperties::IsFrameStateEdge(edge) ||
1411 replacement->opcode() == IrOpcode::kFrameState); 1417 replacement->opcode() == IrOpcode::kFrameState);
1412 } 1418 }
1413 1419
1414 #endif // DEBUG 1420 #endif // DEBUG
1415 1421
1416 } // namespace compiler 1422 } // namespace compiler
1417 } // namespace internal 1423 } // namespace internal
1418 } // namespace v8 1424 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698