KJS: reverseList()
Darin Adler
darin@apple.com
Mon, 10 Feb 2003 08:31:20 -0800
On Saturday, February 1, 2003, at 07:35 PM, Harri Porten wrote:
> I see some reverseList() functions in JavaScriptCore's parse nodes. I
> assume they had to be introduced them when enhancing those nodes to be
> evaluated in a simple for-loop rather than by slower recursive
> evaluate() calls.
Sure. Not just slower, but much more stack hungry.
> Only the constructors of PropertyValueNode and ObjectLiteralNode are
> changed to (mis-)use the "list" pointer of the list tail.
Seems like a good solution. I'll do it in JavaScriptCore at some point,
perhaps before we sync. up with the real KJS, or perhaps then.
-- Darin