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

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

Issue 1557283002: X87: Use register arguments for RestParamAccessStub. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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 | « no previous file | src/x87/code-stubs-x87.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_X87 5 #if V8_TARGET_ARCH_X87
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 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
253 253
254 // Possibly allocate RestParameters 254 // Possibly allocate RestParameters
255 int rest_index; 255 int rest_index;
256 Variable* rest_param = scope()->rest_parameter(&rest_index); 256 Variable* rest_param = scope()->rest_parameter(&rest_index);
257 if (rest_param) { 257 if (rest_param) {
258 Comment cmnt(masm_, "[ Allocate rest parameter array"); 258 Comment cmnt(masm_, "[ Allocate rest parameter array");
259 259
260 int num_parameters = info->scope()->num_parameters(); 260 int num_parameters = info->scope()->num_parameters();
261 int offset = num_parameters * kPointerSize; 261 int offset = num_parameters * kPointerSize;
262 262
263 __ lea(edx, Operand(ebp, StandardFrameConstants::kCallerSPOffset + offset)); 263 __ mov(RestParamAccessDescriptor::parameter_count(),
264 __ push(edx); 264 Immediate(Smi::FromInt(num_parameters)));
265 __ push(Immediate(Smi::FromInt(num_parameters))); 265 __ lea(RestParamAccessDescriptor::parameter_pointer(),
266 __ push(Immediate(Smi::FromInt(rest_index))); 266 Operand(ebp, StandardFrameConstants::kCallerSPOffset + offset));
267 __ push(Immediate(Smi::FromInt(language_mode()))); 267 __ mov(RestParamAccessDescriptor::rest_parameter_index(),
268 Immediate(Smi::FromInt(rest_index)));
269 __ mov(RestParamAccessDescriptor::language_mode(),
270 Immediate(Smi::FromInt(language_mode())));
268 function_in_register = false; 271 function_in_register = false;
269 272
270 RestParamAccessStub stub(isolate()); 273 RestParamAccessStub stub(isolate());
271 __ CallStub(&stub); 274 __ CallStub(&stub);
272 SetVar(rest_param, eax, ebx, edx); 275 SetVar(rest_param, eax, ebx, edx);
273 } 276 }
274 277
275 Variable* arguments = scope()->arguments(); 278 Variable* arguments = scope()->arguments();
276 if (arguments != NULL) { 279 if (arguments != NULL) {
277 // Function uses arguments object. 280 // Function uses arguments object.
(...skipping 4497 matching lines...) Expand 10 before | Expand all | Expand 10 after
4775 Assembler::target_address_at(call_target_address, 4778 Assembler::target_address_at(call_target_address,
4776 unoptimized_code)); 4779 unoptimized_code));
4777 return OSR_AFTER_STACK_CHECK; 4780 return OSR_AFTER_STACK_CHECK;
4778 } 4781 }
4779 4782
4780 4783
4781 } // namespace internal 4784 } // namespace internal
4782 } // namespace v8 4785 } // namespace v8
4783 4786
4784 #endif // V8_TARGET_ARCH_X87 4787 #endif // V8_TARGET_ARCH_X87
OLDNEW
« no previous file with comments | « no previous file | src/x87/code-stubs-x87.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698