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 #include "src/interface-descriptors.h" | 7 #include "src/interface-descriptors.h" |
8 | 8 |
9 namespace v8 { | 9 namespace v8 { |
10 namespace internal { | 10 namespace internal { |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 return function; | 44 return function; |
45 } | 45 } |
46 | 46 |
47 | 47 |
48 void CallInterfaceDescriptorData::InitializePlatformSpecific( | 48 void CallInterfaceDescriptorData::InitializePlatformSpecific( |
49 int register_parameter_count, Register* registers, | 49 int register_parameter_count, Register* registers, |
50 PlatformInterfaceDescriptor* platform_descriptor) { | 50 PlatformInterfaceDescriptor* platform_descriptor) { |
51 platform_specific_descriptor_ = platform_descriptor; | 51 platform_specific_descriptor_ = platform_descriptor; |
52 register_param_count_ = register_parameter_count; | 52 register_param_count_ = register_parameter_count; |
53 | 53 |
54 // An interface descriptor must have a context register. | |
55 DCHECK(register_parameter_count > 0 && | |
56 registers[0].is(CallInterfaceDescriptor::ContextRegister())); | |
57 | |
58 // InterfaceDescriptor owns a copy of the registers array. | 54 // InterfaceDescriptor owns a copy of the registers array. |
59 register_params_.Reset(NewArray<Register>(register_parameter_count)); | 55 register_params_.Reset(NewArray<Register>(register_parameter_count)); |
60 for (int i = 0; i < register_parameter_count; i++) { | 56 for (int i = 0; i < register_parameter_count; i++) { |
61 register_params_[i] = registers[i]; | 57 register_params_[i] = registers[i]; |
62 } | 58 } |
63 } | 59 } |
64 | 60 |
65 const char* CallInterfaceDescriptor::DebugName(Isolate* isolate) const { | 61 const char* CallInterfaceDescriptor::DebugName(Isolate* isolate) const { |
66 CallInterfaceDescriptorData* start = isolate->call_descriptor_data(0); | 62 CallInterfaceDescriptorData* start = isolate->call_descriptor_data(0); |
67 size_t index = data_ - start; | 63 size_t index = data_ - start; |
68 DCHECK(index < CallDescriptors::NUMBER_OF_DESCRIPTORS); | 64 DCHECK(index < CallDescriptors::NUMBER_OF_DESCRIPTORS); |
69 CallDescriptors::Key key = static_cast<CallDescriptors::Key>(index); | 65 CallDescriptors::Key key = static_cast<CallDescriptors::Key>(index); |
70 switch (key) { | 66 switch (key) { |
71 #define DEF_CASE(NAME) \ | 67 #define DEF_CASE(NAME) \ |
72 case CallDescriptors::NAME: \ | 68 case CallDescriptors::NAME: \ |
73 return #NAME " Descriptor"; | 69 return #NAME " Descriptor"; |
74 INTERFACE_DESCRIPTOR_LIST(DEF_CASE) | 70 INTERFACE_DESCRIPTOR_LIST(DEF_CASE) |
75 #undef DEF_CASE | 71 #undef DEF_CASE |
76 case CallDescriptors::NUMBER_OF_DESCRIPTORS: | 72 case CallDescriptors::NUMBER_OF_DESCRIPTORS: |
77 break; | 73 break; |
78 } | 74 } |
79 return ""; | 75 return ""; |
80 } | 76 } |
81 | 77 |
82 | 78 |
83 Type::FunctionType* LoadDescriptor::BuildCallInterfaceDescriptorFunctionType( | 79 Type::FunctionType* LoadDescriptor::BuildCallInterfaceDescriptorFunctionType( |
84 Isolate* isolate, int paramater_count) { | 80 Isolate* isolate, int paramater_count) { |
85 Type::FunctionType* function = Type::FunctionType::New( | 81 Type::FunctionType* function = Type::FunctionType::New( |
86 AnyTagged(), Type::Undefined(), 4, isolate->interface_descriptor_zone()); | 82 AnyTagged(), Type::Undefined(), 3, isolate->interface_descriptor_zone()); |
87 function->InitParameter(0, AnyTagged()); | 83 function->InitParameter(0, AnyTagged()); |
88 function->InitParameter(1, AnyTagged()); | 84 function->InitParameter(1, AnyTagged()); |
89 function->InitParameter(2, AnyTagged()); | 85 function->InitParameter(2, SmiType()); |
90 function->InitParameter(3, SmiType()); | |
91 return function; | 86 return function; |
92 } | 87 } |
93 | 88 |
94 void LoadDescriptor::InitializePlatformSpecific( | 89 void LoadDescriptor::InitializePlatformSpecific( |
95 CallInterfaceDescriptorData* data) { | 90 CallInterfaceDescriptorData* data) { |
96 Register registers[] = {ContextRegister(), ReceiverRegister(), NameRegister(), | 91 Register registers[] = {ReceiverRegister(), NameRegister(), SlotRegister()}; |
97 SlotRegister()}; | |
98 data->InitializePlatformSpecific(arraysize(registers), registers); | 92 data->InitializePlatformSpecific(arraysize(registers), registers); |
99 } | 93 } |
100 | 94 |
101 | 95 |
102 void StoreDescriptor::InitializePlatformSpecific( | 96 void StoreDescriptor::InitializePlatformSpecific( |
103 CallInterfaceDescriptorData* data) { | 97 CallInterfaceDescriptorData* data) { |
104 Register registers[] = {ContextRegister(), ReceiverRegister(), NameRegister(), | 98 Register registers[] = {ReceiverRegister(), NameRegister(), ValueRegister()}; |
105 ValueRegister()}; | |
106 data->InitializePlatformSpecific(arraysize(registers), registers); | 99 data->InitializePlatformSpecific(arraysize(registers), registers); |
107 } | 100 } |
108 | 101 |
109 | 102 |
110 void StoreTransitionDescriptor::InitializePlatformSpecific( | 103 void StoreTransitionDescriptor::InitializePlatformSpecific( |
111 CallInterfaceDescriptorData* data) { | 104 CallInterfaceDescriptorData* data) { |
112 Register registers[] = {ContextRegister(), ReceiverRegister(), NameRegister(), | 105 Register registers[] = {ReceiverRegister(), NameRegister(), ValueRegister(), |
113 ValueRegister(), MapRegister()}; | 106 MapRegister()}; |
114 data->InitializePlatformSpecific(arraysize(registers), registers); | 107 data->InitializePlatformSpecific(arraysize(registers), registers); |
115 } | 108 } |
116 | 109 |
117 | 110 |
118 void ElementTransitionAndStoreDescriptor::InitializePlatformSpecific( | 111 void ElementTransitionAndStoreDescriptor::InitializePlatformSpecific( |
119 CallInterfaceDescriptorData* data) { | 112 CallInterfaceDescriptorData* data) { |
120 Register registers[] = {ContextRegister(), ValueRegister(), MapRegister(), | 113 Register registers[] = {ValueRegister(), MapRegister(), NameRegister(), |
121 NameRegister(), ReceiverRegister()}; | 114 ReceiverRegister()}; |
122 data->InitializePlatformSpecific(arraysize(registers), registers); | 115 data->InitializePlatformSpecific(arraysize(registers), registers); |
123 } | 116 } |
124 | 117 |
125 | 118 |
126 void InstanceofDescriptor::InitializePlatformSpecific( | 119 void InstanceofDescriptor::InitializePlatformSpecific( |
127 CallInterfaceDescriptorData* data) { | 120 CallInterfaceDescriptorData* data) { |
128 Register registers[] = {ContextRegister(), left(), right()}; | 121 Register registers[] = {left(), right()}; |
129 data->InitializePlatformSpecific(arraysize(registers), registers); | 122 data->InitializePlatformSpecific(arraysize(registers), registers); |
130 } | 123 } |
131 | 124 |
132 | 125 |
133 void MathPowTaggedDescriptor::InitializePlatformSpecific( | 126 void MathPowTaggedDescriptor::InitializePlatformSpecific( |
134 CallInterfaceDescriptorData* data) { | 127 CallInterfaceDescriptorData* data) { |
135 Register registers[] = {ContextRegister(), exponent()}; | 128 Register registers[] = {exponent()}; |
136 data->InitializePlatformSpecific(arraysize(registers), registers); | 129 data->InitializePlatformSpecific(arraysize(registers), registers); |
137 } | 130 } |
138 | 131 |
139 | 132 |
140 void MathPowIntegerDescriptor::InitializePlatformSpecific( | 133 void MathPowIntegerDescriptor::InitializePlatformSpecific( |
141 CallInterfaceDescriptorData* data) { | 134 CallInterfaceDescriptorData* data) { |
142 Register registers[] = {ContextRegister(), exponent()}; | 135 Register registers[] = {exponent()}; |
143 data->InitializePlatformSpecific(arraysize(registers), registers); | 136 data->InitializePlatformSpecific(arraysize(registers), registers); |
144 } | 137 } |
145 | 138 |
146 | 139 |
147 Type::FunctionType* | 140 Type::FunctionType* |
148 LoadWithVectorDescriptor::BuildCallInterfaceDescriptorFunctionType( | 141 LoadWithVectorDescriptor::BuildCallInterfaceDescriptorFunctionType( |
149 Isolate* isolate, int paramater_count) { | 142 Isolate* isolate, int paramater_count) { |
150 Type::FunctionType* function = Type::FunctionType::New( | 143 Type::FunctionType* function = Type::FunctionType::New( |
151 AnyTagged(), Type::Undefined(), 5, isolate->interface_descriptor_zone()); | 144 AnyTagged(), Type::Undefined(), 4, isolate->interface_descriptor_zone()); |
152 function->InitParameter(0, AnyTagged()); | 145 function->InitParameter(0, AnyTagged()); |
153 function->InitParameter(1, AnyTagged()); | 146 function->InitParameter(1, AnyTagged()); |
154 function->InitParameter(2, AnyTagged()); | 147 function->InitParameter(2, SmiType()); |
155 function->InitParameter(3, SmiType()); | 148 function->InitParameter(3, AnyTagged()); |
156 function->InitParameter(4, AnyTagged()); | |
157 return function; | 149 return function; |
158 } | 150 } |
159 | 151 |
160 | 152 |
161 void LoadWithVectorDescriptor::InitializePlatformSpecific( | 153 void LoadWithVectorDescriptor::InitializePlatformSpecific( |
162 CallInterfaceDescriptorData* data) { | 154 CallInterfaceDescriptorData* data) { |
163 Register registers[] = {ContextRegister(), ReceiverRegister(), NameRegister(), | 155 Register registers[] = {ReceiverRegister(), NameRegister(), SlotRegister(), |
164 SlotRegister(), VectorRegister()}; | 156 VectorRegister()}; |
165 data->InitializePlatformSpecific(arraysize(registers), registers); | 157 data->InitializePlatformSpecific(arraysize(registers), registers); |
166 } | 158 } |
167 | 159 |
168 | 160 |
169 Type::FunctionType* | 161 Type::FunctionType* |
170 VectorStoreICDescriptor::BuildCallInterfaceDescriptorFunctionType( | 162 VectorStoreICDescriptor::BuildCallInterfaceDescriptorFunctionType( |
171 Isolate* isolate, int paramater_count) { | 163 Isolate* isolate, int paramater_count) { |
172 Type::FunctionType* function = Type::FunctionType::New( | 164 Type::FunctionType* function = Type::FunctionType::New( |
173 AnyTagged(), Type::Undefined(), 6, isolate->interface_descriptor_zone()); | 165 AnyTagged(), Type::Undefined(), 5, isolate->interface_descriptor_zone()); |
174 function->InitParameter(0, AnyTagged()); | 166 function->InitParameter(0, AnyTagged()); |
175 function->InitParameter(1, AnyTagged()); | 167 function->InitParameter(1, AnyTagged()); |
176 function->InitParameter(2, AnyTagged()); | 168 function->InitParameter(2, AnyTagged()); |
177 function->InitParameter(3, AnyTagged()); | 169 function->InitParameter(3, SmiType()); |
178 function->InitParameter(4, SmiType()); | 170 function->InitParameter(4, AnyTagged()); |
179 function->InitParameter(5, AnyTagged()); | |
180 return function; | 171 return function; |
181 } | 172 } |
182 | 173 |
183 | 174 |
184 void VectorStoreICDescriptor::InitializePlatformSpecific( | 175 void VectorStoreICDescriptor::InitializePlatformSpecific( |
185 CallInterfaceDescriptorData* data) { | 176 CallInterfaceDescriptorData* data) { |
186 Register registers[] = {ContextRegister(), ReceiverRegister(), | 177 Register registers[] = {ReceiverRegister(), NameRegister(), ValueRegister(), |
187 NameRegister(), ValueRegister(), | 178 SlotRegister(), VectorRegister()}; |
188 SlotRegister(), VectorRegister()}; | |
189 data->InitializePlatformSpecific(arraysize(registers), registers); | 179 data->InitializePlatformSpecific(arraysize(registers), registers); |
190 } | 180 } |
191 | 181 |
192 | 182 |
193 Type::FunctionType* | 183 Type::FunctionType* |
194 VectorStoreICTrampolineDescriptor::BuildCallInterfaceDescriptorFunctionType( | 184 VectorStoreICTrampolineDescriptor::BuildCallInterfaceDescriptorFunctionType( |
195 Isolate* isolate, int paramater_count) { | 185 Isolate* isolate, int paramater_count) { |
196 Type::FunctionType* function = Type::FunctionType::New( | 186 Type::FunctionType* function = Type::FunctionType::New( |
197 AnyTagged(), Type::Undefined(), 5, isolate->interface_descriptor_zone()); | 187 AnyTagged(), Type::Undefined(), 4, isolate->interface_descriptor_zone()); |
198 function->InitParameter(0, AnyTagged()); | 188 function->InitParameter(0, AnyTagged()); |
199 function->InitParameter(1, AnyTagged()); | 189 function->InitParameter(1, AnyTagged()); |
200 function->InitParameter(2, AnyTagged()); | 190 function->InitParameter(2, AnyTagged()); |
201 function->InitParameter(3, AnyTagged()); | 191 function->InitParameter(3, SmiType()); |
202 function->InitParameter(4, SmiType()); | |
203 return function; | 192 return function; |
204 } | 193 } |
205 | 194 |
206 | 195 |
207 void VectorStoreICTrampolineDescriptor::InitializePlatformSpecific( | 196 void VectorStoreICTrampolineDescriptor::InitializePlatformSpecific( |
208 CallInterfaceDescriptorData* data) { | 197 CallInterfaceDescriptorData* data) { |
209 Register registers[] = {ContextRegister(), ReceiverRegister(), NameRegister(), | 198 Register registers[] = {ReceiverRegister(), NameRegister(), ValueRegister(), |
210 ValueRegister(), SlotRegister()}; | 199 SlotRegister()}; |
211 data->InitializePlatformSpecific(arraysize(registers), registers); | 200 data->InitializePlatformSpecific(arraysize(registers), registers); |
212 } | 201 } |
213 | 202 |
214 | 203 |
215 Type::FunctionType* | 204 Type::FunctionType* |
216 ApiGetterDescriptor::BuildCallInterfaceDescriptorFunctionType( | 205 ApiGetterDescriptor::BuildCallInterfaceDescriptorFunctionType( |
217 Isolate* isolate, int paramater_count) { | 206 Isolate* isolate, int paramater_count) { |
218 Type::FunctionType* function = Type::FunctionType::New( | 207 Type::FunctionType* function = Type::FunctionType::New( |
219 AnyTagged(), Type::Undefined(), 2, isolate->interface_descriptor_zone()); | 208 AnyTagged(), Type::Undefined(), 1, isolate->interface_descriptor_zone()); |
220 function->InitParameter(0, AnyTagged()); | 209 function->InitParameter(0, ExternalPointer()); |
221 function->InitParameter(1, ExternalPointer()); | |
222 return function; | 210 return function; |
223 } | 211 } |
224 | 212 |
225 | 213 |
226 void ApiGetterDescriptor::InitializePlatformSpecific( | 214 void ApiGetterDescriptor::InitializePlatformSpecific( |
227 CallInterfaceDescriptorData* data) { | 215 CallInterfaceDescriptorData* data) { |
228 Register registers[] = {ContextRegister(), function_address()}; | 216 Register registers[] = {function_address()}; |
229 data->InitializePlatformSpecific(arraysize(registers), registers); | 217 data->InitializePlatformSpecific(arraysize(registers), registers); |
230 } | 218 } |
231 | 219 |
232 | 220 |
233 void ArgumentsAccessReadDescriptor::InitializePlatformSpecific( | 221 void ArgumentsAccessReadDescriptor::InitializePlatformSpecific( |
234 CallInterfaceDescriptorData* data) { | 222 CallInterfaceDescriptorData* data) { |
235 Register registers[] = {ContextRegister(), index(), parameter_count()}; | 223 Register registers[] = {index(), parameter_count()}; |
236 data->InitializePlatformSpecific(arraysize(registers), registers); | 224 data->InitializePlatformSpecific(arraysize(registers), registers); |
237 } | 225 } |
238 | 226 |
239 | 227 |
240 void ContextOnlyDescriptor::InitializePlatformSpecific( | 228 void ContextOnlyDescriptor::InitializePlatformSpecific( |
241 CallInterfaceDescriptorData* data) { | 229 CallInterfaceDescriptorData* data) { |
242 Register registers[] = {ContextRegister()}; | 230 data->InitializePlatformSpecific(0, nullptr); |
243 data->InitializePlatformSpecific(arraysize(registers), registers); | |
244 } | 231 } |
245 | 232 |
246 | 233 |
247 void GrowArrayElementsDescriptor::InitializePlatformSpecific( | 234 void GrowArrayElementsDescriptor::InitializePlatformSpecific( |
248 CallInterfaceDescriptorData* data) { | 235 CallInterfaceDescriptorData* data) { |
249 Register registers[] = {ContextRegister(), ObjectRegister(), KeyRegister()}; | 236 Register registers[] = {ObjectRegister(), KeyRegister()}; |
250 data->InitializePlatformSpecific(arraysize(registers), registers); | 237 data->InitializePlatformSpecific(arraysize(registers), registers); |
251 } | 238 } |
252 | 239 |
253 | 240 |
254 Type::FunctionType* | 241 Type::FunctionType* |
255 FastCloneShallowArrayDescriptor::BuildCallInterfaceDescriptorFunctionType( | 242 FastCloneShallowArrayDescriptor::BuildCallInterfaceDescriptorFunctionType( |
256 Isolate* isolate, int paramater_count) { | 243 Isolate* isolate, int paramater_count) { |
257 Type::FunctionType* function = Type::FunctionType::New( | 244 Type::FunctionType* function = Type::FunctionType::New( |
258 AnyTagged(), Type::Undefined(), 4, isolate->interface_descriptor_zone()); | 245 AnyTagged(), Type::Undefined(), 3, isolate->interface_descriptor_zone()); |
259 function->InitParameter(0, AnyTagged()); | 246 function->InitParameter(0, AnyTagged()); |
260 function->InitParameter(1, AnyTagged()); | 247 function->InitParameter(1, SmiType()); |
261 function->InitParameter(2, SmiType()); | 248 function->InitParameter(2, AnyTagged()); |
262 function->InitParameter(3, AnyTagged()); | |
263 return function; | 249 return function; |
264 } | 250 } |
265 | 251 |
266 | 252 |
267 Type::FunctionType* | 253 Type::FunctionType* |
268 CreateAllocationSiteDescriptor::BuildCallInterfaceDescriptorFunctionType( | 254 CreateAllocationSiteDescriptor::BuildCallInterfaceDescriptorFunctionType( |
269 Isolate* isolate, int paramater_count) { | 255 Isolate* isolate, int paramater_count) { |
270 Type::FunctionType* function = Type::FunctionType::New( | 256 Type::FunctionType* function = Type::FunctionType::New( |
271 AnyTagged(), Type::Undefined(), 3, isolate->interface_descriptor_zone()); | 257 AnyTagged(), Type::Undefined(), 2, isolate->interface_descriptor_zone()); |
272 function->InitParameter(0, AnyTagged()); | 258 function->InitParameter(0, AnyTagged()); |
273 function->InitParameter(1, AnyTagged()); | 259 function->InitParameter(1, SmiType()); |
274 function->InitParameter(2, SmiType()); | |
275 return function; | 260 return function; |
276 } | 261 } |
277 | 262 |
278 | 263 |
279 Type::FunctionType* | 264 Type::FunctionType* |
280 CreateWeakCellDescriptor::BuildCallInterfaceDescriptorFunctionType( | 265 CreateWeakCellDescriptor::BuildCallInterfaceDescriptorFunctionType( |
281 Isolate* isolate, int paramater_count) { | 266 Isolate* isolate, int paramater_count) { |
282 Type::FunctionType* function = Type::FunctionType::New( | 267 Type::FunctionType* function = Type::FunctionType::New( |
283 AnyTagged(), Type::Undefined(), 4, isolate->interface_descriptor_zone()); | 268 AnyTagged(), Type::Undefined(), 3, isolate->interface_descriptor_zone()); |
284 function->InitParameter(0, AnyTagged()); | 269 function->InitParameter(0, AnyTagged()); |
285 function->InitParameter(1, AnyTagged()); | 270 function->InitParameter(1, SmiType()); |
286 function->InitParameter(2, SmiType()); | 271 function->InitParameter(2, AnyTagged()); |
287 function->InitParameter(3, AnyTagged()); | |
288 return function; | 272 return function; |
289 } | 273 } |
290 | 274 |
291 | 275 |
292 Type::FunctionType* | 276 Type::FunctionType* |
293 CallFunctionWithFeedbackDescriptor::BuildCallInterfaceDescriptorFunctionType( | 277 CallFunctionWithFeedbackDescriptor::BuildCallInterfaceDescriptorFunctionType( |
294 Isolate* isolate, int paramater_count) { | 278 Isolate* isolate, int paramater_count) { |
295 Type::FunctionType* function = Type::FunctionType::New( | 279 Type::FunctionType* function = Type::FunctionType::New( |
296 AnyTagged(), Type::Undefined(), 3, isolate->interface_descriptor_zone()); | 280 AnyTagged(), Type::Undefined(), 2, isolate->interface_descriptor_zone()); |
297 function->InitParameter(0, AnyTagged()); | 281 function->InitParameter(0, Type::Receiver()); // JSFunction |
298 function->InitParameter(1, Type::Receiver()); // JSFunction | 282 function->InitParameter(1, SmiType()); |
299 function->InitParameter(2, SmiType()); | |
300 return function; | 283 return function; |
301 } | 284 } |
302 | 285 |
303 | 286 |
304 Type::FunctionType* CallFunctionWithFeedbackAndVectorDescriptor:: | 287 Type::FunctionType* CallFunctionWithFeedbackAndVectorDescriptor:: |
305 BuildCallInterfaceDescriptorFunctionType(Isolate* isolate, | 288 BuildCallInterfaceDescriptorFunctionType(Isolate* isolate, |
306 int paramater_count) { | 289 int paramater_count) { |
307 Type::FunctionType* function = Type::FunctionType::New( | 290 Type::FunctionType* function = Type::FunctionType::New( |
308 AnyTagged(), Type::Undefined(), 4, isolate->interface_descriptor_zone()); | 291 AnyTagged(), Type::Undefined(), 3, isolate->interface_descriptor_zone()); |
309 function->InitParameter(0, AnyTagged()); | 292 function->InitParameter(0, Type::Receiver()); // JSFunction |
310 function->InitParameter(1, Type::Receiver()); // JSFunction | 293 function->InitParameter(1, SmiType()); |
311 function->InitParameter(2, SmiType()); | 294 function->InitParameter(2, AnyTagged()); |
312 function->InitParameter(3, AnyTagged()); | |
313 return function; | 295 return function; |
314 } | 296 } |
315 | 297 |
316 | 298 |
317 Type::FunctionType* | 299 Type::FunctionType* |
318 ArrayConstructorDescriptor::BuildCallInterfaceDescriptorFunctionType( | 300 ArrayConstructorDescriptor::BuildCallInterfaceDescriptorFunctionType( |
319 Isolate* isolate, int paramater_count) { | 301 Isolate* isolate, int paramater_count) { |
320 Type::FunctionType* function = Type::FunctionType::New( | 302 Type::FunctionType* function = Type::FunctionType::New( |
321 AnyTagged(), Type::Undefined(), 4, isolate->interface_descriptor_zone()); | 303 AnyTagged(), Type::Undefined(), 3, isolate->interface_descriptor_zone()); |
322 function->InitParameter(0, AnyTagged()); | 304 function->InitParameter(0, Type::Receiver()); // JSFunction |
323 function->InitParameter(1, Type::Receiver()); // JSFunction | 305 function->InitParameter(1, AnyTagged()); |
324 function->InitParameter(2, AnyTagged()); | 306 function->InitParameter(2, UntaggedSigned32()); |
325 function->InitParameter(3, UntaggedSigned32()); | |
326 return function; | 307 return function; |
327 } | 308 } |
328 | 309 |
329 | 310 |
330 Type::FunctionType* | 311 Type::FunctionType* |
331 InternalArrayConstructorDescriptor::BuildCallInterfaceDescriptorFunctionType( | 312 InternalArrayConstructorDescriptor::BuildCallInterfaceDescriptorFunctionType( |
332 Isolate* isolate, int paramater_count) { | 313 Isolate* isolate, int paramater_count) { |
333 Type::FunctionType* function = Type::FunctionType::New( | 314 Type::FunctionType* function = Type::FunctionType::New( |
334 AnyTagged(), Type::Undefined(), 3, isolate->interface_descriptor_zone()); | 315 AnyTagged(), Type::Undefined(), 2, isolate->interface_descriptor_zone()); |
335 function->InitParameter(0, AnyTagged()); | 316 function->InitParameter(0, Type::Receiver()); // JSFunction |
336 function->InitParameter(1, Type::Receiver()); // JSFunction | 317 function->InitParameter(1, UntaggedSigned32()); |
337 function->InitParameter(2, UntaggedSigned32()); | |
338 return function; | 318 return function; |
339 } | 319 } |
340 | 320 |
341 | 321 |
342 Type::FunctionType* | 322 Type::FunctionType* |
343 ArgumentAdaptorDescriptor::BuildCallInterfaceDescriptorFunctionType( | 323 ArgumentAdaptorDescriptor::BuildCallInterfaceDescriptorFunctionType( |
344 Isolate* isolate, int paramater_count) { | 324 Isolate* isolate, int paramater_count) { |
345 Type::FunctionType* function = Type::FunctionType::New( | 325 Type::FunctionType* function = Type::FunctionType::New( |
346 AnyTagged(), Type::Undefined(), 4, isolate->interface_descriptor_zone()); | 326 AnyTagged(), Type::Undefined(), 3, isolate->interface_descriptor_zone()); |
347 function->InitParameter(0, AnyTagged()); // context | 327 function->InitParameter(0, Type::Receiver()); // JSFunction |
348 function->InitParameter(1, Type::Receiver()); // JSFunction | 328 function->InitParameter(1, UntaggedSigned32()); // actual number of arguments |
349 function->InitParameter(2, UntaggedSigned32()); // actual number of arguments | 329 function->InitParameter(2, |
350 function->InitParameter(3, | |
351 UntaggedSigned32()); // expected number of arguments | 330 UntaggedSigned32()); // expected number of arguments |
352 return function; | 331 return function; |
353 } | 332 } |
354 | 333 |
355 | 334 |
356 Type::FunctionType* | 335 Type::FunctionType* |
357 ApiFunctionDescriptor::BuildCallInterfaceDescriptorFunctionType( | 336 ApiFunctionDescriptor::BuildCallInterfaceDescriptorFunctionType( |
358 Isolate* isolate, int paramater_count) { | 337 Isolate* isolate, int paramater_count) { |
359 Type::FunctionType* function = Type::FunctionType::New( | 338 Type::FunctionType* function = Type::FunctionType::New( |
360 AnyTagged(), Type::Undefined(), 6, isolate->interface_descriptor_zone()); | 339 AnyTagged(), Type::Undefined(), 5, isolate->interface_descriptor_zone()); |
361 function->InitParameter(0, AnyTagged()); // context | 340 function->InitParameter(0, AnyTagged()); // callee |
362 function->InitParameter(1, AnyTagged()); // callee | 341 function->InitParameter(1, AnyTagged()); // call_data |
363 function->InitParameter(2, AnyTagged()); // call_data | 342 function->InitParameter(2, AnyTagged()); // holder |
364 function->InitParameter(3, AnyTagged()); // holder | 343 function->InitParameter(3, ExternalPointer()); // api_function_address |
365 function->InitParameter(4, ExternalPointer()); // api_function_address | 344 function->InitParameter(4, UntaggedSigned32()); // actual number of arguments |
366 function->InitParameter(5, UntaggedSigned32()); // actual number of arguments | |
367 return function; | 345 return function; |
368 } | 346 } |
369 | 347 |
370 | 348 |
371 Type::FunctionType* | 349 Type::FunctionType* |
372 ApiAccessorDescriptor::BuildCallInterfaceDescriptorFunctionType( | 350 ApiAccessorDescriptor::BuildCallInterfaceDescriptorFunctionType( |
373 Isolate* isolate, int paramater_count) { | 351 Isolate* isolate, int paramater_count) { |
374 Type::FunctionType* function = Type::FunctionType::New( | 352 Type::FunctionType* function = Type::FunctionType::New( |
375 AnyTagged(), Type::Undefined(), 5, isolate->interface_descriptor_zone()); | 353 AnyTagged(), Type::Undefined(), 4, isolate->interface_descriptor_zone()); |
376 function->InitParameter(0, AnyTagged()); // context | 354 function->InitParameter(0, AnyTagged()); // callee |
377 function->InitParameter(1, AnyTagged()); // callee | 355 function->InitParameter(1, AnyTagged()); // call_data |
378 function->InitParameter(2, AnyTagged()); // call_data | 356 function->InitParameter(2, AnyTagged()); // holder |
379 function->InitParameter(3, AnyTagged()); // holder | 357 function->InitParameter(3, ExternalPointer()); // api_function_address |
380 function->InitParameter(4, ExternalPointer()); // api_function_address | |
381 return function; | 358 return function; |
382 } | 359 } |
383 | 360 |
384 | 361 |
385 Type::FunctionType* | 362 Type::FunctionType* |
386 MathRoundVariantDescriptor::BuildCallInterfaceDescriptorFunctionType( | 363 MathRoundVariantDescriptor::BuildCallInterfaceDescriptorFunctionType( |
387 Isolate* isolate, int paramater_count) { | 364 Isolate* isolate, int paramater_count) { |
388 Type::FunctionType* function = Type::FunctionType::New( | 365 Type::FunctionType* function = Type::FunctionType::New( |
389 AnyTagged(), Type::Undefined(), 3, isolate->interface_descriptor_zone()); | 366 AnyTagged(), Type::Undefined(), 2, isolate->interface_descriptor_zone()); |
390 function->InitParameter(0, Type::Receiver()); | 367 function->InitParameter(0, SmiType()); |
391 function->InitParameter(1, SmiType()); | 368 function->InitParameter(1, AnyTagged()); |
392 function->InitParameter(2, AnyTagged()); | |
393 return function; | 369 return function; |
394 } | 370 } |
395 | 371 |
396 | 372 |
397 } // namespace internal | 373 } // namespace internal |
398 } // namespace v8 | 374 } // namespace v8 |
OLD | NEW |