forked from socketio/has-binary
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Removed trampolining and added new tests.
lol this thing was not tail recursive in the first place, my bad. New tests with very deep json to prove it.
- Loading branch information
Kevin Roark
committed
May 31, 2014
1 parent
e3c2f02
commit 16e83c3
Showing
5 changed files
with
60 additions
and
30 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
var ob = {}; | ||
|
||
var max = 5230; // just before call stack breaks | ||
var count = 0; | ||
|
||
function g(o) { | ||
if (count++ < max) { | ||
o.k = {}; | ||
g(o.k); | ||
} | ||
else { | ||
o.k = 'cool'; | ||
} | ||
} | ||
|
||
g(ob); | ||
console.log(JSON.stringify(ob)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters