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

Side by Side Diff: src/full-codegen/arm/full-codegen-arm.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 4 years, 12 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/crankshaft/hydrogen.cc ('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 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
252 SetVar(this_function_var, r1, r0, r2); 252 SetVar(this_function_var, r1, r0, r2);
253 } 253 }
254 254
255 // Possibly set up a local binding to the new target value. 255 // Possibly set up a local binding to the new target value.
256 Variable* new_target_var = scope()->new_target_var(); 256 Variable* new_target_var = scope()->new_target_var();
257 if (new_target_var != nullptr) { 257 if (new_target_var != nullptr) {
258 Comment cmnt(masm_, "[ new.target"); 258 Comment cmnt(masm_, "[ new.target");
259 SetVar(new_target_var, r3, r0, r2); 259 SetVar(new_target_var, r3, r0, r2);
260 } 260 }
261 261
262 // Possibly allocate RestParameters
263 int rest_index;
264 Variable* rest_param = scope()->rest_parameter(&rest_index);
265 if (rest_param) {
266 Comment cmnt(masm_, "[ Allocate rest parameter array");
267
268 int num_parameters = info->scope()->num_parameters();
269 int offset = num_parameters * kPointerSize;
270
271 __ add(r3, fp, Operand(StandardFrameConstants::kCallerSPOffset + offset));
272 __ mov(r2, Operand(Smi::FromInt(num_parameters)));
273 __ mov(r1, Operand(Smi::FromInt(rest_index)));
274 __ mov(r0, Operand(Smi::FromInt(language_mode())));
275 __ Push(r3, r2, r1, r0);
276 function_in_register_r1 = false;
277
278 RestParamAccessStub stub(isolate());
279 __ CallStub(&stub);
280
281 SetVar(rest_param, r0, r1, r2);
282 }
283
262 Variable* arguments = scope()->arguments(); 284 Variable* arguments = scope()->arguments();
263 if (arguments != NULL) { 285 if (arguments != NULL) {
264 // Function uses arguments object. 286 // Function uses arguments object.
265 Comment cmnt(masm_, "[ Allocate arguments object"); 287 Comment cmnt(masm_, "[ Allocate arguments object");
266 DCHECK(r1.is(ArgumentsAccessNewDescriptor::function())); 288 DCHECK(r1.is(ArgumentsAccessNewDescriptor::function()));
267 if (!function_in_register_r1) { 289 if (!function_in_register_r1) {
268 // Load this again, if it's used by the local context below. 290 // Load this again, if it's used by the local context below.
269 __ ldr(r1, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset)); 291 __ ldr(r1, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset));
270 } 292 }
271 // Receiver is just before the parameters on the caller's stack. 293 // Receiver is just before the parameters on the caller's stack.
(...skipping 4626 matching lines...) Expand 10 before | Expand all | Expand 10 after
4898 DCHECK(interrupt_address == 4920 DCHECK(interrupt_address ==
4899 isolate->builtins()->OsrAfterStackCheck()->entry()); 4921 isolate->builtins()->OsrAfterStackCheck()->entry());
4900 return OSR_AFTER_STACK_CHECK; 4922 return OSR_AFTER_STACK_CHECK;
4901 } 4923 }
4902 4924
4903 4925
4904 } // namespace internal 4926 } // namespace internal
4905 } // namespace v8 4927 } // namespace v8
4906 4928
4907 #endif // V8_TARGET_ARCH_ARM 4929 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/crankshaft/hydrogen.cc ('k') | src/full-codegen/arm64/full-codegen-arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698