OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2004, 2006, 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2004, 2006, 2009 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 14 matching lines...) Expand all Loading... |
25 | 25 |
26 #ifndef BitStack_h | 26 #ifndef BitStack_h |
27 #define BitStack_h | 27 #define BitStack_h |
28 | 28 |
29 #include "core/CoreExport.h" | 29 #include "core/CoreExport.h" |
30 #include "wtf/Allocator.h" | 30 #include "wtf/Allocator.h" |
31 #include "wtf/Vector.h" | 31 #include "wtf/Vector.h" |
32 | 32 |
33 namespace blink { | 33 namespace blink { |
34 | 34 |
35 class Node; | |
36 | |
37 class CORE_EXPORT BitStack { | 35 class CORE_EXPORT BitStack { |
38 STACK_ALLOCATED(); | 36 STACK_ALLOCATED(); |
39 | 37 |
40 public: | 38 public: |
41 BitStack(); | 39 BitStack(); |
42 ~BitStack(); | 40 ~BitStack(); |
43 | 41 |
44 void push(bool); | 42 void push(bool); |
45 void pop(); | 43 void pop(); |
46 | 44 |
47 bool top() const; | 45 bool top() const; |
48 unsigned size() const; | 46 unsigned size() const; |
49 | 47 |
50 private: | 48 private: |
51 unsigned m_size; | 49 unsigned m_size; |
52 Vector<unsigned, 1> m_words; | 50 Vector<unsigned, 1> m_words; |
53 }; | 51 }; |
54 | 52 |
55 } // namespace blink | 53 } // namespace blink |
56 | 54 |
57 #endif // BitStack_h | 55 #endif // BitStack_h |
OLD | NEW |