2008-09-21 Judit Jasz <jasy@inf.u-szeged.hu>
Reviewed and tweaked by Darin Adler.
- https://bugs.webkit.org/show_bug.cgi?id=20645
Elminate duplicate constant values in CodeBlocks.
Seems to be a wash on SunSpider.
* VM/CodeGenerator.cpp:
(JSC::CodeGenerator::emitLoad): Use m_numberMap and m_stringMap to guarantee
we emit the same JSValue* for identical numbers and strings.
* VM/CodeGenerator.h: Added overload of emitLoad for const Identifier&.
Add NumberMap and IdentifierStringMap types and m_numberMap and m_stringMap.
* kjs/nodes.cpp:
(JSC::StringNode::emitCode): Call the new emitLoad and let it do the
JSString creation.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@36741 268f45cc-cd09-0410-ab3c-d52691b4dbfc
4 files changed