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

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

Issue 517993002: Refactoring InterfaceDescriptors away from code-stubs.h (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Ports. 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/arm/code-stubs-arm.h ('k') | src/arm/interface-descriptors-arm.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_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"
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
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(), arraysize(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; }
137
138
139 static void InitializeArrayConstructorDescriptor( 136 static void InitializeArrayConstructorDescriptor(
140 CodeStub::Major major, CodeStubInterfaceDescriptor* descriptor, 137 CodeStub::Major major, CodeStubInterfaceDescriptor* descriptor,
141 int constant_stack_parameter_count) { 138 int constant_stack_parameter_count) {
142 // register state 139 // register state
143 // cp -- context 140 // cp -- context
144 // r0 -- number of arguments 141 // r0 -- number of arguments
145 // r1 -- function 142 // r1 -- function
146 // r2 -- allocation site with elements kind 143 // r2 -- allocation site with elements kind
147 Address deopt_handler = Runtime::FunctionForId( 144 Address deopt_handler = Runtime::FunctionForId(
148 Runtime::kArrayConstructor)->entry; 145 Runtime::kArrayConstructor)->entry;
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
263 260
264 261
265 void StringAddStub::InitializeInterfaceDescriptor( 262 void StringAddStub::InitializeInterfaceDescriptor(
266 CodeStubInterfaceDescriptor* descriptor) { 263 CodeStubInterfaceDescriptor* descriptor) {
267 Register registers[] = { cp, r1, r0 }; 264 Register registers[] = { cp, r1, r0 };
268 descriptor->Initialize(MajorKey(), arraysize(registers), registers, 265 descriptor->Initialize(MajorKey(), arraysize(registers), registers,
269 Runtime::FunctionForId(Runtime::kStringAdd)->entry); 266 Runtime::FunctionForId(Runtime::kStringAdd)->entry);
270 } 267 }
271 268
272 269
273 void CallDescriptors::InitializeForIsolate(Isolate* isolate) {
274 static PlatformInterfaceDescriptor default_descriptor =
275 PlatformInterfaceDescriptor(CAN_INLINE_TARGET_ADDRESS);
276
277 static PlatformInterfaceDescriptor noInlineDescriptor =
278 PlatformInterfaceDescriptor(NEVER_INLINE_TARGET_ADDRESS);
279
280 {
281 CallInterfaceDescriptor* descriptor =
282 isolate->call_descriptor(Isolate::ArgumentAdaptorCall);
283 Register registers[] = { cp, // context
284 r1, // JSFunction
285 r0, // actual number of arguments
286 r2, // expected number of arguments
287 };
288 Representation representations[] = {
289 Representation::Tagged(), // context
290 Representation::Tagged(), // JSFunction
291 Representation::Integer32(), // actual number of arguments
292 Representation::Integer32(), // expected number of arguments
293 };
294 descriptor->Initialize(arraysize(registers), registers,
295 representations, &default_descriptor);
296 }
297 {
298 CallInterfaceDescriptor* descriptor =
299 isolate->call_descriptor(Isolate::KeyedCall);
300 Register registers[] = { cp, // context
301 r2, // key
302 };
303 Representation representations[] = {
304 Representation::Tagged(), // context
305 Representation::Tagged(), // key
306 };
307 descriptor->Initialize(arraysize(registers), registers,
308 representations, &noInlineDescriptor);
309 }
310 {
311 CallInterfaceDescriptor* descriptor =
312 isolate->call_descriptor(Isolate::NamedCall);
313 Register registers[] = { cp, // context
314 r2, // name
315 };
316 Representation representations[] = {
317 Representation::Tagged(), // context
318 Representation::Tagged(), // name
319 };
320 descriptor->Initialize(arraysize(registers), registers,
321 representations, &noInlineDescriptor);
322 }
323 {
324 CallInterfaceDescriptor* descriptor =
325 isolate->call_descriptor(Isolate::CallHandler);
326 Register registers[] = { cp, // context
327 r0, // receiver
328 };
329 Representation representations[] = {
330 Representation::Tagged(), // context
331 Representation::Tagged(), // receiver
332 };
333 descriptor->Initialize(arraysize(registers), registers,
334 representations, &default_descriptor);
335 }
336 {
337 CallInterfaceDescriptor* descriptor =
338 isolate->call_descriptor(Isolate::ApiFunctionCall);
339 Register registers[] = { cp, // context
340 r0, // callee
341 r4, // call_data
342 r2, // holder
343 r1, // api_function_address
344 };
345 Representation representations[] = {
346 Representation::Tagged(), // context
347 Representation::Tagged(), // callee
348 Representation::Tagged(), // call_data
349 Representation::Tagged(), // holder
350 Representation::External(), // api_function_address
351 };
352 descriptor->Initialize(arraysize(registers), registers,
353 representations, &default_descriptor);
354 }
355 }
356
357
358 #define __ ACCESS_MASM(masm) 270 #define __ ACCESS_MASM(masm)
359 271
360 272
361 static void EmitIdenticalObjectComparison(MacroAssembler* masm, 273 static void EmitIdenticalObjectComparison(MacroAssembler* masm,
362 Label* slow, 274 Label* slow,
363 Condition cond); 275 Condition cond);
364 static void EmitSmiNonsmiComparison(MacroAssembler* masm, 276 static void EmitSmiNonsmiComparison(MacroAssembler* masm,
365 Register lhs, 277 Register lhs,
366 Register rhs, 278 Register rhs,
367 Label* lhs_not_nan, 279 Label* lhs_not_nan,
(...skipping 4742 matching lines...) Expand 10 before | Expand all | Expand 10 after
5110 MemOperand(fp, 6 * kPointerSize), 5022 MemOperand(fp, 6 * kPointerSize),
5111 NULL); 5023 NULL);
5112 } 5024 }
5113 5025
5114 5026
5115 #undef __ 5027 #undef __
5116 5028
5117 } } // namespace v8::internal 5029 } } // namespace v8::internal
5118 5030
5119 #endif // V8_TARGET_ARCH_ARM 5031 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/arm/code-stubs-arm.h ('k') | src/arm/interface-descriptors-arm.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698