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

Side by Side Diff: src/crankshaft/ia32/lithium-ia32.cc

Issue 1782743003: [crankshaft] Support inlining of function calls in tail position (in ES6 sense). (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@tco-crank-4
Patch Set: ppc, s390 and x87 ports Created 4 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/crankshaft/hydrogen-instructions.h ('k') | src/crankshaft/lithium.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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/crankshaft/ia32/lithium-ia32.h" 5 #include "src/crankshaft/ia32/lithium-ia32.h"
6 6
7 #include <sstream> 7 #include <sstream>
8 8
9 #if V8_TARGET_ARCH_IA32 9 #if V8_TARGET_ARCH_IA32
10 10
(...skipping 2511 matching lines...) Expand 10 before | Expand all | Expand 10 after
2522 return AssignEnvironment( 2522 return AssignEnvironment(
2523 AssignPointerMap(new(zone()) LStackCheck(context))); 2523 AssignPointerMap(new(zone()) LStackCheck(context)));
2524 } 2524 }
2525 } 2525 }
2526 2526
2527 2527
2528 LInstruction* LChunkBuilder::DoEnterInlined(HEnterInlined* instr) { 2528 LInstruction* LChunkBuilder::DoEnterInlined(HEnterInlined* instr) {
2529 HEnvironment* outer = current_block_->last_environment(); 2529 HEnvironment* outer = current_block_->last_environment();
2530 outer->set_ast_id(instr->ReturnId()); 2530 outer->set_ast_id(instr->ReturnId());
2531 HConstant* undefined = graph()->GetConstantUndefined(); 2531 HConstant* undefined = graph()->GetConstantUndefined();
2532 HEnvironment* inner = outer->CopyForInlining(instr->closure(), 2532 HEnvironment* inner = outer->CopyForInlining(
2533 instr->arguments_count(), 2533 instr->closure(), instr->arguments_count(), instr->function(), undefined,
2534 instr->function(), 2534 instr->inlining_kind(), instr->syntactic_tail_call_mode());
2535 undefined,
2536 instr->inlining_kind());
2537 // Only replay binding of arguments object if it wasn't removed from graph. 2535 // Only replay binding of arguments object if it wasn't removed from graph.
2538 if (instr->arguments_var() != NULL && instr->arguments_object()->IsLinked()) { 2536 if (instr->arguments_var() != NULL && instr->arguments_object()->IsLinked()) {
2539 inner->Bind(instr->arguments_var(), instr->arguments_object()); 2537 inner->Bind(instr->arguments_var(), instr->arguments_object());
2540 } 2538 }
2541 inner->BindContext(instr->closure_context()); 2539 inner->BindContext(instr->closure_context());
2542 inner->set_entry(instr); 2540 inner->set_entry(instr);
2543 current_block_->UpdateEnvironment(inner); 2541 current_block_->UpdateEnvironment(inner);
2544 chunk_->AddInlinedFunction(instr->shared()); 2542 chunk_->AddInlinedFunction(instr->shared());
2545 return NULL; 2543 return NULL;
2546 } 2544 }
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
2598 LInstruction* LChunkBuilder::DoStoreFrameContext(HStoreFrameContext* instr) { 2596 LInstruction* LChunkBuilder::DoStoreFrameContext(HStoreFrameContext* instr) {
2599 LOperand* context = UseRegisterAtStart(instr->context()); 2597 LOperand* context = UseRegisterAtStart(instr->context());
2600 return new(zone()) LStoreFrameContext(context); 2598 return new(zone()) LStoreFrameContext(context);
2601 } 2599 }
2602 2600
2603 2601
2604 } // namespace internal 2602 } // namespace internal
2605 } // namespace v8 2603 } // namespace v8
2606 2604
2607 #endif // V8_TARGET_ARCH_IA32 2605 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/crankshaft/hydrogen-instructions.h ('k') | src/crankshaft/lithium.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698