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

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

Issue 1537683002: Partial revert of rest parameter desugaring. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix test failures. Created 5 years 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/full-codegen/arm/full-codegen-arm.cc ('k') | src/full-codegen/ia32/full-codegen-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/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 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
255 SetVar(this_function_var, x1, x0, x2); 255 SetVar(this_function_var, x1, x0, x2);
256 } 256 }
257 257
258 // Possibly set up a local binding to the new target value. 258 // Possibly set up a local binding to the new target value.
259 Variable* new_target_var = scope()->new_target_var(); 259 Variable* new_target_var = scope()->new_target_var();
260 if (new_target_var != nullptr) { 260 if (new_target_var != nullptr) {
261 Comment cmnt(masm_, "[ new.target"); 261 Comment cmnt(masm_, "[ new.target");
262 SetVar(new_target_var, x3, x0, x2); 262 SetVar(new_target_var, x3, x0, x2);
263 } 263 }
264 264
265 // Possibly allocate RestParameters
266 int rest_index;
267 Variable* rest_param = scope()->rest_parameter(&rest_index);
268 if (rest_param) {
269 Comment cmnt(masm_, "[ Allocate rest parameter array");
270
271 int num_parameters = info->scope()->num_parameters();
272 int offset = num_parameters * kPointerSize;
273
274 __ Add(x3, fp, StandardFrameConstants::kCallerSPOffset + offset);
275 __ Mov(x2, Smi::FromInt(num_parameters));
276 __ Mov(x1, Smi::FromInt(rest_index));
277 __ Mov(x0, Smi::FromInt(language_mode()));
278 __ Push(x3, x2, x1, x0);
279 function_in_register_x1 = false;
280
281 RestParamAccessStub stub(isolate());
282 __ CallStub(&stub);
283
284 SetVar(rest_param, x0, x1, x2);
285 }
286
265 Variable* arguments = scope()->arguments(); 287 Variable* arguments = scope()->arguments();
266 if (arguments != NULL) { 288 if (arguments != NULL) {
267 // Function uses arguments object. 289 // Function uses arguments object.
268 Comment cmnt(masm_, "[ Allocate arguments object"); 290 Comment cmnt(masm_, "[ Allocate arguments object");
269 DCHECK(x1.is(ArgumentsAccessNewDescriptor::function())); 291 DCHECK(x1.is(ArgumentsAccessNewDescriptor::function()));
270 if (!function_in_register_x1) { 292 if (!function_in_register_x1) {
271 // Load this again, if it's used by the local context below. 293 // Load this again, if it's used by the local context below.
272 __ Ldr(x1, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset)); 294 __ Ldr(x1, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset));
273 } 295 }
274 // Receiver is just before the parameters on the caller's stack. 296 // Receiver is just before the parameters on the caller's stack.
(...skipping 4598 matching lines...) Expand 10 before | Expand all | Expand 10 after
4873 } 4895 }
4874 4896
4875 return INTERRUPT; 4897 return INTERRUPT;
4876 } 4898 }
4877 4899
4878 4900
4879 } // namespace internal 4901 } // namespace internal
4880 } // namespace v8 4902 } // namespace v8
4881 4903
4882 #endif // V8_TARGET_ARCH_ARM64 4904 #endif // V8_TARGET_ARCH_ARM64
OLDNEW
« no previous file with comments | « src/full-codegen/arm/full-codegen-arm.cc ('k') | src/full-codegen/ia32/full-codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698