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

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

Issue 1366753003: [turbofan] Make Node::set_op safer via wrapper. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Addressed comments. Created 5 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
« no previous file with comments | « src/compiler/js-generic-lowering.cc ('k') | src/compiler/js-intrinsic-lowering.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/js-inlining.h" 5 #include "src/compiler/js-inlining.h"
6 6
7 #include "src/ast.h" 7 #include "src/ast.h"
8 #include "src/ast-numbering.h" 8 #include "src/ast-numbering.h"
9 #include "src/compiler.h" 9 #include "src/compiler.h"
10 #include "src/compiler/all-nodes.h" 10 #include "src/compiler/all-nodes.h"
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 for (Node* const input : end->inputs()) { 172 for (Node* const input : end->inputs()) {
173 switch (input->opcode()) { 173 switch (input->opcode()) {
174 case IrOpcode::kReturn: 174 case IrOpcode::kReturn:
175 values.push_back(NodeProperties::GetValueInput(input, 0)); 175 values.push_back(NodeProperties::GetValueInput(input, 0));
176 effects.push_back(NodeProperties::GetEffectInput(input)); 176 effects.push_back(NodeProperties::GetEffectInput(input));
177 controls.push_back(NodeProperties::GetControlInput(input)); 177 controls.push_back(NodeProperties::GetControlInput(input));
178 break; 178 break;
179 case IrOpcode::kDeoptimize: 179 case IrOpcode::kDeoptimize:
180 case IrOpcode::kTerminate: 180 case IrOpcode::kTerminate:
181 case IrOpcode::kThrow: 181 case IrOpcode::kThrow:
182 jsgraph_->graph()->end()->AppendInput(jsgraph_->zone(), input); 182 NodeProperties::MergeControlToEnd(jsgraph_->graph(), jsgraph_->common(),
183 jsgraph_->graph()->end()->set_op( 183 input);
184 jsgraph_->common()->End(jsgraph_->graph()->end()->InputCount()));
185 break; 184 break;
186 default: 185 default:
187 UNREACHABLE(); 186 UNREACHABLE();
188 break; 187 break;
189 } 188 }
190 } 189 }
191 DCHECK_EQ(values.size(), effects.size()); 190 DCHECK_EQ(values.size(), effects.size());
192 DCHECK_EQ(values.size(), controls.size()); 191 DCHECK_EQ(values.size(), controls.size());
193 192
194 // Depending on whether the inlinee produces a value, we either replace value 193 // Depending on whether the inlinee produces a value, we either replace value
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
356 355
357 // Remember that we inlined this function. 356 // Remember that we inlined this function.
358 info_->AddInlinedFunction(info.shared_info()); 357 info_->AddInlinedFunction(info.shared_info());
359 358
360 return InlineCall(node, context, frame_state, start, end); 359 return InlineCall(node, context, frame_state, start, end);
361 } 360 }
362 361
363 } // namespace compiler 362 } // namespace compiler
364 } // namespace internal 363 } // namespace internal
365 } // namespace v8 364 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/js-generic-lowering.cc ('k') | src/compiler/js-intrinsic-lowering.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698