| OLD | NEW |
| 1 // Copyright 2006-2009 the V8 project authors. All rights reserved. | 1 // Copyright 2006-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 4209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4220 | 4220 |
| 4221 | 4221 |
| 4222 // Utility superclass for stack-allocated objects that must be updated | 4222 // Utility superclass for stack-allocated objects that must be updated |
| 4223 // on gc. It provides two ways for the gc to update instances, either | 4223 // on gc. It provides two ways for the gc to update instances, either |
| 4224 // iterating or updating after gc. | 4224 // iterating or updating after gc. |
| 4225 class Relocatable BASE_EMBEDDED { | 4225 class Relocatable BASE_EMBEDDED { |
| 4226 public: | 4226 public: |
| 4227 inline Relocatable() : prev_(top_) { top_ = this; } | 4227 inline Relocatable() : prev_(top_) { top_ = this; } |
| 4228 virtual ~Relocatable() { | 4228 virtual ~Relocatable() { |
| 4229 ASSERT_EQ(top_, this); | 4229 ASSERT_EQ(top_, this); |
| 4230 top_ = prev_; } | 4230 top_ = prev_; |
| 4231 } |
| 4231 virtual void IterateInstance(ObjectVisitor* v) { } | 4232 virtual void IterateInstance(ObjectVisitor* v) { } |
| 4232 virtual void PostGarbageCollection() { } | 4233 virtual void PostGarbageCollection() { } |
| 4233 | 4234 |
| 4234 static void PostGarbageCollectionProcessing(); | 4235 static void PostGarbageCollectionProcessing(); |
| 4235 static int ArchiveSpacePerThread(); | 4236 static int ArchiveSpacePerThread(); |
| 4236 static char* ArchiveState(char* to); | 4237 static char* ArchiveState(char* to); |
| 4237 static char* RestoreState(char* from); | 4238 static char* RestoreState(char* from); |
| 4238 static void Iterate(ObjectVisitor* v); | 4239 static void Iterate(ObjectVisitor* v); |
| 4239 static void Iterate(ObjectVisitor* v, Relocatable* top); | 4240 static void Iterate(ObjectVisitor* v, Relocatable* top); |
| 4240 static char* Iterate(ObjectVisitor* v, char* t); | 4241 static char* Iterate(ObjectVisitor* v, char* t); |
| (...skipping 638 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4879 } else { | 4880 } else { |
| 4880 value &= ~(1 << bit_position); | 4881 value &= ~(1 << bit_position); |
| 4881 } | 4882 } |
| 4882 return value; | 4883 return value; |
| 4883 } | 4884 } |
| 4884 }; | 4885 }; |
| 4885 | 4886 |
| 4886 } } // namespace v8::internal | 4887 } } // namespace v8::internal |
| 4887 | 4888 |
| 4888 #endif // V8_OBJECTS_H_ | 4889 #endif // V8_OBJECTS_H_ |
| OLD | NEW |