OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
357 Isolate* isolate, | 357 Isolate* isolate, |
358 CodeStubInterfaceDescriptor* descriptor) { | 358 CodeStubInterfaceDescriptor* descriptor) { |
359 static Register registers[] = { edx, eax }; | 359 static Register registers[] = { edx, eax }; |
360 descriptor->register_param_count_ = 2; | 360 descriptor->register_param_count_ = 2; |
361 descriptor->register_params_ = registers; | 361 descriptor->register_params_ = registers; |
362 descriptor->deoptimization_handler_ = | 362 descriptor->deoptimization_handler_ = |
363 Runtime::FunctionForId(Runtime::kStringAdd)->entry; | 363 Runtime::FunctionForId(Runtime::kStringAdd)->entry; |
364 } | 364 } |
365 | 365 |
366 | 366 |
| 367 void CallDescriptors::InitializeForIsolate(Isolate* isolate) { |
| 368 { |
| 369 CallInterfaceDescriptor* descriptor = |
| 370 isolate->call_descriptor(Isolate::ArgumentAdaptorCall); |
| 371 static Register registers[] = { edi, // JSFunction |
| 372 esi, // context |
| 373 eax, // actual number of arguments |
| 374 ebx, // expected number of arguments |
| 375 }; |
| 376 static Representation representations[] = { |
| 377 Representation::Tagged(), // JSFunction |
| 378 Representation::Tagged(), // context |
| 379 Representation::Integer32(), // actual number of arguments |
| 380 Representation::Integer32(), // expected number of arguments |
| 381 }; |
| 382 descriptor->register_param_count_ = 4; |
| 383 descriptor->register_params_ = registers; |
| 384 descriptor->param_representations_ = representations; |
| 385 } |
| 386 { |
| 387 CallInterfaceDescriptor* descriptor = |
| 388 isolate->call_descriptor(Isolate::KeyedCall); |
| 389 static Register registers[] = { esi, // context |
| 390 ecx, // key |
| 391 }; |
| 392 static Representation representations[] = { |
| 393 Representation::Tagged(), // context |
| 394 Representation::Tagged(), // key |
| 395 }; |
| 396 descriptor->register_param_count_ = 2; |
| 397 descriptor->register_params_ = registers; |
| 398 descriptor->param_representations_ = representations; |
| 399 } |
| 400 { |
| 401 CallInterfaceDescriptor* descriptor = |
| 402 isolate->call_descriptor(Isolate::NamedCall); |
| 403 static Register registers[] = { esi, // context |
| 404 ecx, // name |
| 405 }; |
| 406 static Representation representations[] = { |
| 407 Representation::Tagged(), // context |
| 408 Representation::Tagged(), // name |
| 409 }; |
| 410 descriptor->register_param_count_ = 2; |
| 411 descriptor->register_params_ = registers; |
| 412 descriptor->param_representations_ = representations; |
| 413 } |
| 414 } |
| 415 |
| 416 |
367 #define __ ACCESS_MASM(masm) | 417 #define __ ACCESS_MASM(masm) |
368 | 418 |
369 | 419 |
370 void HydrogenCodeStub::GenerateLightweightMiss(MacroAssembler* masm) { | 420 void HydrogenCodeStub::GenerateLightweightMiss(MacroAssembler* masm) { |
371 // Update the static counter each time a new code stub is generated. | 421 // Update the static counter each time a new code stub is generated. |
372 Isolate* isolate = masm->isolate(); | 422 Isolate* isolate = masm->isolate(); |
373 isolate->counters()->code_stubs()->Increment(); | 423 isolate->counters()->code_stubs()->Increment(); |
374 | 424 |
375 CodeStubInterfaceDescriptor* descriptor = GetInterfaceDescriptor(isolate); | 425 CodeStubInterfaceDescriptor* descriptor = GetInterfaceDescriptor(isolate); |
376 int param_count = descriptor->register_param_count_; | 426 int param_count = descriptor->register_param_count_; |
(...skipping 5292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5669 __ bind(&fast_elements_case); | 5719 __ bind(&fast_elements_case); |
5670 GenerateCase(masm, FAST_ELEMENTS); | 5720 GenerateCase(masm, FAST_ELEMENTS); |
5671 } | 5721 } |
5672 | 5722 |
5673 | 5723 |
5674 #undef __ | 5724 #undef __ |
5675 | 5725 |
5676 } } // namespace v8::internal | 5726 } } // namespace v8::internal |
5677 | 5727 |
5678 #endif // V8_TARGET_ARCH_IA32 | 5728 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |