| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 755 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 766 // operation result to the caller of the stub. | 766 // operation result to the caller of the stub. |
| 767 __ TailCallExternalReference( | 767 __ TailCallExternalReference( |
| 768 ExternalReference(IC_Utility(IC::kBinaryOp_Patch), | 768 ExternalReference(IC_Utility(IC::kBinaryOp_Patch), |
| 769 masm->isolate()), | 769 masm->isolate()), |
| 770 5, | 770 5, |
| 771 1); | 771 1); |
| 772 } | 772 } |
| 773 | 773 |
| 774 | 774 |
| 775 void BinaryOpStub::Generate(MacroAssembler* masm) { | 775 void BinaryOpStub::Generate(MacroAssembler* masm) { |
| 776 // Explicitly allow generation of nested stubs. It is safe here. |
| 777 AllowStubCallsScope allow_stub_calls(masm, true); |
| 778 |
| 776 switch (operands_type_) { | 779 switch (operands_type_) { |
| 777 case BinaryOpIC::UNINITIALIZED: | 780 case BinaryOpIC::UNINITIALIZED: |
| 778 GenerateTypeTransition(masm); | 781 GenerateTypeTransition(masm); |
| 779 break; | 782 break; |
| 780 case BinaryOpIC::SMI: | 783 case BinaryOpIC::SMI: |
| 781 GenerateSmiStub(masm); | 784 GenerateSmiStub(masm); |
| 782 break; | 785 break; |
| 783 case BinaryOpIC::INT32: | 786 case BinaryOpIC::INT32: |
| 784 UNREACHABLE(); | 787 UNREACHABLE(); |
| 785 // The int32 case is identical to the Smi case. We avoid creating this | 788 // The int32 case is identical to the Smi case. We avoid creating this |
| (...skipping 2556 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3342 Isolate::Current()->builtins()->ArgumentsAdaptorTrampoline(); | 3345 Isolate::Current()->builtins()->ArgumentsAdaptorTrampoline(); |
| 3343 __ Jump(adaptor, RelocInfo::CODE_TARGET); | 3346 __ Jump(adaptor, RelocInfo::CODE_TARGET); |
| 3344 } | 3347 } |
| 3345 | 3348 |
| 3346 | 3349 |
| 3347 bool CEntryStub::NeedsImmovableCode() { | 3350 bool CEntryStub::NeedsImmovableCode() { |
| 3348 return false; | 3351 return false; |
| 3349 } | 3352 } |
| 3350 | 3353 |
| 3351 | 3354 |
| 3352 bool CEntryStub::CompilingCallsToThisStubIsGCSafe() { | 3355 bool CEntryStub::IsPregenerated() { |
| 3353 return result_size_ == 1; | 3356 return result_size_ == 1; |
| 3354 } | 3357 } |
| 3355 | 3358 |
| 3356 | 3359 |
| 3357 void CodeStub::GenerateStubsAheadOfTime() { | 3360 void CodeStub::GenerateStubsAheadOfTime() { |
| 3358 CEntryStub save_doubles(1, kSaveFPRegs); | 3361 CEntryStub save_doubles(1, kSaveFPRegs); |
| 3359 save_doubles.GetCode(); | 3362 save_doubles.GetCode(); |
| 3360 StoreBufferOverflowStub::GenerateFixedRegStubsAheadOfTime(); | 3363 StoreBufferOverflowStub::GenerateFixedRegStubsAheadOfTime(); |
| 3361 // It is important that the store buffer overflow stubs are generated first. | 3364 // It is important that the store buffer overflow stubs are generated first. |
| 3362 RecordWriteStub::GenerateFixedRegStubsAheadOfTime(); | 3365 RecordWriteStub::GenerateFixedRegStubsAheadOfTime(); |
| (...skipping 2208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5571 { rbx, r8, r9, EMIT_REMEMBERED_SET }, | 5574 { rbx, r8, r9, EMIT_REMEMBERED_SET }, |
| 5572 // KeyedStoreIC::GenerateGeneric. | 5575 // KeyedStoreIC::GenerateGeneric. |
| 5573 { rbx, rdx, rcx, EMIT_REMEMBERED_SET}, | 5576 { rbx, rdx, rcx, EMIT_REMEMBERED_SET}, |
| 5574 // KeyedStoreStubCompiler::GenerateStoreFastElement. | 5577 // KeyedStoreStubCompiler::GenerateStoreFastElement. |
| 5575 { rdi, rdx, rcx, EMIT_REMEMBERED_SET}, | 5578 { rdi, rdx, rcx, EMIT_REMEMBERED_SET}, |
| 5576 // Null termination. | 5579 // Null termination. |
| 5577 { no_reg, no_reg, no_reg, EMIT_REMEMBERED_SET} | 5580 { no_reg, no_reg, no_reg, EMIT_REMEMBERED_SET} |
| 5578 }; | 5581 }; |
| 5579 | 5582 |
| 5580 | 5583 |
| 5581 bool RecordWriteStub::CompilingCallsToThisStubIsGCSafe() { | 5584 bool RecordWriteStub::IsPregenerated() { |
| 5582 for (AheadOfTimeWriteBarrierStubList* entry = kAheadOfTime; | 5585 for (AheadOfTimeWriteBarrierStubList* entry = kAheadOfTime; |
| 5583 !entry->object.is(no_reg); | 5586 !entry->object.is(no_reg); |
| 5584 entry++) { | 5587 entry++) { |
| 5585 if (object_.is(entry->object) && | 5588 if (object_.is(entry->object) && |
| 5586 value_.is(entry->value) && | 5589 value_.is(entry->value) && |
| 5587 address_.is(entry->address) && | 5590 address_.is(entry->address) && |
| 5588 remembered_set_action_ == entry->action && | 5591 remembered_set_action_ == entry->action && |
| 5589 save_fp_regs_mode_ == kDontSaveFPRegs) { | 5592 save_fp_regs_mode_ == kDontSaveFPRegs) { |
| 5590 return true; | 5593 return true; |
| 5591 } | 5594 } |
| (...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5819 | 5822 |
| 5820 // Fall through when we need to inform the incremental marker. | 5823 // Fall through when we need to inform the incremental marker. |
| 5821 } | 5824 } |
| 5822 | 5825 |
| 5823 | 5826 |
| 5824 #undef __ | 5827 #undef __ |
| 5825 | 5828 |
| 5826 } } // namespace v8::internal | 5829 } } // namespace v8::internal |
| 5827 | 5830 |
| 5828 #endif // V8_TARGET_ARCH_X64 | 5831 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |