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

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

Issue 1191243003: [turbofan] Factor out the function specific part from the frame state operator. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Tweaks Created 5 years, 6 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-graph.cc ('k') | src/compiler/js-type-feedback.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/all-nodes.h" 9 #include "src/compiler/all-nodes.h"
10 #include "src/compiler/ast-graph-builder.h" 10 #include "src/compiler/ast-graph-builder.h"
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 207
208 ReplaceWithValue(call, value_output, effect_output, control_output); 208 ReplaceWithValue(call, value_output, effect_output, control_output);
209 209
210 return Changed(value_output); 210 return Changed(value_output);
211 } 211 }
212 212
213 213
214 Node* JSInliner::CreateArgumentsAdaptorFrameState( 214 Node* JSInliner::CreateArgumentsAdaptorFrameState(
215 JSCallFunctionAccessor* call, Handle<SharedFunctionInfo> shared_info, 215 JSCallFunctionAccessor* call, Handle<SharedFunctionInfo> shared_info,
216 Zone* temp_zone) { 216 Zone* temp_zone) {
217 const FrameStateFunctionInfo* state_info =
218 jsgraph_->common()->CreateFrameStateFunctionInfo(
219 FrameStateType::kArgumentsAdaptor,
220 static_cast<int>(call->formal_arguments()) + 1, 0, shared_info);
221
217 const Operator* op = jsgraph_->common()->FrameState( 222 const Operator* op = jsgraph_->common()->FrameState(
218 FrameStateType::ARGUMENTS_ADAPTOR, BailoutId(-1), 223 BailoutId(-1), OutputFrameStateCombine::Ignore(), state_info);
219 OutputFrameStateCombine::Ignore(), shared_info);
220 const Operator* op0 = jsgraph_->common()->StateValues(0); 224 const Operator* op0 = jsgraph_->common()->StateValues(0);
221 Node* node0 = jsgraph_->graph()->NewNode(op0); 225 Node* node0 = jsgraph_->graph()->NewNode(op0);
222 NodeVector params(temp_zone); 226 NodeVector params(temp_zone);
223 params.push_back(call->receiver()); 227 params.push_back(call->receiver());
224 for (size_t argument = 0; argument != call->formal_arguments(); ++argument) { 228 for (size_t argument = 0; argument != call->formal_arguments(); ++argument) {
225 params.push_back(call->formal_argument(argument)); 229 params.push_back(call->formal_argument(argument));
226 } 230 }
227 const Operator* op_param = 231 const Operator* op_param =
228 jsgraph_->common()->StateValues(static_cast<int>(params.size())); 232 jsgraph_->common()->StateValues(static_cast<int>(params.size()));
229 Node* params_node = jsgraph_->graph()->NewNode( 233 Node* params_node = jsgraph_->graph()->NewNode(
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
305 309
306 // Remember that we inlined this function. 310 // Remember that we inlined this function.
307 info_->AddInlinedFunction(info.shared_info()); 311 info_->AddInlinedFunction(info.shared_info());
308 312
309 return InlineCall(node, frame_state, start, end); 313 return InlineCall(node, frame_state, start, end);
310 } 314 }
311 315
312 } // namespace compiler 316 } // namespace compiler
313 } // namespace internal 317 } // namespace internal
314 } // namespace v8 318 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/js-graph.cc ('k') | src/compiler/js-type-feedback.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698