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 1661 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1672 __ mov(r2, Operand(Smi::FromInt(expr->literal_index()))); | 1672 __ mov(r2, Operand(Smi::FromInt(expr->literal_index()))); |
1673 __ mov(r1, Operand(constant_properties)); | 1673 __ mov(r1, Operand(constant_properties)); |
1674 int flags = expr->fast_elements() | 1674 int flags = expr->fast_elements() |
1675 ? ObjectLiteral::kFastElements | 1675 ? ObjectLiteral::kFastElements |
1676 : ObjectLiteral::kNoFlags; | 1676 : ObjectLiteral::kNoFlags; |
1677 flags |= expr->has_function() | 1677 flags |= expr->has_function() |
1678 ? ObjectLiteral::kHasFunction | 1678 ? ObjectLiteral::kHasFunction |
1679 : ObjectLiteral::kNoFlags; | 1679 : ObjectLiteral::kNoFlags; |
1680 __ mov(r0, Operand(Smi::FromInt(flags))); | 1680 __ mov(r0, Operand(Smi::FromInt(flags))); |
1681 int properties_count = constant_properties->length() / 2; | 1681 int properties_count = constant_properties->length() / 2; |
1682 if (expr->may_store_doubles() || expr->depth() > 1 || Serializer::enabled() || | 1682 if (expr->may_store_doubles() || expr->depth() > 1 || |
1683 flags != ObjectLiteral::kFastElements || | 1683 Serializer::enabled(isolate()) || flags != ObjectLiteral::kFastElements || |
1684 properties_count > FastCloneShallowObjectStub::kMaximumClonedProperties) { | 1684 properties_count > FastCloneShallowObjectStub::kMaximumClonedProperties) { |
1685 __ Push(r3, r2, r1, r0); | 1685 __ Push(r3, r2, r1, r0); |
1686 __ CallRuntime(Runtime::kHiddenCreateObjectLiteral, 4); | 1686 __ CallRuntime(Runtime::kHiddenCreateObjectLiteral, 4); |
1687 } else { | 1687 } else { |
1688 FastCloneShallowObjectStub stub(isolate(), properties_count); | 1688 FastCloneShallowObjectStub stub(isolate(), properties_count); |
1689 __ CallStub(&stub); | 1689 __ CallStub(&stub); |
1690 } | 1690 } |
1691 | 1691 |
1692 // If result_saved is true the result is on top of the stack. If | 1692 // If result_saved is true the result is on top of the stack. If |
1693 // result_saved is false the result is in r0. | 1693 // result_saved is false the result is in r0. |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1824 if (has_fast_elements && constant_elements_values->map() == | 1824 if (has_fast_elements && constant_elements_values->map() == |
1825 isolate()->heap()->fixed_cow_array_map()) { | 1825 isolate()->heap()->fixed_cow_array_map()) { |
1826 FastCloneShallowArrayStub stub( | 1826 FastCloneShallowArrayStub stub( |
1827 isolate(), | 1827 isolate(), |
1828 FastCloneShallowArrayStub::COPY_ON_WRITE_ELEMENTS, | 1828 FastCloneShallowArrayStub::COPY_ON_WRITE_ELEMENTS, |
1829 allocation_site_mode, | 1829 allocation_site_mode, |
1830 length); | 1830 length); |
1831 __ CallStub(&stub); | 1831 __ CallStub(&stub); |
1832 __ IncrementCounter( | 1832 __ IncrementCounter( |
1833 isolate()->counters()->cow_arrays_created_stub(), 1, r1, r2); | 1833 isolate()->counters()->cow_arrays_created_stub(), 1, r1, r2); |
1834 } else if (expr->depth() > 1 || Serializer::enabled() || | 1834 } else if (expr->depth() > 1 || Serializer::enabled(isolate()) || |
1835 length > FastCloneShallowArrayStub::kMaximumClonedLength) { | 1835 length > FastCloneShallowArrayStub::kMaximumClonedLength) { |
1836 __ mov(r0, Operand(Smi::FromInt(flags))); | 1836 __ mov(r0, Operand(Smi::FromInt(flags))); |
1837 __ Push(r3, r2, r1, r0); | 1837 __ Push(r3, r2, r1, r0); |
1838 __ CallRuntime(Runtime::kHiddenCreateArrayLiteral, 4); | 1838 __ CallRuntime(Runtime::kHiddenCreateArrayLiteral, 4); |
1839 } else { | 1839 } else { |
1840 ASSERT(IsFastSmiOrObjectElementsKind(constant_elements_kind) || | 1840 ASSERT(IsFastSmiOrObjectElementsKind(constant_elements_kind) || |
1841 FLAG_smi_only_arrays); | 1841 FLAG_smi_only_arrays); |
1842 FastCloneShallowArrayStub::Mode mode = | 1842 FastCloneShallowArrayStub::Mode mode = |
1843 FastCloneShallowArrayStub::CLONE_ANY_ELEMENTS; | 1843 FastCloneShallowArrayStub::CLONE_ANY_ELEMENTS; |
1844 | 1844 |
(...skipping 3091 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4936 | 4936 |
4937 ASSERT(interrupt_address == | 4937 ASSERT(interrupt_address == |
4938 isolate->builtins()->OsrAfterStackCheck()->entry()); | 4938 isolate->builtins()->OsrAfterStackCheck()->entry()); |
4939 return OSR_AFTER_STACK_CHECK; | 4939 return OSR_AFTER_STACK_CHECK; |
4940 } | 4940 } |
4941 | 4941 |
4942 | 4942 |
4943 } } // namespace v8::internal | 4943 } } // namespace v8::internal |
4944 | 4944 |
4945 #endif // V8_TARGET_ARCH_ARM | 4945 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |