| 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 1763 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1774 __ mov(r1, Operand(constant_elements)); | 1774 __ mov(r1, Operand(constant_elements)); |
| 1775 if (has_fast_elements && constant_elements_values->map() == | 1775 if (has_fast_elements && constant_elements_values->map() == |
| 1776 isolate()->heap()->fixed_cow_array_map()) { | 1776 isolate()->heap()->fixed_cow_array_map()) { |
| 1777 FastCloneShallowArrayStub stub( | 1777 FastCloneShallowArrayStub stub( |
| 1778 FastCloneShallowArrayStub::COPY_ON_WRITE_ELEMENTS, | 1778 FastCloneShallowArrayStub::COPY_ON_WRITE_ELEMENTS, |
| 1779 DONT_TRACK_ALLOCATION_SITE, | 1779 DONT_TRACK_ALLOCATION_SITE, |
| 1780 length); | 1780 length); |
| 1781 __ CallStub(&stub); | 1781 __ CallStub(&stub); |
| 1782 __ IncrementCounter( | 1782 __ IncrementCounter( |
| 1783 isolate()->counters()->cow_arrays_created_stub(), 1, r1, r2); | 1783 isolate()->counters()->cow_arrays_created_stub(), 1, r1, r2); |
| 1784 } else if (expr->depth() > 1) { | 1784 } else if (expr->depth() > 1 || |
| 1785 Serializer::enabled() || |
| 1786 length > FastCloneShallowArrayStub::kMaximumClonedLength) { |
| 1785 __ Push(r3, r2, r1); | 1787 __ Push(r3, r2, r1); |
| 1786 __ CallRuntime(Runtime::kCreateArrayLiteral, 3); | 1788 __ CallRuntime(Runtime::kCreateArrayLiteral, 3); |
| 1787 } else if (Serializer::enabled() || | |
| 1788 length > FastCloneShallowArrayStub::kMaximumClonedLength) { | |
| 1789 __ Push(r3, r2, r1); | |
| 1790 __ CallRuntime(Runtime::kCreateArrayLiteralShallow, 3); | |
| 1791 } else { | 1789 } else { |
| 1792 ASSERT(IsFastSmiOrObjectElementsKind(constant_elements_kind) || | 1790 ASSERT(IsFastSmiOrObjectElementsKind(constant_elements_kind) || |
| 1793 FLAG_smi_only_arrays); | 1791 FLAG_smi_only_arrays); |
| 1794 FastCloneShallowArrayStub::Mode mode = | 1792 FastCloneShallowArrayStub::Mode mode = |
| 1795 FastCloneShallowArrayStub::CLONE_ANY_ELEMENTS; | 1793 FastCloneShallowArrayStub::CLONE_ANY_ELEMENTS; |
| 1796 AllocationSiteMode allocation_site_mode = FLAG_track_allocation_sites | 1794 AllocationSiteMode allocation_site_mode = FLAG_track_allocation_sites |
| 1797 ? TRACK_ALLOCATION_SITE : DONT_TRACK_ALLOCATION_SITE; | 1795 ? TRACK_ALLOCATION_SITE : DONT_TRACK_ALLOCATION_SITE; |
| 1798 | 1796 |
| 1799 if (has_fast_elements) { | 1797 if (has_fast_elements) { |
| 1800 mode = FastCloneShallowArrayStub::CLONE_ELEMENTS; | 1798 mode = FastCloneShallowArrayStub::CLONE_ELEMENTS; |
| (...skipping 3158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4959 ASSERT(Memory::uint32_at(interrupt_address_pointer) == | 4957 ASSERT(Memory::uint32_at(interrupt_address_pointer) == |
| 4960 reinterpret_cast<uint32_t>( | 4958 reinterpret_cast<uint32_t>( |
| 4961 isolate->builtins()->OsrAfterStackCheck()->entry())); | 4959 isolate->builtins()->OsrAfterStackCheck()->entry())); |
| 4962 return OSR_AFTER_STACK_CHECK; | 4960 return OSR_AFTER_STACK_CHECK; |
| 4963 } | 4961 } |
| 4964 | 4962 |
| 4965 | 4963 |
| 4966 } } // namespace v8::internal | 4964 } } // namespace v8::internal |
| 4967 | 4965 |
| 4968 #endif // V8_TARGET_ARCH_ARM | 4966 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |