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

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

Issue 257563004: Unify and simplify the FastCloneShallowArrayStub (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fix arm64 Created 6 years, 8 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 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 86
87 void FastCloneShallowArrayStub::InitializeInterfaceDescriptor( 87 void FastCloneShallowArrayStub::InitializeInterfaceDescriptor(
88 Isolate* isolate, 88 Isolate* isolate,
89 CodeStubInterfaceDescriptor* descriptor) { 89 CodeStubInterfaceDescriptor* descriptor) {
90 // x3: array literals array 90 // x3: array literals array
91 // x2: array literal index 91 // x2: array literal index
92 // x1: constant elements 92 // x1: constant elements
93 static Register registers[] = { x3, x2, x1 }; 93 static Register registers[] = { x3, x2, x1 };
94 descriptor->register_param_count_ = sizeof(registers) / sizeof(registers[0]); 94 descriptor->register_param_count_ = sizeof(registers) / sizeof(registers[0]);
95 descriptor->register_params_ = registers; 95 descriptor->register_params_ = registers;
96 static Representation representations[] = {
97 Representation::Tagged(),
98 Representation::Smi(),
99 Representation::Tagged() };
100 descriptor->register_param_representations_ = representations;
96 descriptor->deoptimization_handler_ = 101 descriptor->deoptimization_handler_ =
97 Runtime::FunctionForId( 102 Runtime::FunctionForId(
98 Runtime::kHiddenCreateArrayLiteralStubBailout)->entry; 103 Runtime::kHiddenCreateArrayLiteralStubBailout)->entry;
99 } 104 }
100 105
101 106
102 void FastCloneShallowObjectStub::InitializeInterfaceDescriptor( 107 void FastCloneShallowObjectStub::InitializeInterfaceDescriptor(
103 Isolate* isolate, 108 Isolate* isolate,
104 CodeStubInterfaceDescriptor* descriptor) { 109 CodeStubInterfaceDescriptor* descriptor) {
105 // x3: object literals array 110 // x3: object literals array
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 descriptor->register_param_count_ = 269 descriptor->register_param_count_ =
265 sizeof(registers_no_args) / sizeof(registers_no_args[0]); 270 sizeof(registers_no_args) / sizeof(registers_no_args[0]);
266 descriptor->register_params_ = registers_no_args; 271 descriptor->register_params_ = registers_no_args;
267 } else { 272 } else {
268 // stack param count needs (constructor pointer, and single argument) 273 // stack param count needs (constructor pointer, and single argument)
269 descriptor->handler_arguments_mode_ = PASS_ARGUMENTS; 274 descriptor->handler_arguments_mode_ = PASS_ARGUMENTS;
270 descriptor->stack_parameter_count_ = x0; 275 descriptor->stack_parameter_count_ = x0;
271 descriptor->register_param_count_ = 276 descriptor->register_param_count_ =
272 sizeof(registers_variable_args) / sizeof(registers_variable_args[0]); 277 sizeof(registers_variable_args) / sizeof(registers_variable_args[0]);
273 descriptor->register_params_ = registers_variable_args; 278 descriptor->register_params_ = registers_variable_args;
279 static Representation representations[] = {
280 Representation::Tagged(),
281 Representation::Tagged(),
282 Representation::Integer32() };
283 descriptor->register_param_representations_ = representations;
274 } 284 }
275 285
276 descriptor->hint_stack_parameter_count_ = constant_stack_parameter_count; 286 descriptor->hint_stack_parameter_count_ = constant_stack_parameter_count;
277 descriptor->function_mode_ = JS_FUNCTION_STUB_MODE; 287 descriptor->function_mode_ = JS_FUNCTION_STUB_MODE;
278 descriptor->deoptimization_handler_ = 288 descriptor->deoptimization_handler_ =
279 Runtime::FunctionForId(Runtime::kHiddenArrayConstructor)->entry; 289 Runtime::FunctionForId(Runtime::kHiddenArrayConstructor)->entry;
280 } 290 }
281 291
282 292
283 void ArrayNoArgumentConstructorStub::InitializeInterfaceDescriptor( 293 void ArrayNoArgumentConstructorStub::InitializeInterfaceDescriptor(
(...skipping 30 matching lines...) Expand all
314 descriptor->register_param_count_ = 324 descriptor->register_param_count_ =
315 sizeof(registers_no_args) / sizeof(registers_no_args[0]); 325 sizeof(registers_no_args) / sizeof(registers_no_args[0]);
316 descriptor->register_params_ = registers_no_args; 326 descriptor->register_params_ = registers_no_args;
317 } else { 327 } else {
318 // stack param count needs (constructor pointer, and single argument) 328 // stack param count needs (constructor pointer, and single argument)
319 descriptor->handler_arguments_mode_ = PASS_ARGUMENTS; 329 descriptor->handler_arguments_mode_ = PASS_ARGUMENTS;
320 descriptor->stack_parameter_count_ = x0; 330 descriptor->stack_parameter_count_ = x0;
321 descriptor->register_param_count_ = 331 descriptor->register_param_count_ =
322 sizeof(registers_variable_args) / sizeof(registers_variable_args[0]); 332 sizeof(registers_variable_args) / sizeof(registers_variable_args[0]);
323 descriptor->register_params_ = registers_variable_args; 333 descriptor->register_params_ = registers_variable_args;
334 static Representation representations[] = {
335 Representation::Tagged(),
336 Representation::Integer32() };
337 descriptor->register_param_representations_ = representations;
324 } 338 }
325 339
326 descriptor->hint_stack_parameter_count_ = constant_stack_parameter_count; 340 descriptor->hint_stack_parameter_count_ = constant_stack_parameter_count;
327 descriptor->function_mode_ = JS_FUNCTION_STUB_MODE; 341 descriptor->function_mode_ = JS_FUNCTION_STUB_MODE;
328 descriptor->deoptimization_handler_ = 342 descriptor->deoptimization_handler_ =
329 Runtime::FunctionForId(Runtime::kHiddenInternalArrayConstructor)->entry; 343 Runtime::FunctionForId(Runtime::kHiddenInternalArrayConstructor)->entry;
330 } 344 }
331 345
332 346
333 void InternalArrayNoArgumentConstructorStub::InitializeInterfaceDescriptor( 347 void InternalArrayNoArgumentConstructorStub::InitializeInterfaceDescriptor(
(...skipping 5093 matching lines...) Expand 10 before | Expand all | Expand 10 after
5427 MemOperand(fp, 6 * kPointerSize), 5441 MemOperand(fp, 6 * kPointerSize),
5428 NULL); 5442 NULL);
5429 } 5443 }
5430 5444
5431 5445
5432 #undef __ 5446 #undef __
5433 5447
5434 } } // namespace v8::internal 5448 } } // namespace v8::internal
5435 5449
5436 #endif // V8_TARGET_ARCH_ARM64 5450 #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