| 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_X64 | 7 #if V8_TARGET_ARCH_X64 |
| 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 | 21 |
| 22 void FastNewClosureStub::InitializeInterfaceDescriptor( | 22 void FastNewClosureStub::InitializeInterfaceDescriptor( |
| 23 CodeStubInterfaceDescriptor* descriptor) { | 23 CodeStubInterfaceDescriptor* descriptor) { |
| 24 Register registers[] = { rsi, rbx }; | 24 Register registers[] = { rsi, rbx }; |
| 25 descriptor->Initialize( | 25 descriptor->Initialize( |
| 26 MajorKey(), ARRAY_SIZE(registers), registers, | 26 MajorKey(), arraysize(registers), registers, |
| 27 Runtime::FunctionForId(Runtime::kNewClosureFromStubFailure)->entry); | 27 Runtime::FunctionForId(Runtime::kNewClosureFromStubFailure)->entry); |
| 28 } | 28 } |
| 29 | 29 |
| 30 | 30 |
| 31 void FastNewContextStub::InitializeInterfaceDescriptor( | 31 void FastNewContextStub::InitializeInterfaceDescriptor( |
| 32 CodeStubInterfaceDescriptor* descriptor) { | 32 CodeStubInterfaceDescriptor* descriptor) { |
| 33 Register registers[] = { rsi, rdi }; | 33 Register registers[] = { rsi, rdi }; |
| 34 descriptor->Initialize(MajorKey(), ARRAY_SIZE(registers), registers); | 34 descriptor->Initialize(MajorKey(), arraysize(registers), registers); |
| 35 } | 35 } |
| 36 | 36 |
| 37 | 37 |
| 38 void ToNumberStub::InitializeInterfaceDescriptor( | 38 void ToNumberStub::InitializeInterfaceDescriptor( |
| 39 CodeStubInterfaceDescriptor* descriptor) { | 39 CodeStubInterfaceDescriptor* descriptor) { |
| 40 Register registers[] = { rsi, rax }; | 40 Register registers[] = { rsi, rax }; |
| 41 descriptor->Initialize(MajorKey(), ARRAY_SIZE(registers), registers); | 41 descriptor->Initialize(MajorKey(), arraysize(registers), registers); |
| 42 } | 42 } |
| 43 | 43 |
| 44 | 44 |
| 45 void NumberToStringStub::InitializeInterfaceDescriptor( | 45 void NumberToStringStub::InitializeInterfaceDescriptor( |
| 46 CodeStubInterfaceDescriptor* descriptor) { | 46 CodeStubInterfaceDescriptor* descriptor) { |
| 47 Register registers[] = { rsi, rax }; | 47 Register registers[] = { rsi, rax }; |
| 48 descriptor->Initialize( | 48 descriptor->Initialize( |
| 49 MajorKey(), ARRAY_SIZE(registers), registers, | 49 MajorKey(), arraysize(registers), registers, |
| 50 Runtime::FunctionForId(Runtime::kNumberToStringRT)->entry); | 50 Runtime::FunctionForId(Runtime::kNumberToStringRT)->entry); |
| 51 } | 51 } |
| 52 | 52 |
| 53 | 53 |
| 54 void FastCloneShallowArrayStub::InitializeInterfaceDescriptor( | 54 void FastCloneShallowArrayStub::InitializeInterfaceDescriptor( |
| 55 CodeStubInterfaceDescriptor* descriptor) { | 55 CodeStubInterfaceDescriptor* descriptor) { |
| 56 Register registers[] = { rsi, rax, rbx, rcx }; | 56 Register registers[] = { rsi, rax, rbx, rcx }; |
| 57 Representation representations[] = { | 57 Representation representations[] = { |
| 58 Representation::Tagged(), | 58 Representation::Tagged(), |
| 59 Representation::Tagged(), | 59 Representation::Tagged(), |
| 60 Representation::Smi(), | 60 Representation::Smi(), |
| 61 Representation::Tagged() }; | 61 Representation::Tagged() }; |
| 62 | 62 |
| 63 descriptor->Initialize( | 63 descriptor->Initialize( |
| 64 MajorKey(), ARRAY_SIZE(registers), registers, | 64 MajorKey(), arraysize(registers), registers, |
| 65 Runtime::FunctionForId(Runtime::kCreateArrayLiteralStubBailout)->entry, | 65 Runtime::FunctionForId(Runtime::kCreateArrayLiteralStubBailout)->entry, |
| 66 representations); | 66 representations); |
| 67 } | 67 } |
| 68 | 68 |
| 69 | 69 |
| 70 void FastCloneShallowObjectStub::InitializeInterfaceDescriptor( | 70 void FastCloneShallowObjectStub::InitializeInterfaceDescriptor( |
| 71 CodeStubInterfaceDescriptor* descriptor) { | 71 CodeStubInterfaceDescriptor* descriptor) { |
| 72 Register registers[] = { rsi, rax, rbx, rcx, rdx }; | 72 Register registers[] = { rsi, rax, rbx, rcx, rdx }; |
| 73 descriptor->Initialize( | 73 descriptor->Initialize( |
| 74 MajorKey(), ARRAY_SIZE(registers), registers, | 74 MajorKey(), arraysize(registers), registers, |
| 75 Runtime::FunctionForId(Runtime::kCreateObjectLiteral)->entry); | 75 Runtime::FunctionForId(Runtime::kCreateObjectLiteral)->entry); |
| 76 } | 76 } |
| 77 | 77 |
| 78 | 78 |
| 79 void CreateAllocationSiteStub::InitializeInterfaceDescriptor( | 79 void CreateAllocationSiteStub::InitializeInterfaceDescriptor( |
| 80 CodeStubInterfaceDescriptor* descriptor) { | 80 CodeStubInterfaceDescriptor* descriptor) { |
| 81 Register registers[] = { rsi, rbx, rdx }; | 81 Register registers[] = { rsi, rbx, rdx }; |
| 82 descriptor->Initialize(MajorKey(), ARRAY_SIZE(registers), registers); | 82 descriptor->Initialize(MajorKey(), arraysize(registers), registers); |
| 83 } | 83 } |
| 84 | 84 |
| 85 | 85 |
| 86 void CallFunctionStub::InitializeInterfaceDescriptor( | 86 void CallFunctionStub::InitializeInterfaceDescriptor( |
| 87 CodeStubInterfaceDescriptor* descriptor) { | 87 CodeStubInterfaceDescriptor* descriptor) { |
| 88 Register registers[] = {rsi, rdi}; | 88 Register registers[] = {rsi, rdi}; |
| 89 descriptor->Initialize(MajorKey(), ARRAY_SIZE(registers), registers); | 89 descriptor->Initialize(MajorKey(), arraysize(registers), registers); |
| 90 } | 90 } |
| 91 | 91 |
| 92 | 92 |
| 93 void CallConstructStub::InitializeInterfaceDescriptor( | 93 void CallConstructStub::InitializeInterfaceDescriptor( |
| 94 CodeStubInterfaceDescriptor* descriptor) { | 94 CodeStubInterfaceDescriptor* descriptor) { |
| 95 // rax : number of arguments | 95 // rax : number of arguments |
| 96 // rbx : feedback vector | 96 // rbx : feedback vector |
| 97 // rdx : (only if rbx is not the megamorphic symbol) slot in feedback | 97 // rdx : (only if rbx is not the megamorphic symbol) slot in feedback |
| 98 // vector (Smi) | 98 // vector (Smi) |
| 99 // rdi : constructor function | 99 // rdi : constructor function |
| 100 // TODO(turbofan): So far we don't gather type feedback and hence skip the | 100 // TODO(turbofan): So far we don't gather type feedback and hence skip the |
| 101 // slot parameter, but ArrayConstructStub needs the vector to be undefined. | 101 // slot parameter, but ArrayConstructStub needs the vector to be undefined. |
| 102 Register registers[] = {rsi, rax, rdi, rbx}; | 102 Register registers[] = {rsi, rax, rdi, rbx}; |
| 103 descriptor->Initialize(MajorKey(), ARRAY_SIZE(registers), registers); | 103 descriptor->Initialize(MajorKey(), arraysize(registers), registers); |
| 104 } | 104 } |
| 105 | 105 |
| 106 | 106 |
| 107 void RegExpConstructResultStub::InitializeInterfaceDescriptor( | 107 void RegExpConstructResultStub::InitializeInterfaceDescriptor( |
| 108 CodeStubInterfaceDescriptor* descriptor) { | 108 CodeStubInterfaceDescriptor* descriptor) { |
| 109 Register registers[] = { rsi, rcx, rbx, rax }; | 109 Register registers[] = { rsi, rcx, rbx, rax }; |
| 110 descriptor->Initialize( | 110 descriptor->Initialize( |
| 111 MajorKey(), ARRAY_SIZE(registers), registers, | 111 MajorKey(), arraysize(registers), registers, |
| 112 Runtime::FunctionForId(Runtime::kRegExpConstructResult)->entry); | 112 Runtime::FunctionForId(Runtime::kRegExpConstructResult)->entry); |
| 113 } | 113 } |
| 114 | 114 |
| 115 | 115 |
| 116 void TransitionElementsKindStub::InitializeInterfaceDescriptor( | 116 void TransitionElementsKindStub::InitializeInterfaceDescriptor( |
| 117 CodeStubInterfaceDescriptor* descriptor) { | 117 CodeStubInterfaceDescriptor* descriptor) { |
| 118 Register registers[] = { rsi, rax, rbx }; | 118 Register registers[] = { rsi, rax, rbx }; |
| 119 descriptor->Initialize( | 119 descriptor->Initialize( |
| 120 MajorKey(), ARRAY_SIZE(registers), registers, | 120 MajorKey(), arraysize(registers), registers, |
| 121 Runtime::FunctionForId(Runtime::kTransitionElementsKind)->entry); | 121 Runtime::FunctionForId(Runtime::kTransitionElementsKind)->entry); |
| 122 } | 122 } |
| 123 | 123 |
| 124 | 124 |
| 125 const Register InterfaceDescriptor::ContextRegister() { return rsi; } | 125 const Register InterfaceDescriptor::ContextRegister() { return rsi; } |
| 126 | 126 |
| 127 | 127 |
| 128 static void InitializeArrayConstructorDescriptor( | 128 static void InitializeArrayConstructorDescriptor( |
| 129 CodeStub::Major major, CodeStubInterfaceDescriptor* descriptor, | 129 CodeStub::Major major, CodeStubInterfaceDescriptor* descriptor, |
| 130 int constant_stack_parameter_count) { | 130 int constant_stack_parameter_count) { |
| 131 // register state | 131 // register state |
| 132 // rax -- number of arguments | 132 // rax -- number of arguments |
| 133 // rdi -- function | 133 // rdi -- function |
| 134 // rbx -- allocation site with elements kind | 134 // rbx -- allocation site with elements kind |
| 135 Address deopt_handler = Runtime::FunctionForId( | 135 Address deopt_handler = Runtime::FunctionForId( |
| 136 Runtime::kArrayConstructor)->entry; | 136 Runtime::kArrayConstructor)->entry; |
| 137 | 137 |
| 138 if (constant_stack_parameter_count == 0) { | 138 if (constant_stack_parameter_count == 0) { |
| 139 Register registers[] = { rsi, rdi, rbx }; | 139 Register registers[] = { rsi, rdi, rbx }; |
| 140 descriptor->Initialize(major, ARRAY_SIZE(registers), registers, | 140 descriptor->Initialize(major, arraysize(registers), registers, |
| 141 deopt_handler, NULL, constant_stack_parameter_count, | 141 deopt_handler, NULL, constant_stack_parameter_count, |
| 142 JS_FUNCTION_STUB_MODE); | 142 JS_FUNCTION_STUB_MODE); |
| 143 } else { | 143 } else { |
| 144 // stack param count needs (constructor pointer, and single argument) | 144 // stack param count needs (constructor pointer, and single argument) |
| 145 Register registers[] = { rsi, rdi, rbx, rax }; | 145 Register registers[] = { rsi, rdi, rbx, rax }; |
| 146 Representation representations[] = { | 146 Representation representations[] = { |
| 147 Representation::Tagged(), | 147 Representation::Tagged(), |
| 148 Representation::Tagged(), | 148 Representation::Tagged(), |
| 149 Representation::Tagged(), | 149 Representation::Tagged(), |
| 150 Representation::Integer32() }; | 150 Representation::Integer32() }; |
| 151 descriptor->Initialize(major, ARRAY_SIZE(registers), registers, rax, | 151 descriptor->Initialize(major, arraysize(registers), registers, rax, |
| 152 deopt_handler, representations, | 152 deopt_handler, representations, |
| 153 constant_stack_parameter_count, | 153 constant_stack_parameter_count, |
| 154 JS_FUNCTION_STUB_MODE, PASS_ARGUMENTS); | 154 JS_FUNCTION_STUB_MODE, PASS_ARGUMENTS); |
| 155 } | 155 } |
| 156 } | 156 } |
| 157 | 157 |
| 158 | 158 |
| 159 static void InitializeInternalArrayConstructorDescriptor( | 159 static void InitializeInternalArrayConstructorDescriptor( |
| 160 CodeStub::Major major, CodeStubInterfaceDescriptor* descriptor, | 160 CodeStub::Major major, CodeStubInterfaceDescriptor* descriptor, |
| 161 int constant_stack_parameter_count) { | 161 int constant_stack_parameter_count) { |
| 162 // register state | 162 // register state |
| 163 // rsi -- context | 163 // rsi -- context |
| 164 // rax -- number of arguments | 164 // rax -- number of arguments |
| 165 // rdi -- constructor function | 165 // rdi -- constructor function |
| 166 Address deopt_handler = Runtime::FunctionForId( | 166 Address deopt_handler = Runtime::FunctionForId( |
| 167 Runtime::kInternalArrayConstructor)->entry; | 167 Runtime::kInternalArrayConstructor)->entry; |
| 168 | 168 |
| 169 if (constant_stack_parameter_count == 0) { | 169 if (constant_stack_parameter_count == 0) { |
| 170 Register registers[] = { rsi, rdi }; | 170 Register registers[] = { rsi, rdi }; |
| 171 descriptor->Initialize(major, ARRAY_SIZE(registers), registers, | 171 descriptor->Initialize(major, arraysize(registers), registers, |
| 172 deopt_handler, NULL, constant_stack_parameter_count, | 172 deopt_handler, NULL, constant_stack_parameter_count, |
| 173 JS_FUNCTION_STUB_MODE); | 173 JS_FUNCTION_STUB_MODE); |
| 174 } else { | 174 } else { |
| 175 // stack param count needs (constructor pointer, and single argument) | 175 // stack param count needs (constructor pointer, and single argument) |
| 176 Register registers[] = { rsi, rdi, rax }; | 176 Register registers[] = { rsi, rdi, rax }; |
| 177 Representation representations[] = { | 177 Representation representations[] = { |
| 178 Representation::Tagged(), | 178 Representation::Tagged(), |
| 179 Representation::Tagged(), | 179 Representation::Tagged(), |
| 180 Representation::Integer32() }; | 180 Representation::Integer32() }; |
| 181 descriptor->Initialize(major, ARRAY_SIZE(registers), registers, rax, | 181 descriptor->Initialize(major, arraysize(registers), registers, rax, |
| 182 deopt_handler, representations, | 182 deopt_handler, representations, |
| 183 constant_stack_parameter_count, | 183 constant_stack_parameter_count, |
| 184 JS_FUNCTION_STUB_MODE, PASS_ARGUMENTS); | 184 JS_FUNCTION_STUB_MODE, PASS_ARGUMENTS); |
| 185 } | 185 } |
| 186 } | 186 } |
| 187 | 187 |
| 188 | 188 |
| 189 void ArrayNoArgumentConstructorStub::InitializeInterfaceDescriptor( | 189 void ArrayNoArgumentConstructorStub::InitializeInterfaceDescriptor( |
| 190 CodeStubInterfaceDescriptor* descriptor) { | 190 CodeStubInterfaceDescriptor* descriptor) { |
| 191 InitializeArrayConstructorDescriptor(MajorKey(), descriptor, 0); | 191 InitializeArrayConstructorDescriptor(MajorKey(), descriptor, 0); |
| (...skipping 26 matching lines...) Expand all Loading... |
| 218 | 218 |
| 219 void InternalArrayNArgumentsConstructorStub::InitializeInterfaceDescriptor( | 219 void InternalArrayNArgumentsConstructorStub::InitializeInterfaceDescriptor( |
| 220 CodeStubInterfaceDescriptor* descriptor) { | 220 CodeStubInterfaceDescriptor* descriptor) { |
| 221 InitializeInternalArrayConstructorDescriptor(MajorKey(), descriptor, -1); | 221 InitializeInternalArrayConstructorDescriptor(MajorKey(), descriptor, -1); |
| 222 } | 222 } |
| 223 | 223 |
| 224 | 224 |
| 225 void CompareNilICStub::InitializeInterfaceDescriptor( | 225 void CompareNilICStub::InitializeInterfaceDescriptor( |
| 226 CodeStubInterfaceDescriptor* descriptor) { | 226 CodeStubInterfaceDescriptor* descriptor) { |
| 227 Register registers[] = { rsi, rax }; | 227 Register registers[] = { rsi, rax }; |
| 228 descriptor->Initialize(MajorKey(), ARRAY_SIZE(registers), registers, | 228 descriptor->Initialize(MajorKey(), arraysize(registers), registers, |
| 229 FUNCTION_ADDR(CompareNilIC_Miss)); | 229 FUNCTION_ADDR(CompareNilIC_Miss)); |
| 230 descriptor->SetMissHandler( | 230 descriptor->SetMissHandler( |
| 231 ExternalReference(IC_Utility(IC::kCompareNilIC_Miss), isolate())); | 231 ExternalReference(IC_Utility(IC::kCompareNilIC_Miss), isolate())); |
| 232 } | 232 } |
| 233 | 233 |
| 234 | 234 |
| 235 void ToBooleanStub::InitializeInterfaceDescriptor( | 235 void ToBooleanStub::InitializeInterfaceDescriptor( |
| 236 CodeStubInterfaceDescriptor* descriptor) { | 236 CodeStubInterfaceDescriptor* descriptor) { |
| 237 Register registers[] = { rsi, rax }; | 237 Register registers[] = { rsi, rax }; |
| 238 descriptor->Initialize(MajorKey(), ARRAY_SIZE(registers), registers, | 238 descriptor->Initialize(MajorKey(), arraysize(registers), registers, |
| 239 FUNCTION_ADDR(ToBooleanIC_Miss)); | 239 FUNCTION_ADDR(ToBooleanIC_Miss)); |
| 240 descriptor->SetMissHandler( | 240 descriptor->SetMissHandler( |
| 241 ExternalReference(IC_Utility(IC::kToBooleanIC_Miss), isolate())); | 241 ExternalReference(IC_Utility(IC::kToBooleanIC_Miss), isolate())); |
| 242 } | 242 } |
| 243 | 243 |
| 244 | 244 |
| 245 void BinaryOpICStub::InitializeInterfaceDescriptor( | 245 void BinaryOpICStub::InitializeInterfaceDescriptor( |
| 246 CodeStubInterfaceDescriptor* descriptor) { | 246 CodeStubInterfaceDescriptor* descriptor) { |
| 247 Register registers[] = { rsi, rdx, rax }; | 247 Register registers[] = { rsi, rdx, rax }; |
| 248 descriptor->Initialize(MajorKey(), ARRAY_SIZE(registers), registers, | 248 descriptor->Initialize(MajorKey(), arraysize(registers), registers, |
| 249 FUNCTION_ADDR(BinaryOpIC_Miss)); | 249 FUNCTION_ADDR(BinaryOpIC_Miss)); |
| 250 descriptor->SetMissHandler( | 250 descriptor->SetMissHandler( |
| 251 ExternalReference(IC_Utility(IC::kBinaryOpIC_Miss), isolate())); | 251 ExternalReference(IC_Utility(IC::kBinaryOpIC_Miss), isolate())); |
| 252 } | 252 } |
| 253 | 253 |
| 254 | 254 |
| 255 void BinaryOpWithAllocationSiteStub::InitializeInterfaceDescriptor( | 255 void BinaryOpWithAllocationSiteStub::InitializeInterfaceDescriptor( |
| 256 CodeStubInterfaceDescriptor* descriptor) { | 256 CodeStubInterfaceDescriptor* descriptor) { |
| 257 Register registers[] = { rsi, rcx, rdx, rax }; | 257 Register registers[] = { rsi, rcx, rdx, rax }; |
| 258 descriptor->Initialize(MajorKey(), ARRAY_SIZE(registers), registers, | 258 descriptor->Initialize(MajorKey(), arraysize(registers), registers, |
| 259 FUNCTION_ADDR(BinaryOpIC_MissWithAllocationSite)); | 259 FUNCTION_ADDR(BinaryOpIC_MissWithAllocationSite)); |
| 260 } | 260 } |
| 261 | 261 |
| 262 | 262 |
| 263 void StringAddStub::InitializeInterfaceDescriptor( | 263 void StringAddStub::InitializeInterfaceDescriptor( |
| 264 CodeStubInterfaceDescriptor* descriptor) { | 264 CodeStubInterfaceDescriptor* descriptor) { |
| 265 Register registers[] = { rsi, rdx, rax }; | 265 Register registers[] = { rsi, rdx, rax }; |
| 266 descriptor->Initialize(MajorKey(), ARRAY_SIZE(registers), registers, | 266 descriptor->Initialize(MajorKey(), arraysize(registers), registers, |
| 267 Runtime::FunctionForId(Runtime::kStringAdd)->entry); | 267 Runtime::FunctionForId(Runtime::kStringAdd)->entry); |
| 268 } | 268 } |
| 269 | 269 |
| 270 | 270 |
| 271 void CallDescriptors::InitializeForIsolate(Isolate* isolate) { | 271 void CallDescriptors::InitializeForIsolate(Isolate* isolate) { |
| 272 { | 272 { |
| 273 CallInterfaceDescriptor* descriptor = | 273 CallInterfaceDescriptor* descriptor = |
| 274 isolate->call_descriptor(Isolate::ArgumentAdaptorCall); | 274 isolate->call_descriptor(Isolate::ArgumentAdaptorCall); |
| 275 Register registers[] = { rsi, // context | 275 Register registers[] = { rsi, // context |
| 276 rdi, // JSFunction | 276 rdi, // JSFunction |
| 277 rax, // actual number of arguments | 277 rax, // actual number of arguments |
| 278 rbx, // expected number of arguments | 278 rbx, // expected number of arguments |
| 279 }; | 279 }; |
| 280 Representation representations[] = { | 280 Representation representations[] = { |
| 281 Representation::Tagged(), // context | 281 Representation::Tagged(), // context |
| 282 Representation::Tagged(), // JSFunction | 282 Representation::Tagged(), // JSFunction |
| 283 Representation::Integer32(), // actual number of arguments | 283 Representation::Integer32(), // actual number of arguments |
| 284 Representation::Integer32(), // expected number of arguments | 284 Representation::Integer32(), // expected number of arguments |
| 285 }; | 285 }; |
| 286 descriptor->Initialize(ARRAY_SIZE(registers), registers, representations); | 286 descriptor->Initialize(arraysize(registers), registers, representations); |
| 287 } | 287 } |
| 288 { | 288 { |
| 289 CallInterfaceDescriptor* descriptor = | 289 CallInterfaceDescriptor* descriptor = |
| 290 isolate->call_descriptor(Isolate::KeyedCall); | 290 isolate->call_descriptor(Isolate::KeyedCall); |
| 291 Register registers[] = { rsi, // context | 291 Register registers[] = { rsi, // context |
| 292 rcx, // key | 292 rcx, // key |
| 293 }; | 293 }; |
| 294 Representation representations[] = { | 294 Representation representations[] = { |
| 295 Representation::Tagged(), // context | 295 Representation::Tagged(), // context |
| 296 Representation::Tagged(), // key | 296 Representation::Tagged(), // key |
| 297 }; | 297 }; |
| 298 descriptor->Initialize(ARRAY_SIZE(registers), registers, representations); | 298 descriptor->Initialize(arraysize(registers), registers, representations); |
| 299 } | 299 } |
| 300 { | 300 { |
| 301 CallInterfaceDescriptor* descriptor = | 301 CallInterfaceDescriptor* descriptor = |
| 302 isolate->call_descriptor(Isolate::NamedCall); | 302 isolate->call_descriptor(Isolate::NamedCall); |
| 303 Register registers[] = { rsi, // context | 303 Register registers[] = { rsi, // context |
| 304 rcx, // name | 304 rcx, // name |
| 305 }; | 305 }; |
| 306 Representation representations[] = { | 306 Representation representations[] = { |
| 307 Representation::Tagged(), // context | 307 Representation::Tagged(), // context |
| 308 Representation::Tagged(), // name | 308 Representation::Tagged(), // name |
| 309 }; | 309 }; |
| 310 descriptor->Initialize(ARRAY_SIZE(registers), registers, representations); | 310 descriptor->Initialize(arraysize(registers), registers, representations); |
| 311 } | 311 } |
| 312 { | 312 { |
| 313 CallInterfaceDescriptor* descriptor = | 313 CallInterfaceDescriptor* descriptor = |
| 314 isolate->call_descriptor(Isolate::CallHandler); | 314 isolate->call_descriptor(Isolate::CallHandler); |
| 315 Register registers[] = { rsi, // context | 315 Register registers[] = { rsi, // context |
| 316 rdx, // receiver | 316 rdx, // receiver |
| 317 }; | 317 }; |
| 318 Representation representations[] = { | 318 Representation representations[] = { |
| 319 Representation::Tagged(), // context | 319 Representation::Tagged(), // context |
| 320 Representation::Tagged(), // receiver | 320 Representation::Tagged(), // receiver |
| 321 }; | 321 }; |
| 322 descriptor->Initialize(ARRAY_SIZE(registers), registers, representations); | 322 descriptor->Initialize(arraysize(registers), registers, representations); |
| 323 } | 323 } |
| 324 { | 324 { |
| 325 CallInterfaceDescriptor* descriptor = | 325 CallInterfaceDescriptor* descriptor = |
| 326 isolate->call_descriptor(Isolate::ApiFunctionCall); | 326 isolate->call_descriptor(Isolate::ApiFunctionCall); |
| 327 Register registers[] = { rsi, // context | 327 Register registers[] = { rsi, // context |
| 328 rax, // callee | 328 rax, // callee |
| 329 rbx, // call_data | 329 rbx, // call_data |
| 330 rcx, // holder | 330 rcx, // holder |
| 331 rdx, // api_function_address | 331 rdx, // api_function_address |
| 332 }; | 332 }; |
| 333 Representation representations[] = { | 333 Representation representations[] = { |
| 334 Representation::Tagged(), // context | 334 Representation::Tagged(), // context |
| 335 Representation::Tagged(), // callee | 335 Representation::Tagged(), // callee |
| 336 Representation::Tagged(), // call_data | 336 Representation::Tagged(), // call_data |
| 337 Representation::Tagged(), // holder | 337 Representation::Tagged(), // holder |
| 338 Representation::External(), // api_function_address | 338 Representation::External(), // api_function_address |
| 339 }; | 339 }; |
| 340 descriptor->Initialize(ARRAY_SIZE(registers), registers, representations); | 340 descriptor->Initialize(arraysize(registers), registers, representations); |
| 341 } | 341 } |
| 342 } | 342 } |
| 343 | 343 |
| 344 | 344 |
| 345 #define __ ACCESS_MASM(masm) | 345 #define __ ACCESS_MASM(masm) |
| 346 | 346 |
| 347 | 347 |
| 348 void HydrogenCodeStub::GenerateLightweightMiss(MacroAssembler* masm) { | 348 void HydrogenCodeStub::GenerateLightweightMiss(MacroAssembler* masm) { |
| 349 // Update the static counter each time a new code stub is generated. | 349 // Update the static counter each time a new code stub is generated. |
| 350 isolate()->counters()->code_stubs()->Increment(); | 350 isolate()->counters()->code_stubs()->Increment(); |
| (...skipping 4625 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4976 return_value_operand, | 4976 return_value_operand, |
| 4977 NULL); | 4977 NULL); |
| 4978 } | 4978 } |
| 4979 | 4979 |
| 4980 | 4980 |
| 4981 #undef __ | 4981 #undef __ |
| 4982 | 4982 |
| 4983 } } // namespace v8::internal | 4983 } } // namespace v8::internal |
| 4984 | 4984 |
| 4985 #endif // V8_TARGET_ARCH_X64 | 4985 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |