| 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 1671 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1682 __ li(a2, Operand(Smi::FromInt(expr->literal_index()))); | 1682 __ li(a2, Operand(Smi::FromInt(expr->literal_index()))); |
| 1683 __ li(a1, Operand(constant_properties)); | 1683 __ li(a1, Operand(constant_properties)); |
| 1684 int flags = expr->fast_elements() | 1684 int flags = expr->fast_elements() |
| 1685 ? ObjectLiteral::kFastElements | 1685 ? ObjectLiteral::kFastElements |
| 1686 : ObjectLiteral::kNoFlags; | 1686 : ObjectLiteral::kNoFlags; |
| 1687 flags |= expr->has_function() | 1687 flags |= expr->has_function() |
| 1688 ? ObjectLiteral::kHasFunction | 1688 ? ObjectLiteral::kHasFunction |
| 1689 : ObjectLiteral::kNoFlags; | 1689 : ObjectLiteral::kNoFlags; |
| 1690 __ li(a0, Operand(Smi::FromInt(flags))); | 1690 __ li(a0, Operand(Smi::FromInt(flags))); |
| 1691 int properties_count = constant_properties->length() / 2; | 1691 int properties_count = constant_properties->length() / 2; |
| 1692 if (expr->may_store_doubles() || expr->depth() > 1 || Serializer::enabled() || | 1692 if (expr->may_store_doubles() || expr->depth() > 1 || |
| 1693 flags != ObjectLiteral::kFastElements || | 1693 Serializer::enabled(isolate()) || flags != ObjectLiteral::kFastElements || |
| 1694 properties_count > FastCloneShallowObjectStub::kMaximumClonedProperties) { | 1694 properties_count > FastCloneShallowObjectStub::kMaximumClonedProperties) { |
| 1695 __ Push(a3, a2, a1, a0); | 1695 __ Push(a3, a2, a1, a0); |
| 1696 __ CallRuntime(Runtime::kHiddenCreateObjectLiteral, 4); | 1696 __ CallRuntime(Runtime::kHiddenCreateObjectLiteral, 4); |
| 1697 } else { | 1697 } else { |
| 1698 FastCloneShallowObjectStub stub(isolate(), properties_count); | 1698 FastCloneShallowObjectStub stub(isolate(), properties_count); |
| 1699 __ CallStub(&stub); | 1699 __ CallStub(&stub); |
| 1700 } | 1700 } |
| 1701 | 1701 |
| 1702 // If result_saved is true the result is on top of the stack. If | 1702 // If result_saved is true the result is on top of the stack. If |
| 1703 // result_saved is false the result is in v0. | 1703 // result_saved is false the result is in v0. |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1837 if (has_fast_elements && constant_elements_values->map() == | 1837 if (has_fast_elements && constant_elements_values->map() == |
| 1838 isolate()->heap()->fixed_cow_array_map()) { | 1838 isolate()->heap()->fixed_cow_array_map()) { |
| 1839 FastCloneShallowArrayStub stub( | 1839 FastCloneShallowArrayStub stub( |
| 1840 isolate(), | 1840 isolate(), |
| 1841 FastCloneShallowArrayStub::COPY_ON_WRITE_ELEMENTS, | 1841 FastCloneShallowArrayStub::COPY_ON_WRITE_ELEMENTS, |
| 1842 allocation_site_mode, | 1842 allocation_site_mode, |
| 1843 length); | 1843 length); |
| 1844 __ CallStub(&stub); | 1844 __ CallStub(&stub); |
| 1845 __ IncrementCounter(isolate()->counters()->cow_arrays_created_stub(), | 1845 __ IncrementCounter(isolate()->counters()->cow_arrays_created_stub(), |
| 1846 1, a1, a2); | 1846 1, a1, a2); |
| 1847 } else if (expr->depth() > 1 || Serializer::enabled() || | 1847 } else if (expr->depth() > 1 || Serializer::enabled(isolate()) || |
| 1848 length > FastCloneShallowArrayStub::kMaximumClonedLength) { | 1848 length > FastCloneShallowArrayStub::kMaximumClonedLength) { |
| 1849 __ li(a0, Operand(Smi::FromInt(flags))); | 1849 __ li(a0, Operand(Smi::FromInt(flags))); |
| 1850 __ Push(a3, a2, a1, a0); | 1850 __ Push(a3, a2, a1, a0); |
| 1851 __ CallRuntime(Runtime::kHiddenCreateArrayLiteral, 4); | 1851 __ CallRuntime(Runtime::kHiddenCreateArrayLiteral, 4); |
| 1852 } else { | 1852 } else { |
| 1853 FastCloneShallowArrayStub stub(isolate(), allocation_site_mode); | 1853 FastCloneShallowArrayStub stub(isolate(), allocation_site_mode); |
| 1854 __ CallStub(&stub); | 1854 __ CallStub(&stub); |
| 1855 } | 1855 } |
| 1856 | 1856 |
| 1857 bool result_saved = false; // Is the result saved to the stack? | 1857 bool result_saved = false; // Is the result saved to the stack? |
| (...skipping 3098 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4956 Assembler::target_address_at(pc_immediate_load_address)) == | 4956 Assembler::target_address_at(pc_immediate_load_address)) == |
| 4957 reinterpret_cast<uint32_t>( | 4957 reinterpret_cast<uint32_t>( |
| 4958 isolate->builtins()->OsrAfterStackCheck()->entry())); | 4958 isolate->builtins()->OsrAfterStackCheck()->entry())); |
| 4959 return OSR_AFTER_STACK_CHECK; | 4959 return OSR_AFTER_STACK_CHECK; |
| 4960 } | 4960 } |
| 4961 | 4961 |
| 4962 | 4962 |
| 4963 } } // namespace v8::internal | 4963 } } // namespace v8::internal |
| 4964 | 4964 |
| 4965 #endif // V8_TARGET_ARCH_MIPS | 4965 #endif // V8_TARGET_ARCH_MIPS |
| OLD | NEW |