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

Side by Side Diff: src/arm/code-stubs-arm.cc

Issue 501323002: Replace our homegrown ARRAY_SIZE() with Chrome's arraysize(). (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
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_ARM 7 #if V8_TARGET_ARCH_ARM
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, r2 }; 24 Register registers[] = { cp, r2 };
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, r1 }; 33 Register registers[] = { cp, r1 };
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, r0 }; 40 Register registers[] = { cp, r0 };
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, r0 }; 47 Register registers[] = { cp, r0 };
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, r3, r2, r1 }; 56 Register registers[] = { cp, r3, r2, r1 };
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, r3, r2, r1, r0 }; 71 Register registers[] = { cp, r3, r2, r1, r0 };
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, r2, r3 }; 80 Register registers[] = { cp, r2, r3 };
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 // r1 function the function to call 87 // r1 function the function to call
88 Register registers[] = {cp, r1}; 88 Register registers[] = {cp, r1};
89 descriptor->Initialize(MajorKey(), ARRAY_SIZE(registers), registers); 89 descriptor->Initialize(MajorKey(), arraysize(registers), registers);
90 } 90 }
91 91
92 92
93 void CallConstructStub::InitializeInterfaceDescriptor( 93 void CallConstructStub::InitializeInterfaceDescriptor(
94 CodeStubInterfaceDescriptor* descriptor) { 94 CodeStubInterfaceDescriptor* descriptor) {
95 // r0 : number of arguments 95 // r0 : number of arguments
96 // r1 : the function to call 96 // r1 : the function to call
97 // r2 : feedback vector 97 // r2 : feedback vector
98 // r3 : (only if r2 is not the megamorphic symbol) slot in feedback 98 // r3 : (only if r2 is not the megamorphic symbol) slot in feedback
99 // vector (Smi) 99 // vector (Smi)
100 // TODO(turbofan): So far we don't gather type feedback and hence skip the 100 // TODO(turbofan): So far we don't gather type feedback and hence skip the
101 // slot parameter, but ArrayConstructStub needs the vector to be undefined. 101 // slot parameter, but ArrayConstructStub needs the vector to be undefined.
102 Register registers[] = {cp, r0, r1, r2}; 102 Register registers[] = {cp, r0, r1, r2};
103 descriptor->Initialize(MajorKey(), ARRAY_SIZE(registers), registers); 103 descriptor->Initialize(MajorKey(), arraysize(registers), registers);
104 } 104 }
105 105
106 106
107 void RegExpConstructResultStub::InitializeInterfaceDescriptor( 107 void RegExpConstructResultStub::InitializeInterfaceDescriptor(
108 CodeStubInterfaceDescriptor* descriptor) { 108 CodeStubInterfaceDescriptor* descriptor) {
109 Register registers[] = { cp, r2, r1, r0 }; 109 Register registers[] = { cp, r2, r1, r0 };
110 descriptor->Initialize( 110 descriptor->Initialize(
111 MajorKey(), ARRAY_SIZE(registers), registers, 111 MajorKey(), arraysize(registers), registers,
112 Runtime::FunctionForId(Runtime::kRegExpConstructResult)->entry); 112 Runtime::FunctionForId(Runtime::kRegExpConstructResult)->entry);
113 } 113 }
114 114
115 115
116 void TransitionElementsKindStub::InitializeInterfaceDescriptor( 116 void TransitionElementsKindStub::InitializeInterfaceDescriptor(
117 CodeStubInterfaceDescriptor* descriptor) { 117 CodeStubInterfaceDescriptor* descriptor) {
118 Register registers[] = { cp, r0, r1 }; 118 Register registers[] = { cp, r0, r1 };
119 Address entry = 119 Address entry =
120 Runtime::FunctionForId(Runtime::kTransitionElementsKind)->entry; 120 Runtime::FunctionForId(Runtime::kTransitionElementsKind)->entry;
121 descriptor->Initialize(MajorKey(), ARRAY_SIZE(registers), registers, 121 descriptor->Initialize(MajorKey(), arraysize(registers), registers,
122 FUNCTION_ADDR(entry)); 122 FUNCTION_ADDR(entry));
123 } 123 }
124 124
125 125
126 void CompareNilICStub::InitializeInterfaceDescriptor( 126 void CompareNilICStub::InitializeInterfaceDescriptor(
127 CodeStubInterfaceDescriptor* descriptor) { 127 CodeStubInterfaceDescriptor* descriptor) {
128 Register registers[] = { cp, r0 }; 128 Register registers[] = { cp, r0 };
129 descriptor->Initialize(MajorKey(), ARRAY_SIZE(registers), registers, 129 descriptor->Initialize(MajorKey(), arraysize(registers), registers,
130 FUNCTION_ADDR(CompareNilIC_Miss)); 130 FUNCTION_ADDR(CompareNilIC_Miss));
131 descriptor->SetMissHandler( 131 descriptor->SetMissHandler(
132 ExternalReference(IC_Utility(IC::kCompareNilIC_Miss), isolate())); 132 ExternalReference(IC_Utility(IC::kCompareNilIC_Miss), isolate()));
133 } 133 }
134 134
135 135
136 const Register InterfaceDescriptor::ContextRegister() { return cp; } 136 const Register InterfaceDescriptor::ContextRegister() { return cp; }
137 137
138 138
139 static void InitializeArrayConstructorDescriptor( 139 static void InitializeArrayConstructorDescriptor(
140 CodeStub::Major major, CodeStubInterfaceDescriptor* descriptor, 140 CodeStub::Major major, CodeStubInterfaceDescriptor* descriptor,
141 int constant_stack_parameter_count) { 141 int constant_stack_parameter_count) {
142 // register state 142 // register state
143 // cp -- context 143 // cp -- context
144 // r0 -- number of arguments 144 // r0 -- number of arguments
145 // r1 -- function 145 // r1 -- function
146 // r2 -- allocation site with elements kind 146 // r2 -- allocation site with elements kind
147 Address deopt_handler = Runtime::FunctionForId( 147 Address deopt_handler = Runtime::FunctionForId(
148 Runtime::kArrayConstructor)->entry; 148 Runtime::kArrayConstructor)->entry;
149 149
150 if (constant_stack_parameter_count == 0) { 150 if (constant_stack_parameter_count == 0) {
151 Register registers[] = { cp, r1, r2 }; 151 Register registers[] = { cp, r1, r2 };
152 descriptor->Initialize(major, ARRAY_SIZE(registers), registers, 152 descriptor->Initialize(major, arraysize(registers), registers,
153 deopt_handler, NULL, constant_stack_parameter_count, 153 deopt_handler, NULL, constant_stack_parameter_count,
154 JS_FUNCTION_STUB_MODE); 154 JS_FUNCTION_STUB_MODE);
155 } else { 155 } else {
156 // stack param count needs (constructor pointer, and single argument) 156 // stack param count needs (constructor pointer, and single argument)
157 Register registers[] = { cp, r1, r2, r0 }; 157 Register registers[] = { cp, r1, r2, r0 };
158 Representation representations[] = { 158 Representation representations[] = {
159 Representation::Tagged(), 159 Representation::Tagged(),
160 Representation::Tagged(), 160 Representation::Tagged(),
161 Representation::Tagged(), 161 Representation::Tagged(),
162 Representation::Integer32() }; 162 Representation::Integer32() };
163 descriptor->Initialize(major, ARRAY_SIZE(registers), registers, r0, 163 descriptor->Initialize(major, arraysize(registers), registers, r0,
164 deopt_handler, representations, 164 deopt_handler, representations,
165 constant_stack_parameter_count, 165 constant_stack_parameter_count,
166 JS_FUNCTION_STUB_MODE, PASS_ARGUMENTS); 166 JS_FUNCTION_STUB_MODE, PASS_ARGUMENTS);
167 } 167 }
168 } 168 }
169 169
170 170
171 static void InitializeInternalArrayConstructorDescriptor( 171 static void InitializeInternalArrayConstructorDescriptor(
172 CodeStub::Major major, CodeStubInterfaceDescriptor* descriptor, 172 CodeStub::Major major, CodeStubInterfaceDescriptor* descriptor,
173 int constant_stack_parameter_count) { 173 int constant_stack_parameter_count) {
174 // register state 174 // register state
175 // cp -- context 175 // cp -- context
176 // r0 -- number of arguments 176 // r0 -- number of arguments
177 // r1 -- constructor function 177 // r1 -- constructor function
178 Address deopt_handler = Runtime::FunctionForId( 178 Address deopt_handler = Runtime::FunctionForId(
179 Runtime::kInternalArrayConstructor)->entry; 179 Runtime::kInternalArrayConstructor)->entry;
180 180
181 if (constant_stack_parameter_count == 0) { 181 if (constant_stack_parameter_count == 0) {
182 Register registers[] = { cp, r1 }; 182 Register registers[] = { cp, r1 };
183 descriptor->Initialize(major, ARRAY_SIZE(registers), registers, 183 descriptor->Initialize(major, arraysize(registers), registers,
184 deopt_handler, NULL, constant_stack_parameter_count, 184 deopt_handler, NULL, constant_stack_parameter_count,
185 JS_FUNCTION_STUB_MODE); 185 JS_FUNCTION_STUB_MODE);
186 } else { 186 } else {
187 // stack param count needs (constructor pointer, and single argument) 187 // stack param count needs (constructor pointer, and single argument)
188 Register registers[] = { cp, r1, r0 }; 188 Register registers[] = { cp, r1, r0 };
189 Representation representations[] = { 189 Representation representations[] = {
190 Representation::Tagged(), 190 Representation::Tagged(),
191 Representation::Tagged(), 191 Representation::Tagged(),
192 Representation::Integer32() }; 192 Representation::Integer32() };
193 descriptor->Initialize(major, ARRAY_SIZE(registers), registers, r0, 193 descriptor->Initialize(major, arraysize(registers), registers, r0,
194 deopt_handler, representations, 194 deopt_handler, representations,
195 constant_stack_parameter_count, 195 constant_stack_parameter_count,
196 JS_FUNCTION_STUB_MODE, PASS_ARGUMENTS); 196 JS_FUNCTION_STUB_MODE, PASS_ARGUMENTS);
197 } 197 }
198 } 198 }
199 199
200 200
201 void ArrayNoArgumentConstructorStub::InitializeInterfaceDescriptor( 201 void ArrayNoArgumentConstructorStub::InitializeInterfaceDescriptor(
202 CodeStubInterfaceDescriptor* descriptor) { 202 CodeStubInterfaceDescriptor* descriptor) {
203 InitializeArrayConstructorDescriptor(MajorKey(), descriptor, 0); 203 InitializeArrayConstructorDescriptor(MajorKey(), descriptor, 0);
204 } 204 }
205 205
206 206
207 void ArraySingleArgumentConstructorStub::InitializeInterfaceDescriptor( 207 void ArraySingleArgumentConstructorStub::InitializeInterfaceDescriptor(
208 CodeStubInterfaceDescriptor* descriptor) { 208 CodeStubInterfaceDescriptor* descriptor) {
209 InitializeArrayConstructorDescriptor(MajorKey(), descriptor, 1); 209 InitializeArrayConstructorDescriptor(MajorKey(), descriptor, 1);
210 } 210 }
211 211
212 212
213 void ArrayNArgumentsConstructorStub::InitializeInterfaceDescriptor( 213 void ArrayNArgumentsConstructorStub::InitializeInterfaceDescriptor(
214 CodeStubInterfaceDescriptor* descriptor) { 214 CodeStubInterfaceDescriptor* descriptor) {
215 InitializeArrayConstructorDescriptor(MajorKey(), descriptor, -1); 215 InitializeArrayConstructorDescriptor(MajorKey(), descriptor, -1);
216 } 216 }
217 217
218 218
219 void ToBooleanStub::InitializeInterfaceDescriptor( 219 void ToBooleanStub::InitializeInterfaceDescriptor(
220 CodeStubInterfaceDescriptor* descriptor) { 220 CodeStubInterfaceDescriptor* descriptor) {
221 Register registers[] = { cp, r0 }; 221 Register registers[] = { cp, r0 };
222 descriptor->Initialize(MajorKey(), ARRAY_SIZE(registers), registers, 222 descriptor->Initialize(MajorKey(), arraysize(registers), registers,
223 FUNCTION_ADDR(ToBooleanIC_Miss)); 223 FUNCTION_ADDR(ToBooleanIC_Miss));
224 descriptor->SetMissHandler( 224 descriptor->SetMissHandler(
225 ExternalReference(IC_Utility(IC::kToBooleanIC_Miss), isolate())); 225 ExternalReference(IC_Utility(IC::kToBooleanIC_Miss), isolate()));
226 } 226 }
227 227
228 228
229 void InternalArrayNoArgumentConstructorStub::InitializeInterfaceDescriptor( 229 void InternalArrayNoArgumentConstructorStub::InitializeInterfaceDescriptor(
230 CodeStubInterfaceDescriptor* descriptor) { 230 CodeStubInterfaceDescriptor* descriptor) {
231 InitializeInternalArrayConstructorDescriptor(MajorKey(), descriptor, 0); 231 InitializeInternalArrayConstructorDescriptor(MajorKey(), descriptor, 0);
232 } 232 }
233 233
234 234
235 void InternalArraySingleArgumentConstructorStub::InitializeInterfaceDescriptor( 235 void InternalArraySingleArgumentConstructorStub::InitializeInterfaceDescriptor(
236 CodeStubInterfaceDescriptor* descriptor) { 236 CodeStubInterfaceDescriptor* descriptor) {
237 InitializeInternalArrayConstructorDescriptor(MajorKey(), descriptor, 1); 237 InitializeInternalArrayConstructorDescriptor(MajorKey(), descriptor, 1);
238 } 238 }
239 239
240 240
241 void InternalArrayNArgumentsConstructorStub::InitializeInterfaceDescriptor( 241 void InternalArrayNArgumentsConstructorStub::InitializeInterfaceDescriptor(
242 CodeStubInterfaceDescriptor* descriptor) { 242 CodeStubInterfaceDescriptor* descriptor) {
243 InitializeInternalArrayConstructorDescriptor(MajorKey(), descriptor, -1); 243 InitializeInternalArrayConstructorDescriptor(MajorKey(), descriptor, -1);
244 } 244 }
245 245
246 246
247 void BinaryOpICStub::InitializeInterfaceDescriptor( 247 void BinaryOpICStub::InitializeInterfaceDescriptor(
248 CodeStubInterfaceDescriptor* descriptor) { 248 CodeStubInterfaceDescriptor* descriptor) {
249 Register registers[] = { cp, r1, r0 }; 249 Register registers[] = { cp, r1, r0 };
250 descriptor->Initialize(MajorKey(), ARRAY_SIZE(registers), registers, 250 descriptor->Initialize(MajorKey(), arraysize(registers), registers,
251 FUNCTION_ADDR(BinaryOpIC_Miss)); 251 FUNCTION_ADDR(BinaryOpIC_Miss));
252 descriptor->SetMissHandler( 252 descriptor->SetMissHandler(
253 ExternalReference(IC_Utility(IC::kBinaryOpIC_Miss), isolate())); 253 ExternalReference(IC_Utility(IC::kBinaryOpIC_Miss), isolate()));
254 } 254 }
255 255
256 256
257 void BinaryOpWithAllocationSiteStub::InitializeInterfaceDescriptor( 257 void BinaryOpWithAllocationSiteStub::InitializeInterfaceDescriptor(
258 CodeStubInterfaceDescriptor* descriptor) { 258 CodeStubInterfaceDescriptor* descriptor) {
259 Register registers[] = { cp, r2, r1, r0 }; 259 Register registers[] = { cp, r2, r1, r0 };
260 descriptor->Initialize(MajorKey(), ARRAY_SIZE(registers), registers, 260 descriptor->Initialize(MajorKey(), arraysize(registers), registers,
261 FUNCTION_ADDR(BinaryOpIC_MissWithAllocationSite)); 261 FUNCTION_ADDR(BinaryOpIC_MissWithAllocationSite));
262 } 262 }
263 263
264 264
265 void StringAddStub::InitializeInterfaceDescriptor( 265 void StringAddStub::InitializeInterfaceDescriptor(
266 CodeStubInterfaceDescriptor* descriptor) { 266 CodeStubInterfaceDescriptor* descriptor) {
267 Register registers[] = { cp, r1, r0 }; 267 Register registers[] = { cp, r1, r0 };
268 descriptor->Initialize(MajorKey(), ARRAY_SIZE(registers), registers, 268 descriptor->Initialize(MajorKey(), arraysize(registers), registers,
269 Runtime::FunctionForId(Runtime::kStringAdd)->entry); 269 Runtime::FunctionForId(Runtime::kStringAdd)->entry);
270 } 270 }
271 271
272 272
273 void CallDescriptors::InitializeForIsolate(Isolate* isolate) { 273 void CallDescriptors::InitializeForIsolate(Isolate* isolate) {
274 static PlatformInterfaceDescriptor default_descriptor = 274 static PlatformInterfaceDescriptor default_descriptor =
275 PlatformInterfaceDescriptor(CAN_INLINE_TARGET_ADDRESS); 275 PlatformInterfaceDescriptor(CAN_INLINE_TARGET_ADDRESS);
276 276
277 static PlatformInterfaceDescriptor noInlineDescriptor = 277 static PlatformInterfaceDescriptor noInlineDescriptor =
278 PlatformInterfaceDescriptor(NEVER_INLINE_TARGET_ADDRESS); 278 PlatformInterfaceDescriptor(NEVER_INLINE_TARGET_ADDRESS);
279 279
280 { 280 {
281 CallInterfaceDescriptor* descriptor = 281 CallInterfaceDescriptor* descriptor =
282 isolate->call_descriptor(Isolate::ArgumentAdaptorCall); 282 isolate->call_descriptor(Isolate::ArgumentAdaptorCall);
283 Register registers[] = { cp, // context 283 Register registers[] = { cp, // context
284 r1, // JSFunction 284 r1, // JSFunction
285 r0, // actual number of arguments 285 r0, // actual number of arguments
286 r2, // expected number of arguments 286 r2, // expected number of arguments
287 }; 287 };
288 Representation representations[] = { 288 Representation representations[] = {
289 Representation::Tagged(), // context 289 Representation::Tagged(), // context
290 Representation::Tagged(), // JSFunction 290 Representation::Tagged(), // JSFunction
291 Representation::Integer32(), // actual number of arguments 291 Representation::Integer32(), // actual number of arguments
292 Representation::Integer32(), // expected number of arguments 292 Representation::Integer32(), // expected number of arguments
293 }; 293 };
294 descriptor->Initialize(ARRAY_SIZE(registers), registers, 294 descriptor->Initialize(arraysize(registers), registers,
295 representations, &default_descriptor); 295 representations, &default_descriptor);
296 } 296 }
297 { 297 {
298 CallInterfaceDescriptor* descriptor = 298 CallInterfaceDescriptor* descriptor =
299 isolate->call_descriptor(Isolate::KeyedCall); 299 isolate->call_descriptor(Isolate::KeyedCall);
300 Register registers[] = { cp, // context 300 Register registers[] = { cp, // context
301 r2, // key 301 r2, // key
302 }; 302 };
303 Representation representations[] = { 303 Representation representations[] = {
304 Representation::Tagged(), // context 304 Representation::Tagged(), // context
305 Representation::Tagged(), // key 305 Representation::Tagged(), // key
306 }; 306 };
307 descriptor->Initialize(ARRAY_SIZE(registers), registers, 307 descriptor->Initialize(arraysize(registers), registers,
308 representations, &noInlineDescriptor); 308 representations, &noInlineDescriptor);
309 } 309 }
310 { 310 {
311 CallInterfaceDescriptor* descriptor = 311 CallInterfaceDescriptor* descriptor =
312 isolate->call_descriptor(Isolate::NamedCall); 312 isolate->call_descriptor(Isolate::NamedCall);
313 Register registers[] = { cp, // context 313 Register registers[] = { cp, // context
314 r2, // name 314 r2, // name
315 }; 315 };
316 Representation representations[] = { 316 Representation representations[] = {
317 Representation::Tagged(), // context 317 Representation::Tagged(), // context
318 Representation::Tagged(), // name 318 Representation::Tagged(), // name
319 }; 319 };
320 descriptor->Initialize(ARRAY_SIZE(registers), registers, 320 descriptor->Initialize(arraysize(registers), registers,
321 representations, &noInlineDescriptor); 321 representations, &noInlineDescriptor);
322 } 322 }
323 { 323 {
324 CallInterfaceDescriptor* descriptor = 324 CallInterfaceDescriptor* descriptor =
325 isolate->call_descriptor(Isolate::CallHandler); 325 isolate->call_descriptor(Isolate::CallHandler);
326 Register registers[] = { cp, // context 326 Register registers[] = { cp, // context
327 r0, // receiver 327 r0, // receiver
328 }; 328 };
329 Representation representations[] = { 329 Representation representations[] = {
330 Representation::Tagged(), // context 330 Representation::Tagged(), // context
331 Representation::Tagged(), // receiver 331 Representation::Tagged(), // receiver
332 }; 332 };
333 descriptor->Initialize(ARRAY_SIZE(registers), registers, 333 descriptor->Initialize(arraysize(registers), registers,
334 representations, &default_descriptor); 334 representations, &default_descriptor);
335 } 335 }
336 { 336 {
337 CallInterfaceDescriptor* descriptor = 337 CallInterfaceDescriptor* descriptor =
338 isolate->call_descriptor(Isolate::ApiFunctionCall); 338 isolate->call_descriptor(Isolate::ApiFunctionCall);
339 Register registers[] = { cp, // context 339 Register registers[] = { cp, // context
340 r0, // callee 340 r0, // callee
341 r4, // call_data 341 r4, // call_data
342 r2, // holder 342 r2, // holder
343 r1, // api_function_address 343 r1, // api_function_address
344 }; 344 };
345 Representation representations[] = { 345 Representation representations[] = {
346 Representation::Tagged(), // context 346 Representation::Tagged(), // context
347 Representation::Tagged(), // callee 347 Representation::Tagged(), // callee
348 Representation::Tagged(), // call_data 348 Representation::Tagged(), // call_data
349 Representation::Tagged(), // holder 349 Representation::Tagged(), // holder
350 Representation::External(), // api_function_address 350 Representation::External(), // api_function_address
351 }; 351 };
352 descriptor->Initialize(ARRAY_SIZE(registers), registers, 352 descriptor->Initialize(arraysize(registers), registers,
353 representations, &default_descriptor); 353 representations, &default_descriptor);
354 } 354 }
355 } 355 }
356 356
357 357
358 #define __ ACCESS_MASM(masm) 358 #define __ ACCESS_MASM(masm)
359 359
360 360
361 static void EmitIdenticalObjectComparison(MacroAssembler* masm, 361 static void EmitIdenticalObjectComparison(MacroAssembler* masm,
362 Label* slow, 362 Label* slow,
(...skipping 4733 matching lines...) Expand 10 before | Expand all | Expand 10 after
5096 MemOperand(fp, 6 * kPointerSize), 5096 MemOperand(fp, 6 * kPointerSize),
5097 NULL); 5097 NULL);
5098 } 5098 }
5099 5099
5100 5100
5101 #undef __ 5101 #undef __
5102 5102
5103 } } // namespace v8::internal 5103 } } // namespace v8::internal
5104 5104
5105 #endif // V8_TARGET_ARCH_ARM 5105 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/api.cc ('k') | src/arm64/assembler-arm64.cc » ('j') | src/base/macros.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698