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

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

Issue 1151853003: [strong] create strong array literals Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix a test Created 5 years, 7 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/full-codegen-arm.cc ('k') | src/arm64/full-codegen-arm64.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 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #if V8_TARGET_ARCH_ARM64 7 #if V8_TARGET_ARCH_ARM64
8 8
9 #include "src/bootstrapper.h" 9 #include "src/bootstrapper.h"
10 #include "src/code-stubs.h" 10 #include "src/code-stubs.h"
(...skipping 2188 matching lines...) Expand 10 before | Expand all | Expand 10 after
2199 2199
2200 // Do the runtime call to allocate the arguments object. 2200 // Do the runtime call to allocate the arguments object.
2201 __ Bind(&runtime); 2201 __ Bind(&runtime);
2202 __ Push(function, params, param_count_smi); 2202 __ Push(function, params, param_count_smi);
2203 __ TailCallRuntime(Runtime::kNewStrictArguments, 3, 1); 2203 __ TailCallRuntime(Runtime::kNewStrictArguments, 3, 1);
2204 } 2204 }
2205 2205
2206 2206
2207 void RestParamAccessStub::GenerateNew(MacroAssembler* masm) { 2207 void RestParamAccessStub::GenerateNew(MacroAssembler* masm) {
2208 // Stack layout on entry. 2208 // Stack layout on entry.
2209 // jssp[0]: index of rest parameter (tagged) 2209 // jssp[0]: language mode (tagged)
2210 // jssp[8]: number of parameters (tagged) 2210 // jssp[8]: index of rest parameter (tagged)
2211 // jssp[16]: address of receiver argument 2211 // jssp[16]: number of parameters (tagged)
2212 // jssp[24]: address of receiver argument
2212 // 2213 //
2213 // Returns pointer to result object in x0. 2214 // Returns pointer to result object in x0.
2214 2215
2215 // Get the stub arguments from the frame, and make an untagged copy of the 2216 // Get the stub arguments from the frame, and make an untagged copy of the
2216 // parameter count. 2217 // parameter count.
2217 Register rest_index_smi = x1; 2218 Register language_mode_smi = x1;
2218 Register param_count_smi = x2; 2219 Register rest_index_smi = x2;
2219 Register params = x3; 2220 Register param_count_smi = x3;
2221 Register params = x4;
2220 Register param_count = x13; 2222 Register param_count = x13;
2221 __ Pop(rest_index_smi, param_count_smi, params); 2223 __ Pop(language_mode_smi, rest_index_smi, param_count_smi, params);
2222 __ SmiUntag(param_count, param_count_smi); 2224 __ SmiUntag(param_count, param_count_smi);
2223 2225
2224 // Test if arguments adaptor needed. 2226 // Test if arguments adaptor needed.
2225 Register caller_fp = x11; 2227 Register caller_fp = x11;
2226 Register caller_ctx = x12; 2228 Register caller_ctx = x12;
2227 Label runtime; 2229 Label runtime;
2228 __ Ldr(caller_fp, MemOperand(fp, StandardFrameConstants::kCallerFPOffset)); 2230 __ Ldr(caller_fp, MemOperand(fp, StandardFrameConstants::kCallerFPOffset));
2229 __ Ldr(caller_ctx, MemOperand(caller_fp, 2231 __ Ldr(caller_ctx, MemOperand(caller_fp,
2230 StandardFrameConstants::kContextOffset)); 2232 StandardFrameConstants::kContextOffset));
2231 __ Cmp(caller_ctx, Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR)); 2233 __ Cmp(caller_ctx, Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR));
2232 __ B(ne, &runtime); 2234 __ B(ne, &runtime);
2233 2235
2234 // x1 rest_index_smi index of rest parameter 2236 // x1 language_mode_smi language mode
2235 // x2 param_count_smi number of parameters passed to function (smi) 2237 // x2 rest_index_smi index of rest parameter
2236 // x3 params pointer to parameters 2238 // x3 param_count_smi number of parameters passed to function (smi)
2237 // x11 caller_fp caller's frame pointer 2239 // x4 params pointer to parameters
2238 // x13 param_count number of parameters passed to function 2240 // x11 caller_fp caller's frame pointer
2241 // x13 param_count number of parameters passed to function
2239 2242
2240 // Patch the argument length and parameters pointer. 2243 // Patch the argument length and parameters pointer.
2241 __ Ldr(param_count_smi, 2244 __ Ldr(param_count_smi,
2242 MemOperand(caller_fp, 2245 MemOperand(caller_fp,
2243 ArgumentsAdaptorFrameConstants::kLengthOffset)); 2246 ArgumentsAdaptorFrameConstants::kLengthOffset));
2244 __ SmiUntag(param_count, param_count_smi); 2247 __ SmiUntag(param_count, param_count_smi);
2245 __ Add(x10, caller_fp, Operand(param_count, LSL, kPointerSizeLog2)); 2248 __ Add(x10, caller_fp, Operand(param_count, LSL, kPointerSizeLog2));
2246 __ Add(params, x10, StandardFrameConstants::kCallerSPOffset); 2249 __ Add(params, x10, StandardFrameConstants::kCallerSPOffset);
2247 2250
2248 __ Bind(&runtime); 2251 __ Bind(&runtime);
2249 __ Push(params, param_count_smi, rest_index_smi); 2252 __ Push(params, param_count_smi, rest_index_smi, language_mode_smi);
2250 __ TailCallRuntime(Runtime::kNewRestParam, 3, 1); 2253 __ TailCallRuntime(Runtime::kNewRestParam, 4, 1);
2251 } 2254 }
2252 2255
2253 2256
2254 void RegExpExecStub::Generate(MacroAssembler* masm) { 2257 void RegExpExecStub::Generate(MacroAssembler* masm) {
2255 #ifdef V8_INTERPRETED_REGEXP 2258 #ifdef V8_INTERPRETED_REGEXP
2256 __ TailCallRuntime(Runtime::kRegExpExec, 4, 1); 2259 __ TailCallRuntime(Runtime::kRegExpExec, 4, 1);
2257 #else // V8_INTERPRETED_REGEXP 2260 #else // V8_INTERPRETED_REGEXP
2258 2261
2259 // Stack frame on entry. 2262 // Stack frame on entry.
2260 // jssp[0]: last_match_info (expected JSArray) 2263 // jssp[0]: last_match_info (expected JSArray)
(...skipping 3512 matching lines...) Expand 10 before | Expand all | Expand 10 after
5773 kStackUnwindSpace, NULL, spill_offset, 5776 kStackUnwindSpace, NULL, spill_offset,
5774 MemOperand(fp, 6 * kPointerSize), NULL); 5777 MemOperand(fp, 6 * kPointerSize), NULL);
5775 } 5778 }
5776 5779
5777 5780
5778 #undef __ 5781 #undef __
5779 5782
5780 } } // namespace v8::internal 5783 } } // namespace v8::internal
5781 5784
5782 #endif // V8_TARGET_ARCH_ARM64 5785 #endif // V8_TARGET_ARCH_ARM64
OLDNEW
« no previous file with comments | « src/arm/full-codegen-arm.cc ('k') | src/arm64/full-codegen-arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698