| OLD | NEW |
| 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 Loading... |
| 207 return Changed(value_output); | 207 return Changed(value_output); |
| 208 } | 208 } |
| 209 | 209 |
| 210 | 210 |
| 211 Node* JSInliner::CreateArgumentsAdaptorFrameState( | 211 Node* JSInliner::CreateArgumentsAdaptorFrameState( |
| 212 JSCallFunctionAccessor* call, Handle<SharedFunctionInfo> shared_info, | 212 JSCallFunctionAccessor* call, Handle<SharedFunctionInfo> shared_info, |
| 213 Zone* temp_zone) { | 213 Zone* temp_zone) { |
| 214 const FrameStateFunctionInfo* state_info = | 214 const FrameStateFunctionInfo* state_info = |
| 215 jsgraph_->common()->CreateFrameStateFunctionInfo( | 215 jsgraph_->common()->CreateFrameStateFunctionInfo( |
| 216 FrameStateType::kArgumentsAdaptor, | 216 FrameStateType::kArgumentsAdaptor, |
| 217 static_cast<int>(call->formal_arguments()) + 1, 0, shared_info); | 217 static_cast<int>(call->formal_arguments()) + 1, 0, shared_info, |
| 218 CALL_MAINTAINS_NATIVE_CONTEXT); |
| 218 | 219 |
| 219 const Operator* op = jsgraph_->common()->FrameState( | 220 const Operator* op = jsgraph_->common()->FrameState( |
| 220 BailoutId(-1), OutputFrameStateCombine::Ignore(), state_info); | 221 BailoutId(-1), OutputFrameStateCombine::Ignore(), state_info); |
| 221 const Operator* op0 = jsgraph_->common()->StateValues(0); | 222 const Operator* op0 = jsgraph_->common()->StateValues(0); |
| 222 Node* node0 = jsgraph_->graph()->NewNode(op0); | 223 Node* node0 = jsgraph_->graph()->NewNode(op0); |
| 223 NodeVector params(temp_zone); | 224 NodeVector params(temp_zone); |
| 224 params.push_back(call->receiver()); | 225 params.push_back(call->receiver()); |
| 225 for (size_t argument = 0; argument != call->formal_arguments(); ++argument) { | 226 for (size_t argument = 0; argument != call->formal_arguments(); ++argument) { |
| 226 params.push_back(call->formal_argument(argument)); | 227 params.push_back(call->formal_argument(argument)); |
| 227 } | 228 } |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 336 | 337 |
| 337 // Remember that we inlined this function. | 338 // Remember that we inlined this function. |
| 338 info_->AddInlinedFunction(info.shared_info()); | 339 info_->AddInlinedFunction(info.shared_info()); |
| 339 | 340 |
| 340 return InlineCall(node, context, frame_state, start, end); | 341 return InlineCall(node, context, frame_state, start, end); |
| 341 } | 342 } |
| 342 | 343 |
| 343 } // namespace compiler | 344 } // namespace compiler |
| 344 } // namespace internal | 345 } // namespace internal |
| 345 } // namespace v8 | 346 } // namespace v8 |
| OLD | NEW |