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

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

Issue 994433002: [turbofan] Skip function entry stack check for inlinee. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 9 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
« no previous file with comments | « src/compiler/ast-graph-builder.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/access-builder.h" 9 #include "src/compiler/access-builder.h"
10 #include "src/compiler/all-nodes.h" 10 #include "src/compiler/all-nodes.h"
(...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after
350 SmartArrayPointer<char> name = function->shared()->DebugName()->ToCString(); 350 SmartArrayPointer<char> name = function->shared()->DebugName()->ToCString();
351 PrintF("Inlining %s into %s\n", name.get(), 351 PrintF("Inlining %s into %s\n", name.get(),
352 info_->shared_info()->DebugName()->ToCString().get()); 352 info_->shared_info()->DebugName()->ToCString().get());
353 } 353 }
354 354
355 Graph graph(info.zone()); 355 Graph graph(info.zone());
356 JSGraph jsgraph(info.isolate(), &graph, jsgraph_->common(), 356 JSGraph jsgraph(info.isolate(), &graph, jsgraph_->common(),
357 jsgraph_->javascript(), jsgraph_->machine()); 357 jsgraph_->javascript(), jsgraph_->machine());
358 358
359 AstGraphBuilder graph_builder(local_zone_, &info, &jsgraph); 359 AstGraphBuilder graph_builder(local_zone_, &info, &jsgraph);
360 graph_builder.CreateGraph(false); 360 graph_builder.CreateGraph(false, false);
361 Inlinee::UnifyReturn(&jsgraph); 361 Inlinee::UnifyReturn(&jsgraph);
362 362
363 CopyVisitor visitor(&graph, jsgraph_->graph(), info.zone()); 363 CopyVisitor visitor(&graph, jsgraph_->graph(), info.zone());
364 visitor.CopyGraph(); 364 visitor.CopyGraph();
365 365
366 Inlinee inlinee(visitor.GetCopy(graph.start()), visitor.GetCopy(graph.end())); 366 Inlinee inlinee(visitor.GetCopy(graph.start()), visitor.GetCopy(graph.end()));
367 367
368 if (FLAG_turbo_deoptimization) { 368 if (FLAG_turbo_deoptimization) {
369 Node* outer_frame_state = call.frame_state(); 369 Node* outer_frame_state = call.frame_state();
370 // Insert argument adaptor frame if required. 370 // Insert argument adaptor frame if required.
371 if (call.formal_arguments() != inlinee.formal_parameters()) { 371 if (call.formal_arguments() != inlinee.formal_parameters()) {
372 outer_frame_state = 372 outer_frame_state =
373 CreateArgumentsAdaptorFrameState(&call, function, info.zone()); 373 CreateArgumentsAdaptorFrameState(&call, function, info.zone());
374 } 374 }
375 375
376 for (Node* node : visitor.copies()) { 376 for (Node* node : visitor.copies()) {
377 if (node && node->opcode() == IrOpcode::kFrameState) { 377 if (node && node->opcode() == IrOpcode::kFrameState) {
378 AddClosureToFrameState(node, function); 378 AddClosureToFrameState(node, function);
379 NodeProperties::ReplaceFrameStateInput(node, outer_frame_state); 379 NodeProperties::ReplaceFrameStateInput(node, outer_frame_state);
380 } 380 }
381 } 381 }
382 } 382 }
383 383
384 return inlinee.InlineAtCall(jsgraph_, node); 384 return inlinee.InlineAtCall(jsgraph_, node);
385 } 385 }
386 386
387 } // namespace compiler 387 } // namespace compiler
388 } // namespace internal 388 } // namespace internal
389 } // namespace v8 389 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/ast-graph-builder.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698