| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "v8.h" | 5 #include "v8.h" |
| 6 | 6 |
| 7 #if V8_TARGET_ARCH_MIPS | 7 #if V8_TARGET_ARCH_MIPS |
| 8 | 8 |
| 9 // Note on Mips implementation: | 9 // Note on Mips implementation: |
| 10 // | 10 // |
| (...skipping 1803 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1814 length); | 1814 length); |
| 1815 __ CallStub(&stub); | 1815 __ CallStub(&stub); |
| 1816 __ IncrementCounter(isolate()->counters()->cow_arrays_created_stub(), | 1816 __ IncrementCounter(isolate()->counters()->cow_arrays_created_stub(), |
| 1817 1, a1, a2); | 1817 1, a1, a2); |
| 1818 } else if (expr->depth() > 1 || Serializer::enabled(isolate()) || | 1818 } else if (expr->depth() > 1 || Serializer::enabled(isolate()) || |
| 1819 length > FastCloneShallowArrayStub::kMaximumClonedLength) { | 1819 length > FastCloneShallowArrayStub::kMaximumClonedLength) { |
| 1820 __ li(a0, Operand(Smi::FromInt(flags))); | 1820 __ li(a0, Operand(Smi::FromInt(flags))); |
| 1821 __ Push(a3, a2, a1, a0); | 1821 __ Push(a3, a2, a1, a0); |
| 1822 __ CallRuntime(Runtime::kHiddenCreateArrayLiteral, 4); | 1822 __ CallRuntime(Runtime::kHiddenCreateArrayLiteral, 4); |
| 1823 } else { | 1823 } else { |
| 1824 FastCloneShallowArrayStub stub(isolate(), allocation_site_mode); | 1824 ASSERT(IsFastSmiOrObjectElementsKind(constant_elements_kind) || |
| 1825 FLAG_smi_only_arrays); |
| 1826 FastCloneShallowArrayStub::Mode mode = |
| 1827 FastCloneShallowArrayStub::CLONE_ANY_ELEMENTS; |
| 1828 |
| 1829 if (has_fast_elements) { |
| 1830 mode = FastCloneShallowArrayStub::CLONE_ELEMENTS; |
| 1831 } |
| 1832 |
| 1833 FastCloneShallowArrayStub stub(isolate(), mode, allocation_site_mode, |
| 1834 length); |
| 1825 __ CallStub(&stub); | 1835 __ CallStub(&stub); |
| 1826 } | 1836 } |
| 1827 | 1837 |
| 1828 bool result_saved = false; // Is the result saved to the stack? | 1838 bool result_saved = false; // Is the result saved to the stack? |
| 1829 | 1839 |
| 1830 // Emit code to evaluate all the non-constant subexpressions and to store | 1840 // Emit code to evaluate all the non-constant subexpressions and to store |
| 1831 // them into the newly cloned array. | 1841 // them into the newly cloned array. |
| 1832 for (int i = 0; i < length; i++) { | 1842 for (int i = 0; i < length; i++) { |
| 1833 Expression* subexpr = subexprs->at(i); | 1843 Expression* subexpr = subexprs->at(i); |
| 1834 // If the subexpression is a literal or a simple materialized literal it | 1844 // If the subexpression is a literal or a simple materialized literal it |
| (...skipping 3028 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4863 Assembler::target_address_at(pc_immediate_load_address)) == | 4873 Assembler::target_address_at(pc_immediate_load_address)) == |
| 4864 reinterpret_cast<uint32_t>( | 4874 reinterpret_cast<uint32_t>( |
| 4865 isolate->builtins()->OsrAfterStackCheck()->entry())); | 4875 isolate->builtins()->OsrAfterStackCheck()->entry())); |
| 4866 return OSR_AFTER_STACK_CHECK; | 4876 return OSR_AFTER_STACK_CHECK; |
| 4867 } | 4877 } |
| 4868 | 4878 |
| 4869 | 4879 |
| 4870 } } // namespace v8::internal | 4880 } } // namespace v8::internal |
| 4871 | 4881 |
| 4872 #endif // V8_TARGET_ARCH_MIPS | 4882 #endif // V8_TARGET_ARCH_MIPS |
| OLD | NEW |