| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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_IA32 | 7 #if V8_TARGET_ARCH_IA32 |
| 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[] = { esi, ebx }; | 24 Register registers[] = { esi, ebx }; |
| 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[] = { esi, edi }; | 33 Register registers[] = { esi, edi }; |
| 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 // ToNumberStub invokes a function, and therefore needs a context. | 40 // ToNumberStub invokes a function, and therefore needs a context. |
| 41 Register registers[] = { esi, eax }; | 41 Register registers[] = { esi, eax }; |
| 42 descriptor->Initialize(MajorKey(), ARRAY_SIZE(registers), registers); | 42 descriptor->Initialize(MajorKey(), arraysize(registers), registers); |
| 43 } | 43 } |
| 44 | 44 |
| 45 | 45 |
| 46 void NumberToStringStub::InitializeInterfaceDescriptor( | 46 void NumberToStringStub::InitializeInterfaceDescriptor( |
| 47 CodeStubInterfaceDescriptor* descriptor) { | 47 CodeStubInterfaceDescriptor* descriptor) { |
| 48 Register registers[] = { esi, eax }; | 48 Register registers[] = { esi, eax }; |
| 49 descriptor->Initialize( | 49 descriptor->Initialize( |
| 50 MajorKey(), ARRAY_SIZE(registers), registers, | 50 MajorKey(), arraysize(registers), registers, |
| 51 Runtime::FunctionForId(Runtime::kNumberToStringRT)->entry); | 51 Runtime::FunctionForId(Runtime::kNumberToStringRT)->entry); |
| 52 } | 52 } |
| 53 | 53 |
| 54 | 54 |
| 55 void FastCloneShallowArrayStub::InitializeInterfaceDescriptor( | 55 void FastCloneShallowArrayStub::InitializeInterfaceDescriptor( |
| 56 CodeStubInterfaceDescriptor* descriptor) { | 56 CodeStubInterfaceDescriptor* descriptor) { |
| 57 Register registers[] = { esi, eax, ebx, ecx }; | 57 Register registers[] = { esi, eax, ebx, ecx }; |
| 58 Representation representations[] = { | 58 Representation representations[] = { |
| 59 Representation::Tagged(), | 59 Representation::Tagged(), |
| 60 Representation::Tagged(), | 60 Representation::Tagged(), |
| 61 Representation::Smi(), | 61 Representation::Smi(), |
| 62 Representation::Tagged() }; | 62 Representation::Tagged() }; |
| 63 | 63 |
| 64 descriptor->Initialize( | 64 descriptor->Initialize( |
| 65 MajorKey(), ARRAY_SIZE(registers), registers, | 65 MajorKey(), arraysize(registers), registers, |
| 66 Runtime::FunctionForId(Runtime::kCreateArrayLiteralStubBailout)->entry, | 66 Runtime::FunctionForId(Runtime::kCreateArrayLiteralStubBailout)->entry, |
| 67 representations); | 67 representations); |
| 68 } | 68 } |
| 69 | 69 |
| 70 | 70 |
| 71 void FastCloneShallowObjectStub::InitializeInterfaceDescriptor( | 71 void FastCloneShallowObjectStub::InitializeInterfaceDescriptor( |
| 72 CodeStubInterfaceDescriptor* descriptor) { | 72 CodeStubInterfaceDescriptor* descriptor) { |
| 73 Register registers[] = { esi, eax, ebx, ecx, edx }; | 73 Register registers[] = { esi, eax, ebx, ecx, edx }; |
| 74 descriptor->Initialize( | 74 descriptor->Initialize( |
| 75 MajorKey(), ARRAY_SIZE(registers), registers, | 75 MajorKey(), arraysize(registers), registers, |
| 76 Runtime::FunctionForId(Runtime::kCreateObjectLiteral)->entry); | 76 Runtime::FunctionForId(Runtime::kCreateObjectLiteral)->entry); |
| 77 } | 77 } |
| 78 | 78 |
| 79 | 79 |
| 80 void CreateAllocationSiteStub::InitializeInterfaceDescriptor( | 80 void CreateAllocationSiteStub::InitializeInterfaceDescriptor( |
| 81 CodeStubInterfaceDescriptor* descriptor) { | 81 CodeStubInterfaceDescriptor* descriptor) { |
| 82 Register registers[] = { esi, ebx, edx }; | 82 Register registers[] = { esi, ebx, edx }; |
| 83 descriptor->Initialize(MajorKey(), ARRAY_SIZE(registers), registers); | 83 descriptor->Initialize(MajorKey(), arraysize(registers), registers); |
| 84 } | 84 } |
| 85 | 85 |
| 86 | 86 |
| 87 void CallFunctionStub::InitializeInterfaceDescriptor( | 87 void CallFunctionStub::InitializeInterfaceDescriptor( |
| 88 CodeStubInterfaceDescriptor* descriptor) { | 88 CodeStubInterfaceDescriptor* descriptor) { |
| 89 Register registers[] = {esi, edi}; | 89 Register registers[] = {esi, edi}; |
| 90 descriptor->Initialize(MajorKey(), ARRAY_SIZE(registers), registers); | 90 descriptor->Initialize(MajorKey(), arraysize(registers), registers); |
| 91 } | 91 } |
| 92 | 92 |
| 93 | 93 |
| 94 void CallConstructStub::InitializeInterfaceDescriptor( | 94 void CallConstructStub::InitializeInterfaceDescriptor( |
| 95 CodeStubInterfaceDescriptor* descriptor) { | 95 CodeStubInterfaceDescriptor* descriptor) { |
| 96 // eax : number of arguments | 96 // eax : number of arguments |
| 97 // ebx : feedback vector | 97 // ebx : feedback vector |
| 98 // edx : (only if ebx is not the megamorphic symbol) slot in feedback | 98 // edx : (only if ebx is not the megamorphic symbol) slot in feedback |
| 99 // vector (Smi) | 99 // vector (Smi) |
| 100 // edi : constructor function | 100 // edi : constructor function |
| 101 // TODO(turbofan): So far we don't gather type feedback and hence skip the | 101 // TODO(turbofan): So far we don't gather type feedback and hence skip the |
| 102 // slot parameter, but ArrayConstructStub needs the vector to be undefined. | 102 // slot parameter, but ArrayConstructStub needs the vector to be undefined. |
| 103 Register registers[] = {esi, eax, edi, ebx}; | 103 Register registers[] = {esi, eax, edi, ebx}; |
| 104 descriptor->Initialize(MajorKey(), ARRAY_SIZE(registers), registers); | 104 descriptor->Initialize(MajorKey(), arraysize(registers), registers); |
| 105 } | 105 } |
| 106 | 106 |
| 107 | 107 |
| 108 void RegExpConstructResultStub::InitializeInterfaceDescriptor( | 108 void RegExpConstructResultStub::InitializeInterfaceDescriptor( |
| 109 CodeStubInterfaceDescriptor* descriptor) { | 109 CodeStubInterfaceDescriptor* descriptor) { |
| 110 Register registers[] = { esi, ecx, ebx, eax }; | 110 Register registers[] = { esi, ecx, ebx, eax }; |
| 111 descriptor->Initialize( | 111 descriptor->Initialize( |
| 112 MajorKey(), ARRAY_SIZE(registers), registers, | 112 MajorKey(), arraysize(registers), registers, |
| 113 Runtime::FunctionForId(Runtime::kRegExpConstructResult)->entry); | 113 Runtime::FunctionForId(Runtime::kRegExpConstructResult)->entry); |
| 114 } | 114 } |
| 115 | 115 |
| 116 | 116 |
| 117 void TransitionElementsKindStub::InitializeInterfaceDescriptor( | 117 void TransitionElementsKindStub::InitializeInterfaceDescriptor( |
| 118 CodeStubInterfaceDescriptor* descriptor) { | 118 CodeStubInterfaceDescriptor* descriptor) { |
| 119 Register registers[] = { esi, eax, ebx }; | 119 Register registers[] = { esi, eax, ebx }; |
| 120 descriptor->Initialize( | 120 descriptor->Initialize( |
| 121 MajorKey(), ARRAY_SIZE(registers), registers, | 121 MajorKey(), arraysize(registers), registers, |
| 122 Runtime::FunctionForId(Runtime::kTransitionElementsKind)->entry); | 122 Runtime::FunctionForId(Runtime::kTransitionElementsKind)->entry); |
| 123 } | 123 } |
| 124 | 124 |
| 125 | 125 |
| 126 const Register InterfaceDescriptor::ContextRegister() { return esi; } | 126 const Register InterfaceDescriptor::ContextRegister() { return esi; } |
| 127 | 127 |
| 128 | 128 |
| 129 static void InitializeArrayConstructorDescriptor( | 129 static void InitializeArrayConstructorDescriptor( |
| 130 Isolate* isolate, CodeStub::Major major, | 130 Isolate* isolate, CodeStub::Major major, |
| 131 CodeStubInterfaceDescriptor* descriptor, | 131 CodeStubInterfaceDescriptor* descriptor, |
| 132 int constant_stack_parameter_count) { | 132 int constant_stack_parameter_count) { |
| 133 // register state | 133 // register state |
| 134 // eax -- number of arguments | 134 // eax -- number of arguments |
| 135 // edi -- function | 135 // edi -- function |
| 136 // ebx -- allocation site with elements kind | 136 // ebx -- allocation site with elements kind |
| 137 Address deopt_handler = Runtime::FunctionForId( | 137 Address deopt_handler = Runtime::FunctionForId( |
| 138 Runtime::kArrayConstructor)->entry; | 138 Runtime::kArrayConstructor)->entry; |
| 139 | 139 |
| 140 if (constant_stack_parameter_count == 0) { | 140 if (constant_stack_parameter_count == 0) { |
| 141 Register registers[] = { esi, edi, ebx }; | 141 Register registers[] = { esi, edi, ebx }; |
| 142 descriptor->Initialize(major, ARRAY_SIZE(registers), registers, | 142 descriptor->Initialize(major, arraysize(registers), registers, |
| 143 deopt_handler, NULL, constant_stack_parameter_count, | 143 deopt_handler, NULL, constant_stack_parameter_count, |
| 144 JS_FUNCTION_STUB_MODE); | 144 JS_FUNCTION_STUB_MODE); |
| 145 } else { | 145 } else { |
| 146 // stack param count needs (constructor pointer, and single argument) | 146 // stack param count needs (constructor pointer, and single argument) |
| 147 Register registers[] = { esi, edi, ebx, eax }; | 147 Register registers[] = { esi, edi, ebx, eax }; |
| 148 Representation representations[] = { | 148 Representation representations[] = { |
| 149 Representation::Tagged(), | 149 Representation::Tagged(), |
| 150 Representation::Tagged(), | 150 Representation::Tagged(), |
| 151 Representation::Tagged(), | 151 Representation::Tagged(), |
| 152 Representation::Integer32() }; | 152 Representation::Integer32() }; |
| 153 descriptor->Initialize(major, ARRAY_SIZE(registers), registers, eax, | 153 descriptor->Initialize(major, arraysize(registers), registers, eax, |
| 154 deopt_handler, representations, | 154 deopt_handler, representations, |
| 155 constant_stack_parameter_count, | 155 constant_stack_parameter_count, |
| 156 JS_FUNCTION_STUB_MODE, PASS_ARGUMENTS); | 156 JS_FUNCTION_STUB_MODE, PASS_ARGUMENTS); |
| 157 } | 157 } |
| 158 } | 158 } |
| 159 | 159 |
| 160 | 160 |
| 161 static void InitializeInternalArrayConstructorDescriptor( | 161 static void InitializeInternalArrayConstructorDescriptor( |
| 162 CodeStub::Major major, CodeStubInterfaceDescriptor* descriptor, | 162 CodeStub::Major major, CodeStubInterfaceDescriptor* descriptor, |
| 163 int constant_stack_parameter_count) { | 163 int constant_stack_parameter_count) { |
| 164 // register state | 164 // register state |
| 165 // eax -- number of arguments | 165 // eax -- number of arguments |
| 166 // edi -- constructor function | 166 // edi -- constructor function |
| 167 Address deopt_handler = Runtime::FunctionForId( | 167 Address deopt_handler = Runtime::FunctionForId( |
| 168 Runtime::kInternalArrayConstructor)->entry; | 168 Runtime::kInternalArrayConstructor)->entry; |
| 169 | 169 |
| 170 if (constant_stack_parameter_count == 0) { | 170 if (constant_stack_parameter_count == 0) { |
| 171 Register registers[] = { esi, edi }; | 171 Register registers[] = { esi, edi }; |
| 172 descriptor->Initialize(major, ARRAY_SIZE(registers), registers, | 172 descriptor->Initialize(major, arraysize(registers), registers, |
| 173 deopt_handler, NULL, constant_stack_parameter_count, | 173 deopt_handler, NULL, constant_stack_parameter_count, |
| 174 JS_FUNCTION_STUB_MODE); | 174 JS_FUNCTION_STUB_MODE); |
| 175 } else { | 175 } else { |
| 176 // stack param count needs (constructor pointer, and single argument) | 176 // stack param count needs (constructor pointer, and single argument) |
| 177 Register registers[] = { esi, edi, eax }; | 177 Register registers[] = { esi, edi, eax }; |
| 178 Representation representations[] = { | 178 Representation representations[] = { |
| 179 Representation::Tagged(), | 179 Representation::Tagged(), |
| 180 Representation::Tagged(), | 180 Representation::Tagged(), |
| 181 Representation::Integer32() }; | 181 Representation::Integer32() }; |
| 182 descriptor->Initialize(major, ARRAY_SIZE(registers), registers, eax, | 182 descriptor->Initialize(major, arraysize(registers), registers, eax, |
| 183 deopt_handler, representations, | 183 deopt_handler, representations, |
| 184 constant_stack_parameter_count, | 184 constant_stack_parameter_count, |
| 185 JS_FUNCTION_STUB_MODE, PASS_ARGUMENTS); | 185 JS_FUNCTION_STUB_MODE, PASS_ARGUMENTS); |
| 186 } | 186 } |
| 187 } | 187 } |
| 188 | 188 |
| 189 | 189 |
| 190 void ArrayNoArgumentConstructorStub::InitializeInterfaceDescriptor( | 190 void ArrayNoArgumentConstructorStub::InitializeInterfaceDescriptor( |
| 191 CodeStubInterfaceDescriptor* descriptor) { | 191 CodeStubInterfaceDescriptor* descriptor) { |
| 192 InitializeArrayConstructorDescriptor(isolate(), MajorKey(), descriptor, 0); | 192 InitializeArrayConstructorDescriptor(isolate(), MajorKey(), descriptor, 0); |
| (...skipping 26 matching lines...) Expand all Loading... |
| 219 | 219 |
| 220 void InternalArrayNArgumentsConstructorStub::InitializeInterfaceDescriptor( | 220 void InternalArrayNArgumentsConstructorStub::InitializeInterfaceDescriptor( |
| 221 CodeStubInterfaceDescriptor* descriptor) { | 221 CodeStubInterfaceDescriptor* descriptor) { |
| 222 InitializeInternalArrayConstructorDescriptor(MajorKey(), descriptor, -1); | 222 InitializeInternalArrayConstructorDescriptor(MajorKey(), descriptor, -1); |
| 223 } | 223 } |
| 224 | 224 |
| 225 | 225 |
| 226 void CompareNilICStub::InitializeInterfaceDescriptor( | 226 void CompareNilICStub::InitializeInterfaceDescriptor( |
| 227 CodeStubInterfaceDescriptor* descriptor) { | 227 CodeStubInterfaceDescriptor* descriptor) { |
| 228 Register registers[] = { esi, eax }; | 228 Register registers[] = { esi, eax }; |
| 229 descriptor->Initialize(MajorKey(), ARRAY_SIZE(registers), registers, | 229 descriptor->Initialize(MajorKey(), arraysize(registers), registers, |
| 230 FUNCTION_ADDR(CompareNilIC_Miss)); | 230 FUNCTION_ADDR(CompareNilIC_Miss)); |
| 231 descriptor->SetMissHandler( | 231 descriptor->SetMissHandler( |
| 232 ExternalReference(IC_Utility(IC::kCompareNilIC_Miss), isolate())); | 232 ExternalReference(IC_Utility(IC::kCompareNilIC_Miss), isolate())); |
| 233 } | 233 } |
| 234 | 234 |
| 235 void ToBooleanStub::InitializeInterfaceDescriptor( | 235 void ToBooleanStub::InitializeInterfaceDescriptor( |
| 236 CodeStubInterfaceDescriptor* descriptor) { | 236 CodeStubInterfaceDescriptor* descriptor) { |
| 237 Register registers[] = { esi, eax }; | 237 Register registers[] = { esi, eax }; |
| 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[] = { esi, edx, eax }; | 247 Register registers[] = { esi, edx, eax }; |
| 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[] = { esi, ecx, edx, eax }; | 257 Register registers[] = { esi, ecx, edx, eax }; |
| 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[] = { esi, edx, eax }; | 265 Register registers[] = { esi, edx, eax }; |
| 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[] = { esi, // context | 275 Register registers[] = { esi, // context |
| 276 edi, // JSFunction | 276 edi, // JSFunction |
| 277 eax, // actual number of arguments | 277 eax, // actual number of arguments |
| 278 ebx, // expected number of arguments | 278 ebx, // 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[] = { esi, // context | 291 Register registers[] = { esi, // context |
| 292 ecx, // key | 292 ecx, // 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[] = { esi, // context | 303 Register registers[] = { esi, // context |
| 304 ecx, // name | 304 ecx, // 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[] = { esi, // context | 315 Register registers[] = { esi, // context |
| 316 edx, // name | 316 edx, // name |
| 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[] = { esi, // context | 327 Register registers[] = { esi, // context |
| 328 eax, // callee | 328 eax, // callee |
| 329 ebx, // call_data | 329 ebx, // call_data |
| 330 ecx, // holder | 330 ecx, // holder |
| 331 edx, // api_function_address | 331 edx, // 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 4654 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5005 Operand(ebp, 7 * kPointerSize), | 5005 Operand(ebp, 7 * kPointerSize), |
| 5006 NULL); | 5006 NULL); |
| 5007 } | 5007 } |
| 5008 | 5008 |
| 5009 | 5009 |
| 5010 #undef __ | 5010 #undef __ |
| 5011 | 5011 |
| 5012 } } // namespace v8::internal | 5012 } } // namespace v8::internal |
| 5013 | 5013 |
| 5014 #endif // V8_TARGET_ARCH_IA32 | 5014 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |