| 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 1572 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  1583       : ObjectLiteral::kNoFlags; |  1583       : ObjectLiteral::kNoFlags; | 
|  1584   flags |= expr->has_function() |  1584   flags |= expr->has_function() | 
|  1585       ? ObjectLiteral::kHasFunction |  1585       ? ObjectLiteral::kHasFunction | 
|  1586       : ObjectLiteral::kNoFlags; |  1586       : ObjectLiteral::kNoFlags; | 
|  1587   __ mov(r0, Operand(Smi::FromInt(flags))); |  1587   __ mov(r0, Operand(Smi::FromInt(flags))); | 
|  1588   __ Push(r3, r2, r1, r0); |  1588   __ Push(r3, r2, r1, r0); | 
|  1589   int properties_count = constant_properties->length() / 2; |  1589   int properties_count = constant_properties->length() / 2; | 
|  1590   if (expr->depth() > 1) { |  1590   if (expr->depth() > 1) { | 
|  1591     __ CallRuntime(Runtime::kCreateObjectLiteral, 4); |  1591     __ CallRuntime(Runtime::kCreateObjectLiteral, 4); | 
|  1592   } else if (flags != ObjectLiteral::kFastElements || |  1592   } else if (flags != ObjectLiteral::kFastElements || | 
|  1593       properties_count > FastCloneShallowObjectStub::kMaximumClonedProperties) { |  1593              properties_count > | 
 |  1594                  FastCloneShallowObjectStub::MaximumClonedProperties()) { | 
|  1594     __ CallRuntime(Runtime::kCreateObjectLiteralShallow, 4); |  1595     __ CallRuntime(Runtime::kCreateObjectLiteralShallow, 4); | 
|  1595   } else { |  1596   } else { | 
|  1596     FastCloneShallowObjectStub stub(properties_count); |  1597     FastCloneShallowObjectStub stub(properties_count); | 
|  1597     __ CallStub(&stub); |  1598     __ CallStub(&stub); | 
|  1598   } |  1599   } | 
|  1599  |  1600  | 
|  1600   // If result_saved is true the result is on top of the stack.  If |  1601   // If result_saved is true the result is on top of the stack.  If | 
|  1601   // result_saved is false the result is in r0. |  1602   // result_saved is false the result is in r0. | 
|  1602   bool result_saved = false; |  1603   bool result_saved = false; | 
|  1603  |  1604  | 
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  1713   __ Push(r3, r2, r1); |  1714   __ Push(r3, r2, r1); | 
|  1714   if (has_fast_elements && constant_elements_values->map() == |  1715   if (has_fast_elements && constant_elements_values->map() == | 
|  1715       isolate()->heap()->fixed_cow_array_map()) { |  1716       isolate()->heap()->fixed_cow_array_map()) { | 
|  1716     FastCloneShallowArrayStub stub( |  1717     FastCloneShallowArrayStub stub( | 
|  1717         FastCloneShallowArrayStub::COPY_ON_WRITE_ELEMENTS, length); |  1718         FastCloneShallowArrayStub::COPY_ON_WRITE_ELEMENTS, length); | 
|  1718     __ CallStub(&stub); |  1719     __ CallStub(&stub); | 
|  1719     __ IncrementCounter( |  1720     __ IncrementCounter( | 
|  1720         isolate()->counters()->cow_arrays_created_stub(), 1, r1, r2); |  1721         isolate()->counters()->cow_arrays_created_stub(), 1, r1, r2); | 
|  1721   } else if (expr->depth() > 1) { |  1722   } else if (expr->depth() > 1) { | 
|  1722     __ CallRuntime(Runtime::kCreateArrayLiteral, 3); |  1723     __ CallRuntime(Runtime::kCreateArrayLiteral, 3); | 
|  1723   } else if (length > FastCloneShallowArrayStub::kMaximumClonedLength) { |  1724   } else if (length > FastCloneShallowArrayStub::MaximumClonedLength()) { | 
|  1724     __ CallRuntime(Runtime::kCreateArrayLiteralShallow, 3); |  1725     __ CallRuntime(Runtime::kCreateArrayLiteralShallow, 3); | 
|  1725   } else { |  1726   } else { | 
|  1726     ASSERT(IsFastSmiOrObjectElementsKind(constant_elements_kind) || |  1727     ASSERT(IsFastSmiOrObjectElementsKind(constant_elements_kind) || | 
|  1727            FLAG_smi_only_arrays); |  1728            FLAG_smi_only_arrays); | 
|  1728     FastCloneShallowArrayStub::Mode mode = has_fast_elements |  1729     FastCloneShallowArrayStub::Mode mode = has_fast_elements | 
|  1729       ? FastCloneShallowArrayStub::CLONE_ELEMENTS |  1730       ? FastCloneShallowArrayStub::CLONE_ELEMENTS | 
|  1730       : FastCloneShallowArrayStub::CLONE_ANY_ELEMENTS; |  1731       : FastCloneShallowArrayStub::CLONE_ANY_ELEMENTS; | 
|  1731     FastCloneShallowArrayStub stub(mode, length); |  1732     FastCloneShallowArrayStub stub(mode, length); | 
|  1732     __ CallStub(&stub); |  1733     __ CallStub(&stub); | 
|  1733   } |  1734   } | 
| (...skipping 2850 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  4584   *context_length = 0; |  4585   *context_length = 0; | 
|  4585   return previous_; |  4586   return previous_; | 
|  4586 } |  4587 } | 
|  4587  |  4588  | 
|  4588  |  4589  | 
|  4589 #undef __ |  4590 #undef __ | 
|  4590  |  4591  | 
|  4591 } }  // namespace v8::internal |  4592 } }  // namespace v8::internal | 
|  4592  |  4593  | 
|  4593 #endif  // V8_TARGET_ARCH_ARM |  4594 #endif  // V8_TARGET_ARCH_ARM | 
| OLD | NEW |