Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(178)

Side by Side Diff: src/heap.cc

Issue 1256002: Add a test to verify correctness of remembered set update for Heap::CopyJSObject. (Closed)
Patch Set: Forgotten dot. Created 10 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/heap.h ('k') | test/cctest/test-heap.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « src/heap.h ('k') | test/cctest/test-heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698