| OLD | NEW |
| 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 333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 344 Representation::Tagged(), // call_data | 344 Representation::Tagged(), // call_data |
| 345 Representation::Tagged(), // holder | 345 Representation::Tagged(), // holder |
| 346 Representation::External(), // api_function_address | 346 Representation::External(), // api_function_address |
| 347 Representation::Tagged(), // context | 347 Representation::Tagged(), // context |
| 348 }; | 348 }; |
| 349 descriptor->Initialize(ARRAY_SIZE(registers), registers, representations); | 349 descriptor->Initialize(ARRAY_SIZE(registers), registers, representations); |
| 350 } | 350 } |
| 351 } | 351 } |
| 352 | 352 |
| 353 | 353 |
| 354 // IC register specifications |
| 355 const Register GrowArrayElementsStub::ObjectRegister() { return eax; } |
| 356 const Register GrowArrayElementsStub::KeyRegister() { return ebx; } |
| 357 const Register GrowArrayElementsStub::CapacityRegister() { return ecx; } |
| 358 |
| 359 |
| 354 #define __ ACCESS_MASM(masm) | 360 #define __ ACCESS_MASM(masm) |
| 355 | 361 |
| 356 | 362 |
| 357 void HydrogenCodeStub::GenerateLightweightMiss(MacroAssembler* masm) { | 363 void HydrogenCodeStub::GenerateLightweightMiss(MacroAssembler* masm) { |
| 358 // Update the static counter each time a new code stub is generated. | 364 // Update the static counter each time a new code stub is generated. |
| 359 isolate()->counters()->code_stubs()->Increment(); | 365 isolate()->counters()->code_stubs()->Increment(); |
| 360 | 366 |
| 361 CodeStubInterfaceDescriptor* descriptor = GetInterfaceDescriptor(); | 367 CodeStubInterfaceDescriptor* descriptor = GetInterfaceDescriptor(); |
| 362 int param_count = descriptor->register_param_count(); | 368 int param_count = descriptor->register_param_count(); |
| 363 { | 369 { |
| (...skipping 2155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2519 | 2525 |
| 2520 void CodeStub::GenerateStubsAheadOfTime(Isolate* isolate) { | 2526 void CodeStub::GenerateStubsAheadOfTime(Isolate* isolate) { |
| 2521 CEntryStub::GenerateAheadOfTime(isolate); | 2527 CEntryStub::GenerateAheadOfTime(isolate); |
| 2522 StoreBufferOverflowStub::GenerateFixedRegStubsAheadOfTime(isolate); | 2528 StoreBufferOverflowStub::GenerateFixedRegStubsAheadOfTime(isolate); |
| 2523 StubFailureTrampolineStub::GenerateAheadOfTime(isolate); | 2529 StubFailureTrampolineStub::GenerateAheadOfTime(isolate); |
| 2524 // It is important that the store buffer overflow stubs are generated first. | 2530 // It is important that the store buffer overflow stubs are generated first. |
| 2525 ArrayConstructorStubBase::GenerateStubsAheadOfTime(isolate); | 2531 ArrayConstructorStubBase::GenerateStubsAheadOfTime(isolate); |
| 2526 CreateAllocationSiteStub::GenerateAheadOfTime(isolate); | 2532 CreateAllocationSiteStub::GenerateAheadOfTime(isolate); |
| 2527 BinaryOpICStub::GenerateAheadOfTime(isolate); | 2533 BinaryOpICStub::GenerateAheadOfTime(isolate); |
| 2528 BinaryOpICWithAllocationSiteStub::GenerateAheadOfTime(isolate); | 2534 BinaryOpICWithAllocationSiteStub::GenerateAheadOfTime(isolate); |
| 2535 GrowArrayElementsStub::GenerateAheadOfTime(isolate); |
| 2529 } | 2536 } |
| 2530 | 2537 |
| 2531 | 2538 |
| 2532 void CodeStub::GenerateFPStubs(Isolate* isolate) { | 2539 void CodeStub::GenerateFPStubs(Isolate* isolate) { |
| 2533 CEntryStub save_doubles(isolate, 1, kSaveFPRegs); | 2540 CEntryStub save_doubles(isolate, 1, kSaveFPRegs); |
| 2534 // Stubs might already be in the snapshot, detect that and don't regenerate, | 2541 // Stubs might already be in the snapshot, detect that and don't regenerate, |
| 2535 // which would lead to code stub initialization state being messed up. | 2542 // which would lead to code stub initialization state being messed up. |
| 2536 Code* save_doubles_code; | 2543 Code* save_doubles_code; |
| 2537 if (!save_doubles.FindCodeInCache(&save_doubles_code)) { | 2544 if (!save_doubles.FindCodeInCache(&save_doubles_code)) { |
| 2538 save_doubles_code = *(save_doubles.GetCode()); | 2545 save_doubles_code = *(save_doubles.GetCode()); |
| (...skipping 2449 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4988 Operand(ebp, 7 * kPointerSize), | 4995 Operand(ebp, 7 * kPointerSize), |
| 4989 NULL); | 4996 NULL); |
| 4990 } | 4997 } |
| 4991 | 4998 |
| 4992 | 4999 |
| 4993 #undef __ | 5000 #undef __ |
| 4994 | 5001 |
| 4995 } } // namespace v8::internal | 5002 } } // namespace v8::internal |
| 4996 | 5003 |
| 4997 #endif // V8_TARGET_ARCH_IA32 | 5004 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |