| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> | 2 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> |
| 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 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 for (unsigned i = groupEnd; i < to; ++i) { | 137 for (unsigned i = groupEnd; i < to; ++i) { |
| 138 if (parentWithDepth(commonAncestorDepth + 1, parentMatrix[i]) ==
n) | 138 if (parentWithDepth(commonAncestorDepth + 1, parentMatrix[i]) ==
n) |
| 139 parentMatrix[i].swap(parentMatrix[groupEnd++]); | 139 parentMatrix[i].swap(parentMatrix[groupEnd++]); |
| 140 } | 140 } |
| 141 | 141 |
| 142 if (groupEnd - previousGroupEnd > 1) | 142 if (groupEnd - previousGroupEnd > 1) |
| 143 sortBlock(previousGroupEnd, groupEnd, parentMatrix, mayContainAt
tributeNodes); | 143 sortBlock(previousGroupEnd, groupEnd, parentMatrix, mayContainAt
tributeNodes); |
| 144 | 144 |
| 145 ASSERT(previousGroupEnd != groupEnd); | 145 ASSERT(previousGroupEnd != groupEnd); |
| 146 previousGroupEnd = groupEnd; | 146 previousGroupEnd = groupEnd; |
| 147 #ifndef NDEBUG | 147 #if ENABLE(ASSERT) |
| 148 parentNodes.remove(n); | 148 parentNodes.remove(n); |
| 149 #endif | 149 #endif |
| 150 } | 150 } |
| 151 } | 151 } |
| 152 | 152 |
| 153 ASSERT(parentNodes.isEmpty()); | 153 ASSERT(parentNodes.isEmpty()); |
| 154 } | 154 } |
| 155 | 155 |
| 156 void NodeSet::sort() const | 156 void NodeSet::sort() const |
| 157 { | 157 { |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 278 Node* NodeSet::anyNode() const | 278 Node* NodeSet::anyNode() const |
| 279 { | 279 { |
| 280 if (isEmpty()) | 280 if (isEmpty()) |
| 281 return 0; | 281 return 0; |
| 282 | 282 |
| 283 return m_nodes.at(0).get(); | 283 return m_nodes.at(0).get(); |
| 284 } | 284 } |
| 285 | 285 |
| 286 } | 286 } |
| 287 } | 287 } |
| OLD | NEW |