| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 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 | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 779 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 790 WTF_LOG_ERROR("%s", output); | 790 WTF_LOG_ERROR("%s", output); |
| 791 } | 791 } |
| 792 #endif | 792 #endif |
| 793 | 793 |
| 794 #ifndef NDEBUG | 794 #ifndef NDEBUG |
| 795 // Dumps the subtree rooted at the given node. | 795 // Dumps the subtree rooted at the given node. |
| 796 void dumpFromNode(Node* node, int indentation) const | 796 void dumpFromNode(Node* node, int indentation) const |
| 797 { | 797 { |
| 798 StringBuilder builder; | 798 StringBuilder builder; |
| 799 for (int i = 0; i < indentation; i++) | 799 for (int i = 0; i < indentation; i++) |
| 800 builder.append(" "); | 800 builder.append(' '); |
| 801 builder.append("-"); | 801 builder.append('-'); |
| 802 if (node) { | 802 if (node) { |
| 803 builder.append(" "); | 803 builder.append(' '); |
| 804 builder.append(ValueToString<T>::string(node->data())); | 804 builder.append(ValueToString<T>::string(node->data())); |
| 805 builder.append((node->color() == Black) ? " (black)" : " (red)"); | 805 builder.append((node->color() == Black) ? " (black)" : " (red)"); |
| 806 } | 806 } |
| 807 WTF_LOG_ERROR("%s", builder.toString().ascii().data()); | 807 WTF_LOG_ERROR("%s", builder.toString().ascii().data()); |
| 808 if (node) { | 808 if (node) { |
| 809 dumpFromNode(node->left(), indentation + 2); | 809 dumpFromNode(node->left(), indentation + 2); |
| 810 dumpFromNode(node->right(), indentation + 2); | 810 dumpFromNode(node->right(), indentation + 2); |
| 811 } | 811 } |
| 812 } | 812 } |
| 813 #endif | 813 #endif |
| 814 | 814 |
| 815 //---------------------------------------------------------------------- | 815 //---------------------------------------------------------------------- |
| 816 // Data members | 816 // Data members |
| 817 | 817 |
| 818 RefPtr<PODFreeListArena<Node> > m_arena; | 818 RefPtr<PODFreeListArena<Node> > m_arena; |
| 819 Node* m_root; | 819 Node* m_root; |
| 820 bool m_needsFullOrderingComparisons; | 820 bool m_needsFullOrderingComparisons; |
| 821 #ifndef NDEBUG | 821 #ifndef NDEBUG |
| 822 bool m_verboseDebugging; | 822 bool m_verboseDebugging; |
| 823 #endif | 823 #endif |
| 824 }; | 824 }; |
| 825 | 825 |
| 826 } // namespace blink | 826 } // namespace blink |
| 827 | 827 |
| 828 #endif // PODRedBlackTree_h | 828 #endif // PODRedBlackTree_h |
| OLD | NEW |