Fix a bug in qmljs_set_element and improve it's performance
authorLars Knoll <lars.knoll@digia.com>
Fri, 24 Jan 2014 11:46:28 +0000 (12:46 +0100)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Fri, 31 Jan 2014 10:13:48 +0000 (11:13 +0100)
commite3219a1f7143c52fad7f5c5266327e199d02c6d6
tree540610679e7a7548b74f7599b58bcc45ca994cc3
parentb8eaedb0dcf0daeae55fd2c2c6e31588c43613bf
Fix a bug in qmljs_set_element and improve it's performance

Avoid expensive function calls for setting indexed properties
in the common case. The spec requires us to read the value before
writing it to check whether it's empty. In that case we need to
fall back to the slow implementation that checks the proto chain.

Change-Id: If278ba81f170d35c18135d2f8661459262e7e606
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
src/qml/jsruntime/qv4runtime.cpp