| 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_ARM |     7 #if V8_TARGET_ARCH_ARM | 
|     8  |     8  | 
|     9 #include "code-stubs.h" |     9 #include "code-stubs.h" | 
|    10 #include "codegen.h" |    10 #include "codegen.h" | 
| (...skipping 1638 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  1649   __ mov(r2, Operand(Smi::FromInt(expr->literal_index()))); |  1649   __ mov(r2, Operand(Smi::FromInt(expr->literal_index()))); | 
|  1650   __ mov(r1, Operand(constant_properties)); |  1650   __ mov(r1, Operand(constant_properties)); | 
|  1651   int flags = expr->fast_elements() |  1651   int flags = expr->fast_elements() | 
|  1652       ? ObjectLiteral::kFastElements |  1652       ? ObjectLiteral::kFastElements | 
|  1653       : ObjectLiteral::kNoFlags; |  1653       : ObjectLiteral::kNoFlags; | 
|  1654   flags |= expr->has_function() |  1654   flags |= expr->has_function() | 
|  1655       ? ObjectLiteral::kHasFunction |  1655       ? ObjectLiteral::kHasFunction | 
|  1656       : ObjectLiteral::kNoFlags; |  1656       : ObjectLiteral::kNoFlags; | 
|  1657   __ mov(r0, Operand(Smi::FromInt(flags))); |  1657   __ mov(r0, Operand(Smi::FromInt(flags))); | 
|  1658   int properties_count = constant_properties->length() / 2; |  1658   int properties_count = constant_properties->length() / 2; | 
|  1659   if (expr->may_store_doubles() || expr->depth() > 1 || Serializer::enabled() || |  1659   if (expr->may_store_doubles() || expr->depth() > 1 || | 
|  1660       flags != ObjectLiteral::kFastElements || |  1660       Serializer::enabled(isolate()) || flags != ObjectLiteral::kFastElements || | 
|  1661       properties_count > FastCloneShallowObjectStub::kMaximumClonedProperties) { |  1661       properties_count > FastCloneShallowObjectStub::kMaximumClonedProperties) { | 
|  1662     __ Push(r3, r2, r1, r0); |  1662     __ Push(r3, r2, r1, r0); | 
|  1663     __ CallRuntime(Runtime::kHiddenCreateObjectLiteral, 4); |  1663     __ CallRuntime(Runtime::kHiddenCreateObjectLiteral, 4); | 
|  1664   } else { |  1664   } else { | 
|  1665     FastCloneShallowObjectStub stub(isolate(), properties_count); |  1665     FastCloneShallowObjectStub stub(isolate(), properties_count); | 
|  1666     __ CallStub(&stub); |  1666     __ CallStub(&stub); | 
|  1667   } |  1667   } | 
|  1668  |  1668  | 
|  1669   // If result_saved is true the result is on top of the stack.  If |  1669   // If result_saved is true the result is on top of the stack.  If | 
|  1670   // result_saved is false the result is in r0. |  1670   // result_saved is false the result is in r0. | 
| (...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  1801   if (has_fast_elements && constant_elements_values->map() == |  1801   if (has_fast_elements && constant_elements_values->map() == | 
|  1802       isolate()->heap()->fixed_cow_array_map()) { |  1802       isolate()->heap()->fixed_cow_array_map()) { | 
|  1803     FastCloneShallowArrayStub stub( |  1803     FastCloneShallowArrayStub stub( | 
|  1804         isolate(), |  1804         isolate(), | 
|  1805         FastCloneShallowArrayStub::COPY_ON_WRITE_ELEMENTS, |  1805         FastCloneShallowArrayStub::COPY_ON_WRITE_ELEMENTS, | 
|  1806         allocation_site_mode, |  1806         allocation_site_mode, | 
|  1807         length); |  1807         length); | 
|  1808     __ CallStub(&stub); |  1808     __ CallStub(&stub); | 
|  1809     __ IncrementCounter( |  1809     __ IncrementCounter( | 
|  1810         isolate()->counters()->cow_arrays_created_stub(), 1, r1, r2); |  1810         isolate()->counters()->cow_arrays_created_stub(), 1, r1, r2); | 
|  1811   } else if (expr->depth() > 1 || Serializer::enabled() || |  1811   } else if (expr->depth() > 1 || Serializer::enabled(isolate()) || | 
|  1812              length > FastCloneShallowArrayStub::kMaximumClonedLength) { |  1812              length > FastCloneShallowArrayStub::kMaximumClonedLength) { | 
|  1813     __ mov(r0, Operand(Smi::FromInt(flags))); |  1813     __ mov(r0, Operand(Smi::FromInt(flags))); | 
|  1814     __ Push(r3, r2, r1, r0); |  1814     __ Push(r3, r2, r1, r0); | 
|  1815     __ CallRuntime(Runtime::kHiddenCreateArrayLiteral, 4); |  1815     __ CallRuntime(Runtime::kHiddenCreateArrayLiteral, 4); | 
|  1816   } else { |  1816   } else { | 
|  1817     ASSERT(IsFastSmiOrObjectElementsKind(constant_elements_kind) || |  1817     ASSERT(IsFastSmiOrObjectElementsKind(constant_elements_kind) || | 
|  1818            FLAG_smi_only_arrays); |  1818            FLAG_smi_only_arrays); | 
|  1819     FastCloneShallowArrayStub::Mode mode = |  1819     FastCloneShallowArrayStub::Mode mode = | 
|  1820         FastCloneShallowArrayStub::CLONE_ANY_ELEMENTS; |  1820         FastCloneShallowArrayStub::CLONE_ANY_ELEMENTS; | 
|  1821  |  1821  | 
| (...skipping 3091 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  4913  |  4913  | 
|  4914   ASSERT(interrupt_address == |  4914   ASSERT(interrupt_address == | 
|  4915          isolate->builtins()->OsrAfterStackCheck()->entry()); |  4915          isolate->builtins()->OsrAfterStackCheck()->entry()); | 
|  4916   return OSR_AFTER_STACK_CHECK; |  4916   return OSR_AFTER_STACK_CHECK; | 
|  4917 } |  4917 } | 
|  4918  |  4918  | 
|  4919  |  4919  | 
|  4920 } }  // namespace v8::internal |  4920 } }  // namespace v8::internal | 
|  4921  |  4921  | 
|  4922 #endif  // V8_TARGET_ARCH_ARM |  4922 #endif  // V8_TARGET_ARCH_ARM | 
| OLD | NEW |