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

Side by Side Diff: src/arm64/code-stubs-arm64.cc

Issue 2019393002: VectorICs: Remove special code to increment call counts by two. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 6 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/arm/code-stubs-arm.cc ('k') | src/ia32/code-stubs-ia32.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 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/code-stubs.h" 7 #include "src/code-stubs.h"
8 #include "src/api-arguments.h" 8 #include "src/api-arguments.h"
9 #include "src/bootstrapper.h" 9 #include "src/bootstrapper.h"
10 #include "src/codegen.h" 10 #include "src/codegen.h"
(...skipping 2165 matching lines...) Expand 10 before | Expand all | Expand 10 after
2176 __ B(ne, miss); 2176 __ B(ne, miss);
2177 2177
2178 __ Mov(x0, Operand(arg_count())); 2178 __ Mov(x0, Operand(arg_count()));
2179 2179
2180 // Increment the call count for monomorphic function calls. 2180 // Increment the call count for monomorphic function calls.
2181 __ Add(feedback_vector, feedback_vector, 2181 __ Add(feedback_vector, feedback_vector,
2182 Operand::UntagSmiAndScale(index, kPointerSizeLog2)); 2182 Operand::UntagSmiAndScale(index, kPointerSizeLog2));
2183 __ Add(feedback_vector, feedback_vector, 2183 __ Add(feedback_vector, feedback_vector,
2184 Operand(FixedArray::kHeaderSize + kPointerSize)); 2184 Operand(FixedArray::kHeaderSize + kPointerSize));
2185 __ Ldr(index, FieldMemOperand(feedback_vector, 0)); 2185 __ Ldr(index, FieldMemOperand(feedback_vector, 0));
2186 __ Add(index, index, Operand(Smi::FromInt(CallICNexus::kCallCountIncrement))); 2186 __ Add(index, index, Operand(Smi::FromInt(1)));
2187 __ Str(index, FieldMemOperand(feedback_vector, 0)); 2187 __ Str(index, FieldMemOperand(feedback_vector, 0));
2188 2188
2189 // Set up arguments for the array constructor stub. 2189 // Set up arguments for the array constructor stub.
2190 Register allocation_site_arg = feedback_vector; 2190 Register allocation_site_arg = feedback_vector;
2191 Register new_target_arg = index; 2191 Register new_target_arg = index;
2192 __ Mov(allocation_site_arg, allocation_site); 2192 __ Mov(allocation_site_arg, allocation_site);
2193 __ Mov(new_target_arg, function); 2193 __ Mov(new_target_arg, function);
2194 ArrayConstructorStub stub(masm->isolate(), arg_count()); 2194 ArrayConstructorStub stub(masm->isolate(), arg_count());
2195 __ TailCallStub(&stub); 2195 __ TailCallStub(&stub);
2196 } 2196 }
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
2236 // The compare above could have been a SMI/SMI comparison. Guard against this 2236 // The compare above could have been a SMI/SMI comparison. Guard against this
2237 // convincing us that we have a monomorphic JSFunction. 2237 // convincing us that we have a monomorphic JSFunction.
2238 __ JumpIfSmi(function, &extra_checks_or_miss); 2238 __ JumpIfSmi(function, &extra_checks_or_miss);
2239 2239
2240 // Increment the call count for monomorphic function calls. 2240 // Increment the call count for monomorphic function calls.
2241 __ Add(feedback_vector, feedback_vector, 2241 __ Add(feedback_vector, feedback_vector,
2242 Operand::UntagSmiAndScale(index, kPointerSizeLog2)); 2242 Operand::UntagSmiAndScale(index, kPointerSizeLog2));
2243 __ Add(feedback_vector, feedback_vector, 2243 __ Add(feedback_vector, feedback_vector,
2244 Operand(FixedArray::kHeaderSize + kPointerSize)); 2244 Operand(FixedArray::kHeaderSize + kPointerSize));
2245 __ Ldr(index, FieldMemOperand(feedback_vector, 0)); 2245 __ Ldr(index, FieldMemOperand(feedback_vector, 0));
2246 __ Add(index, index, Operand(Smi::FromInt(CallICNexus::kCallCountIncrement))); 2246 __ Add(index, index, Operand(Smi::FromInt(1)));
2247 __ Str(index, FieldMemOperand(feedback_vector, 0)); 2247 __ Str(index, FieldMemOperand(feedback_vector, 0));
2248 2248
2249 __ Bind(&call_function); 2249 __ Bind(&call_function);
2250 __ Mov(x0, argc); 2250 __ Mov(x0, argc);
2251 __ Jump(masm->isolate()->builtins()->CallFunction(convert_mode(), 2251 __ Jump(masm->isolate()->builtins()->CallFunction(convert_mode(),
2252 tail_call_mode()), 2252 tail_call_mode()),
2253 RelocInfo::CODE_TARGET); 2253 RelocInfo::CODE_TARGET);
2254 2254
2255 __ bind(&extra_checks_or_miss); 2255 __ bind(&extra_checks_or_miss);
2256 Label uninitialized, miss, not_allocation_site; 2256 Label uninitialized, miss, not_allocation_site;
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
2301 __ B(eq, &miss); 2301 __ B(eq, &miss);
2302 2302
2303 // Make sure the function belongs to the same native context. 2303 // Make sure the function belongs to the same native context.
2304 __ Ldr(x4, FieldMemOperand(function, JSFunction::kContextOffset)); 2304 __ Ldr(x4, FieldMemOperand(function, JSFunction::kContextOffset));
2305 __ Ldr(x4, ContextMemOperand(x4, Context::NATIVE_CONTEXT_INDEX)); 2305 __ Ldr(x4, ContextMemOperand(x4, Context::NATIVE_CONTEXT_INDEX));
2306 __ Ldr(x5, NativeContextMemOperand()); 2306 __ Ldr(x5, NativeContextMemOperand());
2307 __ Cmp(x4, x5); 2307 __ Cmp(x4, x5);
2308 __ B(ne, &miss); 2308 __ B(ne, &miss);
2309 2309
2310 // Initialize the call counter. 2310 // Initialize the call counter.
2311 __ Mov(x5, Smi::FromInt(CallICNexus::kCallCountIncrement)); 2311 __ Mov(x5, Smi::FromInt(1));
2312 __ Adds(x4, feedback_vector, 2312 __ Adds(x4, feedback_vector,
2313 Operand::UntagSmiAndScale(index, kPointerSizeLog2)); 2313 Operand::UntagSmiAndScale(index, kPointerSizeLog2));
2314 __ Str(x5, FieldMemOperand(x4, FixedArray::kHeaderSize + kPointerSize)); 2314 __ Str(x5, FieldMemOperand(x4, FixedArray::kHeaderSize + kPointerSize));
2315 2315
2316 // Store the function. Use a stub since we need a frame for allocation. 2316 // Store the function. Use a stub since we need a frame for allocation.
2317 // x2 - vector 2317 // x2 - vector
2318 // x3 - slot 2318 // x3 - slot
2319 // x1 - function 2319 // x1 - function
2320 { 2320 {
2321 FrameScope scope(masm, StackFrame::INTERNAL); 2321 FrameScope scope(masm, StackFrame::INTERNAL);
(...skipping 3512 matching lines...) Expand 10 before | Expand all | Expand 10 after
5834 kStackUnwindSpace, NULL, spill_offset, 5834 kStackUnwindSpace, NULL, spill_offset,
5835 return_value_operand, NULL); 5835 return_value_operand, NULL);
5836 } 5836 }
5837 5837
5838 #undef __ 5838 #undef __
5839 5839
5840 } // namespace internal 5840 } // namespace internal
5841 } // namespace v8 5841 } // namespace v8
5842 5842
5843 #endif // V8_TARGET_ARCH_ARM64 5843 #endif // V8_TARGET_ARCH_ARM64
OLDNEW
« no previous file with comments | « src/arm/code-stubs-arm.cc ('k') | src/ia32/code-stubs-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698