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

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

Issue 1396333010: [turbofan] Initial support for monomorphic/polymorphic property loads. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix broken tests. Add documentation and TODOs. Created 5 years, 2 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
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.h" 9 #include "src/compiler.h"
10 #include "src/compiler/all-nodes.h" 10 #include "src/compiler/all-nodes.h"
(...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after
361 GraphReducer graph_reducer(local_zone_, &graph, jsgraph.Dead()); 361 GraphReducer graph_reducer(local_zone_, &graph, jsgraph.Dead());
362 DeadCodeElimination dead_code_elimination(&graph_reducer, &graph, 362 DeadCodeElimination dead_code_elimination(&graph_reducer, &graph,
363 jsgraph.common()); 363 jsgraph.common());
364 CommonOperatorReducer common_reducer(&graph_reducer, &graph, 364 CommonOperatorReducer common_reducer(&graph_reducer, &graph,
365 jsgraph.common(), jsgraph.machine()); 365 jsgraph.common(), jsgraph.machine());
366 JSGlobalSpecialization global_specialization( 366 JSGlobalSpecialization global_specialization(
367 &graph_reducer, &jsgraph, 367 &graph_reducer, &jsgraph,
368 info.is_deoptimization_enabled() 368 info.is_deoptimization_enabled()
369 ? JSGlobalSpecialization::kDeoptimizationEnabled 369 ? JSGlobalSpecialization::kDeoptimizationEnabled
370 : JSGlobalSpecialization::kNoFlags, 370 : JSGlobalSpecialization::kNoFlags,
371 handle(info.global_object(), info.isolate()), info_->dependencies()); 371 handle(info.global_object(), info.isolate()), info_->dependencies(),
372 local_zone_);
372 graph_reducer.AddReducer(&dead_code_elimination); 373 graph_reducer.AddReducer(&dead_code_elimination);
373 graph_reducer.AddReducer(&common_reducer); 374 graph_reducer.AddReducer(&common_reducer);
374 graph_reducer.AddReducer(&global_specialization); 375 graph_reducer.AddReducer(&global_specialization);
375 graph_reducer.ReduceGraph(); 376 graph_reducer.ReduceGraph();
376 } 377 }
377 378
378 // The inlinee specializes to the context from the JSFunction object. 379 // The inlinee specializes to the context from the JSFunction object.
379 // TODO(turbofan): We might want to load the context from the JSFunction at 380 // TODO(turbofan): We might want to load the context from the JSFunction at
380 // runtime in case we only know the SharedFunctionInfo once we have dynamic 381 // runtime in case we only know the SharedFunctionInfo once we have dynamic
381 // type feedback in the compiler. 382 // type feedback in the compiler.
(...skipping 21 matching lines...) Expand all
403 404
404 // Remember that we inlined this function. 405 // Remember that we inlined this function.
405 info_->AddInlinedFunction(info.shared_info()); 406 info_->AddInlinedFunction(info.shared_info());
406 407
407 return InlineCall(node, context, frame_state, start, end); 408 return InlineCall(node, context, frame_state, start, end);
408 } 409 }
409 410
410 } // namespace compiler 411 } // namespace compiler
411 } // namespace internal 412 } // namespace internal
412 } // namespace v8 413 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698