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

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

Issue 535103002: CallDescriptors::InitializeForIsolate() is no longer needed. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « src/arm64/interface-descriptors-arm64.cc ('k') | src/interface-descriptors.h » ('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_IA32 7 #if V8_TARGET_ARCH_IA32
8 8
9 #include "src/interface-descriptors.h" 9 #include "src/interface-descriptors.h"
10 10
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 54
55 const Register ElementTransitionAndStoreDescriptor::MapRegister() { 55 const Register ElementTransitionAndStoreDescriptor::MapRegister() {
56 return ebx; 56 return ebx;
57 } 57 }
58 58
59 59
60 const Register InstanceofDescriptor::left() { return eax; } 60 const Register InstanceofDescriptor::left() { return eax; }
61 const Register InstanceofDescriptor::right() { return edx; } 61 const Register InstanceofDescriptor::right() { return edx; }
62 62
63 63
64 void FastNewClosureDescriptor::Initialize(Isolate* isolate) { 64 void FastNewClosureDescriptor::Initialize(CallInterfaceDescriptorData* data) {
65 Register registers[] = {esi, ebx}; 65 Register registers[] = {esi, ebx};
66 InitializeData(isolate, key(), arraysize(registers), registers, NULL); 66 data->Initialize(arraysize(registers), registers, NULL);
67 } 67 }
68 68
69 69
70 void FastNewContextDescriptor::Initialize(Isolate* isolate) { 70 void FastNewContextDescriptor::Initialize(CallInterfaceDescriptorData* data) {
71 Register registers[] = {esi, edi}; 71 Register registers[] = {esi, edi};
72 InitializeData(isolate, key(), arraysize(registers), registers, NULL); 72 data->Initialize(arraysize(registers), registers, NULL);
73 } 73 }
74 74
75 75
76 void ToNumberDescriptor::Initialize(Isolate* isolate) { 76 void ToNumberDescriptor::Initialize(CallInterfaceDescriptorData* data) {
77 // ToNumberStub invokes a function, and therefore needs a context. 77 // ToNumberStub invokes a function, and therefore needs a context.
78 Register registers[] = {esi, eax}; 78 Register registers[] = {esi, eax};
79 InitializeData(isolate, key(), arraysize(registers), registers, NULL); 79 data->Initialize(arraysize(registers), registers, NULL);
80 } 80 }
81 81
82 82
83 void NumberToStringDescriptor::Initialize(Isolate* isolate) { 83 void NumberToStringDescriptor::Initialize(CallInterfaceDescriptorData* data) {
84 Register registers[] = {esi, eax}; 84 Register registers[] = {esi, eax};
85 InitializeData(isolate, key(), arraysize(registers), registers, NULL); 85 data->Initialize(arraysize(registers), registers, NULL);
86 } 86 }
87 87
88 88
89 void FastCloneShallowArrayDescriptor::Initialize(Isolate* isolate) { 89 void FastCloneShallowArrayDescriptor::Initialize(
90 CallInterfaceDescriptorData* data) {
90 Register registers[] = {esi, eax, ebx, ecx}; 91 Register registers[] = {esi, eax, ebx, ecx};
91 Representation representations[] = { 92 Representation representations[] = {
92 Representation::Tagged(), Representation::Tagged(), Representation::Smi(), 93 Representation::Tagged(), Representation::Tagged(), Representation::Smi(),
93 Representation::Tagged()}; 94 Representation::Tagged()};
94 InitializeData(isolate, key(), arraysize(registers), registers, 95 data->Initialize(arraysize(registers), registers, representations);
95 representations);
96 } 96 }
97 97
98 98
99 void FastCloneShallowObjectDescriptor::Initialize(Isolate* isolate) { 99 void FastCloneShallowObjectDescriptor::Initialize(
100 CallInterfaceDescriptorData* data) {
100 Register registers[] = {esi, eax, ebx, ecx, edx}; 101 Register registers[] = {esi, eax, ebx, ecx, edx};
101 InitializeData(isolate, key(), arraysize(registers), registers, NULL); 102 data->Initialize(arraysize(registers), registers, NULL);
102 } 103 }
103 104
104 105
105 void CreateAllocationSiteDescriptor::Initialize(Isolate* isolate) { 106 void CreateAllocationSiteDescriptor::Initialize(
107 CallInterfaceDescriptorData* data) {
106 Register registers[] = {esi, ebx, edx}; 108 Register registers[] = {esi, ebx, edx};
107 InitializeData(isolate, key(), arraysize(registers), registers, NULL); 109 data->Initialize(arraysize(registers), registers, NULL);
108 } 110 }
109 111
110 112
111 void CallFunctionDescriptor::Initialize(Isolate* isolate) { 113 void CallFunctionDescriptor::Initialize(CallInterfaceDescriptorData* data) {
112 Register registers[] = {esi, edi}; 114 Register registers[] = {esi, edi};
113 InitializeData(isolate, key(), arraysize(registers), registers, NULL); 115 data->Initialize(arraysize(registers), registers, NULL);
114 } 116 }
115 117
116 118
117 void CallConstructDescriptor::Initialize(Isolate* isolate) { 119 void CallConstructDescriptor::Initialize(CallInterfaceDescriptorData* data) {
118 // eax : number of arguments 120 // eax : number of arguments
119 // ebx : feedback vector 121 // ebx : feedback vector
120 // edx : (only if ebx is not the megamorphic symbol) slot in feedback 122 // edx : (only if ebx is not the megamorphic symbol) slot in feedback
121 // vector (Smi) 123 // vector (Smi)
122 // edi : constructor function 124 // edi : constructor function
123 // TODO(turbofan): So far we don't gather type feedback and hence skip the 125 // TODO(turbofan): So far we don't gather type feedback and hence skip the
124 // slot parameter, but ArrayConstructStub needs the vector to be undefined. 126 // slot parameter, but ArrayConstructStub needs the vector to be undefined.
125 Register registers[] = {esi, eax, edi, ebx}; 127 Register registers[] = {esi, eax, edi, ebx};
126 InitializeData(isolate, key(), arraysize(registers), registers, NULL); 128 data->Initialize(arraysize(registers), registers, NULL);
127 } 129 }
128 130
129 131
130 void RegExpConstructResultDescriptor::Initialize(Isolate* isolate) { 132 void RegExpConstructResultDescriptor::Initialize(
133 CallInterfaceDescriptorData* data) {
131 Register registers[] = {esi, ecx, ebx, eax}; 134 Register registers[] = {esi, ecx, ebx, eax};
132 InitializeData(isolate, key(), arraysize(registers), registers, NULL); 135 data->Initialize(arraysize(registers), registers, NULL);
133 } 136 }
134 137
135 138
136 void TransitionElementsKindDescriptor::Initialize(Isolate* isolate) { 139 void TransitionElementsKindDescriptor::Initialize(
140 CallInterfaceDescriptorData* data) {
137 Register registers[] = {esi, eax, ebx}; 141 Register registers[] = {esi, eax, ebx};
138 InitializeData(isolate, key(), arraysize(registers), registers, NULL); 142 data->Initialize(arraysize(registers), registers, NULL);
139 } 143 }
140 144
141 145
142 void ArrayConstructorConstantArgCountDescriptor::Initialize(Isolate* isolate) { 146 void ArrayConstructorConstantArgCountDescriptor::Initialize(
147 CallInterfaceDescriptorData* data) {
143 // register state 148 // register state
144 // eax -- number of arguments 149 // eax -- number of arguments
145 // edi -- function 150 // edi -- function
146 // ebx -- allocation site with elements kind 151 // ebx -- allocation site with elements kind
147 Register registers[] = {esi, edi, ebx}; 152 Register registers[] = {esi, edi, ebx};
148 InitializeData(isolate, key(), arraysize(registers), registers, NULL); 153 data->Initialize(arraysize(registers), registers, NULL);
149 } 154 }
150 155
151 156
152 void ArrayConstructorDescriptor::Initialize(Isolate* isolate) { 157 void ArrayConstructorDescriptor::Initialize(CallInterfaceDescriptorData* data) {
153 // stack param count needs (constructor pointer, and single argument) 158 // stack param count needs (constructor pointer, and single argument)
154 Register registers[] = {esi, edi, ebx, eax}; 159 Register registers[] = {esi, edi, ebx, eax};
155 Representation representations[] = { 160 Representation representations[] = {
156 Representation::Tagged(), Representation::Tagged(), 161 Representation::Tagged(), Representation::Tagged(),
157 Representation::Tagged(), Representation::Integer32()}; 162 Representation::Tagged(), Representation::Integer32()};
158 InitializeData(isolate, key(), arraysize(registers), registers, 163 data->Initialize(arraysize(registers), registers, representations);
159 representations);
160 } 164 }
161 165
162 166
163 void InternalArrayConstructorConstantArgCountDescriptor::Initialize( 167 void InternalArrayConstructorConstantArgCountDescriptor::Initialize(
164 Isolate* isolate) { 168 CallInterfaceDescriptorData* data) {
165 // register state 169 // register state
166 // eax -- number of arguments 170 // eax -- number of arguments
167 // edi -- function 171 // edi -- function
168 Register registers[] = {esi, edi}; 172 Register registers[] = {esi, edi};
169 InitializeData(isolate, key(), arraysize(registers), registers, NULL); 173 data->Initialize(arraysize(registers), registers, NULL);
170 } 174 }
171 175
172 176
173 void InternalArrayConstructorDescriptor::Initialize(Isolate* isolate) { 177 void InternalArrayConstructorDescriptor::Initialize(
178 CallInterfaceDescriptorData* data) {
174 // stack param count needs (constructor pointer, and single argument) 179 // stack param count needs (constructor pointer, and single argument)
175 Register registers[] = {esi, edi, eax}; 180 Register registers[] = {esi, edi, eax};
176 Representation representations[] = {Representation::Tagged(), 181 Representation representations[] = {Representation::Tagged(),
177 Representation::Tagged(), 182 Representation::Tagged(),
178 Representation::Integer32()}; 183 Representation::Integer32()};
179 InitializeData(isolate, key(), arraysize(registers), registers, 184 data->Initialize(arraysize(registers), registers, representations);
180 representations);
181 } 185 }
182 186
183 187
184 void CompareNilDescriptor::Initialize(Isolate* isolate) { 188 void CompareNilDescriptor::Initialize(CallInterfaceDescriptorData* data) {
185 Register registers[] = {esi, eax}; 189 Register registers[] = {esi, eax};
186 InitializeData(isolate, key(), arraysize(registers), registers, NULL); 190 data->Initialize(arraysize(registers), registers, NULL);
187 } 191 }
188 192
189 193
190 void ToBooleanDescriptor::Initialize(Isolate* isolate) { 194 void ToBooleanDescriptor::Initialize(CallInterfaceDescriptorData* data) {
191 Register registers[] = {esi, eax}; 195 Register registers[] = {esi, eax};
192 InitializeData(isolate, key(), arraysize(registers), registers, NULL); 196 data->Initialize(arraysize(registers), registers, NULL);
193 } 197 }
194 198
195 199
196 void BinaryOpDescriptor::Initialize(Isolate* isolate) { 200 void BinaryOpDescriptor::Initialize(CallInterfaceDescriptorData* data) {
197 Register registers[] = {esi, edx, eax}; 201 Register registers[] = {esi, edx, eax};
198 InitializeData(isolate, key(), arraysize(registers), registers, NULL); 202 data->Initialize(arraysize(registers), registers, NULL);
199 } 203 }
200 204
201 205
202 void BinaryOpWithAllocationSiteDescriptor::Initialize(Isolate* isolate) { 206 void BinaryOpWithAllocationSiteDescriptor::Initialize(
207 CallInterfaceDescriptorData* data) {
203 Register registers[] = {esi, ecx, edx, eax}; 208 Register registers[] = {esi, ecx, edx, eax};
204 InitializeData(isolate, key(), arraysize(registers), registers, NULL); 209 data->Initialize(arraysize(registers), registers, NULL);
205 } 210 }
206 211
207 212
208 void StringAddDescriptor::Initialize(Isolate* isolate) { 213 void StringAddDescriptor::Initialize(CallInterfaceDescriptorData* data) {
209 Register registers[] = {esi, edx, eax}; 214 Register registers[] = {esi, edx, eax};
210 InitializeData(isolate, key(), arraysize(registers), registers, NULL); 215 data->Initialize(arraysize(registers), registers, NULL);
211 } 216 }
212 217
213 218
214 void KeyedDescriptor::Initialize(Isolate* isolate) { 219 void KeyedDescriptor::Initialize(CallInterfaceDescriptorData* data) {
215 Register registers[] = { 220 Register registers[] = {
216 esi, // context 221 esi, // context
217 ecx, // key 222 ecx, // key
218 }; 223 };
219 Representation representations[] = { 224 Representation representations[] = {
220 Representation::Tagged(), // context 225 Representation::Tagged(), // context
221 Representation::Tagged(), // key 226 Representation::Tagged(), // key
222 }; 227 };
223 InitializeData(isolate, key(), arraysize(registers), registers, 228 data->Initialize(arraysize(registers), registers, representations);
224 representations);
225 } 229 }
226 230
227 231
228 void NamedDescriptor::Initialize(Isolate* isolate) { 232 void NamedDescriptor::Initialize(CallInterfaceDescriptorData* data) {
229 Register registers[] = { 233 Register registers[] = {
230 esi, // context 234 esi, // context
231 ecx, // name 235 ecx, // name
232 }; 236 };
233 Representation representations[] = { 237 Representation representations[] = {
234 Representation::Tagged(), // context 238 Representation::Tagged(), // context
235 Representation::Tagged(), // name 239 Representation::Tagged(), // name
236 }; 240 };
237 InitializeData(isolate, key(), arraysize(registers), registers, 241 data->Initialize(arraysize(registers), registers, representations);
238 representations);
239 } 242 }
240 243
241 244
242 void CallHandlerDescriptor::Initialize(Isolate* isolate) { 245 void CallHandlerDescriptor::Initialize(CallInterfaceDescriptorData* data) {
243 Register registers[] = { 246 Register registers[] = {
244 esi, // context 247 esi, // context
245 edx, // name 248 edx, // name
246 }; 249 };
247 Representation representations[] = { 250 Representation representations[] = {
248 Representation::Tagged(), // context 251 Representation::Tagged(), // context
249 Representation::Tagged(), // receiver 252 Representation::Tagged(), // receiver
250 }; 253 };
251 InitializeData(isolate, key(), arraysize(registers), registers, 254 data->Initialize(arraysize(registers), registers, representations);
252 representations);
253 } 255 }
254 256
255 257
256 void ArgumentAdaptorDescriptor::Initialize(Isolate* isolate) { 258 void ArgumentAdaptorDescriptor::Initialize(CallInterfaceDescriptorData* data) {
257 Register registers[] = { 259 Register registers[] = {
258 esi, // context 260 esi, // context
259 edi, // JSFunction 261 edi, // JSFunction
260 eax, // actual number of arguments 262 eax, // actual number of arguments
261 ebx, // expected number of arguments 263 ebx, // expected number of arguments
262 }; 264 };
263 Representation representations[] = { 265 Representation representations[] = {
264 Representation::Tagged(), // context 266 Representation::Tagged(), // context
265 Representation::Tagged(), // JSFunction 267 Representation::Tagged(), // JSFunction
266 Representation::Integer32(), // actual number of arguments 268 Representation::Integer32(), // actual number of arguments
267 Representation::Integer32(), // expected number of arguments 269 Representation::Integer32(), // expected number of arguments
268 }; 270 };
269 InitializeData(isolate, key(), arraysize(registers), registers, 271 data->Initialize(arraysize(registers), registers, representations);
270 representations);
271 } 272 }
272 273
273 274
274 void ApiFunctionDescriptor::Initialize(Isolate* isolate) { 275 void ApiFunctionDescriptor::Initialize(CallInterfaceDescriptorData* data) {
275 Register registers[] = { 276 Register registers[] = {
276 esi, // context 277 esi, // context
277 eax, // callee 278 eax, // callee
278 ebx, // call_data 279 ebx, // call_data
279 ecx, // holder 280 ecx, // holder
280 edx, // api_function_address 281 edx, // api_function_address
281 }; 282 };
282 Representation representations[] = { 283 Representation representations[] = {
283 Representation::Tagged(), // context 284 Representation::Tagged(), // context
284 Representation::Tagged(), // callee 285 Representation::Tagged(), // callee
285 Representation::Tagged(), // call_data 286 Representation::Tagged(), // call_data
286 Representation::Tagged(), // holder 287 Representation::Tagged(), // holder
287 Representation::External(), // api_function_address 288 Representation::External(), // api_function_address
288 }; 289 };
289 InitializeData(isolate, key(), arraysize(registers), registers, 290 data->Initialize(arraysize(registers), registers, representations);
290 representations);
291 } 291 }
292 } 292 }
293 } // namespace v8::internal 293 } // namespace v8::internal
294 294
295 #endif // V8_TARGET_ARCH_IA32 295 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/arm64/interface-descriptors-arm64.cc ('k') | src/interface-descriptors.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698