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

Side by Side Diff: src/s390/builtins-s390.cc

Issue 1837513002: [es6] Add a flag to the Isolate that defines whether ES2015 tail call elimination is enabled or not. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: New changes 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/ppc/builtins-ppc.cc ('k') | src/x64/builtins-x64.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 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 #if V8_TARGET_ARCH_S390 5 #if V8_TARGET_ARCH_S390
6 6
7 #include "src/codegen.h" 7 #include "src/codegen.h"
8 #include "src/debug/debug.h" 8 #include "src/debug/debug.h"
9 #include "src/deoptimizer.h" 9 #include "src/deoptimizer.h"
10 #include "src/full-codegen/full-codegen.h" 10 #include "src/full-codegen/full-codegen.h"
(...skipping 1931 matching lines...) Expand 10 before | Expand all | Expand 10 after
1942 // | f()'s arg 1 1942 // | f()'s arg 1
1943 // | f()'s receiver arg <- sp (f()'s caller pc is not on the stack yet!) 1943 // | f()'s receiver arg <- sp (f()'s caller pc is not on the stack yet!)
1944 // ---------------------- 1944 // ----------------------
1945 // 1945 //
1946 void PrepareForTailCall(MacroAssembler* masm, Register args_reg, 1946 void PrepareForTailCall(MacroAssembler* masm, Register args_reg,
1947 Register scratch1, Register scratch2, 1947 Register scratch1, Register scratch2,
1948 Register scratch3) { 1948 Register scratch3) {
1949 DCHECK(!AreAliased(args_reg, scratch1, scratch2, scratch3)); 1949 DCHECK(!AreAliased(args_reg, scratch1, scratch2, scratch3));
1950 Comment cmnt(masm, "[ PrepareForTailCall"); 1950 Comment cmnt(masm, "[ PrepareForTailCall");
1951 1951
1952 // Prepare for tail call only if ES2015 tail call elimination is active.
1953 Label done;
1954 ExternalReference is_tail_call_elimination_enabled =
1955 ExternalReference::is_tail_call_elimination_enabled_address(
1956 masm->isolate());
1957 __ mov(scratch1, Operand(is_tail_call_elimination_enabled));
1958 __ LoadlB(scratch1, MemOperand(scratch1));
1959 __ CmpP(scratch1, Operand::Zero());
1960 __ beq(&done);
1961
1952 // Drop possible interpreter handler/stub frame. 1962 // Drop possible interpreter handler/stub frame.
1953 { 1963 {
1954 Label no_interpreter_frame; 1964 Label no_interpreter_frame;
1955 __ LoadP(scratch3, 1965 __ LoadP(scratch3,
1956 MemOperand(fp, CommonFrameConstants::kContextOrFrameTypeOffset)); 1966 MemOperand(fp, CommonFrameConstants::kContextOrFrameTypeOffset));
1957 __ CmpSmiLiteral(scratch3, Smi::FromInt(StackFrame::STUB), r0); 1967 __ CmpSmiLiteral(scratch3, Smi::FromInt(StackFrame::STUB), r0);
1958 __ bne(&no_interpreter_frame); 1968 __ bne(&no_interpreter_frame);
1959 __ LoadP(fp, MemOperand(fp, StandardFrameConstants::kCallerFPOffset)); 1969 __ LoadP(fp, MemOperand(fp, StandardFrameConstants::kCallerFPOffset));
1960 __ bind(&no_interpreter_frame); 1970 __ bind(&no_interpreter_frame);
1961 } 1971 }
(...skipping 26 matching lines...) Expand all
1988 SharedFunctionInfo::kFormalParameterCountOffset)); 1998 SharedFunctionInfo::kFormalParameterCountOffset));
1989 #if !V8_TARGET_ARCH_S390X 1999 #if !V8_TARGET_ARCH_S390X
1990 __ SmiUntag(caller_args_count_reg); 2000 __ SmiUntag(caller_args_count_reg);
1991 #endif 2001 #endif
1992 2002
1993 __ bind(&formal_parameter_count_loaded); 2003 __ bind(&formal_parameter_count_loaded);
1994 2004
1995 ParameterCount callee_args_count(args_reg); 2005 ParameterCount callee_args_count(args_reg);
1996 __ PrepareForTailCall(callee_args_count, caller_args_count_reg, scratch2, 2006 __ PrepareForTailCall(callee_args_count, caller_args_count_reg, scratch2,
1997 scratch3); 2007 scratch3);
2008 __ bind(&done);
1998 } 2009 }
1999 } // namespace 2010 } // namespace
2000 2011
2001 // static 2012 // static
2002 void Builtins::Generate_CallFunction(MacroAssembler* masm, 2013 void Builtins::Generate_CallFunction(MacroAssembler* masm,
2003 ConvertReceiverMode mode, 2014 ConvertReceiverMode mode,
2004 TailCallMode tail_call_mode) { 2015 TailCallMode tail_call_mode) {
2005 // ----------- S t a t e ------------- 2016 // ----------- S t a t e -------------
2006 // -- r2 : the number of arguments (not including the receiver) 2017 // -- r2 : the number of arguments (not including the receiver)
2007 // -- r3 : the function to call (checked to be a JSFunction) 2018 // -- r3 : the function to call (checked to be a JSFunction)
(...skipping 527 matching lines...) Expand 10 before | Expand all | Expand 10 after
2535 __ bkpt(0); 2546 __ bkpt(0);
2536 } 2547 }
2537 } 2548 }
2538 2549
2539 #undef __ 2550 #undef __
2540 2551
2541 } // namespace internal 2552 } // namespace internal
2542 } // namespace v8 2553 } // namespace v8
2543 2554
2544 #endif // V8_TARGET_ARCH_S390 2555 #endif // V8_TARGET_ARCH_S390
OLDNEW
« no previous file with comments | « src/ppc/builtins-ppc.cc ('k') | src/x64/builtins-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698