Make IO a static class instead of a singleton.

This commit is contained in:
Bob Nystrom
2013-12-21 19:25:09 -08:00
parent 24a6f4cd8c
commit 6c3aa85228
119 changed files with 532 additions and 536 deletions

View File

@ -26,7 +26,7 @@ var stretchDepth = maxDepth + 1
var start = OS.clock
io.write("stretch tree of depth " + stretchDepth.toString + " check: " +
IO.write("stretch tree of depth " + stretchDepth.toString + " check: " +
new Tree(0, stretchDepth).check.toString)
var longLivedTree = new Tree(0, maxDepth)
@ -48,13 +48,13 @@ while (depth < stretchDepth) {
i = i + 1
}
io.write((iterations * 2).toString + " trees of depth " + depth.toString +
IO.write((iterations * 2).toString + " trees of depth " + depth.toString +
" check: " + check.toString)
iterations = iterations / 4
depth = depth + 2
}
io.write("long lived tree of depth " + maxDepth.toString + " check: " +
IO.write("long lived tree of depth " + maxDepth.toString + " check: " +
longLivedTree.check.toString)
io.write("elapsed: " + (OS.clock - start).toString)
IO.write("elapsed: " + (OS.clock - start).toString)