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

Unified Diff: src/splay-tree.h

Issue 1148007: Merge bleeding_edge from version 2.1.3 up to revision 4205... (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/partial_snapshots/
Patch Set: Created 10 years, 9 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 side-by-side diff with in-line comments
Download patch
« src/runtime.cc ('K') | « src/serialize.cc ('k') | src/splay-tree-inl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/splay-tree.h
===================================================================
--- src/splay-tree.h (revision 4205)
+++ src/splay-tree.h (working copy)
@@ -88,6 +88,9 @@
// Find the mapping with the least key in this tree.
bool FindLeast(Locator* locator);
+ // Move the node from one key to another.
+ bool Move(const Key& old_key, const Key& new_key);
+
// Remove the node with the given key from the tree.
bool Remove(const Key& key);
@@ -151,7 +154,16 @@
void ResetRoot() { root_ = NULL; }
private:
+ // Search for a node with a given key. If found, root_ points
+ // to the node.
+ bool FindInternal(const Key& key);
+ // Inserts a node assuming that root_ is already set up.
+ void InsertInternal(int cmp, Node* node);
+
+ // Removes root_ node.
+ void RemoveRootNode(const Key& key);
+
template<class Callback>
class NodeToPairAdaptor BASE_EMBEDDED {
public:
« src/runtime.cc ('K') | « src/serialize.cc ('k') | src/splay-tree-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698