| 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 3922 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3933 object_stack.RemoveLast(); | 3933 object_stack.RemoveLast(); |
| 3934 } | 3934 } |
| 3935 | 3935 |
| 3936 | 3936 |
| 3937 static void UnmarkObjectRecursively(Object** p); | 3937 static void UnmarkObjectRecursively(Object** p); |
| 3938 class UnmarkObjectVisitor : public ObjectVisitor { | 3938 class UnmarkObjectVisitor : public ObjectVisitor { |
| 3939 public: | 3939 public: |
| 3940 void VisitPointers(Object** start, Object** end) { | 3940 void VisitPointers(Object** start, Object** end) { |
| 3941 // Copy all HeapObject pointers in [start, end) | 3941 // Copy all HeapObject pointers in [start, end) |
| 3942 for (Object** p = start; p < end; p++) { | 3942 for (Object** p = start; p < end; p++) { |
| 3943 if ((*p)->IsHeapObject()) | 3943 if ((*p)->IsHeapObject()) { |
| 3944 UnmarkObjectRecursively(p); | 3944 UnmarkObjectRecursively(p); |
| 3945 } |
| 3945 } | 3946 } |
| 3946 } | 3947 } |
| 3947 }; | 3948 }; |
| 3948 | 3949 |
| 3949 static UnmarkObjectVisitor unmark_visitor; | 3950 static UnmarkObjectVisitor unmark_visitor; |
| 3950 | 3951 |
| 3951 static void UnmarkObjectRecursively(Object** p) { | 3952 static void UnmarkObjectRecursively(Object** p) { |
| 3952 if (!(*p)->IsHeapObject()) return; | 3953 if (!(*p)->IsHeapObject()) return; |
| 3953 | 3954 |
| 3954 HeapObject* obj = HeapObject::cast(*p); | 3955 HeapObject* obj = HeapObject::cast(*p); |
| (...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4195 void ExternalStringTable::TearDown() { | 4196 void ExternalStringTable::TearDown() { |
| 4196 new_space_strings_.Free(); | 4197 new_space_strings_.Free(); |
| 4197 old_space_strings_.Free(); | 4198 old_space_strings_.Free(); |
| 4198 } | 4199 } |
| 4199 | 4200 |
| 4200 | 4201 |
| 4201 List<Object*> ExternalStringTable::new_space_strings_; | 4202 List<Object*> ExternalStringTable::new_space_strings_; |
| 4202 List<Object*> ExternalStringTable::old_space_strings_; | 4203 List<Object*> ExternalStringTable::old_space_strings_; |
| 4203 | 4204 |
| 4204 } } // namespace v8::internal | 4205 } } // namespace v8::internal |
| OLD | NEW |