| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 1737 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1748 | 1748 |
| 1749 void FixedDoubleArray::Initialize(FixedDoubleArray* from) { | 1749 void FixedDoubleArray::Initialize(FixedDoubleArray* from) { |
| 1750 int old_length = from->length(); | 1750 int old_length = from->length(); |
| 1751 ASSERT(old_length < length()); | 1751 ASSERT(old_length < length()); |
| 1752 if (old_length * kDoubleSize >= OS::kMinComplexMemCopy) { | 1752 if (old_length * kDoubleSize >= OS::kMinComplexMemCopy) { |
| 1753 OS::MemCopy(FIELD_ADDR(this, kHeaderSize), | 1753 OS::MemCopy(FIELD_ADDR(this, kHeaderSize), |
| 1754 FIELD_ADDR(from, kHeaderSize), | 1754 FIELD_ADDR(from, kHeaderSize), |
| 1755 old_length * kDoubleSize); | 1755 old_length * kDoubleSize); |
| 1756 } else { | 1756 } else { |
| 1757 for (int i = 0; i < old_length; ++i) { | 1757 for (int i = 0; i < old_length; ++i) { |
| 1758 set(i, from->get_scalar(i)); | 1758 if (from->is_the_hole(i)) { |
| 1759 set_the_hole(i); |
| 1760 } else { |
| 1761 set(i, from->get_scalar(i)); |
| 1762 } |
| 1759 } | 1763 } |
| 1760 } | 1764 } |
| 1761 int offset = kHeaderSize + old_length * kDoubleSize; | 1765 int offset = kHeaderSize + old_length * kDoubleSize; |
| 1762 for (int current = from->length(); current < length(); ++current) { | 1766 for (int current = from->length(); current < length(); ++current) { |
| 1763 WRITE_DOUBLE_FIELD(this, offset, hole_nan_as_double()); | 1767 WRITE_DOUBLE_FIELD(this, offset, hole_nan_as_double()); |
| 1764 offset += kDoubleSize; | 1768 offset += kDoubleSize; |
| 1765 } | 1769 } |
| 1766 } | 1770 } |
| 1767 | 1771 |
| 1768 | 1772 |
| (...skipping 2916 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4685 #undef WRITE_INT_FIELD | 4689 #undef WRITE_INT_FIELD |
| 4686 #undef READ_SHORT_FIELD | 4690 #undef READ_SHORT_FIELD |
| 4687 #undef WRITE_SHORT_FIELD | 4691 #undef WRITE_SHORT_FIELD |
| 4688 #undef READ_BYTE_FIELD | 4692 #undef READ_BYTE_FIELD |
| 4689 #undef WRITE_BYTE_FIELD | 4693 #undef WRITE_BYTE_FIELD |
| 4690 | 4694 |
| 4691 | 4695 |
| 4692 } } // namespace v8::internal | 4696 } } // namespace v8::internal |
| 4693 | 4697 |
| 4694 #endif // V8_OBJECTS_INL_H_ | 4698 #endif // V8_OBJECTS_INL_H_ |
| OLD | NEW |