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

Side by Side Diff: src/full-codegen/arm/full-codegen-arm.cc

Issue 1556913002: Use register arguments for RestParamAccessStub (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Ports. 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/code-stubs.h ('k') | src/full-codegen/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 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_ARM 5 #if V8_TARGET_ARCH_ARM
6 6
7 #include "src/ast/scopes.h" 7 #include "src/ast/scopes.h"
8 #include "src/code-factory.h" 8 #include "src/code-factory.h"
9 #include "src/code-stubs.h" 9 #include "src/code-stubs.h"
10 #include "src/codegen.h" 10 #include "src/codegen.h"
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 261
262 // Possibly allocate RestParameters 262 // Possibly allocate RestParameters
263 int rest_index; 263 int rest_index;
264 Variable* rest_param = scope()->rest_parameter(&rest_index); 264 Variable* rest_param = scope()->rest_parameter(&rest_index);
265 if (rest_param) { 265 if (rest_param) {
266 Comment cmnt(masm_, "[ Allocate rest parameter array"); 266 Comment cmnt(masm_, "[ Allocate rest parameter array");
267 267
268 int num_parameters = info->scope()->num_parameters(); 268 int num_parameters = info->scope()->num_parameters();
269 int offset = num_parameters * kPointerSize; 269 int offset = num_parameters * kPointerSize;
270 270
271 __ add(r3, fp, Operand(StandardFrameConstants::kCallerSPOffset + offset)); 271 __ mov(RestParamAccessDescriptor::parameter_count(),
272 __ mov(r2, Operand(Smi::FromInt(num_parameters))); 272 Operand(Smi::FromInt(num_parameters)));
273 __ mov(r1, Operand(Smi::FromInt(rest_index))); 273 __ add(RestParamAccessDescriptor::parameter_pointer(), fp,
274 __ mov(r0, Operand(Smi::FromInt(language_mode()))); 274 Operand(StandardFrameConstants::kCallerSPOffset + offset));
275 __ Push(r3, r2, r1, r0); 275 __ mov(RestParamAccessDescriptor::rest_parameter_index(),
276 Operand(Smi::FromInt(rest_index)));
277 __ mov(RestParamAccessDescriptor::language_mode(),
278 Operand(Smi::FromInt(language_mode())));
279 DCHECK(r1.is(RestParamAccessDescriptor::language_mode()));
276 function_in_register_r1 = false; 280 function_in_register_r1 = false;
277 281
278 RestParamAccessStub stub(isolate()); 282 RestParamAccessStub stub(isolate());
279 __ CallStub(&stub); 283 __ CallStub(&stub);
280 284
281 SetVar(rest_param, r0, r1, r2); 285 SetVar(rest_param, r0, r1, r2);
282 } 286 }
283 287
284 Variable* arguments = scope()->arguments(); 288 Variable* arguments = scope()->arguments();
285 if (arguments != NULL) { 289 if (arguments != NULL) {
(...skipping 4631 matching lines...) Expand 10 before | Expand all | Expand 10 after
4917 DCHECK(interrupt_address == 4921 DCHECK(interrupt_address ==
4918 isolate->builtins()->OsrAfterStackCheck()->entry()); 4922 isolate->builtins()->OsrAfterStackCheck()->entry());
4919 return OSR_AFTER_STACK_CHECK; 4923 return OSR_AFTER_STACK_CHECK;
4920 } 4924 }
4921 4925
4922 4926
4923 } // namespace internal 4927 } // namespace internal
4924 } // namespace v8 4928 } // namespace v8
4925 4929
4926 #endif // V8_TARGET_ARCH_ARM 4930 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/code-stubs.h ('k') | src/full-codegen/arm64/full-codegen-arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698