| 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 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 155 NumberOfFinalizedHeaps = GeneralHeapNonFinalized, | 155 NumberOfFinalizedHeaps = GeneralHeapNonFinalized, |
| 156 NumberOfNonFinalizedHeaps = NumberOfHeaps - NumberOfFinalizedHeaps, | 156 NumberOfNonFinalizedHeaps = NumberOfHeaps - NumberOfFinalizedHeaps, |
| 157 NonFinalizedHeapOffset = FirstNonFinalizedHeap | 157 NonFinalizedHeapOffset = FirstNonFinalizedHeap |
| 158 }; | 158 }; |
| 159 | 159 |
| 160 // Base implementation for HeapIndexTrait found below. | 160 // Base implementation for HeapIndexTrait found below. |
| 161 template<int heapIndex> | 161 template<int heapIndex> |
| 162 struct HeapIndexTraitBase { | 162 struct HeapIndexTraitBase { |
| 163 typedef ThreadHeap<FinalizedHeapObjectHeader> HeapType; | 163 typedef ThreadHeap<FinalizedHeapObjectHeader> HeapType; |
| 164 static const int finalizedIndex = heapIndex; | 164 static const int finalizedIndex = heapIndex; |
| 165 static const int nonFinalizedIndex = heapIndex + NonFinalizedHeapOffset; | 165 static const int nonFinalizedIndex = heapIndex + static_cast<int>(NonFinaliz
edHeapOffset); |
| 166 static int index(bool isFinalized) | 166 static int index(bool isFinalized) |
| 167 { | 167 { |
| 168 return isFinalized ? finalizedIndex : nonFinalizedIndex; | 168 return isFinalized ? finalizedIndex : nonFinalizedIndex; |
| 169 } | 169 } |
| 170 }; | 170 }; |
| 171 | 171 |
| 172 // HeapIndexTrait defines properties for each heap in the TypesHeaps enum. | 172 // HeapIndexTrait defines properties for each heap in the TypesHeaps enum. |
| 173 template<int index> | 173 template<int index> |
| 174 struct HeapIndexTrait; | 174 struct HeapIndexTrait; |
| 175 | 175 |
| (...skipping 631 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 807 // HeapPage header. We use some of the bits to determine | 807 // HeapPage header. We use some of the bits to determine |
| 808 // whether the page is part of a terminting thread or | 808 // whether the page is part of a terminting thread or |
| 809 // if the page is traced after being terminated (orphaned). | 809 // if the page is traced after being terminated (orphaned). |
| 810 uintptr_t m_terminating : 1; | 810 uintptr_t m_terminating : 1; |
| 811 uintptr_t m_tracedAfterOrphaned : 1; | 811 uintptr_t m_tracedAfterOrphaned : 1; |
| 812 }; | 812 }; |
| 813 | 813 |
| 814 } | 814 } |
| 815 | 815 |
| 816 #endif // ThreadState_h | 816 #endif // ThreadState_h |
| OLD | NEW |