| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 /** | 4 /** |
| 5 * @unrestricted | 5 * @unrestricted |
| 6 */ | 6 */ |
| 7 WebInspector.Trie = class { | 7 Common.Trie = class { |
| 8 constructor() { | 8 constructor() { |
| 9 this.clear(); | 9 this.clear(); |
| 10 } | 10 } |
| 11 | 11 |
| 12 /** | 12 /** |
| 13 * @param {string} word | 13 * @param {string} word |
| 14 */ | 14 */ |
| 15 add(word) { | 15 add(word) { |
| 16 var node = this._root; | 16 var node = this._root; |
| 17 ++this._wordsInSubtree[this._root]; | 17 ++this._wordsInSubtree[this._root]; |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 /** @type {!Array<!Object<string, number>>} */ | 126 /** @type {!Array<!Object<string, number>>} */ |
| 127 this._edges = [{__proto__: null}]; | 127 this._edges = [{__proto__: null}]; |
| 128 /** @type {!Array<boolean>} */ | 128 /** @type {!Array<boolean>} */ |
| 129 this._isWord = [false]; | 129 this._isWord = [false]; |
| 130 /** @type {!Array<number>} */ | 130 /** @type {!Array<number>} */ |
| 131 this._wordsInSubtree = [0]; | 131 this._wordsInSubtree = [0]; |
| 132 /** @type {!Array<number>} */ | 132 /** @type {!Array<number>} */ |
| 133 this._freeNodes = []; | 133 this._freeNodes = []; |
| 134 } | 134 } |
| 135 }; | 135 }; |
| OLD | NEW |