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

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

Issue 350293003: Cleanup CallInterfaceDescriptor (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Code comments. 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
« no previous file with comments | « src/code-stubs.cc ('k') | src/isolate.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/bootstrapper.h" 9 #include "src/bootstrapper.h"
10 #include "src/code-stubs.h" 10 #include "src/code-stubs.h"
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after
303 descriptor->Initialize( 303 descriptor->Initialize(
304 ARRAY_SIZE(registers), registers, 304 ARRAY_SIZE(registers), registers,
305 Runtime::FunctionForId(Runtime::kHiddenStringAdd)->entry); 305 Runtime::FunctionForId(Runtime::kHiddenStringAdd)->entry);
306 } 306 }
307 307
308 308
309 void CallDescriptors::InitializeForIsolate(Isolate* isolate) { 309 void CallDescriptors::InitializeForIsolate(Isolate* isolate) {
310 { 310 {
311 CallInterfaceDescriptor* descriptor = 311 CallInterfaceDescriptor* descriptor =
312 isolate->call_descriptor(Isolate::ArgumentAdaptorCall); 312 isolate->call_descriptor(Isolate::ArgumentAdaptorCall);
313 static Register registers[] = { edi, // JSFunction 313 Register registers[] = { edi, // JSFunction
314 esi, // context 314 esi, // context
315 eax, // actual number of arguments 315 eax, // actual number of arguments
316 ebx, // expected number of arguments 316 ebx, // expected number of arguments
317 }; 317 };
318 static Representation representations[] = { 318 Representation representations[] = {
319 Representation::Tagged(), // JSFunction 319 Representation::Tagged(), // JSFunction
320 Representation::Tagged(), // context 320 Representation::Tagged(), // context
321 Representation::Integer32(), // actual number of arguments 321 Representation::Integer32(), // actual number of arguments
322 Representation::Integer32(), // expected number of arguments 322 Representation::Integer32(), // expected number of arguments
323 }; 323 };
324 descriptor->register_param_count_ = 4; 324 descriptor->Initialize(ARRAY_SIZE(registers), registers, representations);
325 descriptor->register_params_ = registers;
326 descriptor->param_representations_ = representations;
327 } 325 }
328 { 326 {
329 CallInterfaceDescriptor* descriptor = 327 CallInterfaceDescriptor* descriptor =
330 isolate->call_descriptor(Isolate::KeyedCall); 328 isolate->call_descriptor(Isolate::KeyedCall);
331 static Register registers[] = { esi, // context 329 Register registers[] = { esi, // context
332 ecx, // key 330 ecx, // key
333 }; 331 };
334 static Representation representations[] = { 332 Representation representations[] = {
335 Representation::Tagged(), // context 333 Representation::Tagged(), // context
336 Representation::Tagged(), // key 334 Representation::Tagged(), // key
337 }; 335 };
338 descriptor->register_param_count_ = 2; 336 descriptor->Initialize(ARRAY_SIZE(registers), registers, representations);
339 descriptor->register_params_ = registers;
340 descriptor->param_representations_ = representations;
341 } 337 }
342 { 338 {
343 CallInterfaceDescriptor* descriptor = 339 CallInterfaceDescriptor* descriptor =
344 isolate->call_descriptor(Isolate::NamedCall); 340 isolate->call_descriptor(Isolate::NamedCall);
345 static Register registers[] = { esi, // context 341 Register registers[] = { esi, // context
346 ecx, // name 342 ecx, // name
347 }; 343 };
348 static Representation representations[] = { 344 Representation representations[] = {
349 Representation::Tagged(), // context 345 Representation::Tagged(), // context
350 Representation::Tagged(), // name 346 Representation::Tagged(), // name
351 }; 347 };
352 descriptor->register_param_count_ = 2; 348 descriptor->Initialize(ARRAY_SIZE(registers), registers, representations);
353 descriptor->register_params_ = registers;
354 descriptor->param_representations_ = representations;
355 } 349 }
356 { 350 {
357 CallInterfaceDescriptor* descriptor = 351 CallInterfaceDescriptor* descriptor =
358 isolate->call_descriptor(Isolate::CallHandler); 352 isolate->call_descriptor(Isolate::CallHandler);
359 static Register registers[] = { esi, // context 353 Register registers[] = { esi, // context
360 edx, // receiver 354 edx, // receiver
361 }; 355 };
362 static Representation representations[] = { 356 Representation representations[] = {
363 Representation::Tagged(), // context 357 Representation::Tagged(), // context
364 Representation::Tagged(), // receiver 358 Representation::Tagged(), // receiver
365 }; 359 };
366 descriptor->register_param_count_ = 2; 360 descriptor->Initialize(ARRAY_SIZE(registers), registers, representations);
367 descriptor->register_params_ = registers;
368 descriptor->param_representations_ = representations;
369 } 361 }
370 { 362 {
371 CallInterfaceDescriptor* descriptor = 363 CallInterfaceDescriptor* descriptor =
372 isolate->call_descriptor(Isolate::ApiFunctionCall); 364 isolate->call_descriptor(Isolate::ApiFunctionCall);
373 static Register registers[] = { eax, // callee 365 Register registers[] = { eax, // callee
374 ebx, // call_data 366 ebx, // call_data
375 ecx, // holder 367 ecx, // holder
376 edx, // api_function_address 368 edx, // api_function_address
377 esi, // context 369 esi, // context
378 }; 370 };
379 static Representation representations[] = { 371 Representation representations[] = {
380 Representation::Tagged(), // callee 372 Representation::Tagged(), // callee
381 Representation::Tagged(), // call_data 373 Representation::Tagged(), // call_data
382 Representation::Tagged(), // holder 374 Representation::Tagged(), // holder
383 Representation::External(), // api_function_address 375 Representation::External(), // api_function_address
384 Representation::Tagged(), // context 376 Representation::Tagged(), // context
385 }; 377 };
386 descriptor->register_param_count_ = 5; 378 descriptor->Initialize(ARRAY_SIZE(registers), registers, representations);
387 descriptor->register_params_ = registers;
388 descriptor->param_representations_ = representations;
389 } 379 }
390 } 380 }
391 381
392 382
393 #define __ ACCESS_MASM(masm) 383 #define __ ACCESS_MASM(masm)
394 384
395 385
396 void HydrogenCodeStub::GenerateLightweightMiss(MacroAssembler* masm) { 386 void HydrogenCodeStub::GenerateLightweightMiss(MacroAssembler* masm) {
397 // Update the static counter each time a new code stub is generated. 387 // Update the static counter each time a new code stub is generated.
398 isolate()->counters()->code_stubs()->Increment(); 388 isolate()->counters()->code_stubs()->Increment();
(...skipping 4628 matching lines...) Expand 10 before | Expand all | Expand 10 after
5027 Operand(ebp, 7 * kPointerSize), 5017 Operand(ebp, 7 * kPointerSize),
5028 NULL); 5018 NULL);
5029 } 5019 }
5030 5020
5031 5021
5032 #undef __ 5022 #undef __
5033 5023
5034 } } // namespace v8::internal 5024 } } // namespace v8::internal
5035 5025
5036 #endif // V8_TARGET_ARCH_IA32 5026 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/code-stubs.cc ('k') | src/isolate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698