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 763963002: [turbofan] Add checked load/store operators. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Reapply fix. Created 6 years 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') | src/compiler/x64/code-generator-x64.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 615 matching lines...) Expand 10 before | Expand all | Expand 10 after
626 // CheckUpperIs(node, to)); 626 // CheckUpperIs(node, to));
627 break; 627 break;
628 } 628 }
629 629
630 case IrOpcode::kLoadField: 630 case IrOpcode::kLoadField:
631 // Object -> fieldtype 631 // Object -> fieldtype
632 // TODO(rossberg): activate once machine ops are typed. 632 // TODO(rossberg): activate once machine ops are typed.
633 // CheckValueInputIs(node, 0, Type::Object()); 633 // CheckValueInputIs(node, 0, Type::Object());
634 // CheckUpperIs(node, Field(node).type)); 634 // CheckUpperIs(node, Field(node).type));
635 break; 635 break;
636 case IrOpcode::kLoadBuffer:
637 break;
636 case IrOpcode::kLoadElement: 638 case IrOpcode::kLoadElement:
637 // Object -> elementtype 639 // Object -> elementtype
638 // TODO(rossberg): activate once machine ops are typed. 640 // TODO(rossberg): activate once machine ops are typed.
639 // CheckValueInputIs(node, 0, Type::Object()); 641 // CheckValueInputIs(node, 0, Type::Object());
640 // CheckUpperIs(node, Element(node).type)); 642 // CheckUpperIs(node, Element(node).type));
641 break; 643 break;
642 case IrOpcode::kStoreField: 644 case IrOpcode::kStoreField:
643 // (Object, fieldtype) -> _|_ 645 // (Object, fieldtype) -> _|_
644 // TODO(rossberg): activate once machine ops are typed. 646 // TODO(rossberg): activate once machine ops are typed.
645 // CheckValueInputIs(node, 0, Type::Object()); 647 // CheckValueInputIs(node, 0, Type::Object());
646 // CheckValueInputIs(node, 1, Field(node).type)); 648 // CheckValueInputIs(node, 1, Field(node).type));
647 CheckNotTyped(node); 649 CheckNotTyped(node);
648 break; 650 break;
651 case IrOpcode::kStoreBuffer:
652 break;
649 case IrOpcode::kStoreElement: 653 case IrOpcode::kStoreElement:
650 // (Object, elementtype) -> _|_ 654 // (Object, elementtype) -> _|_
651 // TODO(rossberg): activate once machine ops are typed. 655 // TODO(rossberg): activate once machine ops are typed.
652 // CheckValueInputIs(node, 0, Type::Object()); 656 // CheckValueInputIs(node, 0, Type::Object());
653 // CheckValueInputIs(node, 1, Element(node).type)); 657 // CheckValueInputIs(node, 1, Element(node).type));
654 CheckNotTyped(node); 658 CheckNotTyped(node);
655 break; 659 break;
656 660
657 // Machine operators 661 // Machine operators
658 // ----------------------- 662 // -----------------------
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
716 case IrOpcode::kTruncateFloat64ToFloat32: 720 case IrOpcode::kTruncateFloat64ToFloat32:
717 case IrOpcode::kTruncateFloat64ToInt32: 721 case IrOpcode::kTruncateFloat64ToInt32:
718 case IrOpcode::kChangeInt32ToInt64: 722 case IrOpcode::kChangeInt32ToInt64:
719 case IrOpcode::kChangeUint32ToUint64: 723 case IrOpcode::kChangeUint32ToUint64:
720 case IrOpcode::kChangeInt32ToFloat64: 724 case IrOpcode::kChangeInt32ToFloat64:
721 case IrOpcode::kChangeUint32ToFloat64: 725 case IrOpcode::kChangeUint32ToFloat64:
722 case IrOpcode::kChangeFloat32ToFloat64: 726 case IrOpcode::kChangeFloat32ToFloat64:
723 case IrOpcode::kChangeFloat64ToInt32: 727 case IrOpcode::kChangeFloat64ToInt32:
724 case IrOpcode::kChangeFloat64ToUint32: 728 case IrOpcode::kChangeFloat64ToUint32:
725 case IrOpcode::kLoadStackPointer: 729 case IrOpcode::kLoadStackPointer:
730 case IrOpcode::kCheckedLoad:
731 case IrOpcode::kCheckedStore:
726 // TODO(rossberg): Check. 732 // TODO(rossberg): Check.
727 break; 733 break;
728 } 734 }
729 } 735 }
730 736
731 737
732 void Verifier::Run(Graph* graph, Typing typing) { 738 void Verifier::Run(Graph* graph, Typing typing) {
733 Visitor visitor(graph->zone(), typing); 739 Visitor visitor(graph->zone(), typing);
734 CHECK_NE(NULL, graph->start()); 740 CHECK_NE(NULL, graph->start());
735 CHECK_NE(NULL, graph->end()); 741 CHECK_NE(NULL, graph->end());
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
969 // Check inputs for all nodes in the block. 975 // Check inputs for all nodes in the block.
970 for (size_t i = 0; i < block->NodeCount(); i++) { 976 for (size_t i = 0; i < block->NodeCount(); i++) {
971 Node* node = block->NodeAt(i); 977 Node* node = block->NodeAt(i);
972 CheckInputsDominate(schedule, block, node, static_cast<int>(i) - 1); 978 CheckInputsDominate(schedule, block, node, static_cast<int>(i) - 1);
973 } 979 }
974 } 980 }
975 } 981 }
976 } 982 }
977 } 983 }
978 } // namespace v8::internal::compiler 984 } // namespace v8::internal::compiler
OLDNEW
« no previous file with comments | « src/compiler/typer.cc ('k') | src/compiler/x64/code-generator-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698