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

Side by Side Diff: src/full-codegen/x64/full-codegen-x64.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/full-codegen/mips64/full-codegen-mips64.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 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_X64 5 #if V8_TARGET_ARCH_X64
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 240 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 251
252 // Possibly allocate RestParameters 252 // Possibly allocate RestParameters
253 int rest_index; 253 int rest_index;
254 Variable* rest_param = scope()->rest_parameter(&rest_index); 254 Variable* rest_param = scope()->rest_parameter(&rest_index);
255 if (rest_param) { 255 if (rest_param) {
256 Comment cmnt(masm_, "[ Allocate rest parameter array"); 256 Comment cmnt(masm_, "[ Allocate rest parameter array");
257 257
258 int num_parameters = info->scope()->num_parameters(); 258 int num_parameters = info->scope()->num_parameters();
259 int offset = num_parameters * kPointerSize; 259 int offset = num_parameters * kPointerSize;
260 260
261 __ leap(rdx, 261 __ Move(RestParamAccessDescriptor::parameter_count(),
262 Smi::FromInt(num_parameters));
263 __ leap(RestParamAccessDescriptor::parameter_pointer(),
262 Operand(rbp, StandardFrameConstants::kCallerSPOffset + offset)); 264 Operand(rbp, StandardFrameConstants::kCallerSPOffset + offset));
263 __ Push(rdx); 265 __ Move(RestParamAccessDescriptor::rest_parameter_index(),
264 __ Push(Smi::FromInt(num_parameters)); 266 Smi::FromInt(rest_index));
265 __ Push(Smi::FromInt(rest_index)); 267 __ Move(RestParamAccessDescriptor::language_mode(),
266 __ Push(Smi::FromInt(language_mode())); 268 Smi::FromInt(language_mode()));
267 function_in_register = false; 269 function_in_register = false;
268 270
269 RestParamAccessStub stub(isolate()); 271 RestParamAccessStub stub(isolate());
270 __ CallStub(&stub); 272 __ CallStub(&stub);
271 273
272 SetVar(rest_param, rax, rbx, rdx); 274 SetVar(rest_param, rax, rbx, rdx);
273 } 275 }
274 276
275 // Possibly allocate an arguments object. 277 // Possibly allocate an arguments object.
276 Variable* arguments = scope()->arguments(); 278 Variable* arguments = scope()->arguments();
(...skipping 4515 matching lines...) Expand 10 before | Expand all | Expand 10 after
4792 Assembler::target_address_at(call_target_address, 4794 Assembler::target_address_at(call_target_address,
4793 unoptimized_code)); 4795 unoptimized_code));
4794 return OSR_AFTER_STACK_CHECK; 4796 return OSR_AFTER_STACK_CHECK;
4795 } 4797 }
4796 4798
4797 4799
4798 } // namespace internal 4800 } // namespace internal
4799 } // namespace v8 4801 } // namespace v8
4800 4802
4801 #endif // V8_TARGET_ARCH_X64 4803 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/full-codegen/mips64/full-codegen-mips64.cc ('k') | src/ia32/code-stubs-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698