Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(10)

Side by Side Diff: Source/wtf/BitVector.h

Issue 338463002: Add WTF_EXPORT to BitVector::OutOfLineBits (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2011 Apple 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 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 { 187 {
188 return (bitCount + 7) >> 3; 188 return (bitCount + 7) >> 3;
189 } 189 }
190 190
191 static uintptr_t makeInlineBits(uintptr_t bits) 191 static uintptr_t makeInlineBits(uintptr_t bits)
192 { 192 {
193 ASSERT(!(bits & (static_cast<uintptr_t>(1) << maxInlineBits()))); 193 ASSERT(!(bits & (static_cast<uintptr_t>(1) << maxInlineBits())));
194 return bits | (static_cast<uintptr_t>(1) << maxInlineBits()); 194 return bits | (static_cast<uintptr_t>(1) << maxInlineBits());
195 } 195 }
196 196
197 class OutOfLineBits { 197 class WTF_EXPORT OutOfLineBits {
198 public: 198 public:
199 size_t numBits() const { return m_numBits; } 199 size_t numBits() const { return m_numBits; }
200 size_t numWords() const { return (m_numBits + bitsInPointer() - 1) / bit sInPointer(); } 200 size_t numWords() const { return (m_numBits + bitsInPointer() - 1) / bit sInPointer(); }
201 uintptr_t* bits() { return bitwise_cast<uintptr_t*>(this + 1); } 201 uintptr_t* bits() { return bitwise_cast<uintptr_t*>(this + 1); }
202 const uintptr_t* bits() const { return bitwise_cast<const uintptr_t*>(th is + 1); } 202 const uintptr_t* bits() const { return bitwise_cast<const uintptr_t*>(th is + 1); }
203 203
204 static OutOfLineBits* create(size_t numBits); 204 static OutOfLineBits* create(size_t numBits);
205 205
206 static void destroy(OutOfLineBits*); 206 static void destroy(OutOfLineBits*);
207 207
(...skipping 29 matching lines...) Expand all
237 } 237 }
238 238
239 uintptr_t m_bitsOrPointer; 239 uintptr_t m_bitsOrPointer;
240 }; 240 };
241 241
242 } // namespace WTF 242 } // namespace WTF
243 243
244 using WTF::BitVector; 244 using WTF::BitVector;
245 245
246 #endif // BitVector_h 246 #endif // BitVector_h
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698