| 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 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 254 // Miscellaneous | 254 // Miscellaneous |
| 255 | 255 |
| 256 // NOTE: SpaceIterator depends on AllocationSpace enumeration values being | 256 // NOTE: SpaceIterator depends on AllocationSpace enumeration values being |
| 257 // consecutive. | 257 // consecutive. |
| 258 enum AllocationSpace { | 258 enum AllocationSpace { |
| 259 NEW_SPACE, // Semispaces collected with copying collector. | 259 NEW_SPACE, // Semispaces collected with copying collector. |
| 260 OLD_POINTER_SPACE, // Must be first of the paged spaces - see PagedSpaces. | 260 OLD_POINTER_SPACE, // Must be first of the paged spaces - see PagedSpaces. |
| 261 OLD_DATA_SPACE, // May not have pointers to new space. | 261 OLD_DATA_SPACE, // May not have pointers to new space. |
| 262 CODE_SPACE, // Also one of the old spaces. Marked executable. | 262 CODE_SPACE, // Also one of the old spaces. Marked executable. |
| 263 MAP_SPACE, // Only map objects. | 263 MAP_SPACE, // Only map objects. |
| 264 GLOBAL_PROPERTY_CELL_SPACE, // Only global property cell objects. |
| 264 LO_SPACE, // Large objects. | 265 LO_SPACE, // Large objects. |
| 265 FIRST_SPACE = NEW_SPACE, | 266 FIRST_SPACE = NEW_SPACE, |
| 266 LAST_SPACE = LO_SPACE // <= 5 (see kSpaceBits and kLOSpacePointer) | 267 LAST_SPACE = LO_SPACE // <= 9 (see kSpaceBits and kLOSpacePointer) |
| 267 }; | 268 }; |
| 268 const int kSpaceTagSize = 3; | 269 const int kSpaceTagSize = 4; |
| 269 const int kSpaceTagMask = (1 << kSpaceTagSize) - 1; | 270 const int kSpaceTagMask = (1 << kSpaceTagSize) - 1; |
| 270 | 271 |
| 271 | 272 |
| 272 // A flag that indicates whether objects should be pretenured when | 273 // A flag that indicates whether objects should be pretenured when |
| 273 // allocated (allocated directly into the old generation) or not | 274 // allocated (allocated directly into the old generation) or not |
| 274 // (allocated in the young generation if the object size and type | 275 // (allocated in the young generation if the object size and type |
| 275 // allows). | 276 // allows). |
| 276 enum PretenureFlag { NOT_TENURED, TENURED }; | 277 enum PretenureFlag { NOT_TENURED, TENURED }; |
| 277 | 278 |
| 278 enum GarbageCollector { SCAVENGER, MARK_COMPACTOR }; | 279 enum GarbageCollector { SCAVENGER, MARK_COMPACTOR }; |
| (...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 557 | 558 |
| 558 Dest dest; | 559 Dest dest; |
| 559 memcpy(&dest, &source, sizeof(dest)); | 560 memcpy(&dest, &source, sizeof(dest)); |
| 560 return dest; | 561 return dest; |
| 561 } | 562 } |
| 562 | 563 |
| 563 | 564 |
| 564 } } // namespace v8::internal | 565 } } // namespace v8::internal |
| 565 | 566 |
| 566 #endif // V8_GLOBALS_H_ | 567 #endif // V8_GLOBALS_H_ |
| OLD | NEW |