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

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

Issue 850013003: [turbofan] Fix truncation/representation sloppiness wrt. bool/bit. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fixes/Cleanups Created 5 years, 11 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/cctest/compiler/test-representation-change.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 <deque> 7 #include <deque>
8 #include <queue> 8 #include <queue>
9 #include <sstream> 9 #include <sstream>
10 #include <string> 10 #include <string>
(...skipping 614 matching lines...) Expand 10 before | Expand all | Expand 10 after
625 } 625 }
626 case IrOpcode::kChangeFloat64ToTagged: { 626 case IrOpcode::kChangeFloat64ToTagged: {
627 // Number /\ UntaggedFloat64 -> Number /\ Tagged 627 // Number /\ UntaggedFloat64 -> Number /\ Tagged
628 // TODO(neis): Activate once ChangeRepresentation works in typer. 628 // TODO(neis): Activate once ChangeRepresentation works in typer.
629 // Type* from =Type::Intersect(Type::Number(), Type::UntaggedFloat64()); 629 // Type* from =Type::Intersect(Type::Number(), Type::UntaggedFloat64());
630 // Type* to = Type::Intersect(Type::Number(), Type::Tagged()); 630 // Type* to = Type::Intersect(Type::Number(), Type::Tagged());
631 // CheckValueInputIs(node, 0, from)); 631 // CheckValueInputIs(node, 0, from));
632 // CheckUpperIs(node, to)); 632 // CheckUpperIs(node, to));
633 break; 633 break;
634 } 634 }
635 case IrOpcode::kChangeBitToBool: {
636 // Boolean /\ UntaggedInt1 -> Boolean /\ TaggedPtr
637 // TODO(neis): Activate once ChangeRepresentation works in typer.
638 // Type* from = Type::Intersect(Type::Boolean(), Type::UntaggedInt1());
639 // Type* to = Type::Intersect(Type::Boolean(), Type::TaggedPtr());
640 // CheckValueInputIs(node, 0, from));
641 // CheckUpperIs(node, to));
642 break;
643 }
644 case IrOpcode::kChangeBoolToBit: { 635 case IrOpcode::kChangeBoolToBit: {
645 // Boolean /\ TaggedPtr -> Boolean /\ UntaggedInt1 636 // Boolean /\ TaggedPtr -> Boolean /\ UntaggedInt1
646 // TODO(neis): Activate once ChangeRepresentation works in typer. 637 // TODO(neis): Activate once ChangeRepresentation works in typer.
647 // Type* from = Type::Intersect(Type::Boolean(), Type::TaggedPtr()); 638 // Type* from = Type::Intersect(Type::Boolean(), Type::TaggedPtr());
648 // Type* to = Type::Intersect(Type::Boolean(), Type::UntaggedInt1()); 639 // Type* to = Type::Intersect(Type::Boolean(), Type::UntaggedInt1());
649 // CheckValueInputIs(node, 0, from)); 640 // CheckValueInputIs(node, 0, from));
650 // CheckUpperIs(node, to)); 641 // CheckUpperIs(node, to));
651 break; 642 break;
652 } 643 }
653 case IrOpcode::kChangeWord32ToBit: { 644 case IrOpcode::kChangeBitToBool: {
654 // TODO(rossberg): Check. 645 // Boolean /\ UntaggedInt1 -> Boolean /\ TaggedPtr
655 CheckValueInputIs(node, 0, Type::Integral32()); 646 // TODO(neis): Activate once ChangeRepresentation works in typer.
656 break; 647 // Type* from = Type::Intersect(Type::Boolean(), Type::UntaggedInt1());
657 } 648 // Type* to = Type::Intersect(Type::Boolean(), Type::TaggedPtr());
658 case IrOpcode::kChangeWord64ToBit: { 649 // CheckValueInputIs(node, 0, from));
659 // TODO(rossberg): Check. 650 // CheckUpperIs(node, to));
660 break; 651 break;
661 } 652 }
662 653
663 case IrOpcode::kLoadField: 654 case IrOpcode::kLoadField:
664 // Object -> fieldtype 655 // Object -> fieldtype
665 // TODO(rossberg): activate once machine ops are typed. 656 // TODO(rossberg): activate once machine ops are typed.
666 // CheckValueInputIs(node, 0, Type::Object()); 657 // CheckValueInputIs(node, 0, Type::Object());
667 // CheckUpperIs(node, Field(node).type)); 658 // CheckUpperIs(node, Field(node).type));
668 break; 659 break;
669 case IrOpcode::kLoadBuffer: 660 case IrOpcode::kLoadBuffer:
(...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after
1008 // Check inputs for all nodes in the block. 999 // Check inputs for all nodes in the block.
1009 for (size_t i = 0; i < block->NodeCount(); i++) { 1000 for (size_t i = 0; i < block->NodeCount(); i++) {
1010 Node* node = block->NodeAt(i); 1001 Node* node = block->NodeAt(i);
1011 CheckInputsDominate(schedule, block, node, static_cast<int>(i) - 1); 1002 CheckInputsDominate(schedule, block, node, static_cast<int>(i) - 1);
1012 } 1003 }
1013 } 1004 }
1014 } 1005 }
1015 } 1006 }
1016 } 1007 }
1017 } // namespace v8::internal::compiler 1008 } // namespace v8::internal::compiler
OLDNEW
« no previous file with comments | « src/compiler/typer.cc ('k') | test/cctest/compiler/test-representation-change.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698