OLD | NEW |
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 5637 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5648 // If we reached this point there is a problem. | 5648 // If we reached this point there is a problem. |
5649 __ Abort(kUnexpectedElementsKindInArrayConstructor); | 5649 __ Abort(kUnexpectedElementsKindInArrayConstructor); |
5650 } else { | 5650 } else { |
5651 UNREACHABLE(); | 5651 UNREACHABLE(); |
5652 } | 5652 } |
5653 } | 5653 } |
5654 | 5654 |
5655 | 5655 |
5656 template<class T> | 5656 template<class T> |
5657 static void ArrayConstructorStubAheadOfTimeHelper(Isolate* isolate) { | 5657 static void ArrayConstructorStubAheadOfTimeHelper(Isolate* isolate) { |
5658 ElementsKind initial_kind = GetInitialFastElementsKind(); | |
5659 ElementsKind initial_holey_kind = GetHoleyElementsKind(initial_kind); | |
5660 | |
5661 int to_index = GetSequenceIndexFromFastElementsKind( | 5658 int to_index = GetSequenceIndexFromFastElementsKind( |
5662 TERMINAL_FAST_ELEMENTS_KIND); | 5659 TERMINAL_FAST_ELEMENTS_KIND); |
5663 for (int i = 0; i <= to_index; ++i) { | 5660 for (int i = 0; i <= to_index; ++i) { |
5664 ElementsKind kind = GetFastElementsKindFromSequenceIndex(i); | 5661 ElementsKind kind = GetFastElementsKindFromSequenceIndex(i); |
5665 T stub(kind); | 5662 T stub(kind); |
5666 stub.GetCode(isolate); | 5663 stub.GetCode(isolate); |
5667 if (AllocationSite::GetMode(kind) != DONT_TRACK_ALLOCATION_SITE || | 5664 if (AllocationSite::GetMode(kind) != DONT_TRACK_ALLOCATION_SITE) { |
5668 (!FLAG_track_allocation_sites && | |
5669 (kind == initial_kind || kind == initial_holey_kind))) { | |
5670 T stub1(kind, CONTEXT_CHECK_REQUIRED, DISABLE_ALLOCATION_SITES); | 5665 T stub1(kind, CONTEXT_CHECK_REQUIRED, DISABLE_ALLOCATION_SITES); |
5671 stub1.GetCode(isolate); | 5666 stub1.GetCode(isolate); |
5672 } | 5667 } |
5673 } | 5668 } |
5674 } | 5669 } |
5675 | 5670 |
5676 | 5671 |
5677 void ArrayConstructorStubBase::GenerateStubsAheadOfTime(Isolate* isolate) { | 5672 void ArrayConstructorStubBase::GenerateStubsAheadOfTime(Isolate* isolate) { |
5678 ArrayConstructorStubAheadOfTimeHelper<ArrayNoArgumentConstructorStub>( | 5673 ArrayConstructorStubAheadOfTimeHelper<ArrayNoArgumentConstructorStub>( |
5679 isolate); | 5674 isolate); |
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5854 __ bind(&fast_elements_case); | 5849 __ bind(&fast_elements_case); |
5855 GenerateCase(masm, FAST_ELEMENTS); | 5850 GenerateCase(masm, FAST_ELEMENTS); |
5856 } | 5851 } |
5857 | 5852 |
5858 | 5853 |
5859 #undef __ | 5854 #undef __ |
5860 | 5855 |
5861 } } // namespace v8::internal | 5856 } } // namespace v8::internal |
5862 | 5857 |
5863 #endif // V8_TARGET_ARCH_ARM | 5858 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |