| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2014 Google Inc. All rights reserved. | 2 * Copyright (C) 2014 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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 ++m_size; | 85 ++m_size; |
| 86 } | 86 } |
| 87 | 87 |
| 88 template <typename T> | 88 template <typename T> |
| 89 inline const T& HeapLinkedStack<T>::peek() { | 89 inline const T& HeapLinkedStack<T>::peek() { |
| 90 return m_head->m_data; | 90 return m_head->m_data; |
| 91 } | 91 } |
| 92 | 92 |
| 93 template <typename T> | 93 template <typename T> |
| 94 inline void HeapLinkedStack<T>::pop() { | 94 inline void HeapLinkedStack<T>::pop() { |
| 95 ASSERT(m_head && m_size); | 95 DCHECK(m_head && m_size); |
| 96 m_head = m_head->m_next; | 96 m_head = m_head->m_next; |
| 97 --m_size; | 97 --m_size; |
| 98 } | 98 } |
| 99 | 99 |
| 100 template <typename T> | 100 template <typename T> |
| 101 inline size_t HeapLinkedStack<T>::size() { | 101 inline size_t HeapLinkedStack<T>::size() { |
| 102 return m_size; | 102 return m_size; |
| 103 } | 103 } |
| 104 | 104 |
| 105 template <typename T> | 105 template <typename T> |
| 106 class TraceEagerlyTrait<HeapLinkedStack<T>> { | 106 class TraceEagerlyTrait<HeapLinkedStack<T>> { |
| 107 STATIC_ONLY(TraceEagerlyTrait); | 107 STATIC_ONLY(TraceEagerlyTrait); |
| 108 | 108 |
| 109 public: | 109 public: |
| 110 static const bool value = TraceEagerlyTrait<T>::value; | 110 static const bool value = TraceEagerlyTrait<T>::value; |
| 111 }; | 111 }; |
| 112 | 112 |
| 113 } // namespace blink | 113 } // namespace blink |
| 114 | 114 |
| 115 #endif // HeapLinkedStack_h | 115 #endif // HeapLinkedStack_h |
| OLD | NEW |