Add fast multi-level scope lookup
authoroliver@apple.com <oliver@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 17 Mar 2008 23:33:40 +0000 (23:33 +0000)
committeroliver@apple.com <oliver@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 17 Mar 2008 23:33:40 +0000 (23:33 +0000)
commit92572bac196921993ed7bc746abcee2dded35a4d
tree9cf0feec9aa5bf0c932f2fbf3d7a848b635c296b
parent80f1c652d9b5c09b36797002d09835ee6c960709
Add fast multi-level scope lookup

Reviewed by Geoff, Darin and Weinig

Add logic and AST nodes to provide rapid variable resolution across
static scope boundaries.  This also adds logic that allows us to skip
any static scopes that do not contain the variable to be resolved.

This results in a ~2.5% speedup in SunSpider, and gives a 25-30% speedup
in some simple and ad hoc closure and global variable access tests.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@31114 268f45cc-cd09-0410-ab3c-d52691b4dbfc
JavaScriptCore/ChangeLog
JavaScriptCore/JavaScriptCore.exp
JavaScriptCore/kjs/Activation.h
JavaScriptCore/kjs/JSGlobalObject.cpp
JavaScriptCore/kjs/JSGlobalObject.h
JavaScriptCore/kjs/JSVariableObject.cpp
JavaScriptCore/kjs/JSVariableObject.h
JavaScriptCore/kjs/function.cpp
JavaScriptCore/kjs/nodes.cpp
JavaScriptCore/kjs/nodes.h
JavaScriptCore/kjs/object.h