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

Side by Side Diff: src/arm64/code-stubs-arm64.cc

Issue 272513004: Reland r20974: Unify and simplify the FastCloneShallowArrayStub (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: This time it will work! Created 6 years, 7 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 | Annotate | Revision Log
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 #include "v8.h" 5 #include "v8.h"
6 6
7 #if V8_TARGET_ARCH_ARM64 7 #if V8_TARGET_ARCH_ARM64
8 8
9 #include "bootstrapper.h" 9 #include "bootstrapper.h"
10 #include "code-stubs.h" 10 #include "code-stubs.h"
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 58
59 59
60 void FastCloneShallowArrayStub::InitializeInterfaceDescriptor( 60 void FastCloneShallowArrayStub::InitializeInterfaceDescriptor(
61 CodeStubInterfaceDescriptor* descriptor) { 61 CodeStubInterfaceDescriptor* descriptor) {
62 // x3: array literals array 62 // x3: array literals array
63 // x2: array literal index 63 // x2: array literal index
64 // x1: constant elements 64 // x1: constant elements
65 static Register registers[] = { x3, x2, x1 }; 65 static Register registers[] = { x3, x2, x1 };
66 descriptor->register_param_count_ = sizeof(registers) / sizeof(registers[0]); 66 descriptor->register_param_count_ = sizeof(registers) / sizeof(registers[0]);
67 descriptor->register_params_ = registers; 67 descriptor->register_params_ = registers;
68 static Representation representations[] = {
69 Representation::Tagged(),
70 Representation::Smi(),
71 Representation::Tagged() };
72 descriptor->register_param_representations_ = representations;
68 descriptor->deoptimization_handler_ = 73 descriptor->deoptimization_handler_ =
69 Runtime::FunctionForId( 74 Runtime::FunctionForId(
70 Runtime::kHiddenCreateArrayLiteralStubBailout)->entry; 75 Runtime::kHiddenCreateArrayLiteralStubBailout)->entry;
71 } 76 }
72 77
73 78
74 void FastCloneShallowObjectStub::InitializeInterfaceDescriptor( 79 void FastCloneShallowObjectStub::InitializeInterfaceDescriptor(
75 CodeStubInterfaceDescriptor* descriptor) { 80 CodeStubInterfaceDescriptor* descriptor) {
76 // x3: object literals array 81 // x3: object literals array
77 // x2: object literal index 82 // x2: object literal index
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 descriptor->register_param_count_ = 228 descriptor->register_param_count_ =
224 sizeof(registers_no_args) / sizeof(registers_no_args[0]); 229 sizeof(registers_no_args) / sizeof(registers_no_args[0]);
225 descriptor->register_params_ = registers_no_args; 230 descriptor->register_params_ = registers_no_args;
226 } else { 231 } else {
227 // stack param count needs (constructor pointer, and single argument) 232 // stack param count needs (constructor pointer, and single argument)
228 descriptor->handler_arguments_mode_ = PASS_ARGUMENTS; 233 descriptor->handler_arguments_mode_ = PASS_ARGUMENTS;
229 descriptor->stack_parameter_count_ = x0; 234 descriptor->stack_parameter_count_ = x0;
230 descriptor->register_param_count_ = 235 descriptor->register_param_count_ =
231 sizeof(registers_variable_args) / sizeof(registers_variable_args[0]); 236 sizeof(registers_variable_args) / sizeof(registers_variable_args[0]);
232 descriptor->register_params_ = registers_variable_args; 237 descriptor->register_params_ = registers_variable_args;
238 static Representation representations[] = {
239 Representation::Tagged(),
240 Representation::Tagged(),
241 Representation::Integer32() };
242 descriptor->register_param_representations_ = representations;
233 } 243 }
234 244
235 descriptor->hint_stack_parameter_count_ = constant_stack_parameter_count; 245 descriptor->hint_stack_parameter_count_ = constant_stack_parameter_count;
236 descriptor->function_mode_ = JS_FUNCTION_STUB_MODE; 246 descriptor->function_mode_ = JS_FUNCTION_STUB_MODE;
237 descriptor->deoptimization_handler_ = 247 descriptor->deoptimization_handler_ =
238 Runtime::FunctionForId(Runtime::kHiddenArrayConstructor)->entry; 248 Runtime::FunctionForId(Runtime::kHiddenArrayConstructor)->entry;
239 } 249 }
240 250
241 251
242 void ArrayNoArgumentConstructorStub::InitializeInterfaceDescriptor( 252 void ArrayNoArgumentConstructorStub::InitializeInterfaceDescriptor(
(...skipping 26 matching lines...) Expand all
269 descriptor->register_param_count_ = 279 descriptor->register_param_count_ =
270 sizeof(registers_no_args) / sizeof(registers_no_args[0]); 280 sizeof(registers_no_args) / sizeof(registers_no_args[0]);
271 descriptor->register_params_ = registers_no_args; 281 descriptor->register_params_ = registers_no_args;
272 } else { 282 } else {
273 // stack param count needs (constructor pointer, and single argument) 283 // stack param count needs (constructor pointer, and single argument)
274 descriptor->handler_arguments_mode_ = PASS_ARGUMENTS; 284 descriptor->handler_arguments_mode_ = PASS_ARGUMENTS;
275 descriptor->stack_parameter_count_ = x0; 285 descriptor->stack_parameter_count_ = x0;
276 descriptor->register_param_count_ = 286 descriptor->register_param_count_ =
277 sizeof(registers_variable_args) / sizeof(registers_variable_args[0]); 287 sizeof(registers_variable_args) / sizeof(registers_variable_args[0]);
278 descriptor->register_params_ = registers_variable_args; 288 descriptor->register_params_ = registers_variable_args;
289 static Representation representations[] = {
290 Representation::Tagged(),
291 Representation::Integer32() };
292 descriptor->register_param_representations_ = representations;
279 } 293 }
280 294
281 descriptor->hint_stack_parameter_count_ = constant_stack_parameter_count; 295 descriptor->hint_stack_parameter_count_ = constant_stack_parameter_count;
282 descriptor->function_mode_ = JS_FUNCTION_STUB_MODE; 296 descriptor->function_mode_ = JS_FUNCTION_STUB_MODE;
283 descriptor->deoptimization_handler_ = 297 descriptor->deoptimization_handler_ =
284 Runtime::FunctionForId(Runtime::kHiddenInternalArrayConstructor)->entry; 298 Runtime::FunctionForId(Runtime::kHiddenInternalArrayConstructor)->entry;
285 } 299 }
286 300
287 301
288 void InternalArrayNoArgumentConstructorStub::InitializeInterfaceDescriptor( 302 void InternalArrayNoArgumentConstructorStub::InitializeInterfaceDescriptor(
(...skipping 5200 matching lines...) Expand 10 before | Expand all | Expand 10 after
5489 MemOperand(fp, 6 * kPointerSize), 5503 MemOperand(fp, 6 * kPointerSize),
5490 NULL); 5504 NULL);
5491 } 5505 }
5492 5506
5493 5507
5494 #undef __ 5508 #undef __
5495 5509
5496 } } // namespace v8::internal 5510 } } // namespace v8::internal
5497 5511
5498 #endif // V8_TARGET_ARCH_ARM64 5512 #endif // V8_TARGET_ARCH_ARM64
OLDNEW
« no previous file with comments | « src/arm/full-codegen-arm.cc ('k') | src/arm64/full-codegen-arm64.cc » ('j') | src/hydrogen.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698