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

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

Issue 526953004: Lazy deoptimization for comparisons in Turbofan. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Address review comments Created 6 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 | Annotate | Revision Log
« no previous file with comments | « src/compiler/raw-machine-assembler.cc ('k') | src/compiler/x64/linkage-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 9
10 #include "src/compiler/generic-algorithm.h" 10 #include "src/compiler/generic-algorithm.h"
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 int frame_state_count = 66 int frame_state_count =
67 OperatorProperties::GetFrameStateInputCount(node->op()); 67 OperatorProperties::GetFrameStateInputCount(node->op());
68 int effect_count = OperatorProperties::GetEffectInputCount(node->op()); 68 int effect_count = OperatorProperties::GetEffectInputCount(node->op());
69 int control_count = OperatorProperties::GetControlInputCount(node->op()); 69 int control_count = OperatorProperties::GetControlInputCount(node->op());
70 70
71 // Verify number of inputs matches up. 71 // Verify number of inputs matches up.
72 int input_count = value_count + context_count + frame_state_count + 72 int input_count = value_count + context_count + frame_state_count +
73 effect_count + control_count; 73 effect_count + control_count;
74 CHECK_EQ(input_count, node->InputCount()); 74 CHECK_EQ(input_count, node->InputCount());
75 75
76 // Verify that frame state has been inserted for the nodes that need it.
77 if (OperatorProperties::HasFrameStateInput(node->op())) {
78 Node* frame_state = NodeProperties::GetFrameStateInput(node);
79 CHECK(frame_state->opcode() == IrOpcode::kFrameState);
80 CHECK(IsDefUseChainLinkPresent(frame_state, node));
81 CHECK(IsUseDefChainLinkPresent(frame_state, node));
82 }
83
76 // Verify all value inputs actually produce a value. 84 // Verify all value inputs actually produce a value.
77 for (int i = 0; i < value_count; ++i) { 85 for (int i = 0; i < value_count; ++i) {
78 Node* value = NodeProperties::GetValueInput(node, i); 86 Node* value = NodeProperties::GetValueInput(node, i);
79 CHECK(OperatorProperties::HasValueOutput(value->op())); 87 CHECK(OperatorProperties::HasValueOutput(value->op()));
80 CHECK(IsDefUseChainLinkPresent(value, node)); 88 CHECK(IsDefUseChainLinkPresent(value, node));
81 CHECK(IsUseDefChainLinkPresent(value, node)); 89 CHECK(IsUseDefChainLinkPresent(value, node));
82 } 90 }
83 91
84 // Verify all context inputs are value nodes. 92 // Verify all context inputs are value nodes.
85 for (int i = 0; i < context_count; ++i) { 93 for (int i = 0; i < context_count; ++i) {
(...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after
434 // Check inputs for all nodes in the block. 442 // Check inputs for all nodes in the block.
435 for (size_t i = 0; i < block->nodes_.size(); i++) { 443 for (size_t i = 0; i < block->nodes_.size(); i++) {
436 Node* node = block->nodes_[i]; 444 Node* node = block->nodes_[i];
437 CheckInputsDominate(schedule, block, node, static_cast<int>(i) - 1); 445 CheckInputsDominate(schedule, block, node, static_cast<int>(i) - 1);
438 } 446 }
439 } 447 }
440 } 448 }
441 } 449 }
442 } 450 }
443 } // namespace v8::internal::compiler 451 } // namespace v8::internal::compiler
OLDNEW
« no previous file with comments | « src/compiler/raw-machine-assembler.cc ('k') | src/compiler/x64/linkage-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698