| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 328 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 339 // object->IsHeapNumber() and object->IsSeqString() because we already | 339 // object->IsHeapNumber() and object->IsSeqString() because we already |
| 340 // know that object has the heap object tag. | 340 // know that object has the heap object tag. |
| 341 | 341 |
| 342 // These objects are never allocated in new space. | 342 // These objects are never allocated in new space. |
| 343 ASSERT(type != MAP_TYPE); | 343 ASSERT(type != MAP_TYPE); |
| 344 ASSERT(type != CODE_TYPE); | 344 ASSERT(type != CODE_TYPE); |
| 345 ASSERT(type != ODDBALL_TYPE); | 345 ASSERT(type != ODDBALL_TYPE); |
| 346 ASSERT(type != JS_GLOBAL_PROPERTY_CELL_TYPE); | 346 ASSERT(type != JS_GLOBAL_PROPERTY_CELL_TYPE); |
| 347 | 347 |
| 348 if (type < FIRST_NONSTRING_TYPE) { | 348 if (type < FIRST_NONSTRING_TYPE) { |
| 349 // There are three string representations: sequential strings, cons | 349 // There are four string representations: sequential strings, external |
| 350 // strings, and external strings. Only cons strings contain | 350 // strings, cons strings, and sliced strings. |
| 351 // non-map-word pointers to heap objects. | 351 // Only the latter two contain non-map-word pointers to heap objects. |
| 352 return ((type & kStringRepresentationMask) == kConsStringTag) | 352 return ((type & kIsIndirectStringMask) == kIsIndirectStringTag) |
| 353 ? OLD_POINTER_SPACE | 353 ? OLD_POINTER_SPACE |
| 354 : OLD_DATA_SPACE; | 354 : OLD_DATA_SPACE; |
| 355 } else { | 355 } else { |
| 356 return (type <= LAST_DATA_TYPE) ? OLD_DATA_SPACE : OLD_POINTER_SPACE; | 356 return (type <= LAST_DATA_TYPE) ? OLD_DATA_SPACE : OLD_POINTER_SPACE; |
| 357 } | 357 } |
| 358 } | 358 } |
| 359 | 359 |
| 360 | 360 |
| 361 void Heap::CopyBlock(Address dst, Address src, int byte_size) { | 361 void Heap::CopyBlock(Address dst, Address src, int byte_size) { |
| 362 ASSERT(IsAligned(byte_size, kPointerSize)); | 362 ASSERT(IsAligned(byte_size, kPointerSize)); |
| (...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 675 | 675 |
| 676 | 676 |
| 677 Heap* _inline_get_heap_() { | 677 Heap* _inline_get_heap_() { |
| 678 return HEAP; | 678 return HEAP; |
| 679 } | 679 } |
| 680 | 680 |
| 681 | 681 |
| 682 } } // namespace v8::internal | 682 } } // namespace v8::internal |
| 683 | 683 |
| 684 #endif // V8_HEAP_INL_H_ | 684 #endif // V8_HEAP_INL_H_ |
| OLD | NEW |