Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(932)

Side by Side Diff: pkg/analysis_server/lib/src/index/b_plus_tree.dart

Issue 331603002: Fix caching paging during read. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | pkg/analysis_server/lib/src/index/page_node_manager.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library index.b_plus_tree; 5 library index.b_plus_tree;
6 6
7 import 'dart:collection'; 7 import 'dart:collection';
8 8
9 9
10 /** 10 /**
(...skipping 652 matching lines...) Expand 10 before | Expand all | Expand 10 after
663 } else if (compare > 0) { 663 } else if (compare > 0) {
664 lo = mid + 1; 664 lo = mid + 1;
665 } else { 665 } else {
666 return mid; 666 return mid;
667 } 667 }
668 } 668 }
669 return lo; 669 return lo;
670 } 670 }
671 671
672 void _insertNotFull(K key, V value, int index) { 672 void _insertNotFull(K key, V value, int index) {
673 if (index < keys.length && keys[index] == key) { 673 if (index < keys.length && comparator(keys[index], key) == 0) {
674 values[index] = value; 674 values[index] = value;
675 } else { 675 } else {
676 keys.insert(index, key); 676 keys.insert(index, key);
677 values.insert(index, value); 677 values.insert(index, value);
678 } 678 }
679 tree._writeLeafNode(this); 679 tree._writeLeafNode(this);
680 } 680 }
681 } 681 }
682 682
683 683
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
765 765
766 /** 766 /**
767 * A container with information about split during insert. 767 * A container with information about split during insert.
768 */ 768 */
769 class _Split<K, N> { 769 class _Split<K, N> {
770 final K key; 770 final K key;
771 final N left; 771 final N left;
772 final N right; 772 final N right;
773 _Split(this.key, this.left, this.right); 773 _Split(this.key, this.left, this.right);
774 } 774 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analysis_server/lib/src/index/page_node_manager.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698