| 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 1775 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1786 __ li(a1, Operand(constant_elements)); | 1786 __ li(a1, Operand(constant_elements)); |
| 1787 if (has_fast_elements && constant_elements_values->map() == | 1787 if (has_fast_elements && constant_elements_values->map() == |
| 1788 isolate()->heap()->fixed_cow_array_map()) { | 1788 isolate()->heap()->fixed_cow_array_map()) { |
| 1789 FastCloneShallowArrayStub stub( | 1789 FastCloneShallowArrayStub stub( |
| 1790 FastCloneShallowArrayStub::COPY_ON_WRITE_ELEMENTS, | 1790 FastCloneShallowArrayStub::COPY_ON_WRITE_ELEMENTS, |
| 1791 DONT_TRACK_ALLOCATION_SITE, | 1791 DONT_TRACK_ALLOCATION_SITE, |
| 1792 length); | 1792 length); |
| 1793 __ CallStub(&stub); | 1793 __ CallStub(&stub); |
| 1794 __ IncrementCounter(isolate()->counters()->cow_arrays_created_stub(), | 1794 __ IncrementCounter(isolate()->counters()->cow_arrays_created_stub(), |
| 1795 1, a1, a2); | 1795 1, a1, a2); |
| 1796 } else if (expr->depth() > 1) { | 1796 } else if (expr->depth() > 1 || |
| 1797 Serializer::enabled() || |
| 1798 length > FastCloneShallowArrayStub::kMaximumClonedLength) { |
| 1797 __ Push(a3, a2, a1); | 1799 __ Push(a3, a2, a1); |
| 1798 __ CallRuntime(Runtime::kCreateArrayLiteral, 3); | 1800 __ CallRuntime(Runtime::kCreateArrayLiteral, 3); |
| 1799 } else if (Serializer::enabled() || | |
| 1800 length > FastCloneShallowArrayStub::kMaximumClonedLength) { | |
| 1801 __ Push(a3, a2, a1); | |
| 1802 __ CallRuntime(Runtime::kCreateArrayLiteralShallow, 3); | |
| 1803 } else { | 1801 } else { |
| 1804 ASSERT(IsFastSmiOrObjectElementsKind(constant_elements_kind) || | 1802 ASSERT(IsFastSmiOrObjectElementsKind(constant_elements_kind) || |
| 1805 FLAG_smi_only_arrays); | 1803 FLAG_smi_only_arrays); |
| 1806 FastCloneShallowArrayStub::Mode mode = | 1804 FastCloneShallowArrayStub::Mode mode = |
| 1807 FastCloneShallowArrayStub::CLONE_ANY_ELEMENTS; | 1805 FastCloneShallowArrayStub::CLONE_ANY_ELEMENTS; |
| 1808 AllocationSiteMode allocation_site_mode = FLAG_track_allocation_sites | 1806 AllocationSiteMode allocation_site_mode = FLAG_track_allocation_sites |
| 1809 ? TRACK_ALLOCATION_SITE : DONT_TRACK_ALLOCATION_SITE; | 1807 ? TRACK_ALLOCATION_SITE : DONT_TRACK_ALLOCATION_SITE; |
| 1810 | 1808 |
| 1811 if (has_fast_elements) { | 1809 if (has_fast_elements) { |
| 1812 mode = FastCloneShallowArrayStub::CLONE_ELEMENTS; | 1810 mode = FastCloneShallowArrayStub::CLONE_ELEMENTS; |
| (...skipping 3180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4993 Assembler::target_address_at(pc_immediate_load_address)) == | 4991 Assembler::target_address_at(pc_immediate_load_address)) == |
| 4994 reinterpret_cast<uint32_t>( | 4992 reinterpret_cast<uint32_t>( |
| 4995 isolate->builtins()->OsrAfterStackCheck()->entry())); | 4993 isolate->builtins()->OsrAfterStackCheck()->entry())); |
| 4996 return OSR_AFTER_STACK_CHECK; | 4994 return OSR_AFTER_STACK_CHECK; |
| 4997 } | 4995 } |
| 4998 | 4996 |
| 4999 | 4997 |
| 5000 } } // namespace v8::internal | 4998 } } // namespace v8::internal |
| 5001 | 4999 |
| 5002 #endif // V8_TARGET_ARCH_MIPS | 5000 #endif // V8_TARGET_ARCH_MIPS |
| OLD | NEW |