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 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
288 | 288 |
289 Reduction JSInliner::Reduce(Node* node) { | 289 Reduction JSInliner::Reduce(Node* node) { |
290 if (node->opcode() != IrOpcode::kJSCallFunction) return NoChange(); | 290 if (node->opcode() != IrOpcode::kJSCallFunction) return NoChange(); |
291 | 291 |
292 JSCallFunctionAccessor call(node); | 292 JSCallFunctionAccessor call(node); |
293 HeapObjectMatcher<JSFunction> match(call.jsfunction()); | 293 HeapObjectMatcher<JSFunction> match(call.jsfunction()); |
294 if (!match.HasValue()) return NoChange(); | 294 if (!match.HasValue()) return NoChange(); |
295 | 295 |
296 Handle<JSFunction> function = match.Value().handle(); | 296 Handle<JSFunction> function = match.Value().handle(); |
297 if (!function->IsJSFunction()) return NoChange(); | 297 if (!function->IsJSFunction()) return NoChange(); |
298 if (mode_ == kBuiltinsInlining && !function->shared()->inline_builtin()) { | 298 if (mode_ == kRestrictedInlining && !function->shared()->force_inline()) { |
299 return NoChange(); | 299 return NoChange(); |
300 } | 300 } |
301 | 301 |
302 Zone zone; | 302 Zone zone; |
303 ParseInfo parse_info(&zone, function); | 303 ParseInfo parse_info(&zone, function); |
304 CompilationInfo info(&parse_info); | 304 CompilationInfo info(&parse_info); |
305 | 305 |
306 if (!Compiler::ParseAndAnalyze(info.parse_info())) return NoChange(); | 306 if (!Compiler::ParseAndAnalyze(info.parse_info())) return NoChange(); |
307 if (!Compiler::EnsureDeoptimizationSupport(&info)) return NoChange(); | 307 if (!Compiler::EnsureDeoptimizationSupport(&info)) return NoChange(); |
308 | 308 |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
357 NodeProperties::ReplaceFrameStateInput(node, 0, outer_frame_state); | 357 NodeProperties::ReplaceFrameStateInput(node, 0, outer_frame_state); |
358 } | 358 } |
359 } | 359 } |
360 | 360 |
361 return InlineCall(node, inlinee); | 361 return InlineCall(node, inlinee); |
362 } | 362 } |
363 | 363 |
364 } // namespace compiler | 364 } // namespace compiler |
365 } // namespace internal | 365 } // namespace internal |
366 } // namespace v8 | 366 } // namespace v8 |
OLD | NEW |