| 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 974 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 985 if (e->IsMap()) { | 985 if (e->IsMap()) { |
| 986 Map::cast(e)->SharedMapVerify(); | 986 Map::cast(e)->SharedMapVerify(); |
| 987 } else { | 987 } else { |
| 988 ASSERT(e->IsUndefined()); | 988 ASSERT(e->IsUndefined()); |
| 989 } | 989 } |
| 990 } | 990 } |
| 991 } | 991 } |
| 992 } | 992 } |
| 993 | 993 |
| 994 | 994 |
| 995 void Map::ZapInstanceDescriptors() { |
| 996 DescriptorArray* descriptors = instance_descriptors(); |
| 997 if (descriptors == GetHeap()->empty_descriptor_array()) return; |
| 998 FixedArray* contents = FixedArray::cast( |
| 999 descriptors->get(DescriptorArray::kContentArrayIndex)); |
| 1000 MemsetPointer(descriptors->data_start(), |
| 1001 GetHeap()->the_hole_value(), |
| 1002 descriptors->length()); |
| 1003 MemsetPointer(contents->data_start(), |
| 1004 GetHeap()->the_hole_value(), |
| 1005 contents->length()); |
| 1006 } |
| 1007 |
| 1008 |
| 1009 void Map::ZapPrototypeTransitions() { |
| 1010 FixedArray* proto_transitions = prototype_transitions(); |
| 1011 MemsetPointer(proto_transitions->data_start(), |
| 1012 GetHeap()->the_hole_value(), |
| 1013 proto_transitions->length()); |
| 1014 } |
| 1015 |
| 1016 |
| 995 #endif // DEBUG | 1017 #endif // DEBUG |
| 996 | 1018 |
| 997 } } // namespace v8::internal | 1019 } } // namespace v8::internal |
| OLD | NEW |