Bug 19718: Named anonymous functions are slow accessing global variables
authoroliver@apple.com <oliver@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 26 Jul 2008 03:52:24 +0000 (03:52 +0000)
committeroliver@apple.com <oliver@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 26 Jul 2008 03:52:24 +0000 (03:52 +0000)
commit68285e4aea34b9c31bd4fd82809e0d5bab498256
treec45a441fe237e8c4e67d0446661fec1d7d7a25c6
parente54e0679084af7f1fcf83c2e92724b8870d4869d
Bug 19718: Named anonymous functions are slow accessing global variables
<https://bugs.webkit.org/show_bug.cgi?id=19718>

Reviewed by Cameron Zwarich.

To fix this we switch over to an activation-like scope object for
on which we attach the function name property, and add logic to
prevent cross scope assignment to read only properties.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@35368 268f45cc-cd09-0410-ab3c-d52691b4dbfc
14 files changed:
JavaScriptCore/ChangeLog
JavaScriptCore/GNUmakefile.am
JavaScriptCore/JavaScriptCore.pri
JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj
JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj
JavaScriptCore/VM/CodeGenerator.cpp
JavaScriptCore/VM/CodeGenerator.h
JavaScriptCore/kjs/AllInOneFile.cpp
JavaScriptCore/kjs/JSStaticScopeObject.cpp [new file with mode: 0644]
JavaScriptCore/kjs/JSStaticScopeObject.h [new file with mode: 0644]
JavaScriptCore/kjs/nodes.cpp
LayoutTests/ChangeLog
LayoutTests/fast/js/const-expected.txt
LayoutTests/fast/js/resources/const.js