[JSC] Generate put_by_val_direct for indexed identifiers instead of put_by_id with...
authorutatane.tea@gmail.com <utatane.tea@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 26 May 2015 17:26:40 +0000 (17:26 +0000)
committerutatane.tea@gmail.com <utatane.tea@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 26 May 2015 17:26:40 +0000 (17:26 +0000)
commit13961243a413adda5e41314adb4d1296085c4d84
tree13f3fdc8904a8bfa56d023caff56fba544073415
parentc8e55fc2493dc4dfd64d1716f38997b75a489e2d
[JSC] Generate put_by_val_direct for indexed identifiers instead of put_by_id with direct postfix
https://bugs.webkit.org/show_bug.cgi?id=145360

Reviewed by Darin Adler.

JSObject::putDirect only accepts non-indexed properties.
So when generating put_by_id (with direct postfix) for indexed property,
we should generate put_by_val_direct instead.

* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::emitDirectPutById):
* bytecompiler/NodesCodegen.cpp:
(JSC::PropertyListNode::emitPutConstantProperty):
* tests/stress/put-by-id-direct-should-be-done-for-non-index-property.js: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@184859 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp
Source/JavaScriptCore/bytecompiler/NodesCodegen.cpp
Source/JavaScriptCore/tests/stress/put-by-id-direct-should-be-done-for-non-index-property.js [new file with mode: 0644]