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

Side by Side Diff: src/compiler/js-inlining.cc

Issue 505133003: Introduce subclass wrappers for STL containers that make them a lot easier (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 | « src/compiler/instruction-selector.cc ('k') | src/compiler/node.h » ('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/ast-graph-builder.h" 5 #include "src/compiler/ast-graph-builder.h"
6 #include "src/compiler/common-operator.h" 6 #include "src/compiler/common-operator.h"
7 #include "src/compiler/generic-node-inl.h" 7 #include "src/compiler/generic-node-inl.h"
8 #include "src/compiler/graph-inl.h" 8 #include "src/compiler/graph-inl.h"
9 #include "src/compiler/graph-visualizer.h" 9 #include "src/compiler/graph-visualizer.h"
10 #include "src/compiler/js-inlining.h" 10 #include "src/compiler/js-inlining.h"
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 // nothing to do 145 // nothing to do
146 return; 146 return;
147 } 147 }
148 DCHECK_EQ(IrOpcode::kMerge, final_merge->opcode()); 148 DCHECK_EQ(IrOpcode::kMerge, final_merge->opcode());
149 149
150 int predecessors = 150 int predecessors =
151 OperatorProperties::GetControlInputCount(final_merge->op()); 151 OperatorProperties::GetControlInputCount(final_merge->op());
152 Operator* op_phi = jsgraph_->common()->Phi(predecessors); 152 Operator* op_phi = jsgraph_->common()->Phi(predecessors);
153 Operator* op_ephi = jsgraph_->common()->EffectPhi(predecessors); 153 Operator* op_ephi = jsgraph_->common()->EffectPhi(predecessors);
154 154
155 NodeVector values(NodeVector::allocator_type(jsgraph_->zone())); 155 NodeVector values(jsgraph_->zone());
156 NodeVector effects(NodeVector::allocator_type(jsgraph_->zone())); 156 NodeVector effects(jsgraph_->zone());
157 // Iterate over all control flow predecessors, 157 // Iterate over all control flow predecessors,
158 // which must be return statements. 158 // which must be return statements.
159 InputIter iter = final_merge->inputs().begin(); 159 InputIter iter = final_merge->inputs().begin();
160 while (iter != final_merge->inputs().end()) { 160 while (iter != final_merge->inputs().end()) {
161 Node* input = *iter; 161 Node* input = *iter;
162 switch (input->opcode()) { 162 switch (input->opcode()) {
163 case IrOpcode::kReturn: 163 case IrOpcode::kReturn:
164 values.push_back(NodeProperties::GetValueInput(input, 0)); 164 values.push_back(NodeProperties::GetValueInput(input, 0));
165 effects.push_back(NodeProperties::GetEffectInput(input)); 165 effects.push_back(NodeProperties::GetEffectInput(input));
166 iter.UpdateToAndIncrement(NodeProperties::GetControlInput(input)); 166 iter.UpdateToAndIncrement(NodeProperties::GetControlInput(input));
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
320 320
321 Inlinee inlinee(&jsgraph); 321 Inlinee inlinee(&jsgraph);
322 inlinee.UnifyReturn(); 322 inlinee.UnifyReturn();
323 inlinee.InlineAtCall(jsgraph_, node); 323 inlinee.InlineAtCall(jsgraph_, node);
324 324
325 jsgraph_->graph()->SetNextNodeId(inlinee.graph()->NextNodeID()); 325 jsgraph_->graph()->SetNextNodeId(inlinee.graph()->NextNodeID());
326 } 326 }
327 } 327 }
328 } 328 }
329 } // namespace v8::internal::compiler 329 } // namespace v8::internal::compiler
OLDNEW
« no previous file with comments | « src/compiler/instruction-selector.cc ('k') | src/compiler/node.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698