OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 1622 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1633 int flags = expr->fast_elements() | 1633 int flags = expr->fast_elements() |
1634 ? ObjectLiteral::kFastElements | 1634 ? ObjectLiteral::kFastElements |
1635 : ObjectLiteral::kNoFlags; | 1635 : ObjectLiteral::kNoFlags; |
1636 flags |= expr->has_function() | 1636 flags |= expr->has_function() |
1637 ? ObjectLiteral::kHasFunction | 1637 ? ObjectLiteral::kHasFunction |
1638 : ObjectLiteral::kNoFlags; | 1638 : ObjectLiteral::kNoFlags; |
1639 __ Mov(x0, Operand(Smi::FromInt(flags))); | 1639 __ Mov(x0, Operand(Smi::FromInt(flags))); |
1640 int properties_count = constant_properties->length() / 2; | 1640 int properties_count = constant_properties->length() / 2; |
1641 const int max_cloned_properties = | 1641 const int max_cloned_properties = |
1642 FastCloneShallowObjectStub::kMaximumClonedProperties; | 1642 FastCloneShallowObjectStub::kMaximumClonedProperties; |
1643 if ((FLAG_track_double_fields && expr->may_store_doubles()) || | 1643 if (expr->may_store_doubles() || expr->depth() > 1 || Serializer::enabled() || |
1644 (expr->depth() > 1) || Serializer::enabled() || | 1644 flags != ObjectLiteral::kFastElements || |
1645 (flags != ObjectLiteral::kFastElements) || | 1645 properties_count > max_cloned_properties) { |
1646 (properties_count > max_cloned_properties)) { | |
1647 __ Push(x3, x2, x1, x0); | 1646 __ Push(x3, x2, x1, x0); |
1648 __ CallRuntime(Runtime::kCreateObjectLiteral, 4); | 1647 __ CallRuntime(Runtime::kCreateObjectLiteral, 4); |
1649 } else { | 1648 } else { |
1650 FastCloneShallowObjectStub stub(properties_count); | 1649 FastCloneShallowObjectStub stub(properties_count); |
1651 __ CallStub(&stub); | 1650 __ CallStub(&stub); |
1652 } | 1651 } |
1653 | 1652 |
1654 // If result_saved is true the result is on top of the stack. If | 1653 // If result_saved is true the result is on top of the stack. If |
1655 // result_saved is false the result is in x0. | 1654 // result_saved is false the result is in x0. |
1656 bool result_saved = false; | 1655 bool result_saved = false; |
(...skipping 3327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4984 return previous_; | 4983 return previous_; |
4985 } | 4984 } |
4986 | 4985 |
4987 | 4986 |
4988 #undef __ | 4987 #undef __ |
4989 | 4988 |
4990 | 4989 |
4991 } } // namespace v8::internal | 4990 } } // namespace v8::internal |
4992 | 4991 |
4993 #endif // V8_TARGET_ARCH_A64 | 4992 #endif // V8_TARGET_ARCH_A64 |
OLD | NEW |