| OLD | NEW |
| 1 // Copyright 2009 the V8 project authors. All rights reserved. | 1 // Copyright 2009 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 2645 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2656 // Since we know the clone is allocated in new space, we can copy | 2656 // Since we know the clone is allocated in new space, we can copy |
| 2657 // the contents without worrying about updating the write barrier. | 2657 // the contents without worrying about updating the write barrier. |
| 2658 CopyBlock(reinterpret_cast<Object**>(HeapObject::cast(clone)->address()), | 2658 CopyBlock(reinterpret_cast<Object**>(HeapObject::cast(clone)->address()), |
| 2659 reinterpret_cast<Object**>(source->address()), | 2659 reinterpret_cast<Object**>(source->address()), |
| 2660 object_size); | 2660 object_size); |
| 2661 } | 2661 } |
| 2662 | 2662 |
| 2663 FixedArray* elements = FixedArray::cast(source->elements()); | 2663 FixedArray* elements = FixedArray::cast(source->elements()); |
| 2664 FixedArray* properties = FixedArray::cast(source->properties()); | 2664 FixedArray* properties = FixedArray::cast(source->properties()); |
| 2665 // Update elements if necessary. | 2665 // Update elements if necessary. |
| 2666 if (elements->length()> 0) { | 2666 if (elements->length() > 0) { |
| 2667 Object* elem = CopyFixedArray(elements); | 2667 Object* elem = CopyFixedArray(elements); |
| 2668 if (elem->IsFailure()) return elem; | 2668 if (elem->IsFailure()) return elem; |
| 2669 JSObject::cast(clone)->set_elements(FixedArray::cast(elem)); | 2669 JSObject::cast(clone)->set_elements(FixedArray::cast(elem)); |
| 2670 } | 2670 } |
| 2671 // Update properties if necessary. | 2671 // Update properties if necessary. |
| 2672 if (properties->length() > 0) { | 2672 if (properties->length() > 0) { |
| 2673 Object* prop = CopyFixedArray(properties); | 2673 Object* prop = CopyFixedArray(properties); |
| 2674 if (prop->IsFailure()) return prop; | 2674 if (prop->IsFailure()) return prop; |
| 2675 JSObject::cast(clone)->set_properties(FixedArray::cast(prop)); | 2675 JSObject::cast(clone)->set_properties(FixedArray::cast(prop)); |
| 2676 } | 2676 } |
| (...skipping 1689 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4366 void ExternalStringTable::TearDown() { | 4366 void ExternalStringTable::TearDown() { |
| 4367 new_space_strings_.Free(); | 4367 new_space_strings_.Free(); |
| 4368 old_space_strings_.Free(); | 4368 old_space_strings_.Free(); |
| 4369 } | 4369 } |
| 4370 | 4370 |
| 4371 | 4371 |
| 4372 List<Object*> ExternalStringTable::new_space_strings_; | 4372 List<Object*> ExternalStringTable::new_space_strings_; |
| 4373 List<Object*> ExternalStringTable::old_space_strings_; | 4373 List<Object*> ExternalStringTable::old_space_strings_; |
| 4374 | 4374 |
| 4375 } } // namespace v8::internal | 4375 } } // namespace v8::internal |
| OLD | NEW |