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

Side by Side Diff: src/full-codegen/x64/full-codegen-x64.cc

Issue 1609893003: [es6] Tail calls support. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebasing Created 4 years, 11 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/full-codegen/mips64/full-codegen-mips64.cc ('k') | src/globals.h » ('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 #if V8_TARGET_ARCH_X64 5 #if V8_TARGET_ARCH_X64
6 6
7 #include "src/ast/scopes.h" 7 #include "src/ast/scopes.h"
8 #include "src/code-factory.h" 8 #include "src/code-factory.h"
9 #include "src/code-stubs.h" 9 #include "src/code-stubs.h"
10 #include "src/codegen.h" 10 #include "src/codegen.h"
(...skipping 2719 matching lines...) Expand 10 before | Expand all | Expand 10 after
2730 void FullCodeGenerator::EmitCall(Call* expr, ConvertReceiverMode mode) { 2730 void FullCodeGenerator::EmitCall(Call* expr, ConvertReceiverMode mode) {
2731 // Load the arguments. 2731 // Load the arguments.
2732 ZoneList<Expression*>* args = expr->arguments(); 2732 ZoneList<Expression*>* args = expr->arguments();
2733 int arg_count = args->length(); 2733 int arg_count = args->length();
2734 for (int i = 0; i < arg_count; i++) { 2734 for (int i = 0; i < arg_count; i++) {
2735 VisitForStackValue(args->at(i)); 2735 VisitForStackValue(args->at(i));
2736 } 2736 }
2737 2737
2738 PrepareForBailoutForId(expr->CallId(), NO_REGISTERS); 2738 PrepareForBailoutForId(expr->CallId(), NO_REGISTERS);
2739 SetCallPosition(expr); 2739 SetCallPosition(expr);
2740 Handle<Code> ic = CodeFactory::CallIC(isolate(), arg_count, mode).code(); 2740 Handle<Code> ic =
2741 CodeFactory::CallIC(isolate(), arg_count, mode, expr->tail_call_mode())
2742 .code();
2741 __ Move(rdx, SmiFromSlot(expr->CallFeedbackICSlot())); 2743 __ Move(rdx, SmiFromSlot(expr->CallFeedbackICSlot()));
2742 __ movp(rdi, Operand(rsp, (arg_count + 1) * kPointerSize)); 2744 __ movp(rdi, Operand(rsp, (arg_count + 1) * kPointerSize));
2743 // Don't assign a type feedback id to the IC, since type feedback is provided 2745 // Don't assign a type feedback id to the IC, since type feedback is provided
2744 // by the vector above. 2746 // by the vector above.
2745 CallIC(ic); 2747 CallIC(ic);
2746 2748
2747 RecordJSReturnSite(expr); 2749 RecordJSReturnSite(expr);
2748 2750
2749 // Restore context register. 2751 // Restore context register.
2750 __ movp(rsi, Operand(rbp, StandardFrameConstants::kContextOffset)); 2752 __ movp(rsi, Operand(rbp, StandardFrameConstants::kContextOffset));
(...skipping 1969 matching lines...) Expand 10 before | Expand all | Expand 10 after
4720 Assembler::target_address_at(call_target_address, 4722 Assembler::target_address_at(call_target_address,
4721 unoptimized_code)); 4723 unoptimized_code));
4722 return OSR_AFTER_STACK_CHECK; 4724 return OSR_AFTER_STACK_CHECK;
4723 } 4725 }
4724 4726
4725 4727
4726 } // namespace internal 4728 } // namespace internal
4727 } // namespace v8 4729 } // namespace v8
4728 4730
4729 #endif // V8_TARGET_ARCH_X64 4731 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/full-codegen/mips64/full-codegen-mips64.cc ('k') | src/globals.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698