| 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 1635 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1646 __ li(a1, Operand(constant_properties)); | 1646 __ li(a1, Operand(constant_properties)); |
| 1647 int flags = expr->fast_elements() | 1647 int flags = expr->fast_elements() |
| 1648 ? ObjectLiteral::kFastElements | 1648 ? ObjectLiteral::kFastElements |
| 1649 : ObjectLiteral::kNoFlags; | 1649 : ObjectLiteral::kNoFlags; |
| 1650 flags |= expr->has_function() | 1650 flags |= expr->has_function() |
| 1651 ? ObjectLiteral::kHasFunction | 1651 ? ObjectLiteral::kHasFunction |
| 1652 : ObjectLiteral::kNoFlags; | 1652 : ObjectLiteral::kNoFlags; |
| 1653 __ li(a0, Operand(Smi::FromInt(flags))); | 1653 __ li(a0, Operand(Smi::FromInt(flags))); |
| 1654 int properties_count = constant_properties->length() / 2; | 1654 int properties_count = constant_properties->length() / 2; |
| 1655 if ((FLAG_track_double_fields && expr->may_store_doubles()) || | 1655 if ((FLAG_track_double_fields && expr->may_store_doubles()) || |
| 1656 expr->depth() > 1) { | 1656 expr->depth() > 1 || Serializer::enabled() || |
| 1657 flags != ObjectLiteral::kFastElements || |
| 1658 properties_count > FastCloneShallowObjectStub::kMaximumClonedProperties) { |
| 1657 __ Push(a3, a2, a1, a0); | 1659 __ Push(a3, a2, a1, a0); |
| 1658 __ CallRuntime(Runtime::kCreateObjectLiteral, 4); | 1660 __ CallRuntime(Runtime::kCreateObjectLiteral, 4); |
| 1659 } else if (Serializer::enabled() || flags != ObjectLiteral::kFastElements || | |
| 1660 properties_count > FastCloneShallowObjectStub::kMaximumClonedProperties) { | |
| 1661 __ Push(a3, a2, a1, a0); | |
| 1662 __ CallRuntime(Runtime::kCreateObjectLiteralShallow, 4); | |
| 1663 } else { | 1661 } else { |
| 1664 FastCloneShallowObjectStub stub(properties_count); | 1662 FastCloneShallowObjectStub stub(properties_count); |
| 1665 __ CallStub(&stub); | 1663 __ CallStub(&stub); |
| 1666 } | 1664 } |
| 1667 | 1665 |
| 1668 // If result_saved is true the result is on top of the stack. If | 1666 // If result_saved is true the result is on top of the stack. If |
| 1669 // result_saved is false the result is in v0. | 1667 // result_saved is false the result is in v0. |
| 1670 bool result_saved = false; | 1668 bool result_saved = false; |
| 1671 | 1669 |
| 1672 // Mark all computed expressions that are bound to a key that | 1670 // Mark all computed expressions that are bound to a key that |
| (...skipping 3249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4922 *context_length = 0; | 4920 *context_length = 0; |
| 4923 return previous_; | 4921 return previous_; |
| 4924 } | 4922 } |
| 4925 | 4923 |
| 4926 | 4924 |
| 4927 #undef __ | 4925 #undef __ |
| 4928 | 4926 |
| 4929 } } // namespace v8::internal | 4927 } } // namespace v8::internal |
| 4930 | 4928 |
| 4931 #endif // V8_TARGET_ARCH_MIPS | 4929 #endif // V8_TARGET_ARCH_MIPS |
| OLD | NEW |