| 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_MIPS | 7 #if V8_TARGET_ARCH_MIPS |
| 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[] = { cp, a2 }; | 24 Register registers[] = { cp, a2 }; |
| 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[] = { cp, a1 }; | 33 Register registers[] = { cp, a1 }; |
| 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[] = { cp, a0 }; | 40 Register registers[] = { cp, a0 }; |
| 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[] = { cp, a0 }; | 47 Register registers[] = { cp, a0 }; |
| 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[] = { cp, a3, a2, a1 }; | 56 Register registers[] = { cp, a3, a2, a1 }; |
| 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 descriptor->Initialize( | 62 descriptor->Initialize( |
| 63 MajorKey(), ARRAY_SIZE(registers), registers, | 63 MajorKey(), arraysize(registers), registers, |
| 64 Runtime::FunctionForId(Runtime::kCreateArrayLiteralStubBailout)->entry, | 64 Runtime::FunctionForId(Runtime::kCreateArrayLiteralStubBailout)->entry, |
| 65 representations); | 65 representations); |
| 66 } | 66 } |
| 67 | 67 |
| 68 | 68 |
| 69 void FastCloneShallowObjectStub::InitializeInterfaceDescriptor( | 69 void FastCloneShallowObjectStub::InitializeInterfaceDescriptor( |
| 70 CodeStubInterfaceDescriptor* descriptor) { | 70 CodeStubInterfaceDescriptor* descriptor) { |
| 71 Register registers[] = { cp, a3, a2, a1, a0 }; | 71 Register registers[] = { cp, a3, a2, a1, a0 }; |
| 72 descriptor->Initialize( | 72 descriptor->Initialize( |
| 73 MajorKey(), ARRAY_SIZE(registers), registers, | 73 MajorKey(), arraysize(registers), registers, |
| 74 Runtime::FunctionForId(Runtime::kCreateObjectLiteral)->entry); | 74 Runtime::FunctionForId(Runtime::kCreateObjectLiteral)->entry); |
| 75 } | 75 } |
| 76 | 76 |
| 77 | 77 |
| 78 void CreateAllocationSiteStub::InitializeInterfaceDescriptor( | 78 void CreateAllocationSiteStub::InitializeInterfaceDescriptor( |
| 79 CodeStubInterfaceDescriptor* descriptor) { | 79 CodeStubInterfaceDescriptor* descriptor) { |
| 80 Register registers[] = { cp, a2, a3 }; | 80 Register registers[] = { cp, a2, a3 }; |
| 81 descriptor->Initialize(MajorKey(), ARRAY_SIZE(registers), registers); | 81 descriptor->Initialize(MajorKey(), arraysize(registers), registers); |
| 82 } | 82 } |
| 83 | 83 |
| 84 | 84 |
| 85 void CallFunctionStub::InitializeInterfaceDescriptor( | 85 void CallFunctionStub::InitializeInterfaceDescriptor( |
| 86 CodeStubInterfaceDescriptor* descriptor) { | 86 CodeStubInterfaceDescriptor* descriptor) { |
| 87 UNIMPLEMENTED(); | 87 UNIMPLEMENTED(); |
| 88 } | 88 } |
| 89 | 89 |
| 90 | 90 |
| 91 void CallConstructStub::InitializeInterfaceDescriptor( | 91 void CallConstructStub::InitializeInterfaceDescriptor( |
| 92 CodeStubInterfaceDescriptor* descriptor) { | 92 CodeStubInterfaceDescriptor* descriptor) { |
| 93 UNIMPLEMENTED(); | 93 UNIMPLEMENTED(); |
| 94 } | 94 } |
| 95 | 95 |
| 96 | 96 |
| 97 void RegExpConstructResultStub::InitializeInterfaceDescriptor( | 97 void RegExpConstructResultStub::InitializeInterfaceDescriptor( |
| 98 CodeStubInterfaceDescriptor* descriptor) { | 98 CodeStubInterfaceDescriptor* descriptor) { |
| 99 Register registers[] = { cp, a2, a1, a0 }; | 99 Register registers[] = { cp, a2, a1, a0 }; |
| 100 descriptor->Initialize( | 100 descriptor->Initialize( |
| 101 MajorKey(), ARRAY_SIZE(registers), registers, | 101 MajorKey(), arraysize(registers), registers, |
| 102 Runtime::FunctionForId(Runtime::kRegExpConstructResult)->entry); | 102 Runtime::FunctionForId(Runtime::kRegExpConstructResult)->entry); |
| 103 } | 103 } |
| 104 | 104 |
| 105 | 105 |
| 106 void TransitionElementsKindStub::InitializeInterfaceDescriptor( | 106 void TransitionElementsKindStub::InitializeInterfaceDescriptor( |
| 107 CodeStubInterfaceDescriptor* descriptor) { | 107 CodeStubInterfaceDescriptor* descriptor) { |
| 108 Register registers[] = { cp, a0, a1 }; | 108 Register registers[] = { cp, a0, a1 }; |
| 109 Address entry = | 109 Address entry = |
| 110 Runtime::FunctionForId(Runtime::kTransitionElementsKind)->entry; | 110 Runtime::FunctionForId(Runtime::kTransitionElementsKind)->entry; |
| 111 descriptor->Initialize(MajorKey(), ARRAY_SIZE(registers), registers, | 111 descriptor->Initialize(MajorKey(), arraysize(registers), registers, |
| 112 FUNCTION_ADDR(entry)); | 112 FUNCTION_ADDR(entry)); |
| 113 } | 113 } |
| 114 | 114 |
| 115 | 115 |
| 116 void CompareNilICStub::InitializeInterfaceDescriptor( | 116 void CompareNilICStub::InitializeInterfaceDescriptor( |
| 117 CodeStubInterfaceDescriptor* descriptor) { | 117 CodeStubInterfaceDescriptor* descriptor) { |
| 118 Register registers[] = { cp, a0 }; | 118 Register registers[] = { cp, a0 }; |
| 119 descriptor->Initialize(MajorKey(), ARRAY_SIZE(registers), registers, | 119 descriptor->Initialize(MajorKey(), arraysize(registers), registers, |
| 120 FUNCTION_ADDR(CompareNilIC_Miss)); | 120 FUNCTION_ADDR(CompareNilIC_Miss)); |
| 121 descriptor->SetMissHandler( | 121 descriptor->SetMissHandler( |
| 122 ExternalReference(IC_Utility(IC::kCompareNilIC_Miss), isolate())); | 122 ExternalReference(IC_Utility(IC::kCompareNilIC_Miss), isolate())); |
| 123 } | 123 } |
| 124 | 124 |
| 125 | 125 |
| 126 const Register InterfaceDescriptor::ContextRegister() { return cp; } | 126 const Register InterfaceDescriptor::ContextRegister() { return cp; } |
| 127 | 127 |
| 128 | 128 |
| 129 static void InitializeArrayConstructorDescriptor( | 129 static void InitializeArrayConstructorDescriptor( |
| 130 CodeStub::Major major, CodeStubInterfaceDescriptor* descriptor, | 130 CodeStub::Major major, CodeStubInterfaceDescriptor* descriptor, |
| 131 int constant_stack_parameter_count) { | 131 int constant_stack_parameter_count) { |
| 132 // register state | 132 // register state |
| 133 // cp -- context | 133 // cp -- context |
| 134 // a0 -- number of arguments | 134 // a0 -- number of arguments |
| 135 // a1 -- function | 135 // a1 -- function |
| 136 // a2 -- allocation site with elements kind | 136 // a2 -- 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[] = { cp, a1, a2 }; | 141 Register registers[] = { cp, a1, a2 }; |
| 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[] = { cp, a1, a2, a0 }; | 147 Register registers[] = { cp, a1, a2, a0 }; |
| 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, a0, | 153 descriptor->Initialize(major, arraysize(registers), registers, a0, |
| 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 // cp -- context | 165 // cp -- context |
| 166 // a0 -- number of arguments | 166 // a0 -- number of arguments |
| 167 // a1 -- constructor function | 167 // a1 -- constructor function |
| 168 Address deopt_handler = Runtime::FunctionForId( | 168 Address deopt_handler = Runtime::FunctionForId( |
| 169 Runtime::kInternalArrayConstructor)->entry; | 169 Runtime::kInternalArrayConstructor)->entry; |
| 170 | 170 |
| 171 if (constant_stack_parameter_count == 0) { | 171 if (constant_stack_parameter_count == 0) { |
| 172 Register registers[] = { cp, a1 }; | 172 Register registers[] = { cp, a1 }; |
| 173 descriptor->Initialize(major, ARRAY_SIZE(registers), registers, | 173 descriptor->Initialize(major, arraysize(registers), registers, |
| 174 deopt_handler, NULL, constant_stack_parameter_count, | 174 deopt_handler, NULL, constant_stack_parameter_count, |
| 175 JS_FUNCTION_STUB_MODE); | 175 JS_FUNCTION_STUB_MODE); |
| 176 } else { | 176 } else { |
| 177 // stack param count needs (constructor pointer, and single argument) | 177 // stack param count needs (constructor pointer, and single argument) |
| 178 Register registers[] = { cp, a1, a0 }; | 178 Register registers[] = { cp, a1, a0 }; |
| 179 Representation representations[] = { | 179 Representation representations[] = { |
| 180 Representation::Tagged(), | 180 Representation::Tagged(), |
| 181 Representation::Tagged(), | 181 Representation::Tagged(), |
| 182 Representation::Integer32() }; | 182 Representation::Integer32() }; |
| 183 descriptor->Initialize(major, ARRAY_SIZE(registers), registers, a0, | 183 descriptor->Initialize(major, arraysize(registers), registers, a0, |
| 184 deopt_handler, representations, | 184 deopt_handler, representations, |
| 185 constant_stack_parameter_count, | 185 constant_stack_parameter_count, |
| 186 JS_FUNCTION_STUB_MODE, PASS_ARGUMENTS); | 186 JS_FUNCTION_STUB_MODE, PASS_ARGUMENTS); |
| 187 } | 187 } |
| 188 } | 188 } |
| 189 | 189 |
| 190 | 190 |
| 191 void ArrayNoArgumentConstructorStub::InitializeInterfaceDescriptor( | 191 void ArrayNoArgumentConstructorStub::InitializeInterfaceDescriptor( |
| 192 CodeStubInterfaceDescriptor* descriptor) { | 192 CodeStubInterfaceDescriptor* descriptor) { |
| 193 InitializeArrayConstructorDescriptor(MajorKey(), descriptor, 0); | 193 InitializeArrayConstructorDescriptor(MajorKey(), descriptor, 0); |
| 194 } | 194 } |
| 195 | 195 |
| 196 | 196 |
| 197 void ArraySingleArgumentConstructorStub::InitializeInterfaceDescriptor( | 197 void ArraySingleArgumentConstructorStub::InitializeInterfaceDescriptor( |
| 198 CodeStubInterfaceDescriptor* descriptor) { | 198 CodeStubInterfaceDescriptor* descriptor) { |
| 199 InitializeArrayConstructorDescriptor(MajorKey(), descriptor, 1); | 199 InitializeArrayConstructorDescriptor(MajorKey(), descriptor, 1); |
| 200 } | 200 } |
| 201 | 201 |
| 202 | 202 |
| 203 void ArrayNArgumentsConstructorStub::InitializeInterfaceDescriptor( | 203 void ArrayNArgumentsConstructorStub::InitializeInterfaceDescriptor( |
| 204 CodeStubInterfaceDescriptor* descriptor) { | 204 CodeStubInterfaceDescriptor* descriptor) { |
| 205 InitializeArrayConstructorDescriptor(MajorKey(), descriptor, -1); | 205 InitializeArrayConstructorDescriptor(MajorKey(), descriptor, -1); |
| 206 } | 206 } |
| 207 | 207 |
| 208 | 208 |
| 209 void ToBooleanStub::InitializeInterfaceDescriptor( | 209 void ToBooleanStub::InitializeInterfaceDescriptor( |
| 210 CodeStubInterfaceDescriptor* descriptor) { | 210 CodeStubInterfaceDescriptor* descriptor) { |
| 211 Register registers[] = { cp, a0 }; | 211 Register registers[] = { cp, a0 }; |
| 212 descriptor->Initialize(MajorKey(), ARRAY_SIZE(registers), registers, | 212 descriptor->Initialize(MajorKey(), arraysize(registers), registers, |
| 213 FUNCTION_ADDR(ToBooleanIC_Miss)); | 213 FUNCTION_ADDR(ToBooleanIC_Miss)); |
| 214 descriptor->SetMissHandler( | 214 descriptor->SetMissHandler( |
| 215 ExternalReference(IC_Utility(IC::kToBooleanIC_Miss), isolate())); | 215 ExternalReference(IC_Utility(IC::kToBooleanIC_Miss), isolate())); |
| 216 } | 216 } |
| 217 | 217 |
| 218 | 218 |
| 219 void InternalArrayNoArgumentConstructorStub::InitializeInterfaceDescriptor( | 219 void InternalArrayNoArgumentConstructorStub::InitializeInterfaceDescriptor( |
| 220 CodeStubInterfaceDescriptor* descriptor) { | 220 CodeStubInterfaceDescriptor* descriptor) { |
| 221 InitializeInternalArrayConstructorDescriptor(MajorKey(), descriptor, 0); | 221 InitializeInternalArrayConstructorDescriptor(MajorKey(), descriptor, 0); |
| 222 } | 222 } |
| 223 | 223 |
| 224 | 224 |
| 225 void InternalArraySingleArgumentConstructorStub::InitializeInterfaceDescriptor( | 225 void InternalArraySingleArgumentConstructorStub::InitializeInterfaceDescriptor( |
| 226 CodeStubInterfaceDescriptor* descriptor) { | 226 CodeStubInterfaceDescriptor* descriptor) { |
| 227 InitializeInternalArrayConstructorDescriptor(MajorKey(), descriptor, 1); | 227 InitializeInternalArrayConstructorDescriptor(MajorKey(), descriptor, 1); |
| 228 } | 228 } |
| 229 | 229 |
| 230 | 230 |
| 231 void InternalArrayNArgumentsConstructorStub::InitializeInterfaceDescriptor( | 231 void InternalArrayNArgumentsConstructorStub::InitializeInterfaceDescriptor( |
| 232 CodeStubInterfaceDescriptor* descriptor) { | 232 CodeStubInterfaceDescriptor* descriptor) { |
| 233 InitializeInternalArrayConstructorDescriptor(MajorKey(), descriptor, -1); | 233 InitializeInternalArrayConstructorDescriptor(MajorKey(), descriptor, -1); |
| 234 } | 234 } |
| 235 | 235 |
| 236 | 236 |
| 237 void BinaryOpICStub::InitializeInterfaceDescriptor( | 237 void BinaryOpICStub::InitializeInterfaceDescriptor( |
| 238 CodeStubInterfaceDescriptor* descriptor) { | 238 CodeStubInterfaceDescriptor* descriptor) { |
| 239 Register registers[] = { cp, a1, a0 }; | 239 Register registers[] = { cp, a1, a0 }; |
| 240 descriptor->Initialize(MajorKey(), ARRAY_SIZE(registers), registers, | 240 descriptor->Initialize(MajorKey(), arraysize(registers), registers, |
| 241 FUNCTION_ADDR(BinaryOpIC_Miss)); | 241 FUNCTION_ADDR(BinaryOpIC_Miss)); |
| 242 descriptor->SetMissHandler( | 242 descriptor->SetMissHandler( |
| 243 ExternalReference(IC_Utility(IC::kBinaryOpIC_Miss), isolate())); | 243 ExternalReference(IC_Utility(IC::kBinaryOpIC_Miss), isolate())); |
| 244 } | 244 } |
| 245 | 245 |
| 246 | 246 |
| 247 void BinaryOpWithAllocationSiteStub::InitializeInterfaceDescriptor( | 247 void BinaryOpWithAllocationSiteStub::InitializeInterfaceDescriptor( |
| 248 CodeStubInterfaceDescriptor* descriptor) { | 248 CodeStubInterfaceDescriptor* descriptor) { |
| 249 Register registers[] = { cp, a2, a1, a0 }; | 249 Register registers[] = { cp, a2, a1, a0 }; |
| 250 descriptor->Initialize(MajorKey(), ARRAY_SIZE(registers), registers, | 250 descriptor->Initialize(MajorKey(), arraysize(registers), registers, |
| 251 FUNCTION_ADDR(BinaryOpIC_MissWithAllocationSite)); | 251 FUNCTION_ADDR(BinaryOpIC_MissWithAllocationSite)); |
| 252 } | 252 } |
| 253 | 253 |
| 254 | 254 |
| 255 void StringAddStub::InitializeInterfaceDescriptor( | 255 void StringAddStub::InitializeInterfaceDescriptor( |
| 256 CodeStubInterfaceDescriptor* descriptor) { | 256 CodeStubInterfaceDescriptor* descriptor) { |
| 257 Register registers[] = { cp, a1, a0 }; | 257 Register registers[] = { cp, a1, a0 }; |
| 258 descriptor->Initialize(MajorKey(), ARRAY_SIZE(registers), registers, | 258 descriptor->Initialize(MajorKey(), arraysize(registers), registers, |
| 259 Runtime::FunctionForId(Runtime::kStringAdd)->entry); | 259 Runtime::FunctionForId(Runtime::kStringAdd)->entry); |
| 260 } | 260 } |
| 261 | 261 |
| 262 | 262 |
| 263 void CallDescriptors::InitializeForIsolate(Isolate* isolate) { | 263 void CallDescriptors::InitializeForIsolate(Isolate* isolate) { |
| 264 { | 264 { |
| 265 CallInterfaceDescriptor* descriptor = | 265 CallInterfaceDescriptor* descriptor = |
| 266 isolate->call_descriptor(Isolate::ArgumentAdaptorCall); | 266 isolate->call_descriptor(Isolate::ArgumentAdaptorCall); |
| 267 Register registers[] = { cp, // context, | 267 Register registers[] = { cp, // context, |
| 268 a1, // JSFunction | 268 a1, // JSFunction |
| 269 a0, // actual number of arguments | 269 a0, // actual number of arguments |
| 270 a2, // expected number of arguments | 270 a2, // expected number of arguments |
| 271 }; | 271 }; |
| 272 Representation representations[] = { | 272 Representation representations[] = { |
| 273 Representation::Tagged(), // context | 273 Representation::Tagged(), // context |
| 274 Representation::Tagged(), // JSFunction | 274 Representation::Tagged(), // JSFunction |
| 275 Representation::Integer32(), // actual number of arguments | 275 Representation::Integer32(), // actual number of arguments |
| 276 Representation::Integer32(), // expected number of arguments | 276 Representation::Integer32(), // expected number of arguments |
| 277 }; | 277 }; |
| 278 descriptor->Initialize(ARRAY_SIZE(registers), registers, representations); | 278 descriptor->Initialize(arraysize(registers), registers, representations); |
| 279 } | 279 } |
| 280 { | 280 { |
| 281 CallInterfaceDescriptor* descriptor = | 281 CallInterfaceDescriptor* descriptor = |
| 282 isolate->call_descriptor(Isolate::KeyedCall); | 282 isolate->call_descriptor(Isolate::KeyedCall); |
| 283 Register registers[] = { cp, // context | 283 Register registers[] = { cp, // context |
| 284 a2, // key | 284 a2, // key |
| 285 }; | 285 }; |
| 286 Representation representations[] = { | 286 Representation representations[] = { |
| 287 Representation::Tagged(), // context | 287 Representation::Tagged(), // context |
| 288 Representation::Tagged(), // key | 288 Representation::Tagged(), // key |
| 289 }; | 289 }; |
| 290 descriptor->Initialize(ARRAY_SIZE(registers), registers, representations); | 290 descriptor->Initialize(arraysize(registers), registers, representations); |
| 291 } | 291 } |
| 292 { | 292 { |
| 293 CallInterfaceDescriptor* descriptor = | 293 CallInterfaceDescriptor* descriptor = |
| 294 isolate->call_descriptor(Isolate::NamedCall); | 294 isolate->call_descriptor(Isolate::NamedCall); |
| 295 Register registers[] = { cp, // context | 295 Register registers[] = { cp, // context |
| 296 a2, // name | 296 a2, // name |
| 297 }; | 297 }; |
| 298 Representation representations[] = { | 298 Representation representations[] = { |
| 299 Representation::Tagged(), // context | 299 Representation::Tagged(), // context |
| 300 Representation::Tagged(), // name | 300 Representation::Tagged(), // name |
| 301 }; | 301 }; |
| 302 descriptor->Initialize(ARRAY_SIZE(registers), registers, representations); | 302 descriptor->Initialize(arraysize(registers), registers, representations); |
| 303 } | 303 } |
| 304 { | 304 { |
| 305 CallInterfaceDescriptor* descriptor = | 305 CallInterfaceDescriptor* descriptor = |
| 306 isolate->call_descriptor(Isolate::CallHandler); | 306 isolate->call_descriptor(Isolate::CallHandler); |
| 307 Register registers[] = { cp, // context | 307 Register registers[] = { cp, // context |
| 308 a0, // receiver | 308 a0, // receiver |
| 309 }; | 309 }; |
| 310 Representation representations[] = { | 310 Representation representations[] = { |
| 311 Representation::Tagged(), // context | 311 Representation::Tagged(), // context |
| 312 Representation::Tagged(), // receiver | 312 Representation::Tagged(), // receiver |
| 313 }; | 313 }; |
| 314 descriptor->Initialize(ARRAY_SIZE(registers), registers, representations); | 314 descriptor->Initialize(arraysize(registers), registers, representations); |
| 315 } | 315 } |
| 316 { | 316 { |
| 317 CallInterfaceDescriptor* descriptor = | 317 CallInterfaceDescriptor* descriptor = |
| 318 isolate->call_descriptor(Isolate::ApiFunctionCall); | 318 isolate->call_descriptor(Isolate::ApiFunctionCall); |
| 319 Register registers[] = { cp, // context | 319 Register registers[] = { cp, // context |
| 320 a0, // callee | 320 a0, // callee |
| 321 t0, // call_data | 321 t0, // call_data |
| 322 a2, // holder | 322 a2, // holder |
| 323 a1, // api_function_address | 323 a1, // api_function_address |
| 324 }; | 324 }; |
| 325 Representation representations[] = { | 325 Representation representations[] = { |
| 326 Representation::Tagged(), // context | 326 Representation::Tagged(), // context |
| 327 Representation::Tagged(), // callee | 327 Representation::Tagged(), // callee |
| 328 Representation::Tagged(), // call_data | 328 Representation::Tagged(), // call_data |
| 329 Representation::Tagged(), // holder | 329 Representation::Tagged(), // holder |
| 330 Representation::External(), // api_function_address | 330 Representation::External(), // api_function_address |
| 331 }; | 331 }; |
| 332 descriptor->Initialize(ARRAY_SIZE(registers), registers, representations); | 332 descriptor->Initialize(arraysize(registers), registers, representations); |
| 333 } | 333 } |
| 334 } | 334 } |
| 335 | 335 |
| 336 | 336 |
| 337 #define __ ACCESS_MASM(masm) | 337 #define __ ACCESS_MASM(masm) |
| 338 | 338 |
| 339 | 339 |
| 340 static void EmitIdenticalObjectComparison(MacroAssembler* masm, | 340 static void EmitIdenticalObjectComparison(MacroAssembler* masm, |
| 341 Label* slow, | 341 Label* slow, |
| 342 Condition cc); | 342 Condition cc); |
| (...skipping 4943 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5286 MemOperand(fp, 6 * kPointerSize), | 5286 MemOperand(fp, 6 * kPointerSize), |
| 5287 NULL); | 5287 NULL); |
| 5288 } | 5288 } |
| 5289 | 5289 |
| 5290 | 5290 |
| 5291 #undef __ | 5291 #undef __ |
| 5292 | 5292 |
| 5293 } } // namespace v8::internal | 5293 } } // namespace v8::internal |
| 5294 | 5294 |
| 5295 #endif // V8_TARGET_ARCH_MIPS | 5295 #endif // V8_TARGET_ARCH_MIPS |
| OLD | NEW |