| 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 5799 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5810 // If we reached this point there is a problem. | 5810 // If we reached this point there is a problem. |
| 5811 __ Abort(kUnexpectedElementsKindInArrayConstructor); | 5811 __ Abort(kUnexpectedElementsKindInArrayConstructor); |
| 5812 } else { | 5812 } else { |
| 5813 UNREACHABLE(); | 5813 UNREACHABLE(); |
| 5814 } | 5814 } |
| 5815 } | 5815 } |
| 5816 | 5816 |
| 5817 | 5817 |
| 5818 template<class T> | 5818 template<class T> |
| 5819 static void ArrayConstructorStubAheadOfTimeHelper(Isolate* isolate) { | 5819 static void ArrayConstructorStubAheadOfTimeHelper(Isolate* isolate) { |
| 5820 ElementsKind initial_kind = GetInitialFastElementsKind(); | |
| 5821 ElementsKind initial_holey_kind = GetHoleyElementsKind(initial_kind); | |
| 5822 | |
| 5823 int to_index = GetSequenceIndexFromFastElementsKind( | 5820 int to_index = GetSequenceIndexFromFastElementsKind( |
| 5824 TERMINAL_FAST_ELEMENTS_KIND); | 5821 TERMINAL_FAST_ELEMENTS_KIND); |
| 5825 for (int i = 0; i <= to_index; ++i) { | 5822 for (int i = 0; i <= to_index; ++i) { |
| 5826 ElementsKind kind = GetFastElementsKindFromSequenceIndex(i); | 5823 ElementsKind kind = GetFastElementsKindFromSequenceIndex(i); |
| 5827 T stub(kind); | 5824 T stub(kind); |
| 5828 stub.GetCode(isolate); | 5825 stub.GetCode(isolate); |
| 5829 if (AllocationSite::GetMode(kind) != DONT_TRACK_ALLOCATION_SITE || | 5826 if (AllocationSite::GetMode(kind) != DONT_TRACK_ALLOCATION_SITE) { |
| 5830 (!FLAG_track_allocation_sites && | |
| 5831 (kind == initial_kind || kind == initial_holey_kind))) { | |
| 5832 T stub1(kind, CONTEXT_CHECK_REQUIRED, DISABLE_ALLOCATION_SITES); | 5827 T stub1(kind, CONTEXT_CHECK_REQUIRED, DISABLE_ALLOCATION_SITES); |
| 5833 stub1.GetCode(isolate); | 5828 stub1.GetCode(isolate); |
| 5834 } | 5829 } |
| 5835 } | 5830 } |
| 5836 } | 5831 } |
| 5837 | 5832 |
| 5838 | 5833 |
| 5839 void ArrayConstructorStubBase::GenerateStubsAheadOfTime(Isolate* isolate) { | 5834 void ArrayConstructorStubBase::GenerateStubsAheadOfTime(Isolate* isolate) { |
| 5840 ArrayConstructorStubAheadOfTimeHelper<ArrayNoArgumentConstructorStub>( | 5835 ArrayConstructorStubAheadOfTimeHelper<ArrayNoArgumentConstructorStub>( |
| 5841 isolate); | 5836 isolate); |
| (...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6016 __ bind(&fast_elements_case); | 6011 __ bind(&fast_elements_case); |
| 6017 GenerateCase(masm, FAST_ELEMENTS); | 6012 GenerateCase(masm, FAST_ELEMENTS); |
| 6018 } | 6013 } |
| 6019 | 6014 |
| 6020 | 6015 |
| 6021 #undef __ | 6016 #undef __ |
| 6022 | 6017 |
| 6023 } } // namespace v8::internal | 6018 } } // namespace v8::internal |
| 6024 | 6019 |
| 6025 #endif // V8_TARGET_ARCH_MIPS | 6020 #endif // V8_TARGET_ARCH_MIPS |
| OLD | NEW |