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

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

Issue 8052029: Pregenerate a RecordWrite stub that we need in the new CallFunctionStub (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 9 years, 2 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/arm/code-stubs-arm.cc ('k') | src/isolate.cc » ('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 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 4406 matching lines...) Expand 10 before | Expand all | Expand 10 after
4417 void CodeStub::GenerateStubsAheadOfTime() { 4417 void CodeStub::GenerateStubsAheadOfTime() {
4418 StoreBufferOverflowStub::GenerateFixedRegStubsAheadOfTime(); 4418 StoreBufferOverflowStub::GenerateFixedRegStubsAheadOfTime();
4419 // It is important that the store buffer overflow stubs are generated first. 4419 // It is important that the store buffer overflow stubs are generated first.
4420 RecordWriteStub::GenerateFixedRegStubsAheadOfTime(); 4420 RecordWriteStub::GenerateFixedRegStubsAheadOfTime();
4421 } 4421 }
4422 4422
4423 4423
4424 void CodeStub::GenerateFPStubs() { 4424 void CodeStub::GenerateFPStubs() {
4425 CEntryStub save_doubles(1, kSaveFPRegs); 4425 CEntryStub save_doubles(1, kSaveFPRegs);
4426 Handle<Code> code = save_doubles.GetCode(); 4426 Handle<Code> code = save_doubles.GetCode();
4427 code->set_is_pregenerated(true);
4427 code->GetIsolate()->set_fp_stubs_generated(true); 4428 code->GetIsolate()->set_fp_stubs_generated(true);
4428 } 4429 }
4429 4430
4430 4431
4431 void CEntryStub::GenerateThrowTOS(MacroAssembler* masm) { 4432 void CEntryStub::GenerateThrowTOS(MacroAssembler* masm) {
4432 __ Throw(eax); 4433 __ Throw(eax);
4433 } 4434 }
4434 4435
4435 4436
4436 void CEntryStub::GenerateCore(MacroAssembler* masm, 4437 void CEntryStub::GenerateCore(MacroAssembler* masm,
(...skipping 2223 matching lines...) Expand 10 before | Expand all | Expand 10 after
6660 Register object, value, address; 6661 Register object, value, address;
6661 RememberedSetAction action; 6662 RememberedSetAction action;
6662 }; 6663 };
6663 6664
6664 6665
6665 struct AheadOfTimeWriteBarrierStubList kAheadOfTime[] = { 6666 struct AheadOfTimeWriteBarrierStubList kAheadOfTime[] = {
6666 // Used in RegExpExecStub. 6667 // Used in RegExpExecStub.
6667 { ebx, eax, edi, EMIT_REMEMBERED_SET }, 6668 { ebx, eax, edi, EMIT_REMEMBERED_SET },
6668 // Used in CompileArrayPushCall. 6669 // Used in CompileArrayPushCall.
6669 { ebx, ecx, edx, EMIT_REMEMBERED_SET }, 6670 { ebx, ecx, edx, EMIT_REMEMBERED_SET },
6670 // Used in CompileStoreGlobal. 6671 // Used in CompileStoreGlobal and CallFunctionStub.
6671 { ebx, ecx, edx, OMIT_REMEMBERED_SET }, 6672 { ebx, ecx, edx, OMIT_REMEMBERED_SET },
6672 // Used in StoreStubCompiler::CompileStoreField and 6673 // Used in StoreStubCompiler::CompileStoreField and
6673 // KeyedStoreStubCompiler::CompileStoreField via GenerateStoreField. 6674 // KeyedStoreStubCompiler::CompileStoreField via GenerateStoreField.
6674 { edx, ecx, ebx, EMIT_REMEMBERED_SET }, 6675 { edx, ecx, ebx, EMIT_REMEMBERED_SET },
6675 // GenerateStoreField calls the stub with two different permutations of 6676 // GenerateStoreField calls the stub with two different permutations of
6676 // registers. This is the second. 6677 // registers. This is the second.
6677 { ebx, ecx, edx, EMIT_REMEMBERED_SET }, 6678 { ebx, ecx, edx, EMIT_REMEMBERED_SET },
6678 // StoreIC::GenerateNormal via GenerateDictionaryStore, CompileArrayPushCall 6679 // StoreIC::GenerateNormal via GenerateDictionaryStore, CompileArrayPushCall
6679 { ebx, edi, edx, EMIT_REMEMBERED_SET }, 6680 { ebx, edi, edx, EMIT_REMEMBERED_SET },
6680 // KeyedStoreIC::GenerateGeneric. 6681 // KeyedStoreIC::GenerateGeneric.
(...skipping 16 matching lines...) Expand all
6697 save_fp_regs_mode_ == kDontSaveFPRegs) { 6698 save_fp_regs_mode_ == kDontSaveFPRegs) {
6698 return true; 6699 return true;
6699 } 6700 }
6700 } 6701 }
6701 return false; 6702 return false;
6702 } 6703 }
6703 6704
6704 6705
6705 void StoreBufferOverflowStub::GenerateFixedRegStubsAheadOfTime() { 6706 void StoreBufferOverflowStub::GenerateFixedRegStubsAheadOfTime() {
6706 StoreBufferOverflowStub stub1(kDontSaveFPRegs); 6707 StoreBufferOverflowStub stub1(kDontSaveFPRegs);
6707 stub1.GetCode(); 6708 stub1.GetCode()->set_is_pregenerated(true);
6708 6709
6709 CpuFeatures::TryForceFeatureScope scope(SSE2); 6710 CpuFeatures::TryForceFeatureScope scope(SSE2);
6710 if (CpuFeatures::IsSupported(SSE2)) { 6711 if (CpuFeatures::IsSupported(SSE2)) {
6711 StoreBufferOverflowStub stub2(kSaveFPRegs); 6712 StoreBufferOverflowStub stub2(kSaveFPRegs);
6712 stub2.GetCode(); 6713 stub2.GetCode()->set_is_pregenerated(true);
6713 } 6714 }
6714 } 6715 }
6715 6716
6716 6717
6717 void RecordWriteStub::GenerateFixedRegStubsAheadOfTime() { 6718 void RecordWriteStub::GenerateFixedRegStubsAheadOfTime() {
6718 for (AheadOfTimeWriteBarrierStubList* entry = kAheadOfTime; 6719 for (AheadOfTimeWriteBarrierStubList* entry = kAheadOfTime;
6719 !entry->object.is(no_reg); 6720 !entry->object.is(no_reg);
6720 entry++) { 6721 entry++) {
6721 RecordWriteStub stub(entry->object, 6722 RecordWriteStub stub(entry->object,
6722 entry->value, 6723 entry->value,
6723 entry->address, 6724 entry->address,
6724 entry->action, 6725 entry->action,
6725 kDontSaveFPRegs); 6726 kDontSaveFPRegs);
6726 stub.GetCode(); 6727 stub.GetCode()->set_is_pregenerated(true);
6727 } 6728 }
6728 } 6729 }
6729 6730
6730 6731
6731 // Takes the input in 3 registers: address_ value_ and object_. A pointer to 6732 // Takes the input in 3 registers: address_ value_ and object_. A pointer to
6732 // the value has just been written into the object, now this stub makes sure 6733 // the value has just been written into the object, now this stub makes sure
6733 // we keep the GC informed. The word in the object where the value has been 6734 // we keep the GC informed. The word in the object where the value has been
6734 // written is in the address register. 6735 // written is in the address register.
6735 void RecordWriteStub::Generate(MacroAssembler* masm) { 6736 void RecordWriteStub::Generate(MacroAssembler* masm) {
6736 Label skip_to_incremental_noncompacting; 6737 Label skip_to_incremental_noncompacting;
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
6922 6923
6923 // Fall through when we need to inform the incremental marker. 6924 // Fall through when we need to inform the incremental marker.
6924 } 6925 }
6925 6926
6926 6927
6927 #undef __ 6928 #undef __
6928 6929
6929 } } // namespace v8::internal 6930 } } // namespace v8::internal
6930 6931
6931 #endif // V8_TARGET_ARCH_IA32 6932 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/arm/code-stubs-arm.cc ('k') | src/isolate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698