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/arm64/code-stubs-arm64.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/arm64/builtins-arm64.cc ('k') | src/ast/ast.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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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_ARM64 5 #if V8_TARGET_ARCH_ARM64
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 2918 matching lines...) Expand 10 before | Expand all | Expand 10 after
2929 __ Add(feedback_vector, feedback_vector, 2929 __ Add(feedback_vector, feedback_vector,
2930 Operand::UntagSmiAndScale(index, kPointerSizeLog2)); 2930 Operand::UntagSmiAndScale(index, kPointerSizeLog2));
2931 __ Add(feedback_vector, feedback_vector, 2931 __ Add(feedback_vector, feedback_vector,
2932 Operand(FixedArray::kHeaderSize + kPointerSize)); 2932 Operand(FixedArray::kHeaderSize + kPointerSize));
2933 __ Ldr(index, FieldMemOperand(feedback_vector, 0)); 2933 __ Ldr(index, FieldMemOperand(feedback_vector, 0));
2934 __ Add(index, index, Operand(Smi::FromInt(CallICNexus::kCallCountIncrement))); 2934 __ Add(index, index, Operand(Smi::FromInt(CallICNexus::kCallCountIncrement)));
2935 __ Str(index, FieldMemOperand(feedback_vector, 0)); 2935 __ Str(index, FieldMemOperand(feedback_vector, 0));
2936 2936
2937 __ Bind(&call_function); 2937 __ Bind(&call_function);
2938 __ Mov(x0, argc); 2938 __ Mov(x0, argc);
2939 __ Jump(masm->isolate()->builtins()->CallFunction(convert_mode()), 2939 __ Jump(masm->isolate()->builtins()->CallFunction(convert_mode(),
2940 tail_call_mode()),
2940 RelocInfo::CODE_TARGET); 2941 RelocInfo::CODE_TARGET);
2941 2942
2942 __ bind(&extra_checks_or_miss); 2943 __ bind(&extra_checks_or_miss);
2943 Label uninitialized, miss, not_allocation_site; 2944 Label uninitialized, miss, not_allocation_site;
2944 2945
2945 __ JumpIfRoot(x4, Heap::kmegamorphic_symbolRootIndex, &call); 2946 __ JumpIfRoot(x4, Heap::kmegamorphic_symbolRootIndex, &call);
2946 2947
2947 __ Ldr(x5, FieldMemOperand(x4, HeapObject::kMapOffset)); 2948 __ Ldr(x5, FieldMemOperand(x4, HeapObject::kMapOffset));
2948 __ JumpIfNotRoot(x5, Heap::kAllocationSiteMapRootIndex, &not_allocation_site); 2949 __ JumpIfNotRoot(x5, Heap::kAllocationSiteMapRootIndex, &not_allocation_site);
2949 2950
(...skipping 13 matching lines...) Expand all
2963 // to handle it here. More complex cases are dealt with in the runtime. 2964 // to handle it here. More complex cases are dealt with in the runtime.
2964 __ AssertNotSmi(x4); 2965 __ AssertNotSmi(x4);
2965 __ JumpIfNotObjectType(x4, x5, x5, JS_FUNCTION_TYPE, &miss); 2966 __ JumpIfNotObjectType(x4, x5, x5, JS_FUNCTION_TYPE, &miss);
2966 __ Add(x4, feedback_vector, 2967 __ Add(x4, feedback_vector,
2967 Operand::UntagSmiAndScale(index, kPointerSizeLog2)); 2968 Operand::UntagSmiAndScale(index, kPointerSizeLog2));
2968 __ LoadRoot(x5, Heap::kmegamorphic_symbolRootIndex); 2969 __ LoadRoot(x5, Heap::kmegamorphic_symbolRootIndex);
2969 __ Str(x5, FieldMemOperand(x4, FixedArray::kHeaderSize)); 2970 __ Str(x5, FieldMemOperand(x4, FixedArray::kHeaderSize));
2970 2971
2971 __ Bind(&call); 2972 __ Bind(&call);
2972 __ Mov(x0, argc); 2973 __ Mov(x0, argc);
2973 __ Jump(masm->isolate()->builtins()->Call(convert_mode()), 2974 __ Jump(masm->isolate()->builtins()->Call(convert_mode(), tail_call_mode()),
2974 RelocInfo::CODE_TARGET); 2975 RelocInfo::CODE_TARGET);
2975 2976
2976 __ bind(&uninitialized); 2977 __ bind(&uninitialized);
2977 2978
2978 // We are going monomorphic, provided we actually have a JSFunction. 2979 // We are going monomorphic, provided we actually have a JSFunction.
2979 __ JumpIfSmi(function, &miss); 2980 __ JumpIfSmi(function, &miss);
2980 2981
2981 // Goto miss case if we do not have a function. 2982 // Goto miss case if we do not have a function.
2982 __ JumpIfNotObjectType(function, x5, x5, JS_FUNCTION_TYPE, &miss); 2983 __ JumpIfNotObjectType(function, x5, x5, JS_FUNCTION_TYPE, &miss);
2983 2984
(...skipping 2909 matching lines...) Expand 10 before | Expand all | Expand 10 after
5893 return_value_operand, NULL); 5894 return_value_operand, NULL);
5894 } 5895 }
5895 5896
5896 5897
5897 #undef __ 5898 #undef __
5898 5899
5899 } // namespace internal 5900 } // namespace internal
5900 } // namespace v8 5901 } // namespace v8
5901 5902
5902 #endif // V8_TARGET_ARCH_ARM64 5903 #endif // V8_TARGET_ARCH_ARM64
OLDNEW
« no previous file with comments | « src/arm64/builtins-arm64.cc ('k') | src/ast/ast.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698