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

Side by Side Diff: src/mips64/code-stubs-mips64.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/mips64/builtins-mips64.cc ('k') | src/parsing/parser.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 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_MIPS64 5 #if V8_TARGET_ARCH_MIPS64
6 6
7 #include "src/bootstrapper.h" 7 #include "src/bootstrapper.h"
8 #include "src/code-stubs.h" 8 #include "src/code-stubs.h"
9 #include "src/codegen.h" 9 #include "src/codegen.h"
10 #include "src/ic/handler-compiler.h" 10 #include "src/ic/handler-compiler.h"
(...skipping 2729 matching lines...) Expand 10 before | Expand all | Expand 10 after
2740 __ JumpIfSmi(a1, &extra_checks_or_miss); 2740 __ JumpIfSmi(a1, &extra_checks_or_miss);
2741 2741
2742 // Increment the call count for monomorphic function calls. 2742 // Increment the call count for monomorphic function calls.
2743 __ dsrl(t0, a3, 32 - kPointerSizeLog2); 2743 __ dsrl(t0, a3, 32 - kPointerSizeLog2);
2744 __ Daddu(a3, a2, Operand(t0)); 2744 __ Daddu(a3, a2, Operand(t0));
2745 __ ld(t0, FieldMemOperand(a3, FixedArray::kHeaderSize + kPointerSize)); 2745 __ ld(t0, FieldMemOperand(a3, FixedArray::kHeaderSize + kPointerSize));
2746 __ Daddu(t0, t0, Operand(Smi::FromInt(CallICNexus::kCallCountIncrement))); 2746 __ Daddu(t0, t0, Operand(Smi::FromInt(CallICNexus::kCallCountIncrement)));
2747 __ sd(t0, FieldMemOperand(a3, FixedArray::kHeaderSize + kPointerSize)); 2747 __ sd(t0, FieldMemOperand(a3, FixedArray::kHeaderSize + kPointerSize));
2748 2748
2749 __ bind(&call_function); 2749 __ bind(&call_function);
2750 __ Jump(masm->isolate()->builtins()->CallFunction(convert_mode()), 2750 __ Jump(masm->isolate()->builtins()->CallFunction(convert_mode(),
2751 tail_call_mode()),
2751 RelocInfo::CODE_TARGET, al, zero_reg, Operand(zero_reg), 2752 RelocInfo::CODE_TARGET, al, zero_reg, Operand(zero_reg),
2752 USE_DELAY_SLOT); 2753 USE_DELAY_SLOT);
2753 __ li(a0, Operand(argc)); // In delay slot. 2754 __ li(a0, Operand(argc)); // In delay slot.
2754 2755
2755 __ bind(&extra_checks_or_miss); 2756 __ bind(&extra_checks_or_miss);
2756 Label uninitialized, miss, not_allocation_site; 2757 Label uninitialized, miss, not_allocation_site;
2757 2758
2758 __ LoadRoot(at, Heap::kmegamorphic_symbolRootIndex); 2759 __ LoadRoot(at, Heap::kmegamorphic_symbolRootIndex);
2759 __ Branch(&call, eq, a4, Operand(at)); 2760 __ Branch(&call, eq, a4, Operand(at));
2760 2761
(...skipping 19 matching lines...) Expand all
2780 // to handle it here. More complex cases are dealt with in the runtime. 2781 // to handle it here. More complex cases are dealt with in the runtime.
2781 __ AssertNotSmi(a4); 2782 __ AssertNotSmi(a4);
2782 __ GetObjectType(a4, a5, a5); 2783 __ GetObjectType(a4, a5, a5);
2783 __ Branch(&miss, ne, a5, Operand(JS_FUNCTION_TYPE)); 2784 __ Branch(&miss, ne, a5, Operand(JS_FUNCTION_TYPE));
2784 __ dsrl(a4, a3, 32 - kPointerSizeLog2); 2785 __ dsrl(a4, a3, 32 - kPointerSizeLog2);
2785 __ Daddu(a4, a2, Operand(a4)); 2786 __ Daddu(a4, a2, Operand(a4));
2786 __ LoadRoot(at, Heap::kmegamorphic_symbolRootIndex); 2787 __ LoadRoot(at, Heap::kmegamorphic_symbolRootIndex);
2787 __ sd(at, FieldMemOperand(a4, FixedArray::kHeaderSize)); 2788 __ sd(at, FieldMemOperand(a4, FixedArray::kHeaderSize));
2788 2789
2789 __ bind(&call); 2790 __ bind(&call);
2790 __ Jump(masm->isolate()->builtins()->Call(convert_mode()), 2791 __ Jump(masm->isolate()->builtins()->Call(convert_mode(), tail_call_mode()),
2791 RelocInfo::CODE_TARGET, al, zero_reg, Operand(zero_reg), 2792 RelocInfo::CODE_TARGET, al, zero_reg, Operand(zero_reg),
2792 USE_DELAY_SLOT); 2793 USE_DELAY_SLOT);
2793 __ li(a0, Operand(argc)); // In delay slot. 2794 __ li(a0, Operand(argc)); // In delay slot.
2794 2795
2795 __ bind(&uninitialized); 2796 __ bind(&uninitialized);
2796 2797
2797 // We are going monomorphic, provided we actually have a JSFunction. 2798 // We are going monomorphic, provided we actually have a JSFunction.
2798 __ JumpIfSmi(a1, &miss); 2799 __ JumpIfSmi(a1, &miss);
2799 2800
2800 // Goto miss case if we do not have a function. 2801 // Goto miss case if we do not have a function.
(...skipping 2876 matching lines...) Expand 10 before | Expand all | Expand 10 after
5677 return_value_operand, NULL); 5678 return_value_operand, NULL);
5678 } 5679 }
5679 5680
5680 5681
5681 #undef __ 5682 #undef __
5682 5683
5683 } // namespace internal 5684 } // namespace internal
5684 } // namespace v8 5685 } // namespace v8
5685 5686
5686 #endif // V8_TARGET_ARCH_MIPS64 5687 #endif // V8_TARGET_ARCH_MIPS64
OLDNEW
« no previous file with comments | « src/mips64/builtins-mips64.cc ('k') | src/parsing/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698