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

Unified Diff: tools/splaytree.js

Issue 7310025: Remove support for logging into a memory buffer. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Don't add runtime test-only functions Created 9 years, 5 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
« test/cctest/test-log.cc ('K') | « tools/profile.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/splaytree.js
diff --git a/tools/splaytree.js b/tools/splaytree.js
index 1c9aab9e2eb37d47cad773e9b1e7cb11adcfec74..d272a9e18279bd5add5a95c0a33d784eb8a2cef7 100644
--- a/tools/splaytree.js
+++ b/tools/splaytree.js
@@ -191,6 +191,17 @@ SplayTree.prototype.findGreatestLessThan = function(key) {
/**
+ * @return {Array<*>} An array containing all the values of tree's nodes paired
+ * with keys.
+ */
+SplayTree.prototype.exportKeysAndValues = function() {
+ var result = [];
+ this.traverse_(function(node) { result.push([node.key, node.value]); });
+ return result;
+};
+
+
+/**
* @return {Array<*>} An array containing all the values of tree's nodes.
*/
SplayTree.prototype.exportValues = function() {
« test/cctest/test-log.cc ('K') | « tools/profile.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698