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

Side by Side Diff: src/crankshaft/mips/lithium-mips.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: Other 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
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/mips/lithium-mips.h" 5 #include "src/crankshaft/mips/lithium-mips.h"
6 6
7 #include <sstream> 7 #include <sstream>
8 8
9 #if V8_TARGET_ARCH_MIPS 9 #if V8_TARGET_ARCH_MIPS
10 10
(...skipping 2406 matching lines...) Expand 10 before | Expand all | Expand 10 after
2417 return AssignEnvironment( 2417 return AssignEnvironment(
2418 AssignPointerMap(new(zone()) LStackCheck(context))); 2418 AssignPointerMap(new(zone()) LStackCheck(context)));
2419 } 2419 }
2420 } 2420 }
2421 2421
2422 2422
2423 LInstruction* LChunkBuilder::DoEnterInlined(HEnterInlined* instr) { 2423 LInstruction* LChunkBuilder::DoEnterInlined(HEnterInlined* instr) {
2424 HEnvironment* outer = current_block_->last_environment(); 2424 HEnvironment* outer = current_block_->last_environment();
2425 outer->set_ast_id(instr->ReturnId()); 2425 outer->set_ast_id(instr->ReturnId());
2426 HConstant* undefined = graph()->GetConstantUndefined(); 2426 HConstant* undefined = graph()->GetConstantUndefined();
2427 HEnvironment* inner = outer->CopyForInlining(instr->closure(), 2427 HEnvironment* inner = outer->CopyForInlining(
2428 instr->arguments_count(), 2428 instr->closure(), instr->arguments_count(), instr->function(), undefined,
2429 instr->function(), 2429 instr->inlining_kind(), instr->syntactic_tail_call_mode());
2430 undefined,
2431 instr->inlining_kind());
2432 // Only replay binding of arguments object if it wasn't removed from graph. 2430 // Only replay binding of arguments object if it wasn't removed from graph.
2433 if (instr->arguments_var() != NULL && instr->arguments_object()->IsLinked()) { 2431 if (instr->arguments_var() != NULL && instr->arguments_object()->IsLinked()) {
2434 inner->Bind(instr->arguments_var(), instr->arguments_object()); 2432 inner->Bind(instr->arguments_var(), instr->arguments_object());
2435 } 2433 }
2436 inner->BindContext(instr->closure_context()); 2434 inner->BindContext(instr->closure_context());
2437 inner->set_entry(instr); 2435 inner->set_entry(instr);
2438 current_block_->UpdateEnvironment(inner); 2436 current_block_->UpdateEnvironment(inner);
2439 chunk_->AddInlinedFunction(instr->shared()); 2437 chunk_->AddInlinedFunction(instr->shared());
2440 return NULL; 2438 return NULL;
2441 } 2439 }
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
2493 2491
2494 LInstruction* LChunkBuilder::DoStoreFrameContext(HStoreFrameContext* instr) { 2492 LInstruction* LChunkBuilder::DoStoreFrameContext(HStoreFrameContext* instr) {
2495 LOperand* context = UseRegisterAtStart(instr->context()); 2493 LOperand* context = UseRegisterAtStart(instr->context());
2496 return new(zone()) LStoreFrameContext(context); 2494 return new(zone()) LStoreFrameContext(context);
2497 } 2495 }
2498 2496
2499 } // namespace internal 2497 } // namespace internal
2500 } // namespace v8 2498 } // namespace v8
2501 2499
2502 #endif // V8_TARGET_ARCH_MIPS 2500 #endif // V8_TARGET_ARCH_MIPS
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698