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

Issue 67151: Reimplement Splay Tree in JavaScript (and add unit tests!). (Closed)

Created:
11 years, 8 months ago by Mikhail Naganov
Modified:
9 years, 7 months ago
CC:
v8-dev
Visibility:
Public.

Description

Reimplement Splay Tree in JavaScript (and add unit tests!). This is the first step in reimplementing tick processing scripts in JavaScript. The goal is to have the same source both for Dev Tools and Golem, so Python implementation will be removed to avoid code duplication. The implementation follows the Dev Tools style: namespaces and JSDocs are used. Committed: http://code.google.com/p/v8/source/detail?r=1709

Patch Set 1 #

Total comments: 4

Patch Set 2 : Added comment to 'Files:' directive #

Unified diffs Side-by-side diffs Delta from patch set Stats (+497 lines, -1 line) Patch
M test/mjsunit/testcfg.py View 3 chunks +9 lines, -1 line 0 comments Download
A test/mjsunit/tools/splaytree.js View 1 1 chunk +166 lines, -0 lines 0 comments Download
A tools/splaytree.js View 1 chunk +322 lines, -0 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
Mikhail Naganov
11 years, 8 months ago (2009-04-15 00:08:20 UTC) #1
Søren Thygesen Gjesse
LGTM http://codereview.chromium.org/67151/diff/1/3 File test/mjsunit/tools/splaytree.js (right): http://codereview.chromium.org/67151/diff/1/3#newcode28 Line 28: // Files: tools/splaytree.js Please add a comment ...
11 years, 8 months ago (2009-04-15 01:11:52 UTC) #2
Mikhail Naganov
11 years, 8 months ago (2009-04-15 01:22:08 UTC) #3
http://codereview.chromium.org/67151/diff/1/3
File test/mjsunit/tools/splaytree.js (right):

http://codereview.chromium.org/67151/diff/1/3#newcode28
Line 28: // Files: tools/splaytree.js
On 2009/04/15 01:11:52, Søren Gjesse wrote:
> Please add a comment that this is relative to the project root - I confused me
> as I was at first thinking that the file was importing itself.

Done.

http://codereview.chromium.org/67151/diff/1/4
File tools/splaytree.js (right):

http://codereview.chromium.org/67151/diff/1/4#newcode149
Line 149: goog.structs.SplayTree.prototype.findMin = function() {
On 2009/04/15 01:11:52, Søren Gjesse wrote:
> Maybe add opt_startNode to match findMax.
> 

This asymmetry exists because findGreatestLessThan doesn't have a mirror
function. Unless we contribute this code to a JS library, I think this doesn't
matter much.

Powered by Google App Engine
This is Rietveld 408576698