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

Side by Side Diff: src/compiler/instruction-selector.cc

Issue 500023004: Revert a mistake in Node::CollectProjections. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: 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 | « no previous file | src/compiler/node.cc » ('j') | src/compiler/node.cc » ('J')
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/instruction-selector.h" 5 #include "src/compiler/instruction-selector.h"
6 6
7 #include "src/compiler/instruction-selector-impl.h" 7 #include "src/compiler/instruction-selector-impl.h"
8 #include "src/compiler/node-matchers.h" 8 #include "src/compiler/node-matchers.h"
9 #include "src/compiler/node-properties-inl.h" 9 #include "src/compiler/node-properties-inl.h"
10 #include "src/compiler/pipeline.h" 10 #include "src/compiler/pipeline.h"
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after
277 OperandGenerator g(this); 277 OperandGenerator g(this);
278 DCHECK_EQ(call->op()->OutputCount(), buffer->descriptor->ReturnCount()); 278 DCHECK_EQ(call->op()->OutputCount(), buffer->descriptor->ReturnCount());
279 DCHECK_EQ(OperatorProperties::GetValueInputCount(call->op()), 279 DCHECK_EQ(OperatorProperties::GetValueInputCount(call->op()),
280 buffer->input_count() + buffer->frame_state_count()); 280 buffer->input_count() + buffer->frame_state_count());
281 281
282 if (buffer->descriptor->ReturnCount() > 0) { 282 if (buffer->descriptor->ReturnCount() > 0) {
283 // Collect the projections that represent multiple outputs from this call. 283 // Collect the projections that represent multiple outputs from this call.
284 if (buffer->descriptor->ReturnCount() == 1) { 284 if (buffer->descriptor->ReturnCount() == 1) {
285 buffer->output_nodes.push_back(call); 285 buffer->output_nodes.push_back(call);
286 } else { 286 } else {
287 buffer->output_nodes.resize(buffer->descriptor->ReturnCount(), NULL);
287 call->CollectProjections(&buffer->output_nodes); 288 call->CollectProjections(&buffer->output_nodes);
288 DCHECK(buffer->output_nodes.size() <=
289 static_cast<size_t>(buffer->descriptor->ReturnCount()));
290 } 289 }
291 290
292 // Filter out the outputs that aren't live because no projection uses them. 291 // Filter out the outputs that aren't live because no projection uses them.
293 for (size_t i = 0; i < buffer->output_nodes.size(); i++) { 292 for (size_t i = 0; i < buffer->output_nodes.size(); i++) {
294 if (buffer->output_nodes[i] != NULL) { 293 if (buffer->output_nodes[i] != NULL) {
295 Node* output = buffer->output_nodes[i]; 294 Node* output = buffer->output_nodes[i];
296 LinkageLocation location = 295 LinkageLocation location =
297 buffer->descriptor->GetReturnLocation(static_cast<int>(i)); 296 buffer->descriptor->GetReturnLocation(static_cast<int>(i));
298 MarkAsRepresentation(location.representation(), output); 297 MarkAsRepresentation(location.representation(), output);
299 buffer->outputs.push_back(g.DefineAsLocation(output, location)); 298 buffer->outputs.push_back(g.DefineAsLocation(output, location));
(...skipping 827 matching lines...) Expand 10 before | Expand all | Expand 10 after
1127 1126
1128 1127
1129 void InstructionSelector::VisitCall(Node* call, BasicBlock* continuation, 1128 void InstructionSelector::VisitCall(Node* call, BasicBlock* continuation,
1130 BasicBlock* deoptimization) {} 1129 BasicBlock* deoptimization) {}
1131 1130
1132 #endif // !V8_TURBOFAN_BACKEND 1131 #endif // !V8_TURBOFAN_BACKEND
1133 1132
1134 } // namespace compiler 1133 } // namespace compiler
1135 } // namespace internal 1134 } // namespace internal
1136 } // namespace v8 1135 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/compiler/node.cc » ('j') | src/compiler/node.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698