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

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

Issue 1819073003: [es6] Don't disable ES6 tail call elimination when Debugger is on. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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/mips64/builtins-mips64.cc ('k') | src/s390/builtins-s390.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_PPC 5 #if V8_TARGET_ARCH_PPC
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 1948 matching lines...) Expand 10 before | Expand all | Expand 10 after
1959 // | f()'s arg 1 1959 // | f()'s arg 1
1960 // | f()'s receiver arg <- sp (f()'s caller pc is not on the stack yet!) 1960 // | f()'s receiver arg <- sp (f()'s caller pc is not on the stack yet!)
1961 // ---------------------- 1961 // ----------------------
1962 // 1962 //
1963 void PrepareForTailCall(MacroAssembler* masm, Register args_reg, 1963 void PrepareForTailCall(MacroAssembler* masm, Register args_reg,
1964 Register scratch1, Register scratch2, 1964 Register scratch1, Register scratch2,
1965 Register scratch3) { 1965 Register scratch3) {
1966 DCHECK(!AreAliased(args_reg, scratch1, scratch2, scratch3)); 1966 DCHECK(!AreAliased(args_reg, scratch1, scratch2, scratch3));
1967 Comment cmnt(masm, "[ PrepareForTailCall"); 1967 Comment cmnt(masm, "[ PrepareForTailCall");
1968 1968
1969 // Prepare for tail call only if the debugger is not active.
1970 Label done;
1971 ExternalReference debug_is_active =
1972 ExternalReference::debug_is_active_address(masm->isolate());
1973 __ mov(scratch1, Operand(debug_is_active));
1974 __ lbz(scratch1, MemOperand(scratch1));
1975 __ cmpi(scratch1, Operand::Zero());
1976 __ bne(&done);
1977
1978 // Drop possible interpreter handler/stub frame. 1969 // Drop possible interpreter handler/stub frame.
1979 { 1970 {
1980 Label no_interpreter_frame; 1971 Label no_interpreter_frame;
1981 __ LoadP(scratch3, 1972 __ LoadP(scratch3,
1982 MemOperand(fp, CommonFrameConstants::kContextOrFrameTypeOffset)); 1973 MemOperand(fp, CommonFrameConstants::kContextOrFrameTypeOffset));
1983 __ CmpSmiLiteral(scratch3, Smi::FromInt(StackFrame::STUB), r0); 1974 __ CmpSmiLiteral(scratch3, Smi::FromInt(StackFrame::STUB), r0);
1984 __ bne(&no_interpreter_frame); 1975 __ bne(&no_interpreter_frame);
1985 __ LoadP(fp, MemOperand(fp, StandardFrameConstants::kCallerFPOffset)); 1976 __ LoadP(fp, MemOperand(fp, StandardFrameConstants::kCallerFPOffset));
1986 __ bind(&no_interpreter_frame); 1977 __ bind(&no_interpreter_frame);
1987 } 1978 }
(...skipping 27 matching lines...) Expand all
2015 SharedFunctionInfo::kFormalParameterCountOffset)); 2006 SharedFunctionInfo::kFormalParameterCountOffset));
2016 #if !V8_TARGET_ARCH_PPC64 2007 #if !V8_TARGET_ARCH_PPC64
2017 __ SmiUntag(caller_args_count_reg); 2008 __ SmiUntag(caller_args_count_reg);
2018 #endif 2009 #endif
2019 2010
2020 __ bind(&formal_parameter_count_loaded); 2011 __ bind(&formal_parameter_count_loaded);
2021 2012
2022 ParameterCount callee_args_count(args_reg); 2013 ParameterCount callee_args_count(args_reg);
2023 __ PrepareForTailCall(callee_args_count, caller_args_count_reg, scratch2, 2014 __ PrepareForTailCall(callee_args_count, caller_args_count_reg, scratch2,
2024 scratch3); 2015 scratch3);
2025 __ bind(&done);
2026 } 2016 }
2027 } // namespace 2017 } // namespace
2028 2018
2029 // static 2019 // static
2030 void Builtins::Generate_CallFunction(MacroAssembler* masm, 2020 void Builtins::Generate_CallFunction(MacroAssembler* masm,
2031 ConvertReceiverMode mode, 2021 ConvertReceiverMode mode,
2032 TailCallMode tail_call_mode) { 2022 TailCallMode tail_call_mode) {
2033 // ----------- S t a t e ------------- 2023 // ----------- S t a t e -------------
2034 // -- r3 : the number of arguments (not including the receiver) 2024 // -- r3 : the number of arguments (not including the receiver)
2035 // -- r4 : the function to call (checked to be a JSFunction) 2025 // -- r4 : the function to call (checked to be a JSFunction)
(...skipping 535 matching lines...) Expand 10 before | Expand all | Expand 10 after
2571 __ bkpt(0); 2561 __ bkpt(0);
2572 } 2562 }
2573 } 2563 }
2574 2564
2575 2565
2576 #undef __ 2566 #undef __
2577 } // namespace internal 2567 } // namespace internal
2578 } // namespace v8 2568 } // namespace v8
2579 2569
2580 #endif // V8_TARGET_ARCH_PPC 2570 #endif // V8_TARGET_ARCH_PPC
OLDNEW
« no previous file with comments | « src/mips64/builtins-mips64.cc ('k') | src/s390/builtins-s390.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698