Generate get_by_id for bracket access with constant string subscript.
authorakling@apple.com <akling@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 12 Nov 2014 21:13:13 +0000 (21:13 +0000)
committerakling@apple.com <akling@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 12 Nov 2014 21:13:13 +0000 (21:13 +0000)
commit121a236569aa572735a57986e8ee7555da5b49f3
tree2b534635afa90dffb342c64395e4329c29fc068a
parent3fd3f71e99eddef8c2abd76bb1545e41a1bd78ef
Generate get_by_id for bracket access with constant string subscript.
<https://webkit.org/b/138663>

Reviewed by Michael Saboff.

Transform o["f"] into o.f when generating bytecode. This allows our JIT
to inline-cache those accesses instead of always dropping out to C++.

This is surprisingly common in real-web content, less so in benchmarks.
Interestingly, Speedometer does hit the optimization quite a bit.

* bytecompiler/NodesCodegen.cpp:
(JSC::BracketAccessorNode::emitBytecode):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@176035 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/bytecompiler/NodesCodegen.cpp