| 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 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 180 | 180 |
| 181 static int CellsForLength(int length) { | 181 static int CellsForLength(int length) { |
| 182 return (length + kBitsPerCell - 1) >> kBitsPerCellLog2; | 182 return (length + kBitsPerCell - 1) >> kBitsPerCellLog2; |
| 183 } | 183 } |
| 184 | 184 |
| 185 int CellsCount() { | 185 int CellsCount() { |
| 186 return CellsForLength(kLength); | 186 return CellsForLength(kLength); |
| 187 } | 187 } |
| 188 | 188 |
| 189 static int SizeFor(int cells_count) { | 189 static int SizeFor(int cells_count) { |
| 190 return sizeof(MarkBit::CellType)*cells_count; | 190 return sizeof(MarkBit::CellType) * cells_count; |
| 191 } | 191 } |
| 192 | 192 |
| 193 INLINE(static uint32_t IndexToCell(uint32_t index)) { | 193 INLINE(static uint32_t IndexToCell(uint32_t index)) { |
| 194 return index >> kBitsPerCellLog2; | 194 return index >> kBitsPerCellLog2; |
| 195 } | 195 } |
| 196 | 196 |
| 197 INLINE(static uint32_t CellToIndex(uint32_t index)) { | 197 INLINE(static uint32_t CellToIndex(uint32_t index)) { |
| 198 return index << kBitsPerCellLog2; | 198 return index << kBitsPerCellLog2; |
| 199 } | 199 } |
| 200 | 200 |
| (...skipping 2411 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2612 } | 2612 } |
| 2613 // Must be small, since an iteration is used for lookup. | 2613 // Must be small, since an iteration is used for lookup. |
| 2614 static const int kMaxComments = 64; | 2614 static const int kMaxComments = 64; |
| 2615 }; | 2615 }; |
| 2616 #endif | 2616 #endif |
| 2617 | 2617 |
| 2618 | 2618 |
| 2619 } } // namespace v8::internal | 2619 } } // namespace v8::internal |
| 2620 | 2620 |
| 2621 #endif // V8_SPACES_H_ | 2621 #endif // V8_SPACES_H_ |
| OLD | NEW |