| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 907 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 918 ASSERT(isMarked()); | 918 ASSERT(isMarked()); |
| 919 m_encoded &= ~headerMarkBitMask; | 919 m_encoded &= ~headerMarkBitMask; |
| 920 } | 920 } |
| 921 | 921 |
| 922 NO_SANITIZE_ADDRESS inline bool HeapObjectHeader::isDead() const { | 922 NO_SANITIZE_ADDRESS inline bool HeapObjectHeader::isDead() const { |
| 923 ASSERT(checkHeader()); | 923 ASSERT(checkHeader()); |
| 924 return m_encoded & headerDeadBitMask; | 924 return m_encoded & headerDeadBitMask; |
| 925 } | 925 } |
| 926 | 926 |
| 927 NO_SANITIZE_ADDRESS inline void HeapObjectHeader::markDead() { | 927 NO_SANITIZE_ADDRESS inline void HeapObjectHeader::markDead() { |
| 928 // A Dead state should not happen in a per-thread heap world. |
| 929 // TODO(haraken): Remove code to handle the Dead state. |
| 930 CHECK(false); |
| 928 ASSERT(checkHeader()); | 931 ASSERT(checkHeader()); |
| 929 ASSERT(!isMarked()); | 932 ASSERT(!isMarked()); |
| 930 m_encoded |= headerDeadBitMask; | 933 m_encoded |= headerDeadBitMask; |
| 931 } | 934 } |
| 932 | 935 |
| 933 inline Address NormalPageArena::allocateObject(size_t allocationSize, | 936 inline Address NormalPageArena::allocateObject(size_t allocationSize, |
| 934 size_t gcInfoIndex) { | 937 size_t gcInfoIndex) { |
| 935 if (LIKELY(allocationSize <= m_remainingAllocationSize)) { | 938 if (LIKELY(allocationSize <= m_remainingAllocationSize)) { |
| 936 Address headerAddress = m_currentAllocationPoint; | 939 Address headerAddress = m_currentAllocationPoint; |
| 937 m_currentAllocationPoint += allocationSize; | 940 m_currentAllocationPoint += allocationSize; |
| (...skipping 10 matching lines...) Expand all Loading... |
| 948 return outOfLineAllocate(allocationSize, gcInfoIndex); | 951 return outOfLineAllocate(allocationSize, gcInfoIndex); |
| 949 } | 952 } |
| 950 | 953 |
| 951 inline NormalPageArena* NormalPage::arenaForNormalPage() const { | 954 inline NormalPageArena* NormalPage::arenaForNormalPage() const { |
| 952 return static_cast<NormalPageArena*>(arena()); | 955 return static_cast<NormalPageArena*>(arena()); |
| 953 } | 956 } |
| 954 | 957 |
| 955 } // namespace blink | 958 } // namespace blink |
| 956 | 959 |
| 957 #endif // HeapPage_h | 960 #endif // HeapPage_h |
| OLD | NEW |