| OLD | NEW |
| 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 "src/v8.h" | 5 #include "src/v8.h" |
| 6 | 6 |
| 7 #if V8_TARGET_ARCH_ARM64 | 7 #if V8_TARGET_ARCH_ARM64 |
| 8 | 8 |
| 9 #include "src/bootstrapper.h" | 9 #include "src/bootstrapper.h" |
| 10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
| 11 #include "src/codegen.h" | 11 #include "src/codegen.h" |
| 12 #include "src/ic/handler-compiler.h" | 12 #include "src/ic/handler-compiler.h" |
| 13 #include "src/isolate.h" | 13 #include "src/isolate.h" |
| 14 #include "src/jsregexp.h" | 14 #include "src/jsregexp.h" |
| 15 #include "src/regexp-macro-assembler.h" | 15 #include "src/regexp-macro-assembler.h" |
| 16 #include "src/runtime.h" | 16 #include "src/runtime.h" |
| 17 | 17 |
| 18 namespace v8 { | 18 namespace v8 { |
| 19 namespace internal { | 19 namespace internal { |
| 20 | 20 |
| 21 void FastNewClosureStub::InitializeInterfaceDescriptor( | 21 void FastNewClosureStub::InitializeInterfaceDescriptor( |
| 22 CodeStubInterfaceDescriptor* descriptor) { | 22 CodeStubInterfaceDescriptor* descriptor) { |
| 23 // cp: context | 23 // cp: context |
| 24 // x2: function info | 24 // x2: function info |
| 25 Register registers[] = { cp, x2 }; | 25 Register registers[] = { cp, x2 }; |
| 26 descriptor->Initialize( | 26 descriptor->Initialize( |
| 27 MajorKey(), ARRAY_SIZE(registers), registers, | 27 MajorKey(), arraysize(registers), registers, |
| 28 Runtime::FunctionForId(Runtime::kNewClosureFromStubFailure)->entry); | 28 Runtime::FunctionForId(Runtime::kNewClosureFromStubFailure)->entry); |
| 29 } | 29 } |
| 30 | 30 |
| 31 | 31 |
| 32 void FastNewContextStub::InitializeInterfaceDescriptor( | 32 void FastNewContextStub::InitializeInterfaceDescriptor( |
| 33 CodeStubInterfaceDescriptor* descriptor) { | 33 CodeStubInterfaceDescriptor* descriptor) { |
| 34 // cp: context | 34 // cp: context |
| 35 // x1: function | 35 // x1: function |
| 36 Register registers[] = { cp, x1 }; | 36 Register registers[] = { cp, x1 }; |
| 37 descriptor->Initialize(MajorKey(), ARRAY_SIZE(registers), registers); | 37 descriptor->Initialize(MajorKey(), arraysize(registers), registers); |
| 38 } | 38 } |
| 39 | 39 |
| 40 | 40 |
| 41 void ToNumberStub::InitializeInterfaceDescriptor( | 41 void ToNumberStub::InitializeInterfaceDescriptor( |
| 42 CodeStubInterfaceDescriptor* descriptor) { | 42 CodeStubInterfaceDescriptor* descriptor) { |
| 43 // cp: context | 43 // cp: context |
| 44 // x0: value | 44 // x0: value |
| 45 Register registers[] = { cp, x0 }; | 45 Register registers[] = { cp, x0 }; |
| 46 descriptor->Initialize(MajorKey(), ARRAY_SIZE(registers), registers); | 46 descriptor->Initialize(MajorKey(), arraysize(registers), registers); |
| 47 } | 47 } |
| 48 | 48 |
| 49 | 49 |
| 50 void NumberToStringStub::InitializeInterfaceDescriptor( | 50 void NumberToStringStub::InitializeInterfaceDescriptor( |
| 51 CodeStubInterfaceDescriptor* descriptor) { | 51 CodeStubInterfaceDescriptor* descriptor) { |
| 52 // cp: context | 52 // cp: context |
| 53 // x0: value | 53 // x0: value |
| 54 Register registers[] = { cp, x0 }; | 54 Register registers[] = { cp, x0 }; |
| 55 descriptor->Initialize( | 55 descriptor->Initialize( |
| 56 MajorKey(), ARRAY_SIZE(registers), registers, | 56 MajorKey(), arraysize(registers), registers, |
| 57 Runtime::FunctionForId(Runtime::kNumberToStringRT)->entry); | 57 Runtime::FunctionForId(Runtime::kNumberToStringRT)->entry); |
| 58 } | 58 } |
| 59 | 59 |
| 60 | 60 |
| 61 void FastCloneShallowArrayStub::InitializeInterfaceDescriptor( | 61 void FastCloneShallowArrayStub::InitializeInterfaceDescriptor( |
| 62 CodeStubInterfaceDescriptor* descriptor) { | 62 CodeStubInterfaceDescriptor* descriptor) { |
| 63 // cp: context | 63 // cp: context |
| 64 // x3: array literals array | 64 // x3: array literals array |
| 65 // x2: array literal index | 65 // x2: array literal index |
| 66 // x1: constant elements | 66 // x1: constant elements |
| 67 Register registers[] = { cp, x3, x2, x1 }; | 67 Register registers[] = { cp, x3, x2, x1 }; |
| 68 Representation representations[] = { | 68 Representation representations[] = { |
| 69 Representation::Tagged(), | 69 Representation::Tagged(), |
| 70 Representation::Tagged(), | 70 Representation::Tagged(), |
| 71 Representation::Smi(), | 71 Representation::Smi(), |
| 72 Representation::Tagged() }; | 72 Representation::Tagged() }; |
| 73 descriptor->Initialize( | 73 descriptor->Initialize( |
| 74 MajorKey(), ARRAY_SIZE(registers), registers, | 74 MajorKey(), arraysize(registers), registers, |
| 75 Runtime::FunctionForId(Runtime::kCreateArrayLiteralStubBailout)->entry, | 75 Runtime::FunctionForId(Runtime::kCreateArrayLiteralStubBailout)->entry, |
| 76 representations); | 76 representations); |
| 77 } | 77 } |
| 78 | 78 |
| 79 | 79 |
| 80 void FastCloneShallowObjectStub::InitializeInterfaceDescriptor( | 80 void FastCloneShallowObjectStub::InitializeInterfaceDescriptor( |
| 81 CodeStubInterfaceDescriptor* descriptor) { | 81 CodeStubInterfaceDescriptor* descriptor) { |
| 82 // cp: context | 82 // cp: context |
| 83 // x3: object literals array | 83 // x3: object literals array |
| 84 // x2: object literal index | 84 // x2: object literal index |
| 85 // x1: constant properties | 85 // x1: constant properties |
| 86 // x0: object literal flags | 86 // x0: object literal flags |
| 87 Register registers[] = { cp, x3, x2, x1, x0 }; | 87 Register registers[] = { cp, x3, x2, x1, x0 }; |
| 88 descriptor->Initialize( | 88 descriptor->Initialize( |
| 89 MajorKey(), ARRAY_SIZE(registers), registers, | 89 MajorKey(), arraysize(registers), registers, |
| 90 Runtime::FunctionForId(Runtime::kCreateObjectLiteral)->entry); | 90 Runtime::FunctionForId(Runtime::kCreateObjectLiteral)->entry); |
| 91 } | 91 } |
| 92 | 92 |
| 93 | 93 |
| 94 void CreateAllocationSiteStub::InitializeInterfaceDescriptor( | 94 void CreateAllocationSiteStub::InitializeInterfaceDescriptor( |
| 95 CodeStubInterfaceDescriptor* descriptor) { | 95 CodeStubInterfaceDescriptor* descriptor) { |
| 96 // cp: context | 96 // cp: context |
| 97 // x2: feedback vector | 97 // x2: feedback vector |
| 98 // x3: call feedback slot | 98 // x3: call feedback slot |
| 99 Register registers[] = { cp, x2, x3 }; | 99 Register registers[] = { cp, x2, x3 }; |
| 100 descriptor->Initialize(MajorKey(), ARRAY_SIZE(registers), registers); | 100 descriptor->Initialize(MajorKey(), arraysize(registers), registers); |
| 101 } | 101 } |
| 102 | 102 |
| 103 | 103 |
| 104 void CallFunctionStub::InitializeInterfaceDescriptor( | 104 void CallFunctionStub::InitializeInterfaceDescriptor( |
| 105 CodeStubInterfaceDescriptor* descriptor) { | 105 CodeStubInterfaceDescriptor* descriptor) { |
| 106 // x1 function the function to call | 106 // x1 function the function to call |
| 107 Register registers[] = {cp, x1}; | 107 Register registers[] = {cp, x1}; |
| 108 descriptor->Initialize(MajorKey(), ARRAY_SIZE(registers), registers); | 108 descriptor->Initialize(MajorKey(), arraysize(registers), registers); |
| 109 } | 109 } |
| 110 | 110 |
| 111 | 111 |
| 112 void CallConstructStub::InitializeInterfaceDescriptor( | 112 void CallConstructStub::InitializeInterfaceDescriptor( |
| 113 CodeStubInterfaceDescriptor* descriptor) { | 113 CodeStubInterfaceDescriptor* descriptor) { |
| 114 // x0 : number of arguments | 114 // x0 : number of arguments |
| 115 // x1 : the function to call | 115 // x1 : the function to call |
| 116 // x2 : feedback vector | 116 // x2 : feedback vector |
| 117 // x3 : slot in feedback vector (smi) (if r2 is not the megamorphic symbol) | 117 // x3 : slot in feedback vector (smi) (if r2 is not the megamorphic symbol) |
| 118 // TODO(turbofan): So far we don't gather type feedback and hence skip the | 118 // TODO(turbofan): So far we don't gather type feedback and hence skip the |
| 119 // slot parameter, but ArrayConstructStub needs the vector to be undefined. | 119 // slot parameter, but ArrayConstructStub needs the vector to be undefined. |
| 120 Register registers[] = {cp, x0, x1, x2}; | 120 Register registers[] = {cp, x0, x1, x2}; |
| 121 descriptor->Initialize(MajorKey(), ARRAY_SIZE(registers), registers); | 121 descriptor->Initialize(MajorKey(), arraysize(registers), registers); |
| 122 } | 122 } |
| 123 | 123 |
| 124 | 124 |
| 125 void RegExpConstructResultStub::InitializeInterfaceDescriptor( | 125 void RegExpConstructResultStub::InitializeInterfaceDescriptor( |
| 126 CodeStubInterfaceDescriptor* descriptor) { | 126 CodeStubInterfaceDescriptor* descriptor) { |
| 127 // cp: context | 127 // cp: context |
| 128 // x2: length | 128 // x2: length |
| 129 // x1: index (of last match) | 129 // x1: index (of last match) |
| 130 // x0: string | 130 // x0: string |
| 131 Register registers[] = { cp, x2, x1, x0 }; | 131 Register registers[] = { cp, x2, x1, x0 }; |
| 132 descriptor->Initialize( | 132 descriptor->Initialize( |
| 133 MajorKey(), ARRAY_SIZE(registers), registers, | 133 MajorKey(), arraysize(registers), registers, |
| 134 Runtime::FunctionForId(Runtime::kRegExpConstructResult)->entry); | 134 Runtime::FunctionForId(Runtime::kRegExpConstructResult)->entry); |
| 135 } | 135 } |
| 136 | 136 |
| 137 | 137 |
| 138 void TransitionElementsKindStub::InitializeInterfaceDescriptor( | 138 void TransitionElementsKindStub::InitializeInterfaceDescriptor( |
| 139 CodeStubInterfaceDescriptor* descriptor) { | 139 CodeStubInterfaceDescriptor* descriptor) { |
| 140 // cp: context | 140 // cp: context |
| 141 // x0: value (js_array) | 141 // x0: value (js_array) |
| 142 // x1: to_map | 142 // x1: to_map |
| 143 Register registers[] = { cp, x0, x1 }; | 143 Register registers[] = { cp, x0, x1 }; |
| 144 Address entry = | 144 Address entry = |
| 145 Runtime::FunctionForId(Runtime::kTransitionElementsKind)->entry; | 145 Runtime::FunctionForId(Runtime::kTransitionElementsKind)->entry; |
| 146 descriptor->Initialize(MajorKey(), ARRAY_SIZE(registers), registers, | 146 descriptor->Initialize(MajorKey(), arraysize(registers), registers, |
| 147 FUNCTION_ADDR(entry)); | 147 FUNCTION_ADDR(entry)); |
| 148 } | 148 } |
| 149 | 149 |
| 150 | 150 |
| 151 void CompareNilICStub::InitializeInterfaceDescriptor( | 151 void CompareNilICStub::InitializeInterfaceDescriptor( |
| 152 CodeStubInterfaceDescriptor* descriptor) { | 152 CodeStubInterfaceDescriptor* descriptor) { |
| 153 // cp: context | 153 // cp: context |
| 154 // x0: value to compare | 154 // x0: value to compare |
| 155 Register registers[] = { cp, x0 }; | 155 Register registers[] = { cp, x0 }; |
| 156 descriptor->Initialize(MajorKey(), ARRAY_SIZE(registers), registers, | 156 descriptor->Initialize(MajorKey(), arraysize(registers), registers, |
| 157 FUNCTION_ADDR(CompareNilIC_Miss)); | 157 FUNCTION_ADDR(CompareNilIC_Miss)); |
| 158 descriptor->SetMissHandler( | 158 descriptor->SetMissHandler( |
| 159 ExternalReference(IC_Utility(IC::kCompareNilIC_Miss), isolate())); | 159 ExternalReference(IC_Utility(IC::kCompareNilIC_Miss), isolate())); |
| 160 } | 160 } |
| 161 | 161 |
| 162 | 162 |
| 163 const Register InterfaceDescriptor::ContextRegister() { return cp; } | 163 const Register InterfaceDescriptor::ContextRegister() { return cp; } |
| 164 | 164 |
| 165 | 165 |
| 166 static void InitializeArrayConstructorDescriptor( | 166 static void InitializeArrayConstructorDescriptor( |
| 167 CodeStub::Major major, CodeStubInterfaceDescriptor* descriptor, | 167 CodeStub::Major major, CodeStubInterfaceDescriptor* descriptor, |
| 168 int constant_stack_parameter_count) { | 168 int constant_stack_parameter_count) { |
| 169 // cp: context | 169 // cp: context |
| 170 // x1: function | 170 // x1: function |
| 171 // x2: allocation site with elements kind | 171 // x2: allocation site with elements kind |
| 172 // x0: number of arguments to the constructor function | 172 // x0: number of arguments to the constructor function |
| 173 Address deopt_handler = Runtime::FunctionForId( | 173 Address deopt_handler = Runtime::FunctionForId( |
| 174 Runtime::kArrayConstructor)->entry; | 174 Runtime::kArrayConstructor)->entry; |
| 175 | 175 |
| 176 if (constant_stack_parameter_count == 0) { | 176 if (constant_stack_parameter_count == 0) { |
| 177 Register registers[] = { cp, x1, x2 }; | 177 Register registers[] = { cp, x1, x2 }; |
| 178 descriptor->Initialize(major, ARRAY_SIZE(registers), registers, | 178 descriptor->Initialize(major, arraysize(registers), registers, |
| 179 deopt_handler, NULL, constant_stack_parameter_count, | 179 deopt_handler, NULL, constant_stack_parameter_count, |
| 180 JS_FUNCTION_STUB_MODE); | 180 JS_FUNCTION_STUB_MODE); |
| 181 } else { | 181 } else { |
| 182 // stack param count needs (constructor pointer, and single argument) | 182 // stack param count needs (constructor pointer, and single argument) |
| 183 Register registers[] = { cp, x1, x2, x0 }; | 183 Register registers[] = { cp, x1, x2, x0 }; |
| 184 Representation representations[] = { | 184 Representation representations[] = { |
| 185 Representation::Tagged(), | 185 Representation::Tagged(), |
| 186 Representation::Tagged(), | 186 Representation::Tagged(), |
| 187 Representation::Tagged(), | 187 Representation::Tagged(), |
| 188 Representation::Integer32() }; | 188 Representation::Integer32() }; |
| 189 descriptor->Initialize(major, ARRAY_SIZE(registers), registers, x0, | 189 descriptor->Initialize(major, arraysize(registers), registers, x0, |
| 190 deopt_handler, representations, | 190 deopt_handler, representations, |
| 191 constant_stack_parameter_count, | 191 constant_stack_parameter_count, |
| 192 JS_FUNCTION_STUB_MODE, PASS_ARGUMENTS); | 192 JS_FUNCTION_STUB_MODE, PASS_ARGUMENTS); |
| 193 } | 193 } |
| 194 } | 194 } |
| 195 | 195 |
| 196 | 196 |
| 197 void ArrayNoArgumentConstructorStub::InitializeInterfaceDescriptor( | 197 void ArrayNoArgumentConstructorStub::InitializeInterfaceDescriptor( |
| 198 CodeStubInterfaceDescriptor* descriptor) { | 198 CodeStubInterfaceDescriptor* descriptor) { |
| 199 InitializeArrayConstructorDescriptor(MajorKey(), descriptor, 0); | 199 InitializeArrayConstructorDescriptor(MajorKey(), descriptor, 0); |
| (...skipping 16 matching lines...) Expand all Loading... |
| 216 CodeStub::Major major, CodeStubInterfaceDescriptor* descriptor, | 216 CodeStub::Major major, CodeStubInterfaceDescriptor* descriptor, |
| 217 int constant_stack_parameter_count) { | 217 int constant_stack_parameter_count) { |
| 218 // cp: context | 218 // cp: context |
| 219 // x1: constructor function | 219 // x1: constructor function |
| 220 // x0: number of arguments to the constructor function | 220 // x0: number of arguments to the constructor function |
| 221 Address deopt_handler = Runtime::FunctionForId( | 221 Address deopt_handler = Runtime::FunctionForId( |
| 222 Runtime::kInternalArrayConstructor)->entry; | 222 Runtime::kInternalArrayConstructor)->entry; |
| 223 | 223 |
| 224 if (constant_stack_parameter_count == 0) { | 224 if (constant_stack_parameter_count == 0) { |
| 225 Register registers[] = { cp, x1 }; | 225 Register registers[] = { cp, x1 }; |
| 226 descriptor->Initialize(major, ARRAY_SIZE(registers), registers, | 226 descriptor->Initialize(major, arraysize(registers), registers, |
| 227 deopt_handler, NULL, constant_stack_parameter_count, | 227 deopt_handler, NULL, constant_stack_parameter_count, |
| 228 JS_FUNCTION_STUB_MODE); | 228 JS_FUNCTION_STUB_MODE); |
| 229 } else { | 229 } else { |
| 230 // stack param count needs (constructor pointer, and single argument) | 230 // stack param count needs (constructor pointer, and single argument) |
| 231 Register registers[] = { cp, x1, x0 }; | 231 Register registers[] = { cp, x1, x0 }; |
| 232 Representation representations[] = { | 232 Representation representations[] = { |
| 233 Representation::Tagged(), | 233 Representation::Tagged(), |
| 234 Representation::Tagged(), | 234 Representation::Tagged(), |
| 235 Representation::Integer32() }; | 235 Representation::Integer32() }; |
| 236 descriptor->Initialize(major, ARRAY_SIZE(registers), registers, x0, | 236 descriptor->Initialize(major, arraysize(registers), registers, x0, |
| 237 deopt_handler, representations, | 237 deopt_handler, representations, |
| 238 constant_stack_parameter_count, | 238 constant_stack_parameter_count, |
| 239 JS_FUNCTION_STUB_MODE, PASS_ARGUMENTS); | 239 JS_FUNCTION_STUB_MODE, PASS_ARGUMENTS); |
| 240 } | 240 } |
| 241 } | 241 } |
| 242 | 242 |
| 243 | 243 |
| 244 void InternalArrayNoArgumentConstructorStub::InitializeInterfaceDescriptor( | 244 void InternalArrayNoArgumentConstructorStub::InitializeInterfaceDescriptor( |
| 245 CodeStubInterfaceDescriptor* descriptor) { | 245 CodeStubInterfaceDescriptor* descriptor) { |
| 246 InitializeInternalArrayConstructorDescriptor(MajorKey(), descriptor, 0); | 246 InitializeInternalArrayConstructorDescriptor(MajorKey(), descriptor, 0); |
| (...skipping 10 matching lines...) Expand all Loading... |
| 257 CodeStubInterfaceDescriptor* descriptor) { | 257 CodeStubInterfaceDescriptor* descriptor) { |
| 258 InitializeInternalArrayConstructorDescriptor(MajorKey(), descriptor, -1); | 258 InitializeInternalArrayConstructorDescriptor(MajorKey(), descriptor, -1); |
| 259 } | 259 } |
| 260 | 260 |
| 261 | 261 |
| 262 void ToBooleanStub::InitializeInterfaceDescriptor( | 262 void ToBooleanStub::InitializeInterfaceDescriptor( |
| 263 CodeStubInterfaceDescriptor* descriptor) { | 263 CodeStubInterfaceDescriptor* descriptor) { |
| 264 // cp: context | 264 // cp: context |
| 265 // x0: value | 265 // x0: value |
| 266 Register registers[] = { cp, x0 }; | 266 Register registers[] = { cp, x0 }; |
| 267 descriptor->Initialize(MajorKey(), ARRAY_SIZE(registers), registers, | 267 descriptor->Initialize(MajorKey(), arraysize(registers), registers, |
| 268 FUNCTION_ADDR(ToBooleanIC_Miss)); | 268 FUNCTION_ADDR(ToBooleanIC_Miss)); |
| 269 descriptor->SetMissHandler( | 269 descriptor->SetMissHandler( |
| 270 ExternalReference(IC_Utility(IC::kToBooleanIC_Miss), isolate())); | 270 ExternalReference(IC_Utility(IC::kToBooleanIC_Miss), isolate())); |
| 271 } | 271 } |
| 272 | 272 |
| 273 | 273 |
| 274 void BinaryOpICStub::InitializeInterfaceDescriptor( | 274 void BinaryOpICStub::InitializeInterfaceDescriptor( |
| 275 CodeStubInterfaceDescriptor* descriptor) { | 275 CodeStubInterfaceDescriptor* descriptor) { |
| 276 // cp: context | 276 // cp: context |
| 277 // x1: left operand | 277 // x1: left operand |
| 278 // x0: right operand | 278 // x0: right operand |
| 279 Register registers[] = { cp, x1, x0 }; | 279 Register registers[] = { cp, x1, x0 }; |
| 280 descriptor->Initialize(MajorKey(), ARRAY_SIZE(registers), registers, | 280 descriptor->Initialize(MajorKey(), arraysize(registers), registers, |
| 281 FUNCTION_ADDR(BinaryOpIC_Miss)); | 281 FUNCTION_ADDR(BinaryOpIC_Miss)); |
| 282 descriptor->SetMissHandler( | 282 descriptor->SetMissHandler( |
| 283 ExternalReference(IC_Utility(IC::kBinaryOpIC_Miss), isolate())); | 283 ExternalReference(IC_Utility(IC::kBinaryOpIC_Miss), isolate())); |
| 284 } | 284 } |
| 285 | 285 |
| 286 | 286 |
| 287 void BinaryOpWithAllocationSiteStub::InitializeInterfaceDescriptor( | 287 void BinaryOpWithAllocationSiteStub::InitializeInterfaceDescriptor( |
| 288 CodeStubInterfaceDescriptor* descriptor) { | 288 CodeStubInterfaceDescriptor* descriptor) { |
| 289 // cp: context | 289 // cp: context |
| 290 // x2: allocation site | 290 // x2: allocation site |
| 291 // x1: left operand | 291 // x1: left operand |
| 292 // x0: right operand | 292 // x0: right operand |
| 293 Register registers[] = { cp, x2, x1, x0 }; | 293 Register registers[] = { cp, x2, x1, x0 }; |
| 294 descriptor->Initialize(MajorKey(), ARRAY_SIZE(registers), registers, | 294 descriptor->Initialize(MajorKey(), arraysize(registers), registers, |
| 295 FUNCTION_ADDR(BinaryOpIC_MissWithAllocationSite)); | 295 FUNCTION_ADDR(BinaryOpIC_MissWithAllocationSite)); |
| 296 } | 296 } |
| 297 | 297 |
| 298 | 298 |
| 299 void StringAddStub::InitializeInterfaceDescriptor( | 299 void StringAddStub::InitializeInterfaceDescriptor( |
| 300 CodeStubInterfaceDescriptor* descriptor) { | 300 CodeStubInterfaceDescriptor* descriptor) { |
| 301 // cp: context | 301 // cp: context |
| 302 // x1: left operand | 302 // x1: left operand |
| 303 // x0: right operand | 303 // x0: right operand |
| 304 Register registers[] = { cp, x1, x0 }; | 304 Register registers[] = { cp, x1, x0 }; |
| 305 descriptor->Initialize(MajorKey(), ARRAY_SIZE(registers), registers, | 305 descriptor->Initialize(MajorKey(), arraysize(registers), registers, |
| 306 Runtime::FunctionForId(Runtime::kStringAdd)->entry); | 306 Runtime::FunctionForId(Runtime::kStringAdd)->entry); |
| 307 } | 307 } |
| 308 | 308 |
| 309 | 309 |
| 310 void CallDescriptors::InitializeForIsolate(Isolate* isolate) { | 310 void CallDescriptors::InitializeForIsolate(Isolate* isolate) { |
| 311 static PlatformInterfaceDescriptor default_descriptor = | 311 static PlatformInterfaceDescriptor default_descriptor = |
| 312 PlatformInterfaceDescriptor(CAN_INLINE_TARGET_ADDRESS); | 312 PlatformInterfaceDescriptor(CAN_INLINE_TARGET_ADDRESS); |
| 313 | 313 |
| 314 static PlatformInterfaceDescriptor noInlineDescriptor = | 314 static PlatformInterfaceDescriptor noInlineDescriptor = |
| 315 PlatformInterfaceDescriptor(NEVER_INLINE_TARGET_ADDRESS); | 315 PlatformInterfaceDescriptor(NEVER_INLINE_TARGET_ADDRESS); |
| 316 | 316 |
| 317 { | 317 { |
| 318 CallInterfaceDescriptor* descriptor = | 318 CallInterfaceDescriptor* descriptor = |
| 319 isolate->call_descriptor(Isolate::ArgumentAdaptorCall); | 319 isolate->call_descriptor(Isolate::ArgumentAdaptorCall); |
| 320 Register registers[] = { cp, // context | 320 Register registers[] = { cp, // context |
| 321 x1, // JSFunction | 321 x1, // JSFunction |
| 322 x0, // actual number of arguments | 322 x0, // actual number of arguments |
| 323 x2, // expected number of arguments | 323 x2, // expected number of arguments |
| 324 }; | 324 }; |
| 325 Representation representations[] = { | 325 Representation representations[] = { |
| 326 Representation::Tagged(), // context | 326 Representation::Tagged(), // context |
| 327 Representation::Tagged(), // JSFunction | 327 Representation::Tagged(), // JSFunction |
| 328 Representation::Integer32(), // actual number of arguments | 328 Representation::Integer32(), // actual number of arguments |
| 329 Representation::Integer32(), // expected number of arguments | 329 Representation::Integer32(), // expected number of arguments |
| 330 }; | 330 }; |
| 331 descriptor->Initialize(ARRAY_SIZE(registers), registers, | 331 descriptor->Initialize(arraysize(registers), registers, |
| 332 representations, &default_descriptor); | 332 representations, &default_descriptor); |
| 333 } | 333 } |
| 334 { | 334 { |
| 335 CallInterfaceDescriptor* descriptor = | 335 CallInterfaceDescriptor* descriptor = |
| 336 isolate->call_descriptor(Isolate::KeyedCall); | 336 isolate->call_descriptor(Isolate::KeyedCall); |
| 337 Register registers[] = { cp, // context | 337 Register registers[] = { cp, // context |
| 338 x2, // key | 338 x2, // key |
| 339 }; | 339 }; |
| 340 Representation representations[] = { | 340 Representation representations[] = { |
| 341 Representation::Tagged(), // context | 341 Representation::Tagged(), // context |
| 342 Representation::Tagged(), // key | 342 Representation::Tagged(), // key |
| 343 }; | 343 }; |
| 344 descriptor->Initialize(ARRAY_SIZE(registers), registers, | 344 descriptor->Initialize(arraysize(registers), registers, |
| 345 representations, &noInlineDescriptor); | 345 representations, &noInlineDescriptor); |
| 346 } | 346 } |
| 347 { | 347 { |
| 348 CallInterfaceDescriptor* descriptor = | 348 CallInterfaceDescriptor* descriptor = |
| 349 isolate->call_descriptor(Isolate::NamedCall); | 349 isolate->call_descriptor(Isolate::NamedCall); |
| 350 Register registers[] = { cp, // context | 350 Register registers[] = { cp, // context |
| 351 x2, // name | 351 x2, // name |
| 352 }; | 352 }; |
| 353 Representation representations[] = { | 353 Representation representations[] = { |
| 354 Representation::Tagged(), // context | 354 Representation::Tagged(), // context |
| 355 Representation::Tagged(), // name | 355 Representation::Tagged(), // name |
| 356 }; | 356 }; |
| 357 descriptor->Initialize(ARRAY_SIZE(registers), registers, | 357 descriptor->Initialize(arraysize(registers), registers, |
| 358 representations, &noInlineDescriptor); | 358 representations, &noInlineDescriptor); |
| 359 } | 359 } |
| 360 { | 360 { |
| 361 CallInterfaceDescriptor* descriptor = | 361 CallInterfaceDescriptor* descriptor = |
| 362 isolate->call_descriptor(Isolate::CallHandler); | 362 isolate->call_descriptor(Isolate::CallHandler); |
| 363 Register registers[] = { cp, // context | 363 Register registers[] = { cp, // context |
| 364 x0, // receiver | 364 x0, // receiver |
| 365 }; | 365 }; |
| 366 Representation representations[] = { | 366 Representation representations[] = { |
| 367 Representation::Tagged(), // context | 367 Representation::Tagged(), // context |
| 368 Representation::Tagged(), // receiver | 368 Representation::Tagged(), // receiver |
| 369 }; | 369 }; |
| 370 descriptor->Initialize(ARRAY_SIZE(registers), registers, | 370 descriptor->Initialize(arraysize(registers), registers, |
| 371 representations, &default_descriptor); | 371 representations, &default_descriptor); |
| 372 } | 372 } |
| 373 { | 373 { |
| 374 CallInterfaceDescriptor* descriptor = | 374 CallInterfaceDescriptor* descriptor = |
| 375 isolate->call_descriptor(Isolate::ApiFunctionCall); | 375 isolate->call_descriptor(Isolate::ApiFunctionCall); |
| 376 Register registers[] = { cp, // context | 376 Register registers[] = { cp, // context |
| 377 x0, // callee | 377 x0, // callee |
| 378 x4, // call_data | 378 x4, // call_data |
| 379 x2, // holder | 379 x2, // holder |
| 380 x1, // api_function_address | 380 x1, // api_function_address |
| 381 }; | 381 }; |
| 382 Representation representations[] = { | 382 Representation representations[] = { |
| 383 Representation::Tagged(), // context | 383 Representation::Tagged(), // context |
| 384 Representation::Tagged(), // callee | 384 Representation::Tagged(), // callee |
| 385 Representation::Tagged(), // call_data | 385 Representation::Tagged(), // call_data |
| 386 Representation::Tagged(), // holder | 386 Representation::Tagged(), // holder |
| 387 Representation::External(), // api_function_address | 387 Representation::External(), // api_function_address |
| 388 }; | 388 }; |
| 389 descriptor->Initialize(ARRAY_SIZE(registers), registers, | 389 descriptor->Initialize(arraysize(registers), registers, |
| 390 representations, &default_descriptor); | 390 representations, &default_descriptor); |
| 391 } | 391 } |
| 392 } | 392 } |
| 393 | 393 |
| 394 | 394 |
| 395 #define __ ACCESS_MASM(masm) | 395 #define __ ACCESS_MASM(masm) |
| 396 | 396 |
| 397 | 397 |
| 398 void HydrogenCodeStub::GenerateLightweightMiss(MacroAssembler* masm) { | 398 void HydrogenCodeStub::GenerateLightweightMiss(MacroAssembler* masm) { |
| 399 // Update the static counter each time a new code stub is generated. | 399 // Update the static counter each time a new code stub is generated. |
| (...skipping 5023 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5423 MemOperand(fp, 6 * kPointerSize), | 5423 MemOperand(fp, 6 * kPointerSize), |
| 5424 NULL); | 5424 NULL); |
| 5425 } | 5425 } |
| 5426 | 5426 |
| 5427 | 5427 |
| 5428 #undef __ | 5428 #undef __ |
| 5429 | 5429 |
| 5430 } } // namespace v8::internal | 5430 } } // namespace v8::internal |
| 5431 | 5431 |
| 5432 #endif // V8_TARGET_ARCH_ARM64 | 5432 #endif // V8_TARGET_ARCH_ARM64 |
| OLD | NEW |