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

Side by Side Diff: src/arm/code-stubs-arm.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 | « no previous file | src/code-stubs.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 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 679 matching lines...) Expand 10 before | Expand all | Expand 10 after
690 690
691 __ Pop(scratch_high, scratch_low); 691 __ Pop(scratch_high, scratch_low);
692 __ Ret(); 692 __ Ret();
693 } 693 }
694 694
695 695
696 void WriteInt32ToHeapNumberStub::GenerateFixedRegStubsAheadOfTime( 696 void WriteInt32ToHeapNumberStub::GenerateFixedRegStubsAheadOfTime(
697 Isolate* isolate) { 697 Isolate* isolate) {
698 WriteInt32ToHeapNumberStub stub1(r1, r0, r2); 698 WriteInt32ToHeapNumberStub stub1(r1, r0, r2);
699 WriteInt32ToHeapNumberStub stub2(r2, r0, r3); 699 WriteInt32ToHeapNumberStub stub2(r2, r0, r3);
700 stub1.GetCode(isolate)->set_is_pregenerated(true); 700 stub1.GetCode(isolate);
701 stub2.GetCode(isolate)->set_is_pregenerated(true); 701 stub2.GetCode(isolate);
702 } 702 }
703 703
704 704
705 // See comment for class. 705 // See comment for class.
706 void WriteInt32ToHeapNumberStub::Generate(MacroAssembler* masm) { 706 void WriteInt32ToHeapNumberStub::Generate(MacroAssembler* masm) {
707 Label max_negative_int; 707 Label max_negative_int;
708 // the_int_ has the answer which is a signed int32 but not a Smi. 708 // the_int_ has the answer which is a signed int32 but not a Smi.
709 // We test for the special value that has a different exponent. This test 709 // We test for the special value that has a different exponent. This test
710 // has the neat side effect of setting the flags according to the sign. 710 // has the neat side effect of setting the flags according to the sign.
711 STATIC_ASSERT(HeapNumber::kSignMask == 0x80000000u); 711 STATIC_ASSERT(HeapNumber::kSignMask == 0x80000000u);
(...skipping 966 matching lines...) Expand 10 before | Expand all | Expand 10 after
1678 // regenerate, which would lead to code stub initialization state being messed 1678 // regenerate, which would lead to code stub initialization state being messed
1679 // up. 1679 // up.
1680 Code* save_doubles_code; 1680 Code* save_doubles_code;
1681 if (!save_doubles.FindCodeInCache(&save_doubles_code, isolate)) { 1681 if (!save_doubles.FindCodeInCache(&save_doubles_code, isolate)) {
1682 save_doubles_code = *save_doubles.GetCode(isolate); 1682 save_doubles_code = *save_doubles.GetCode(isolate);
1683 } 1683 }
1684 Code* store_buffer_overflow_code; 1684 Code* store_buffer_overflow_code;
1685 if (!stub.FindCodeInCache(&store_buffer_overflow_code, isolate)) { 1685 if (!stub.FindCodeInCache(&store_buffer_overflow_code, isolate)) {
1686 store_buffer_overflow_code = *stub.GetCode(isolate); 1686 store_buffer_overflow_code = *stub.GetCode(isolate);
1687 } 1687 }
1688 save_doubles_code->set_is_pregenerated(true);
1689 store_buffer_overflow_code->set_is_pregenerated(true);
1690 isolate->set_fp_stubs_generated(true); 1688 isolate->set_fp_stubs_generated(true);
1691 } 1689 }
1692 1690
1693 1691
1694 void CEntryStub::GenerateAheadOfTime(Isolate* isolate) { 1692 void CEntryStub::GenerateAheadOfTime(Isolate* isolate) {
1695 CEntryStub stub(1, kDontSaveFPRegs); 1693 CEntryStub stub(1, kDontSaveFPRegs);
1696 Handle<Code> code = stub.GetCode(isolate); 1694 stub.GetCode(isolate);
1697 code->set_is_pregenerated(true);
1698 } 1695 }
1699 1696
1700 1697
1701 static void JumpIfOOM(MacroAssembler* masm, 1698 static void JumpIfOOM(MacroAssembler* masm,
1702 Register value, 1699 Register value,
1703 Register scratch, 1700 Register scratch,
1704 Label* oom_label) { 1701 Label* oom_label) {
1705 STATIC_ASSERT(Failure::OUT_OF_MEMORY_EXCEPTION == 3); 1702 STATIC_ASSERT(Failure::OUT_OF_MEMORY_EXCEPTION == 3);
1706 STATIC_ASSERT(kFailureTag == 3); 1703 STATIC_ASSERT(kFailureTag == 3);
1707 __ and_(scratch, value, Operand(0xf)); 1704 __ and_(scratch, value, Operand(0xf));
(...skipping 3613 matching lines...) Expand 10 before | Expand all | Expand 10 after
5321 5318
5322 __ bind(&not_in_dictionary); 5319 __ bind(&not_in_dictionary);
5323 __ mov(result, Operand::Zero()); 5320 __ mov(result, Operand::Zero());
5324 __ Ret(); 5321 __ Ret();
5325 } 5322 }
5326 5323
5327 5324
5328 void StoreBufferOverflowStub::GenerateFixedRegStubsAheadOfTime( 5325 void StoreBufferOverflowStub::GenerateFixedRegStubsAheadOfTime(
5329 Isolate* isolate) { 5326 Isolate* isolate) {
5330 StoreBufferOverflowStub stub1(kDontSaveFPRegs); 5327 StoreBufferOverflowStub stub1(kDontSaveFPRegs);
5331 stub1.GetCode(isolate)->set_is_pregenerated(true); 5328 stub1.GetCode(isolate);
5332 // Hydrogen code stubs need stub2 at snapshot time. 5329 // Hydrogen code stubs need stub2 at snapshot time.
5333 StoreBufferOverflowStub stub2(kSaveFPRegs); 5330 StoreBufferOverflowStub stub2(kSaveFPRegs);
5334 stub2.GetCode(isolate)->set_is_pregenerated(true); 5331 stub2.GetCode(isolate);
5335 } 5332 }
5336 5333
5337 5334
5338 bool CodeStub::CanUseFPRegisters() { 5335 bool CodeStub::CanUseFPRegisters() {
5339 return true; // VFP2 is a base requirement for V8 5336 return true; // VFP2 is a base requirement for V8
5340 } 5337 }
5341 5338
5342 5339
5343 // Takes the input in 3 registers: address_ value_ and object_. A pointer to 5340 // Takes the input in 3 registers: address_ value_ and object_. A pointer to
5344 // the value has just been written into the object, now this stub makes sure 5341 // the value has just been written into the object, now this stub makes sure
(...skipping 480 matching lines...) Expand 10 before | Expand all | Expand 10 after
5825 template<class T> 5822 template<class T>
5826 static void ArrayConstructorStubAheadOfTimeHelper(Isolate* isolate) { 5823 static void ArrayConstructorStubAheadOfTimeHelper(Isolate* isolate) {
5827 ElementsKind initial_kind = GetInitialFastElementsKind(); 5824 ElementsKind initial_kind = GetInitialFastElementsKind();
5828 ElementsKind initial_holey_kind = GetHoleyElementsKind(initial_kind); 5825 ElementsKind initial_holey_kind = GetHoleyElementsKind(initial_kind);
5829 5826
5830 int to_index = GetSequenceIndexFromFastElementsKind( 5827 int to_index = GetSequenceIndexFromFastElementsKind(
5831 TERMINAL_FAST_ELEMENTS_KIND); 5828 TERMINAL_FAST_ELEMENTS_KIND);
5832 for (int i = 0; i <= to_index; ++i) { 5829 for (int i = 0; i <= to_index; ++i) {
5833 ElementsKind kind = GetFastElementsKindFromSequenceIndex(i); 5830 ElementsKind kind = GetFastElementsKindFromSequenceIndex(i);
5834 T stub(kind); 5831 T stub(kind);
5835 stub.GetCode(isolate)->set_is_pregenerated(true); 5832 stub.GetCode(isolate);
5836 if (AllocationSite::GetMode(kind) != DONT_TRACK_ALLOCATION_SITE || 5833 if (AllocationSite::GetMode(kind) != DONT_TRACK_ALLOCATION_SITE ||
5837 (!FLAG_track_allocation_sites && 5834 (!FLAG_track_allocation_sites &&
5838 (kind == initial_kind || kind == initial_holey_kind))) { 5835 (kind == initial_kind || kind == initial_holey_kind))) {
5839 T stub1(kind, CONTEXT_CHECK_REQUIRED, DISABLE_ALLOCATION_SITES); 5836 T stub1(kind, CONTEXT_CHECK_REQUIRED, DISABLE_ALLOCATION_SITES);
5840 stub1.GetCode(isolate)->set_is_pregenerated(true); 5837 stub1.GetCode(isolate);
5841 } 5838 }
5842 } 5839 }
5843 } 5840 }
5844 5841
5845 5842
5846 void ArrayConstructorStubBase::GenerateStubsAheadOfTime(Isolate* isolate) { 5843 void ArrayConstructorStubBase::GenerateStubsAheadOfTime(Isolate* isolate) {
5847 ArrayConstructorStubAheadOfTimeHelper<ArrayNoArgumentConstructorStub>( 5844 ArrayConstructorStubAheadOfTimeHelper<ArrayNoArgumentConstructorStub>(
5848 isolate); 5845 isolate);
5849 ArrayConstructorStubAheadOfTimeHelper<ArraySingleArgumentConstructorStub>( 5846 ArrayConstructorStubAheadOfTimeHelper<ArraySingleArgumentConstructorStub>(
5850 isolate); 5847 isolate);
5851 ArrayConstructorStubAheadOfTimeHelper<ArrayNArgumentsConstructorStub>( 5848 ArrayConstructorStubAheadOfTimeHelper<ArrayNArgumentsConstructorStub>(
5852 isolate); 5849 isolate);
5853 } 5850 }
5854 5851
5855 5852
5856 void InternalArrayConstructorStubBase::GenerateStubsAheadOfTime( 5853 void InternalArrayConstructorStubBase::GenerateStubsAheadOfTime(
5857 Isolate* isolate) { 5854 Isolate* isolate) {
5858 ElementsKind kinds[2] = { FAST_ELEMENTS, FAST_HOLEY_ELEMENTS }; 5855 ElementsKind kinds[2] = { FAST_ELEMENTS, FAST_HOLEY_ELEMENTS };
5859 for (int i = 0; i < 2; i++) { 5856 for (int i = 0; i < 2; i++) {
5860 // For internal arrays we only need a few things 5857 // For internal arrays we only need a few things
5861 InternalArrayNoArgumentConstructorStub stubh1(kinds[i]); 5858 InternalArrayNoArgumentConstructorStub stubh1(kinds[i]);
5862 stubh1.GetCode(isolate)->set_is_pregenerated(true); 5859 stubh1.GetCode(isolate);
5863 InternalArraySingleArgumentConstructorStub stubh2(kinds[i]); 5860 InternalArraySingleArgumentConstructorStub stubh2(kinds[i]);
5864 stubh2.GetCode(isolate)->set_is_pregenerated(true); 5861 stubh2.GetCode(isolate);
5865 InternalArrayNArgumentsConstructorStub stubh3(kinds[i]); 5862 InternalArrayNArgumentsConstructorStub stubh3(kinds[i]);
5866 stubh3.GetCode(isolate)->set_is_pregenerated(true); 5863 stubh3.GetCode(isolate);
5867 } 5864 }
5868 } 5865 }
5869 5866
5870 5867
5871 void ArrayConstructorStub::GenerateDispatchToArrayStub( 5868 void ArrayConstructorStub::GenerateDispatchToArrayStub(
5872 MacroAssembler* masm, 5869 MacroAssembler* masm,
5873 AllocationSiteOverrideMode mode) { 5870 AllocationSiteOverrideMode mode) {
5874 if (argument_count_ == ANY) { 5871 if (argument_count_ == ANY) {
5875 Label not_zero_case, not_one_case; 5872 Label not_zero_case, not_one_case;
5876 __ tst(r0, r0); 5873 __ tst(r0, r0);
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
6033 __ bind(&fast_elements_case); 6030 __ bind(&fast_elements_case);
6034 GenerateCase(masm, FAST_ELEMENTS); 6031 GenerateCase(masm, FAST_ELEMENTS);
6035 } 6032 }
6036 6033
6037 6034
6038 #undef __ 6035 #undef __
6039 6036
6040 } } // namespace v8::internal 6037 } } // namespace v8::internal
6041 6038
6042 #endif // V8_TARGET_ARCH_ARM 6039 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « no previous file | src/code-stubs.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698