Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Side by Side Diff: src/mips/interface-descriptors-mips.cc

Issue 1197703002: Use big-boy Types to annotate interface descriptor parameters (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Latest Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/isolate.h ('k') | src/mips64/interface-descriptors-mips64.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/interface-descriptors.h" 9 #include "src/interface-descriptors.h"
10 10
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 55
56 const Register MathPowIntegerDescriptor::exponent() { 56 const Register MathPowIntegerDescriptor::exponent() {
57 return MathPowTaggedDescriptor::exponent(); 57 return MathPowTaggedDescriptor::exponent();
58 } 58 }
59 59
60 60
61 const Register GrowArrayElementsDescriptor::ObjectRegister() { return a0; } 61 const Register GrowArrayElementsDescriptor::ObjectRegister() { return a0; }
62 const Register GrowArrayElementsDescriptor::KeyRegister() { return a3; } 62 const Register GrowArrayElementsDescriptor::KeyRegister() { return a3; }
63 63
64 64
65 void FastNewClosureDescriptor::Initialize(CallInterfaceDescriptorData* data) { 65 void FastNewClosureDescriptor::InitializePlatformSpecific(
66 CallInterfaceDescriptorData* data) {
66 Register registers[] = {cp, a2}; 67 Register registers[] = {cp, a2};
67 data->Initialize(arraysize(registers), registers, NULL); 68 data->InitializePlatformSpecific(arraysize(registers), registers, NULL);
68 } 69 }
69 70
70 71
71 void FastNewContextDescriptor::Initialize(CallInterfaceDescriptorData* data) { 72 void FastNewContextDescriptor::InitializePlatformSpecific(
73 CallInterfaceDescriptorData* data) {
72 Register registers[] = {cp, a1}; 74 Register registers[] = {cp, a1};
73 data->Initialize(arraysize(registers), registers, NULL); 75 data->InitializePlatformSpecific(arraysize(registers), registers, NULL);
74 } 76 }
75 77
76 78
77 void ToNumberDescriptor::Initialize(CallInterfaceDescriptorData* data) { 79 void ToNumberDescriptor::InitializePlatformSpecific(
80 CallInterfaceDescriptorData* data) {
78 Register registers[] = {cp, a0}; 81 Register registers[] = {cp, a0};
79 data->Initialize(arraysize(registers), registers, NULL); 82 data->InitializePlatformSpecific(arraysize(registers), registers, NULL);
80 } 83 }
81 84
82 85
83 void NumberToStringDescriptor::Initialize(CallInterfaceDescriptorData* data) { 86 void NumberToStringDescriptor::InitializePlatformSpecific(
87 CallInterfaceDescriptorData* data) {
84 Register registers[] = {cp, a0}; 88 Register registers[] = {cp, a0};
85 data->Initialize(arraysize(registers), registers, NULL); 89 data->InitializePlatformSpecific(arraysize(registers), registers, NULL);
86 } 90 }
87 91
88 92
89 void TypeofDescriptor::Initialize(CallInterfaceDescriptorData* data) { 93 void TypeofDescriptor::InitializePlatformSpecific(
94 CallInterfaceDescriptorData* data) {
90 Register registers[] = {cp, a3}; 95 Register registers[] = {cp, a3};
91 data->Initialize(arraysize(registers), registers, NULL); 96 data->InitializePlatformSpecific(arraysize(registers), registers, NULL);
92 } 97 }
93 98
94 99
95 void FastCloneShallowArrayDescriptor::Initialize( 100 void FastCloneShallowArrayDescriptor::InitializePlatformSpecific(
96 CallInterfaceDescriptorData* data) { 101 CallInterfaceDescriptorData* data) {
97 Register registers[] = {cp, a3, a2, a1}; 102 Register registers[] = {cp, a3, a2, a1};
98 Representation representations[] = { 103 data->InitializePlatformSpecific(arraysize(registers), registers);
99 Representation::Tagged(), Representation::Tagged(), Representation::Smi(),
100 Representation::Tagged()};
101 data->Initialize(arraysize(registers), registers, representations);
102 } 104 }
103 105
104 106
105 void FastCloneShallowObjectDescriptor::Initialize( 107 void FastCloneShallowObjectDescriptor::InitializePlatformSpecific(
106 CallInterfaceDescriptorData* data) { 108 CallInterfaceDescriptorData* data) {
107 Register registers[] = {cp, a3, a2, a1, a0}; 109 Register registers[] = {cp, a3, a2, a1, a0};
108 data->Initialize(arraysize(registers), registers, NULL); 110 data->InitializePlatformSpecific(arraysize(registers), registers, NULL);
109 } 111 }
110 112
111 113
112 void CreateAllocationSiteDescriptor::Initialize( 114 void CreateAllocationSiteDescriptor::InitializePlatformSpecific(
113 CallInterfaceDescriptorData* data) { 115 CallInterfaceDescriptorData* data) {
114 Register registers[] = {cp, a2, a3}; 116 Register registers[] = {cp, a2, a3};
115 Representation representations[] = {Representation::Tagged(), 117 data->InitializePlatformSpecific(arraysize(registers), registers);
116 Representation::Tagged(),
117 Representation::Smi()};
118 data->Initialize(arraysize(registers), registers, representations);
119 } 118 }
120 119
121 120
122 void CreateWeakCellDescriptor::Initialize(CallInterfaceDescriptorData* data) { 121 void CreateWeakCellDescriptor::InitializePlatformSpecific(
122 CallInterfaceDescriptorData* data) {
123 Register registers[] = {cp, a2, a3, a1}; 123 Register registers[] = {cp, a2, a3, a1};
124 Representation representations[] = { 124 data->InitializePlatformSpecific(arraysize(registers), registers);
125 Representation::Tagged(), Representation::Tagged(), Representation::Smi(),
126 Representation::Tagged()};
127 data->Initialize(arraysize(registers), registers, representations);
128 } 125 }
129 126
130 127
131 void StoreArrayLiteralElementDescriptor::Initialize( 128 void StoreArrayLiteralElementDescriptor::InitializePlatformSpecific(
132 CallInterfaceDescriptorData* data) { 129 CallInterfaceDescriptorData* data) {
133 Register registers[] = {cp, a3, a0}; 130 Register registers[] = {cp, a3, a0};
134 data->Initialize(arraysize(registers), registers, NULL); 131 data->InitializePlatformSpecific(arraysize(registers), registers, NULL);
135 } 132 }
136 133
137 134
138 void CallFunctionDescriptor::Initialize(CallInterfaceDescriptorData* data) { 135 void CallFunctionDescriptor::InitializePlatformSpecific(
136 CallInterfaceDescriptorData* data) {
139 Register registers[] = {cp, a1}; 137 Register registers[] = {cp, a1};
140 data->Initialize(arraysize(registers), registers, NULL); 138 data->InitializePlatformSpecific(arraysize(registers), registers, NULL);
141 } 139 }
142 140
143 141
144 void CallFunctionWithFeedbackDescriptor::Initialize( 142 void CallFunctionWithFeedbackDescriptor::InitializePlatformSpecific(
145 CallInterfaceDescriptorData* data) { 143 CallInterfaceDescriptorData* data) {
146 Register registers[] = {cp, a1, a3}; 144 Register registers[] = {cp, a1, a3};
147 Representation representations[] = {Representation::Tagged(), 145 data->InitializePlatformSpecific(arraysize(registers), registers);
148 Representation::Tagged(),
149 Representation::Smi()};
150 data->Initialize(arraysize(registers), registers, representations);
151 } 146 }
152 147
153 148
154 void CallFunctionWithFeedbackAndVectorDescriptor::Initialize( 149 void CallFunctionWithFeedbackAndVectorDescriptor::InitializePlatformSpecific(
155 CallInterfaceDescriptorData* data) { 150 CallInterfaceDescriptorData* data) {
156 Register registers[] = {cp, a1, a3, a2}; 151 Register registers[] = {cp, a1, a3, a2};
157 Representation representations[] = { 152 data->InitializePlatformSpecific(arraysize(registers), registers);
158 Representation::Tagged(), Representation::Tagged(), Representation::Smi(),
159 Representation::Tagged()};
160 data->Initialize(arraysize(registers), registers, representations);
161 } 153 }
162 154
163 155
164 void CallConstructDescriptor::Initialize(CallInterfaceDescriptorData* data) { 156 void CallConstructDescriptor::InitializePlatformSpecific(
157 CallInterfaceDescriptorData* data) {
165 // a0 : number of arguments 158 // a0 : number of arguments
166 // a1 : the function to call 159 // a1 : the function to call
167 // a2 : feedback vector 160 // a2 : feedback vector
168 // a3 : (only if a2 is not the megamorphic symbol) slot in feedback 161 // a3 : (only if a2 is not the megamorphic symbol) slot in feedback
169 // vector (Smi) 162 // vector (Smi)
170 // TODO(turbofan): So far we don't gather type feedback and hence skip the 163 // TODO(turbofan): So far we don't gather type feedback and hence skip the
171 // slot parameter, but ArrayConstructStub needs the vector to be undefined. 164 // slot parameter, but ArrayConstructStub needs the vector to be undefined.
172 Register registers[] = {cp, a0, a1, a2}; 165 Register registers[] = {cp, a0, a1, a2};
173 data->Initialize(arraysize(registers), registers, NULL); 166 data->InitializePlatformSpecific(arraysize(registers), registers, NULL);
174 } 167 }
175 168
176 169
177 void RegExpConstructResultDescriptor::Initialize( 170 void RegExpConstructResultDescriptor::InitializePlatformSpecific(
178 CallInterfaceDescriptorData* data) { 171 CallInterfaceDescriptorData* data) {
179 Register registers[] = {cp, a2, a1, a0}; 172 Register registers[] = {cp, a2, a1, a0};
180 data->Initialize(arraysize(registers), registers, NULL); 173 data->InitializePlatformSpecific(arraysize(registers), registers, NULL);
181 } 174 }
182 175
183 176
184 void TransitionElementsKindDescriptor::Initialize( 177 void TransitionElementsKindDescriptor::InitializePlatformSpecific(
185 CallInterfaceDescriptorData* data) { 178 CallInterfaceDescriptorData* data) {
186 Register registers[] = {cp, a0, a1}; 179 Register registers[] = {cp, a0, a1};
187 data->Initialize(arraysize(registers), registers, NULL); 180 data->InitializePlatformSpecific(arraysize(registers), registers, NULL);
188 } 181 }
189 182
190 183
191 void AllocateHeapNumberDescriptor::Initialize( 184 void AllocateHeapNumberDescriptor::InitializePlatformSpecific(
192 CallInterfaceDescriptorData* data) { 185 CallInterfaceDescriptorData* data) {
193 // register state 186 // register state
194 // cp -- context 187 // cp -- context
195 Register registers[] = {cp}; 188 Register registers[] = {cp};
196 data->Initialize(arraysize(registers), registers, nullptr); 189 data->InitializePlatformSpecific(arraysize(registers), registers, nullptr);
197 } 190 }
198 191
199 192
200 void ArrayConstructorConstantArgCountDescriptor::Initialize( 193 void ArrayConstructorConstantArgCountDescriptor::InitializePlatformSpecific(
201 CallInterfaceDescriptorData* data) { 194 CallInterfaceDescriptorData* data) {
202 // register state 195 // register state
203 // cp -- context 196 // cp -- context
204 // a0 -- number of arguments 197 // a0 -- number of arguments
205 // a1 -- function 198 // a1 -- function
206 // a2 -- allocation site with elements kind 199 // a2 -- allocation site with elements kind
207 Register registers[] = {cp, a1, a2}; 200 Register registers[] = {cp, a1, a2};
208 data->Initialize(arraysize(registers), registers, NULL); 201 data->InitializePlatformSpecific(arraysize(registers), registers, NULL);
209 } 202 }
210 203
211 204
212 void ArrayConstructorDescriptor::Initialize(CallInterfaceDescriptorData* data) { 205 void ArrayConstructorDescriptor::InitializePlatformSpecific(
206 CallInterfaceDescriptorData* data) {
213 // stack param count needs (constructor pointer, and single argument) 207 // stack param count needs (constructor pointer, and single argument)
214 Register registers[] = {cp, a1, a2, a0}; 208 Register registers[] = {cp, a1, a2, a0};
215 Representation representations[] = { 209 data->InitializePlatformSpecific(arraysize(registers), registers);
216 Representation::Tagged(), Representation::Tagged(),
217 Representation::Tagged(), Representation::Integer32()};
218 data->Initialize(arraysize(registers), registers, representations);
219 } 210 }
220 211
221 212
222 void InternalArrayConstructorConstantArgCountDescriptor::Initialize( 213 void InternalArrayConstructorConstantArgCountDescriptor::
223 CallInterfaceDescriptorData* data) { 214 InitializePlatformSpecific(CallInterfaceDescriptorData* data) {
224 // register state 215 // register state
225 // cp -- context 216 // cp -- context
226 // a0 -- number of arguments 217 // a0 -- number of arguments
227 // a1 -- constructor function 218 // a1 -- constructor function
228 Register registers[] = {cp, a1}; 219 Register registers[] = {cp, a1};
229 data->Initialize(arraysize(registers), registers, NULL); 220 data->InitializePlatformSpecific(arraysize(registers), registers, NULL);
230 } 221 }
231 222
232 223
233 void InternalArrayConstructorDescriptor::Initialize( 224 void InternalArrayConstructorDescriptor::InitializePlatformSpecific(
234 CallInterfaceDescriptorData* data) { 225 CallInterfaceDescriptorData* data) {
235 // stack param count needs (constructor pointer, and single argument) 226 // stack param count needs (constructor pointer, and single argument)
236 Register registers[] = {cp, a1, a0}; 227 Register registers[] = {cp, a1, a0};
237 Representation representations[] = {Representation::Tagged(), 228 data->InitializePlatformSpecific(arraysize(registers), registers);
238 Representation::Tagged(),
239 Representation::Integer32()};
240 data->Initialize(arraysize(registers), registers, representations);
241 } 229 }
242 230
243 231
244 void CompareDescriptor::Initialize(CallInterfaceDescriptorData* data) { 232 void CompareDescriptor::InitializePlatformSpecific(
233 CallInterfaceDescriptorData* data) {
245 Register registers[] = {cp, a1, a0}; 234 Register registers[] = {cp, a1, a0};
246 data->Initialize(arraysize(registers), registers, NULL); 235 data->InitializePlatformSpecific(arraysize(registers), registers, NULL);
247 } 236 }
248 237
249 238
250 void CompareNilDescriptor::Initialize(CallInterfaceDescriptorData* data) { 239 void CompareNilDescriptor::InitializePlatformSpecific(
240 CallInterfaceDescriptorData* data) {
251 Register registers[] = {cp, a0}; 241 Register registers[] = {cp, a0};
252 data->Initialize(arraysize(registers), registers, NULL); 242 data->InitializePlatformSpecific(arraysize(registers), registers, NULL);
253 } 243 }
254 244
255 245
256 void ToBooleanDescriptor::Initialize(CallInterfaceDescriptorData* data) { 246 void ToBooleanDescriptor::InitializePlatformSpecific(
247 CallInterfaceDescriptorData* data) {
257 Register registers[] = {cp, a0}; 248 Register registers[] = {cp, a0};
258 data->Initialize(arraysize(registers), registers, NULL); 249 data->InitializePlatformSpecific(arraysize(registers), registers, NULL);
259 } 250 }
260 251
261 252
262 void BinaryOpDescriptor::Initialize(CallInterfaceDescriptorData* data) { 253 void BinaryOpDescriptor::InitializePlatformSpecific(
254 CallInterfaceDescriptorData* data) {
263 Register registers[] = {cp, a1, a0}; 255 Register registers[] = {cp, a1, a0};
264 data->Initialize(arraysize(registers), registers, NULL); 256 data->InitializePlatformSpecific(arraysize(registers), registers, NULL);
265 } 257 }
266 258
267 259
268 void BinaryOpWithAllocationSiteDescriptor::Initialize( 260 void BinaryOpWithAllocationSiteDescriptor::InitializePlatformSpecific(
269 CallInterfaceDescriptorData* data) { 261 CallInterfaceDescriptorData* data) {
270 Register registers[] = {cp, a2, a1, a0}; 262 Register registers[] = {cp, a2, a1, a0};
271 data->Initialize(arraysize(registers), registers, NULL); 263 data->InitializePlatformSpecific(arraysize(registers), registers, NULL);
272 } 264 }
273 265
274 266
275 void StringAddDescriptor::Initialize(CallInterfaceDescriptorData* data) { 267 void StringAddDescriptor::InitializePlatformSpecific(
268 CallInterfaceDescriptorData* data) {
276 Register registers[] = {cp, a1, a0}; 269 Register registers[] = {cp, a1, a0};
277 data->Initialize(arraysize(registers), registers, NULL); 270 data->InitializePlatformSpecific(arraysize(registers), registers, NULL);
278 } 271 }
279 272
280 273
281 void KeyedDescriptor::Initialize(CallInterfaceDescriptorData* data) { 274 void KeyedDescriptor::InitializePlatformSpecific(
275 CallInterfaceDescriptorData* data) {
282 Register registers[] = { 276 Register registers[] = {
283 cp, // context 277 cp, // context
284 a2, // key 278 a2, // key
285 }; 279 };
286 Representation representations[] = { 280 data->InitializePlatformSpecific(arraysize(registers), registers);
287 Representation::Tagged(), // context
288 Representation::Tagged(), // key
289 };
290 data->Initialize(arraysize(registers), registers, representations);
291 } 281 }
292 282
293 283
294 void NamedDescriptor::Initialize(CallInterfaceDescriptorData* data) { 284 void NamedDescriptor::InitializePlatformSpecific(
285 CallInterfaceDescriptorData* data) {
295 Register registers[] = { 286 Register registers[] = {
296 cp, // context 287 cp, // context
297 a2, // name 288 a2, // name
298 }; 289 };
299 Representation representations[] = { 290 data->InitializePlatformSpecific(arraysize(registers), registers);
300 Representation::Tagged(), // context
301 Representation::Tagged(), // name
302 };
303 data->Initialize(arraysize(registers), registers, representations);
304 } 291 }
305 292
306 293
307 void CallHandlerDescriptor::Initialize(CallInterfaceDescriptorData* data) { 294 void CallHandlerDescriptor::InitializePlatformSpecific(
295 CallInterfaceDescriptorData* data) {
308 Register registers[] = { 296 Register registers[] = {
309 cp, // context 297 cp, // context
310 a0, // receiver 298 a0, // receiver
311 }; 299 };
312 Representation representations[] = { 300 data->InitializePlatformSpecific(arraysize(registers), registers);
313 Representation::Tagged(), // context
314 Representation::Tagged(), // receiver
315 };
316 data->Initialize(arraysize(registers), registers, representations);
317 } 301 }
318 302
319 303
320 void ArgumentAdaptorDescriptor::Initialize(CallInterfaceDescriptorData* data) { 304 void ArgumentAdaptorDescriptor::InitializePlatformSpecific(
305 CallInterfaceDescriptorData* data) {
321 Register registers[] = { 306 Register registers[] = {
322 cp, // context 307 cp, // context
323 a1, // JSFunction 308 a1, // JSFunction
324 a0, // actual number of arguments 309 a0, // actual number of arguments
325 a2, // expected number of arguments 310 a2, // expected number of arguments
326 }; 311 };
327 Representation representations[] = { 312 data->InitializePlatformSpecific(arraysize(registers), registers);
328 Representation::Tagged(), // context
329 Representation::Tagged(), // JSFunction
330 Representation::Integer32(), // actual number of arguments
331 Representation::Integer32(), // expected number of arguments
332 };
333 data->Initialize(arraysize(registers), registers, representations);
334 } 313 }
335 314
336 315
337 void ApiFunctionDescriptor::Initialize(CallInterfaceDescriptorData* data) { 316 void ApiFunctionDescriptor::InitializePlatformSpecific(
317 CallInterfaceDescriptorData* data) {
338 Register registers[] = { 318 Register registers[] = {
339 cp, // context 319 cp, // context
340 a0, // callee 320 a0, // callee
341 t0, // call_data 321 t0, // call_data
342 a2, // holder 322 a2, // holder
343 a1, // api_function_address 323 a1, // api_function_address
344 a3, // actual number of arguments 324 a3, // actual number of arguments
345 }; 325 };
346 Representation representations[] = { 326 data->InitializePlatformSpecific(arraysize(registers), registers);
347 Representation::Tagged(), // context
348 Representation::Tagged(), // callee
349 Representation::Tagged(), // call_data
350 Representation::Tagged(), // holder
351 Representation::External(), // api_function_address
352 Representation::Integer32(), // actual number of arguments
353 };
354 data->Initialize(arraysize(registers), registers, representations);
355 } 327 }
356 328
357 329
358 void ApiAccessorDescriptor::Initialize(CallInterfaceDescriptorData* data) { 330 void ApiAccessorDescriptor::InitializePlatformSpecific(
331 CallInterfaceDescriptorData* data) {
359 Register registers[] = { 332 Register registers[] = {
360 cp, // context 333 cp, // context
361 a0, // callee 334 a0, // callee
362 t0, // call_data 335 t0, // call_data
363 a2, // holder 336 a2, // holder
364 a1, // api_function_address 337 a1, // api_function_address
365 }; 338 };
366 Representation representations[] = { 339 data->InitializePlatformSpecific(arraysize(registers), registers);
367 Representation::Tagged(), // context
368 Representation::Tagged(), // callee
369 Representation::Tagged(), // call_data
370 Representation::Tagged(), // holder
371 Representation::External(), // api_function_address
372 };
373 data->Initialize(arraysize(registers), registers, representations);
374 } 340 }
375 341
376 342
377 void MathRoundVariantDescriptor::Initialize(CallInterfaceDescriptorData* data) { 343 void MathRoundVariantDescriptor::InitializePlatformSpecific(
344 CallInterfaceDescriptorData* data) {
378 Register registers[] = { 345 Register registers[] = {
379 cp, // context 346 cp, // context
380 a1, // math rounding function 347 a1, // math rounding function
381 a3, // vector slot id 348 a3, // vector slot id
382 }; 349 };
383 Representation representations[] = { 350 data->InitializePlatformSpecific(arraysize(registers), registers);
384 Representation::Tagged(), //
385 Representation::Tagged(), //
386 Representation::Tagged(), //
387 };
388 data->Initialize(arraysize(registers), registers, representations);
389 } 351 }
390 } // namespace internal 352 } // namespace internal
391 } // namespace v8 353 } // namespace v8
392 354
393 #endif // V8_TARGET_ARCH_MIPS 355 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/isolate.h ('k') | src/mips64/interface-descriptors-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698