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

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

Issue 96753003: Remove the obsolete Code::IsPregenerated flag. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Add comment about unused bit. Created 7 years 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/objects-inl.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 2780 matching lines...) Expand 10 before | Expand all | Expand 10 after
2791 BinaryOpStub::GenerateAheadOfTime(isolate); 2791 BinaryOpStub::GenerateAheadOfTime(isolate);
2792 } 2792 }
2793 2793
2794 2794
2795 void CodeStub::GenerateFPStubs(Isolate* isolate) { 2795 void CodeStub::GenerateFPStubs(Isolate* isolate) {
2796 } 2796 }
2797 2797
2798 2798
2799 void CEntryStub::GenerateAheadOfTime(Isolate* isolate) { 2799 void CEntryStub::GenerateAheadOfTime(Isolate* isolate) {
2800 CEntryStub stub(1, kDontSaveFPRegs); 2800 CEntryStub stub(1, kDontSaveFPRegs);
2801 stub.GetCode(isolate)->set_is_pregenerated(true); 2801 stub.GetCode(isolate);
2802 CEntryStub save_doubles(1, kSaveFPRegs); 2802 CEntryStub save_doubles(1, kSaveFPRegs);
2803 save_doubles.GetCode(isolate)->set_is_pregenerated(true); 2803 save_doubles.GetCode(isolate);
2804 } 2804 }
2805 2805
2806 2806
2807 static void JumpIfOOM(MacroAssembler* masm, 2807 static void JumpIfOOM(MacroAssembler* masm,
2808 Register value, 2808 Register value,
2809 Register scratch, 2809 Register scratch,
2810 Label* oom_label) { 2810 Label* oom_label) {
2811 __ movq(scratch, value); 2811 __ movq(scratch, value);
2812 STATIC_ASSERT(Failure::OUT_OF_MEMORY_EXCEPTION == 3); 2812 STATIC_ASSERT(Failure::OUT_OF_MEMORY_EXCEPTION == 3);
2813 STATIC_ASSERT(kFailureTag == 3); 2813 STATIC_ASSERT(kFailureTag == 3);
(...skipping 2257 matching lines...) Expand 10 before | Expand all | Expand 10 after
5071 __ bind(&not_in_dictionary); 5071 __ bind(&not_in_dictionary);
5072 __ movq(scratch, Immediate(0)); 5072 __ movq(scratch, Immediate(0));
5073 __ Drop(1); 5073 __ Drop(1);
5074 __ ret(2 * kPointerSize); 5074 __ ret(2 * kPointerSize);
5075 } 5075 }
5076 5076
5077 5077
5078 void StoreBufferOverflowStub::GenerateFixedRegStubsAheadOfTime( 5078 void StoreBufferOverflowStub::GenerateFixedRegStubsAheadOfTime(
5079 Isolate* isolate) { 5079 Isolate* isolate) {
5080 StoreBufferOverflowStub stub1(kDontSaveFPRegs); 5080 StoreBufferOverflowStub stub1(kDontSaveFPRegs);
5081 stub1.GetCode(isolate)->set_is_pregenerated(true); 5081 stub1.GetCode(isolate);
5082 StoreBufferOverflowStub stub2(kSaveFPRegs); 5082 StoreBufferOverflowStub stub2(kSaveFPRegs);
5083 stub2.GetCode(isolate)->set_is_pregenerated(true); 5083 stub2.GetCode(isolate);
5084 } 5084 }
5085 5085
5086 5086
5087 bool CodeStub::CanUseFPRegisters() { 5087 bool CodeStub::CanUseFPRegisters() {
5088 return true; // Always have SSE2 on x64. 5088 return true; // Always have SSE2 on x64.
5089 } 5089 }
5090 5090
5091 5091
5092 // Takes the input in 3 registers: address_ value_ and object_. A pointer to 5092 // Takes the input in 3 registers: address_ value_ and object_. A pointer to
5093 // the value has just been written into the object, now this stub makes sure 5093 // the value has just been written into the object, now this stub makes sure
(...skipping 473 matching lines...) Expand 10 before | Expand all | Expand 10 after
5567 template<class T> 5567 template<class T>
5568 static void ArrayConstructorStubAheadOfTimeHelper(Isolate* isolate) { 5568 static void ArrayConstructorStubAheadOfTimeHelper(Isolate* isolate) {
5569 ElementsKind initial_kind = GetInitialFastElementsKind(); 5569 ElementsKind initial_kind = GetInitialFastElementsKind();
5570 ElementsKind initial_holey_kind = GetHoleyElementsKind(initial_kind); 5570 ElementsKind initial_holey_kind = GetHoleyElementsKind(initial_kind);
5571 5571
5572 int to_index = GetSequenceIndexFromFastElementsKind( 5572 int to_index = GetSequenceIndexFromFastElementsKind(
5573 TERMINAL_FAST_ELEMENTS_KIND); 5573 TERMINAL_FAST_ELEMENTS_KIND);
5574 for (int i = 0; i <= to_index; ++i) { 5574 for (int i = 0; i <= to_index; ++i) {
5575 ElementsKind kind = GetFastElementsKindFromSequenceIndex(i); 5575 ElementsKind kind = GetFastElementsKindFromSequenceIndex(i);
5576 T stub(kind); 5576 T stub(kind);
5577 stub.GetCode(isolate)->set_is_pregenerated(true); 5577 stub.GetCode(isolate);
5578 if (AllocationSite::GetMode(kind) != DONT_TRACK_ALLOCATION_SITE || 5578 if (AllocationSite::GetMode(kind) != DONT_TRACK_ALLOCATION_SITE ||
5579 (!FLAG_track_allocation_sites && 5579 (!FLAG_track_allocation_sites &&
5580 (kind == initial_kind || kind == initial_holey_kind))) { 5580 (kind == initial_kind || kind == initial_holey_kind))) {
5581 T stub1(kind, CONTEXT_CHECK_REQUIRED, DISABLE_ALLOCATION_SITES); 5581 T stub1(kind, CONTEXT_CHECK_REQUIRED, DISABLE_ALLOCATION_SITES);
5582 stub1.GetCode(isolate)->set_is_pregenerated(true); 5582 stub1.GetCode(isolate);
5583 } 5583 }
5584 } 5584 }
5585 } 5585 }
5586 5586
5587 5587
5588 void ArrayConstructorStubBase::GenerateStubsAheadOfTime(Isolate* isolate) { 5588 void ArrayConstructorStubBase::GenerateStubsAheadOfTime(Isolate* isolate) {
5589 ArrayConstructorStubAheadOfTimeHelper<ArrayNoArgumentConstructorStub>( 5589 ArrayConstructorStubAheadOfTimeHelper<ArrayNoArgumentConstructorStub>(
5590 isolate); 5590 isolate);
5591 ArrayConstructorStubAheadOfTimeHelper<ArraySingleArgumentConstructorStub>( 5591 ArrayConstructorStubAheadOfTimeHelper<ArraySingleArgumentConstructorStub>(
5592 isolate); 5592 isolate);
5593 ArrayConstructorStubAheadOfTimeHelper<ArrayNArgumentsConstructorStub>( 5593 ArrayConstructorStubAheadOfTimeHelper<ArrayNArgumentsConstructorStub>(
5594 isolate); 5594 isolate);
5595 } 5595 }
5596 5596
5597 5597
5598 void InternalArrayConstructorStubBase::GenerateStubsAheadOfTime( 5598 void InternalArrayConstructorStubBase::GenerateStubsAheadOfTime(
5599 Isolate* isolate) { 5599 Isolate* isolate) {
5600 ElementsKind kinds[2] = { FAST_ELEMENTS, FAST_HOLEY_ELEMENTS }; 5600 ElementsKind kinds[2] = { FAST_ELEMENTS, FAST_HOLEY_ELEMENTS };
5601 for (int i = 0; i < 2; i++) { 5601 for (int i = 0; i < 2; i++) {
5602 // For internal arrays we only need a few things 5602 // For internal arrays we only need a few things
5603 InternalArrayNoArgumentConstructorStub stubh1(kinds[i]); 5603 InternalArrayNoArgumentConstructorStub stubh1(kinds[i]);
5604 stubh1.GetCode(isolate)->set_is_pregenerated(true); 5604 stubh1.GetCode(isolate);
5605 InternalArraySingleArgumentConstructorStub stubh2(kinds[i]); 5605 InternalArraySingleArgumentConstructorStub stubh2(kinds[i]);
5606 stubh2.GetCode(isolate)->set_is_pregenerated(true); 5606 stubh2.GetCode(isolate);
5607 InternalArrayNArgumentsConstructorStub stubh3(kinds[i]); 5607 InternalArrayNArgumentsConstructorStub stubh3(kinds[i]);
5608 stubh3.GetCode(isolate)->set_is_pregenerated(true); 5608 stubh3.GetCode(isolate);
5609 } 5609 }
5610 } 5610 }
5611 5611
5612 5612
5613 void ArrayConstructorStub::GenerateDispatchToArrayStub( 5613 void ArrayConstructorStub::GenerateDispatchToArrayStub(
5614 MacroAssembler* masm, 5614 MacroAssembler* masm,
5615 AllocationSiteOverrideMode mode) { 5615 AllocationSiteOverrideMode mode) {
5616 if (argument_count_ == ANY) { 5616 if (argument_count_ == ANY) {
5617 Label not_zero_case, not_one_case; 5617 Label not_zero_case, not_one_case;
5618 __ testq(rax, rax); 5618 __ testq(rax, rax);
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
5783 __ bind(&fast_elements_case); 5783 __ bind(&fast_elements_case);
5784 GenerateCase(masm, FAST_ELEMENTS); 5784 GenerateCase(masm, FAST_ELEMENTS);
5785 } 5785 }
5786 5786
5787 5787
5788 #undef __ 5788 #undef __
5789 5789
5790 } } // namespace v8::internal 5790 } } // namespace v8::internal
5791 5791
5792 #endif // V8_TARGET_ARCH_X64 5792 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/objects-inl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698