| OLD | NEW |
| 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 28 matching lines...) Expand all Loading... |
| 39 | 39 |
| 40 | 40 |
| 41 void FastNewClosureStub::InitializeInterfaceDescriptor( | 41 void FastNewClosureStub::InitializeInterfaceDescriptor( |
| 42 Isolate* isolate, | 42 Isolate* isolate, |
| 43 CodeStubInterfaceDescriptor* descriptor) { | 43 CodeStubInterfaceDescriptor* descriptor) { |
| 44 // x2: function info | 44 // x2: function info |
| 45 static Register registers[] = { x2 }; | 45 static Register registers[] = { x2 }; |
| 46 descriptor->register_param_count_ = sizeof(registers) / sizeof(registers[0]); | 46 descriptor->register_param_count_ = sizeof(registers) / sizeof(registers[0]); |
| 47 descriptor->register_params_ = registers; | 47 descriptor->register_params_ = registers; |
| 48 descriptor->deoptimization_handler_ = | 48 descriptor->deoptimization_handler_ = |
| 49 Runtime::FunctionForId(Runtime::kNewClosureFromStubFailure)->entry; | 49 Runtime::FunctionForId(Runtime::kHiddenNewClosureFromStubFailure)->entry; |
| 50 } | 50 } |
| 51 | 51 |
| 52 | 52 |
| 53 void FastNewContextStub::InitializeInterfaceDescriptor( | 53 void FastNewContextStub::InitializeInterfaceDescriptor( |
| 54 Isolate* isolate, | 54 Isolate* isolate, |
| 55 CodeStubInterfaceDescriptor* descriptor) { | 55 CodeStubInterfaceDescriptor* descriptor) { |
| 56 // x1: function | 56 // x1: function |
| 57 static Register registers[] = { x1 }; | 57 static Register registers[] = { x1 }; |
| 58 descriptor->register_param_count_ = sizeof(registers) / sizeof(registers[0]); | 58 descriptor->register_param_count_ = sizeof(registers) / sizeof(registers[0]); |
| 59 descriptor->register_params_ = registers; | 59 descriptor->register_params_ = registers; |
| (...skipping 27 matching lines...) Expand all Loading... |
| 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 descriptor->deoptimization_handler_ = | 96 descriptor->deoptimization_handler_ = |
| 97 Runtime::FunctionForId(Runtime::kCreateArrayLiteralStubBailout)->entry; | 97 Runtime::FunctionForId( |
| 98 Runtime::kHiddenCreateArrayLiteralStubBailout)->entry; |
| 98 } | 99 } |
| 99 | 100 |
| 100 | 101 |
| 101 void FastCloneShallowObjectStub::InitializeInterfaceDescriptor( | 102 void FastCloneShallowObjectStub::InitializeInterfaceDescriptor( |
| 102 Isolate* isolate, | 103 Isolate* isolate, |
| 103 CodeStubInterfaceDescriptor* descriptor) { | 104 CodeStubInterfaceDescriptor* descriptor) { |
| 104 // x3: object literals array | 105 // x3: object literals array |
| 105 // x2: object literal index | 106 // x2: object literal index |
| 106 // x1: constant properties | 107 // x1: constant properties |
| 107 // x0: object literal flags | 108 // x0: object literal flags |
| 108 static Register registers[] = { x3, x2, x1, x0 }; | 109 static Register registers[] = { x3, x2, x1, x0 }; |
| 109 descriptor->register_param_count_ = sizeof(registers) / sizeof(registers[0]); | 110 descriptor->register_param_count_ = sizeof(registers) / sizeof(registers[0]); |
| 110 descriptor->register_params_ = registers; | 111 descriptor->register_params_ = registers; |
| 111 descriptor->deoptimization_handler_ = | 112 descriptor->deoptimization_handler_ = |
| 112 Runtime::FunctionForId(Runtime::kCreateObjectLiteral)->entry; | 113 Runtime::FunctionForId(Runtime::kHiddenCreateObjectLiteral)->entry; |
| 113 } | 114 } |
| 114 | 115 |
| 115 | 116 |
| 116 void CreateAllocationSiteStub::InitializeInterfaceDescriptor( | 117 void CreateAllocationSiteStub::InitializeInterfaceDescriptor( |
| 117 Isolate* isolate, | 118 Isolate* isolate, |
| 118 CodeStubInterfaceDescriptor* descriptor) { | 119 CodeStubInterfaceDescriptor* descriptor) { |
| 119 // x2: feedback vector | 120 // x2: feedback vector |
| 120 // x3: call feedback slot | 121 // x3: call feedback slot |
| 121 static Register registers[] = { x2, x3 }; | 122 static Register registers[] = { x2, x3 }; |
| 122 descriptor->register_param_count_ = sizeof(registers) / sizeof(registers[0]); | 123 descriptor->register_param_count_ = sizeof(registers) / sizeof(registers[0]); |
| (...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 268 descriptor->handler_arguments_mode_ = PASS_ARGUMENTS; | 269 descriptor->handler_arguments_mode_ = PASS_ARGUMENTS; |
| 269 descriptor->stack_parameter_count_ = x0; | 270 descriptor->stack_parameter_count_ = x0; |
| 270 descriptor->register_param_count_ = | 271 descriptor->register_param_count_ = |
| 271 sizeof(registers_variable_args) / sizeof(registers_variable_args[0]); | 272 sizeof(registers_variable_args) / sizeof(registers_variable_args[0]); |
| 272 descriptor->register_params_ = registers_variable_args; | 273 descriptor->register_params_ = registers_variable_args; |
| 273 } | 274 } |
| 274 | 275 |
| 275 descriptor->hint_stack_parameter_count_ = constant_stack_parameter_count; | 276 descriptor->hint_stack_parameter_count_ = constant_stack_parameter_count; |
| 276 descriptor->function_mode_ = JS_FUNCTION_STUB_MODE; | 277 descriptor->function_mode_ = JS_FUNCTION_STUB_MODE; |
| 277 descriptor->deoptimization_handler_ = | 278 descriptor->deoptimization_handler_ = |
| 278 Runtime::FunctionForId(Runtime::kArrayConstructor)->entry; | 279 Runtime::FunctionForId(Runtime::kHiddenArrayConstructor)->entry; |
| 279 } | 280 } |
| 280 | 281 |
| 281 | 282 |
| 282 void ArrayNoArgumentConstructorStub::InitializeInterfaceDescriptor( | 283 void ArrayNoArgumentConstructorStub::InitializeInterfaceDescriptor( |
| 283 Isolate* isolate, | 284 Isolate* isolate, |
| 284 CodeStubInterfaceDescriptor* descriptor) { | 285 CodeStubInterfaceDescriptor* descriptor) { |
| 285 InitializeArrayConstructorDescriptor(isolate, descriptor, 0); | 286 InitializeArrayConstructorDescriptor(isolate, descriptor, 0); |
| 286 } | 287 } |
| 287 | 288 |
| 288 | 289 |
| (...skipping 29 matching lines...) Expand all Loading... |
| 318 descriptor->handler_arguments_mode_ = PASS_ARGUMENTS; | 319 descriptor->handler_arguments_mode_ = PASS_ARGUMENTS; |
| 319 descriptor->stack_parameter_count_ = x0; | 320 descriptor->stack_parameter_count_ = x0; |
| 320 descriptor->register_param_count_ = | 321 descriptor->register_param_count_ = |
| 321 sizeof(registers_variable_args) / sizeof(registers_variable_args[0]); | 322 sizeof(registers_variable_args) / sizeof(registers_variable_args[0]); |
| 322 descriptor->register_params_ = registers_variable_args; | 323 descriptor->register_params_ = registers_variable_args; |
| 323 } | 324 } |
| 324 | 325 |
| 325 descriptor->hint_stack_parameter_count_ = constant_stack_parameter_count; | 326 descriptor->hint_stack_parameter_count_ = constant_stack_parameter_count; |
| 326 descriptor->function_mode_ = JS_FUNCTION_STUB_MODE; | 327 descriptor->function_mode_ = JS_FUNCTION_STUB_MODE; |
| 327 descriptor->deoptimization_handler_ = | 328 descriptor->deoptimization_handler_ = |
| 328 Runtime::FunctionForId(Runtime::kInternalArrayConstructor)->entry; | 329 Runtime::FunctionForId(Runtime::kHiddenInternalArrayConstructor)->entry; |
| 329 } | 330 } |
| 330 | 331 |
| 331 | 332 |
| 332 void InternalArrayNoArgumentConstructorStub::InitializeInterfaceDescriptor( | 333 void InternalArrayNoArgumentConstructorStub::InitializeInterfaceDescriptor( |
| 333 Isolate* isolate, | 334 Isolate* isolate, |
| 334 CodeStubInterfaceDescriptor* descriptor) { | 335 CodeStubInterfaceDescriptor* descriptor) { |
| 335 InitializeInternalArrayConstructorDescriptor(isolate, descriptor, 0); | 336 InitializeInternalArrayConstructorDescriptor(isolate, descriptor, 0); |
| 336 } | 337 } |
| 337 | 338 |
| 338 | 339 |
| (...skipping 1902 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2241 | 2242 |
| 2242 // Patch the arguments.length and parameters pointer in the current frame. | 2243 // Patch the arguments.length and parameters pointer in the current frame. |
| 2243 __ Ldr(x11, MemOperand(caller_fp, | 2244 __ Ldr(x11, MemOperand(caller_fp, |
| 2244 ArgumentsAdaptorFrameConstants::kLengthOffset)); | 2245 ArgumentsAdaptorFrameConstants::kLengthOffset)); |
| 2245 __ Poke(x11, 0 * kXRegSize); | 2246 __ Poke(x11, 0 * kXRegSize); |
| 2246 __ Add(x10, caller_fp, Operand::UntagSmiAndScale(x11, kPointerSizeLog2)); | 2247 __ Add(x10, caller_fp, Operand::UntagSmiAndScale(x11, kPointerSizeLog2)); |
| 2247 __ Add(x10, x10, StandardFrameConstants::kCallerSPOffset); | 2248 __ Add(x10, x10, StandardFrameConstants::kCallerSPOffset); |
| 2248 __ Poke(x10, 1 * kXRegSize); | 2249 __ Poke(x10, 1 * kXRegSize); |
| 2249 | 2250 |
| 2250 __ Bind(&runtime); | 2251 __ Bind(&runtime); |
| 2251 __ TailCallRuntime(Runtime::kNewArgumentsFast, 3, 1); | 2252 __ TailCallRuntime(Runtime::kHiddenNewArgumentsFast, 3, 1); |
| 2252 } | 2253 } |
| 2253 | 2254 |
| 2254 | 2255 |
| 2255 void ArgumentsAccessStub::GenerateNewSloppyFast(MacroAssembler* masm) { | 2256 void ArgumentsAccessStub::GenerateNewSloppyFast(MacroAssembler* masm) { |
| 2256 // Stack layout on entry. | 2257 // Stack layout on entry. |
| 2257 // jssp[0]: number of parameters (tagged) | 2258 // jssp[0]: number of parameters (tagged) |
| 2258 // jssp[8]: address of receiver argument | 2259 // jssp[8]: address of receiver argument |
| 2259 // jssp[16]: function | 2260 // jssp[16]: function |
| 2260 // | 2261 // |
| 2261 // Returns pointer to result object in x0. | 2262 // Returns pointer to result object in x0. |
| (...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2513 | 2514 |
| 2514 __ Bind(&arguments_test); | 2515 __ Bind(&arguments_test); |
| 2515 __ Cmp(x10, arg_count); | 2516 __ Cmp(x10, arg_count); |
| 2516 __ B(lt, &arguments_loop); | 2517 __ B(lt, &arguments_loop); |
| 2517 | 2518 |
| 2518 __ Ret(); | 2519 __ Ret(); |
| 2519 | 2520 |
| 2520 // Do the runtime call to allocate the arguments object. | 2521 // Do the runtime call to allocate the arguments object. |
| 2521 __ Bind(&runtime); | 2522 __ Bind(&runtime); |
| 2522 __ Push(function, recv_arg, arg_count_smi); | 2523 __ Push(function, recv_arg, arg_count_smi); |
| 2523 __ TailCallRuntime(Runtime::kNewArgumentsFast, 3, 1); | 2524 __ TailCallRuntime(Runtime::kHiddenNewArgumentsFast, 3, 1); |
| 2524 } | 2525 } |
| 2525 | 2526 |
| 2526 | 2527 |
| 2527 void ArgumentsAccessStub::GenerateNewStrict(MacroAssembler* masm) { | 2528 void ArgumentsAccessStub::GenerateNewStrict(MacroAssembler* masm) { |
| 2528 // Stack layout on entry. | 2529 // Stack layout on entry. |
| 2529 // jssp[0]: number of parameters (tagged) | 2530 // jssp[0]: number of parameters (tagged) |
| 2530 // jssp[8]: address of receiver argument | 2531 // jssp[8]: address of receiver argument |
| 2531 // jssp[16]: function | 2532 // jssp[16]: function |
| 2532 // | 2533 // |
| 2533 // Returns pointer to result object in x0. | 2534 // Returns pointer to result object in x0. |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2646 __ Sub(param_count, param_count, 1); | 2647 __ Sub(param_count, param_count, 1); |
| 2647 __ Cbnz(param_count, &loop); | 2648 __ Cbnz(param_count, &loop); |
| 2648 | 2649 |
| 2649 // Return from stub. | 2650 // Return from stub. |
| 2650 __ Bind(&done); | 2651 __ Bind(&done); |
| 2651 __ Ret(); | 2652 __ Ret(); |
| 2652 | 2653 |
| 2653 // Do the runtime call to allocate the arguments object. | 2654 // Do the runtime call to allocate the arguments object. |
| 2654 __ Bind(&runtime); | 2655 __ Bind(&runtime); |
| 2655 __ Push(function, params, param_count_smi); | 2656 __ Push(function, params, param_count_smi); |
| 2656 __ TailCallRuntime(Runtime::kNewStrictArgumentsFast, 3, 1); | 2657 __ TailCallRuntime(Runtime::kHiddenNewStrictArgumentsFast, 3, 1); |
| 2657 } | 2658 } |
| 2658 | 2659 |
| 2659 | 2660 |
| 2660 void RegExpExecStub::Generate(MacroAssembler* masm) { | 2661 void RegExpExecStub::Generate(MacroAssembler* masm) { |
| 2661 #ifdef V8_INTERPRETED_REGEXP | 2662 #ifdef V8_INTERPRETED_REGEXP |
| 2662 __ TailCallRuntime(Runtime::kHiddenRegExpExec, 4, 1); | 2663 __ TailCallRuntime(Runtime::kHiddenRegExpExec, 4, 1); |
| 2663 #else // V8_INTERPRETED_REGEXP | 2664 #else // V8_INTERPRETED_REGEXP |
| 2664 | 2665 |
| 2665 // Stack frame on entry. | 2666 // Stack frame on entry. |
| 2666 // jssp[0]: last_match_info (expected JSArray) | 2667 // jssp[0]: last_match_info (expected JSArray) |
| (...skipping 853 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3520 index_not_number_, | 3521 index_not_number_, |
| 3521 DONT_DO_SMI_CHECK); | 3522 DONT_DO_SMI_CHECK); |
| 3522 call_helper.BeforeCall(masm); | 3523 call_helper.BeforeCall(masm); |
| 3523 // Save object_ on the stack and pass index_ as argument for runtime call. | 3524 // Save object_ on the stack and pass index_ as argument for runtime call. |
| 3524 __ Push(object_, index_); | 3525 __ Push(object_, index_); |
| 3525 if (index_flags_ == STRING_INDEX_IS_NUMBER) { | 3526 if (index_flags_ == STRING_INDEX_IS_NUMBER) { |
| 3526 __ CallRuntime(Runtime::kNumberToIntegerMapMinusZero, 1); | 3527 __ CallRuntime(Runtime::kNumberToIntegerMapMinusZero, 1); |
| 3527 } else { | 3528 } else { |
| 3528 ASSERT(index_flags_ == STRING_INDEX_IS_ARRAY_INDEX); | 3529 ASSERT(index_flags_ == STRING_INDEX_IS_ARRAY_INDEX); |
| 3529 // NumberToSmi discards numbers that are not exact integers. | 3530 // NumberToSmi discards numbers that are not exact integers. |
| 3530 __ CallRuntime(Runtime::kNumberToSmi, 1); | 3531 __ CallRuntime(Runtime::kHiddenNumberToSmi, 1); |
| 3531 } | 3532 } |
| 3532 // Save the conversion result before the pop instructions below | 3533 // Save the conversion result before the pop instructions below |
| 3533 // have a chance to overwrite it. | 3534 // have a chance to overwrite it. |
| 3534 __ Mov(index_, x0); | 3535 __ Mov(index_, x0); |
| 3535 __ Pop(object_); | 3536 __ Pop(object_); |
| 3536 // Reload the instance type. | 3537 // Reload the instance type. |
| 3537 __ Ldr(result_, FieldMemOperand(object_, HeapObject::kMapOffset)); | 3538 __ Ldr(result_, FieldMemOperand(object_, HeapObject::kMapOffset)); |
| 3538 __ Ldrb(result_, FieldMemOperand(result_, Map::kInstanceTypeOffset)); | 3539 __ Ldrb(result_, FieldMemOperand(result_, Map::kInstanceTypeOffset)); |
| 3539 call_helper.AfterCall(masm); | 3540 call_helper.AfterCall(masm); |
| 3540 | 3541 |
| (...skipping 2185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5726 MemOperand(fp, 6 * kPointerSize), | 5727 MemOperand(fp, 6 * kPointerSize), |
| 5727 NULL); | 5728 NULL); |
| 5728 } | 5729 } |
| 5729 | 5730 |
| 5730 | 5731 |
| 5731 #undef __ | 5732 #undef __ |
| 5732 | 5733 |
| 5733 } } // namespace v8::internal | 5734 } } // namespace v8::internal |
| 5734 | 5735 |
| 5735 #endif // V8_TARGET_ARCH_ARM64 | 5736 #endif // V8_TARGET_ARCH_ARM64 |
| OLD | NEW |