View Single Post
Old 03-09-2010, 11:22 PM   #731
thawk
Connoisseur
thawk began at the beginning.
 
Posts: 57
Karma: 10
Join Date: Oct 2008
Device: prs 505
Quote:
Originally Posted by kartu View Post
thawk
I've seen this code in porkupan's (boroda) firmwares. What I don't like about it is: it ALWAYS does lookup strings in a giant hashtable, instead of setting them once and for good.

Another thing (not related), does anyone understand why this call works:
var result = arguments.callee.grammar.call(this);

this kind of calls was made for anonymous functions to be able to recursively call themselves. But what I see in the code is not a recursion and should lead to stack overflow. (I know, that it doesn't, just don't get why)
Agree. It's better not to lookup every string every time.

I don't know about that call too. After some google, I found arguments.callee.call(), but not arguments.callee.grammar.

But anyway, I found that this line also exists in the original PRS+ firmware. (line 645 of main.xml, in getValue() function insides ABOUT_GROUP)
thawk is offline   Reply With Quote