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_ == kBuiltinsInlining && !function->shared()->force_inline()) { |
Michael Starzinger
2015/05/20 10:37:35
nit: Maybe s/kBuiltinsInlining/kRestrictedInlining
danno
2015/05/20 12:19:19
Done.
| |
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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
362 } | 362 } |
363 } | 363 } |
364 } | 364 } |
365 | 365 |
366 return InlineCall(node, inlinee); | 366 return InlineCall(node, inlinee); |
367 } | 367 } |
368 | 368 |
369 } // namespace compiler | 369 } // namespace compiler |
370 } // namespace internal | 370 } // namespace internal |
371 } // namespace v8 | 371 } // namespace v8 |
OLD | NEW |