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 381 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
392 // other object types are promoted to old pointer space. We do not use | 392 // other object types are promoted to old pointer space. We do not use |
393 // object->IsHeapNumber() and object->IsSeqString() because we already | 393 // object->IsHeapNumber() and object->IsSeqString() because we already |
394 // know that object has the heap object tag. | 394 // know that object has the heap object tag. |
395 | 395 |
396 // These objects are never allocated in new space. | 396 // These objects are never allocated in new space. |
397 ASSERT(type != MAP_TYPE); | 397 ASSERT(type != MAP_TYPE); |
398 ASSERT(type != CODE_TYPE); | 398 ASSERT(type != CODE_TYPE); |
399 ASSERT(type != ODDBALL_TYPE); | 399 ASSERT(type != ODDBALL_TYPE); |
400 ASSERT(type != JS_GLOBAL_PROPERTY_CELL_TYPE); | 400 ASSERT(type != JS_GLOBAL_PROPERTY_CELL_TYPE); |
401 | 401 |
402 if (type < FIRST_NONSTRING_TYPE) { | 402 if (type <= LAST_NAME_TYPE) { |
| 403 if (type == SYMBOL_TYPE) return OLD_POINTER_SPACE; |
| 404 ASSERT(type < FIRST_NONSTRING_TYPE); |
403 // There are four string representations: sequential strings, external | 405 // There are four string representations: sequential strings, external |
404 // strings, cons strings, and sliced strings. | 406 // strings, cons strings, and sliced strings. |
405 // Only the latter two contain non-map-word pointers to heap objects. | 407 // Only the latter two contain non-map-word pointers to heap objects. |
406 return ((type & kIsIndirectStringMask) == kIsIndirectStringTag) | 408 return ((type & kIsIndirectStringMask) == kIsIndirectStringTag) |
407 ? OLD_POINTER_SPACE | 409 ? OLD_POINTER_SPACE |
408 : OLD_DATA_SPACE; | 410 : OLD_DATA_SPACE; |
409 } else { | 411 } else { |
410 return (type <= LAST_DATA_TYPE) ? OLD_DATA_SPACE : OLD_POINTER_SPACE; | 412 return (type <= LAST_DATA_TYPE) ? OLD_DATA_SPACE : OLD_POINTER_SPACE; |
411 } | 413 } |
412 } | 414 } |
(...skipping 453 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
866 AssertNoAllocation::~AssertNoAllocation() { } | 868 AssertNoAllocation::~AssertNoAllocation() { } |
867 DisableAssertNoAllocation::DisableAssertNoAllocation() { } | 869 DisableAssertNoAllocation::DisableAssertNoAllocation() { } |
868 DisableAssertNoAllocation::~DisableAssertNoAllocation() { } | 870 DisableAssertNoAllocation::~DisableAssertNoAllocation() { } |
869 | 871 |
870 #endif | 872 #endif |
871 | 873 |
872 | 874 |
873 } } // namespace v8::internal | 875 } } // namespace v8::internal |
874 | 876 |
875 #endif // V8_HEAP_INL_H_ | 877 #endif // V8_HEAP_INL_H_ |
OLD | NEW |