Lines Matching refs:current
147 var current = this.root_;
148 while (current.left) {
149 current = current.left;
151 return current;
162 var current = opt_startNode || this.root_;
163 while (current.right) {
164 current = current.right;
166 return current;
235 var current = this.root_;
237 if (key < current.key) {
238 if (!current.left) {
241 if (key < current.left.key) {
243 var tmp = current.left;
244 current.left = tmp.right;
245 tmp.right = current;
246 current = tmp;
247 if (!current.left) {
252 right.left = current;
253 right = current;
254 current = current.left;
255 } else if (key > current.key) {
256 if (!current.right) {
259 if (key > current.right.key) {
261 var tmp = current.right;
262 current.right = tmp.left;
263 tmp.left = current;
264 current = tmp;
265 if (!current.right) {
270 left.right = current;
271 left = current;
272 current = current.right;
278 left.right = current.left;
279 right.left = current.right;
280 current.left = dummy.right;
281 current.right = dummy.left;
282 this.root_ = current;