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

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: Support for CS and TF compilers added 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
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 2724 matching lines...) Expand 10 before | Expand all | Expand 10 after
2735 void FullCodeGenerator::EmitCall(Call* expr, ConvertReceiverMode mode) { 2735 void FullCodeGenerator::EmitCall(Call* expr, ConvertReceiverMode mode) {
2736 // Load the arguments. 2736 // Load the arguments.
2737 ZoneList<Expression*>* args = expr->arguments(); 2737 ZoneList<Expression*>* args = expr->arguments();
2738 int arg_count = args->length(); 2738 int arg_count = args->length();
2739 for (int i = 0; i < arg_count; i++) { 2739 for (int i = 0; i < arg_count; i++) {
2740 VisitForStackValue(args->at(i)); 2740 VisitForStackValue(args->at(i));
2741 } 2741 }
2742 2742
2743 PrepareForBailoutForId(expr->CallId(), NO_REGISTERS); 2743 PrepareForBailoutForId(expr->CallId(), NO_REGISTERS);
2744 SetCallPosition(expr); 2744 SetCallPosition(expr);
2745 Handle<Code> ic = CodeFactory::CallIC(isolate(), arg_count, mode).code(); 2745 Handle<Code> ic =
2746 CodeFactory::CallIC(isolate(), arg_count, mode, expr->tail_call_mode())
2747 .code();
2746 __ Move(rdx, SmiFromSlot(expr->CallFeedbackICSlot())); 2748 __ Move(rdx, SmiFromSlot(expr->CallFeedbackICSlot()));
2747 __ movp(rdi, Operand(rsp, (arg_count + 1) * kPointerSize)); 2749 __ movp(rdi, Operand(rsp, (arg_count + 1) * kPointerSize));
2748 // Don't assign a type feedback id to the IC, since type feedback is provided 2750 // Don't assign a type feedback id to the IC, since type feedback is provided
2749 // by the vector above. 2751 // by the vector above.
2750 CallIC(ic); 2752 CallIC(ic);
2751 2753
2752 RecordJSReturnSite(expr); 2754 RecordJSReturnSite(expr);
2753 2755
2754 // Restore context register. 2756 // Restore context register.
2755 __ movp(rsi, Operand(rbp, StandardFrameConstants::kContextOffset)); 2757 __ movp(rsi, Operand(rbp, StandardFrameConstants::kContextOffset));
(...skipping 1990 matching lines...) Expand 10 before | Expand all | Expand 10 after
4746 Assembler::target_address_at(call_target_address, 4748 Assembler::target_address_at(call_target_address,
4747 unoptimized_code)); 4749 unoptimized_code));
4748 return OSR_AFTER_STACK_CHECK; 4750 return OSR_AFTER_STACK_CHECK;
4749 } 4751 }
4750 4752
4751 4753
4752 } // namespace internal 4754 } // namespace internal
4753 } // namespace v8 4755 } // namespace v8
4754 4756
4755 #endif // V8_TARGET_ARCH_X64 4757 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/full-codegen/full-codegen.cc ('k') | src/globals.h » ('j') | src/x64/builtins-x64.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698