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.h" | 9 #include "src/compiler.h" |
10 #include "src/compiler/all-nodes.h" | 10 #include "src/compiler/all-nodes.h" |
(...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
362 GraphReducer graph_reducer(local_zone_, &graph, jsgraph.Dead()); | 362 GraphReducer graph_reducer(local_zone_, &graph, jsgraph.Dead()); |
363 DeadCodeElimination dead_code_elimination(&graph_reducer, &graph, | 363 DeadCodeElimination dead_code_elimination(&graph_reducer, &graph, |
364 jsgraph.common()); | 364 jsgraph.common()); |
365 CommonOperatorReducer common_reducer(&graph_reducer, &graph, | 365 CommonOperatorReducer common_reducer(&graph_reducer, &graph, |
366 jsgraph.common(), jsgraph.machine()); | 366 jsgraph.common(), jsgraph.machine()); |
367 JSGlobalSpecialization global_specialization( | 367 JSGlobalSpecialization global_specialization( |
368 &graph_reducer, &jsgraph, | 368 &graph_reducer, &jsgraph, |
369 info.is_deoptimization_enabled() | 369 info.is_deoptimization_enabled() |
370 ? JSGlobalSpecialization::kDeoptimizationEnabled | 370 ? JSGlobalSpecialization::kDeoptimizationEnabled |
371 : JSGlobalSpecialization::kNoFlags, | 371 : JSGlobalSpecialization::kNoFlags, |
372 handle(info.global_object(), info.isolate()), info_->dependencies()); | 372 handle(info.global_object(), info.isolate()), info_->dependencies(), |
| 373 local_zone_); |
373 graph_reducer.AddReducer(&dead_code_elimination); | 374 graph_reducer.AddReducer(&dead_code_elimination); |
374 graph_reducer.AddReducer(&common_reducer); | 375 graph_reducer.AddReducer(&common_reducer); |
375 graph_reducer.AddReducer(&global_specialization); | 376 graph_reducer.AddReducer(&global_specialization); |
376 graph_reducer.ReduceGraph(); | 377 graph_reducer.ReduceGraph(); |
377 } | 378 } |
378 | 379 |
379 // The inlinee specializes to the context from the JSFunction object. | 380 // The inlinee specializes to the context from the JSFunction object. |
380 // TODO(turbofan): We might want to load the context from the JSFunction at | 381 // TODO(turbofan): We might want to load the context from the JSFunction at |
381 // runtime in case we only know the SharedFunctionInfo once we have dynamic | 382 // runtime in case we only know the SharedFunctionInfo once we have dynamic |
382 // type feedback in the compiler. | 383 // type feedback in the compiler. |
(...skipping 21 matching lines...) Expand all Loading... |
404 | 405 |
405 // Remember that we inlined this function. | 406 // Remember that we inlined this function. |
406 info_->AddInlinedFunction(info.shared_info()); | 407 info_->AddInlinedFunction(info.shared_info()); |
407 | 408 |
408 return InlineCall(node, context, frame_state, start, end); | 409 return InlineCall(node, context, frame_state, start, end); |
409 } | 410 } |
410 | 411 |
411 } // namespace compiler | 412 } // namespace compiler |
412 } // namespace internal | 413 } // namespace internal |
413 } // namespace v8 | 414 } // namespace v8 |
OLD | NEW |