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

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

Issue 384403002: StubCallInterfaceDescriptor takes a context register. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Base class for Descriptors. Created 6 years, 5 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_IA32 7 #if V8_TARGET_ARCH_IA32
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 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 94
95 void TransitionElementsKindStub::InitializeInterfaceDescriptor( 95 void TransitionElementsKindStub::InitializeInterfaceDescriptor(
96 CodeStubInterfaceDescriptor* descriptor) { 96 CodeStubInterfaceDescriptor* descriptor) {
97 Register registers[] = { eax, ebx }; 97 Register registers[] = { eax, ebx };
98 descriptor->Initialize( 98 descriptor->Initialize(
99 ARRAY_SIZE(registers), registers, 99 ARRAY_SIZE(registers), registers,
100 Runtime::FunctionForId(Runtime::kTransitionElementsKind)->entry); 100 Runtime::FunctionForId(Runtime::kTransitionElementsKind)->entry);
101 } 101 }
102 102
103 103
104 const Register InterfaceDescriptor::ContextRegister() { return esi; }
105
106
104 static void InitializeArrayConstructorDescriptor( 107 static void InitializeArrayConstructorDescriptor(
105 Isolate* isolate, 108 Isolate* isolate,
106 CodeStubInterfaceDescriptor* descriptor, 109 CodeStubInterfaceDescriptor* descriptor,
107 int constant_stack_parameter_count) { 110 int constant_stack_parameter_count) {
108 // register state 111 // register state
109 // eax -- number of arguments 112 // eax -- number of arguments
110 // edi -- function 113 // edi -- function
111 // ebx -- allocation site with elements kind 114 // ebx -- allocation site with elements kind
112 Address deopt_handler = Runtime::FunctionForId( 115 Address deopt_handler = Runtime::FunctionForId(
113 Runtime::kArrayConstructor)->entry; 116 Runtime::kArrayConstructor)->entry;
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
258 ARRAY_SIZE(registers), registers, 261 ARRAY_SIZE(registers), registers,
259 Runtime::FunctionForId(Runtime::kStringAdd)->entry); 262 Runtime::FunctionForId(Runtime::kStringAdd)->entry);
260 } 263 }
261 264
262 265
263 void CallDescriptors::InitializeForIsolate(Isolate* isolate) { 266 void CallDescriptors::InitializeForIsolate(Isolate* isolate) {
264 { 267 {
265 CallInterfaceDescriptor* descriptor = 268 CallInterfaceDescriptor* descriptor =
266 isolate->call_descriptor(Isolate::ArgumentAdaptorCall); 269 isolate->call_descriptor(Isolate::ArgumentAdaptorCall);
267 Register registers[] = { edi, // JSFunction 270 Register registers[] = { edi, // JSFunction
268 esi, // context
269 eax, // actual number of arguments 271 eax, // actual number of arguments
270 ebx, // expected number of arguments 272 ebx, // expected number of arguments
271 }; 273 };
272 Representation representations[] = { 274 Representation representations[] = {
273 Representation::Tagged(), // JSFunction 275 Representation::Tagged(), // JSFunction
274 Representation::Tagged(), // context
275 Representation::Integer32(), // actual number of arguments 276 Representation::Integer32(), // actual number of arguments
276 Representation::Integer32(), // expected number of arguments 277 Representation::Integer32(), // expected number of arguments
277 }; 278 };
278 descriptor->Initialize(ARRAY_SIZE(registers), registers, representations); 279 descriptor->Initialize(ARRAY_SIZE(registers), registers, representations);
279 } 280 }
280 { 281 {
281 CallInterfaceDescriptor* descriptor = 282 CallInterfaceDescriptor* descriptor =
282 isolate->call_descriptor(Isolate::KeyedCall); 283 isolate->call_descriptor(Isolate::KeyedCall);
283 Register registers[] = { esi, // context 284 Register registers[] = { ecx }; // key
284 ecx, // key
285 };
286 Representation representations[] = { 285 Representation representations[] = {
287 Representation::Tagged(), // context 286 Representation::Tagged() // key
288 Representation::Tagged(), // key
289 }; 287 };
290 descriptor->Initialize(ARRAY_SIZE(registers), registers, representations); 288 descriptor->Initialize(ARRAY_SIZE(registers), registers, representations);
291 } 289 }
292 { 290 {
293 CallInterfaceDescriptor* descriptor = 291 CallInterfaceDescriptor* descriptor =
294 isolate->call_descriptor(Isolate::NamedCall); 292 isolate->call_descriptor(Isolate::NamedCall);
295 Register registers[] = { esi, // context 293 Register registers[] = { ecx }; // name
296 ecx, // name
297 };
298 Representation representations[] = { 294 Representation representations[] = {
299 Representation::Tagged(), // context 295 Representation::Tagged() // name
300 Representation::Tagged(), // name
301 }; 296 };
302 descriptor->Initialize(ARRAY_SIZE(registers), registers, representations); 297 descriptor->Initialize(ARRAY_SIZE(registers), registers, representations);
303 } 298 }
304 { 299 {
305 CallInterfaceDescriptor* descriptor = 300 CallInterfaceDescriptor* descriptor =
306 isolate->call_descriptor(Isolate::CallHandler); 301 isolate->call_descriptor(Isolate::CallHandler);
307 Register registers[] = { esi, // context 302 Register registers[] = { edx }; // receiver
308 edx, // receiver
309 };
310 Representation representations[] = { 303 Representation representations[] = {
311 Representation::Tagged(), // context 304 Representation::Tagged() // receiver
312 Representation::Tagged(), // receiver
313 }; 305 };
314 descriptor->Initialize(ARRAY_SIZE(registers), registers, representations); 306 descriptor->Initialize(ARRAY_SIZE(registers), registers, representations);
315 } 307 }
316 { 308 {
317 CallInterfaceDescriptor* descriptor = 309 CallInterfaceDescriptor* descriptor =
318 isolate->call_descriptor(Isolate::ApiFunctionCall); 310 isolate->call_descriptor(Isolate::ApiFunctionCall);
319 Register registers[] = { eax, // callee 311 Register registers[] = { eax, // callee
320 ebx, // call_data 312 ebx, // call_data
321 ecx, // holder 313 ecx, // holder
322 edx, // api_function_address 314 edx // api_function_address
323 esi, // context
324 }; 315 };
325 Representation representations[] = { 316 Representation representations[] = {
326 Representation::Tagged(), // callee 317 Representation::Tagged(), // callee
327 Representation::Tagged(), // call_data 318 Representation::Tagged(), // call_data
328 Representation::Tagged(), // holder 319 Representation::Tagged(), // holder
329 Representation::External(), // api_function_address 320 Representation::External() // api_function_address
330 Representation::Tagged(), // context
331 }; 321 };
332 descriptor->Initialize(ARRAY_SIZE(registers), registers, representations); 322 descriptor->Initialize(ARRAY_SIZE(registers), registers, representations);
333 } 323 }
334 } 324 }
335 325
336 326
337 #define __ ACCESS_MASM(masm) 327 #define __ ACCESS_MASM(masm)
338 328
339 329
340 void HydrogenCodeStub::GenerateLightweightMiss(MacroAssembler* masm) { 330 void HydrogenCodeStub::GenerateLightweightMiss(MacroAssembler* masm) {
(...skipping 4635 matching lines...) Expand 10 before | Expand all | Expand 10 after
4976 Operand(ebp, 7 * kPointerSize), 4966 Operand(ebp, 7 * kPointerSize),
4977 NULL); 4967 NULL);
4978 } 4968 }
4979 4969
4980 4970
4981 #undef __ 4971 #undef __
4982 4972
4983 } } // namespace v8::internal 4973 } } // namespace v8::internal
4984 4974
4985 #endif // V8_TARGET_ARCH_IA32 4975 #endif // V8_TARGET_ARCH_IA32
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698