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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
« test/cctest/test-log.cc ('K') | « tools/profile.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2009 the V8 project authors. All rights reserved. 1 // Copyright 2009 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 return this.root_; 184 return this.root_;
185 } else if (this.root_.left) { 185 } else if (this.root_.left) {
186 return this.findMax(this.root_.left); 186 return this.findMax(this.root_.left);
187 } else { 187 } else {
188 return null; 188 return null;
189 } 189 }
190 }; 190 };
191 191
192 192
193 /** 193 /**
194 * @return {Array<*>} An array containing all the values of tree's nodes paired
195 * with keys.
196 */
197 SplayTree.prototype.exportKeysAndValues = function() {
198 var result = [];
199 this.traverse_(function(node) { result.push([node.key, node.value]); });
200 return result;
201 };
202
203
204 /**
194 * @return {Array<*>} An array containing all the values of tree's nodes. 205 * @return {Array<*>} An array containing all the values of tree's nodes.
195 */ 206 */
196 SplayTree.prototype.exportValues = function() { 207 SplayTree.prototype.exportValues = function() {
197 var result = []; 208 var result = [];
198 this.traverse_(function(node) { result.push(node.value); }); 209 this.traverse_(function(node) { result.push(node.value); });
199 return result; 210 return result;
200 }; 211 };
201 212
202 213
203 /** 214 /**
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
307 /** 318 /**
308 * @type {SplayTree.Node} 319 * @type {SplayTree.Node}
309 */ 320 */
310 SplayTree.Node.prototype.left = null; 321 SplayTree.Node.prototype.left = null;
311 322
312 323
313 /** 324 /**
314 * @type {SplayTree.Node} 325 * @type {SplayTree.Node}
315 */ 326 */
316 SplayTree.Node.prototype.right = null; 327 SplayTree.Node.prototype.right = null;
OLDNEW
« 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