aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4object_p.h
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@theqtcompany.com>2015-01-09 13:13:04 +0100
committerSimon Hausmann <simon.hausmann@digia.com>2015-01-12 11:04:19 +0100
commit3840beb6c61023542a689c7f125a7b521d3b2551 (patch)
treeb787c7383fd6ea631d81f6952f4687804e4c4e48 /src/qml/jsruntime/qv4object_p.h
parent462496c2bbf9a35ce13762af8830cb2f87b0c27e (diff)
Get rid of hasAccessorProperty in Heap::Base
This shouldn't affect performance as we can just as well check for cases where we need to take the slow path differently. Change-Id: I4b9f69c39e9e64b437820ca3a6ea43e8877f2cf3 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/jsruntime/qv4object_p.h')
-rw-r--r--src/qml/jsruntime/qv4object_p.h8
1 files changed, 1 insertions, 7 deletions
diff --git a/src/qml/jsruntime/qv4object_p.h b/src/qml/jsruntime/qv4object_p.h
index c256b1f34b..a38750dd07 100644
--- a/src/qml/jsruntime/qv4object_p.h
+++ b/src/qml/jsruntime/qv4object_p.h
@@ -140,9 +140,6 @@ struct Q_QML_EXPORT Object: Managed {
inline ExecutionEngine *engine() const { return internalClass()->engine; }
- inline bool hasAccessorProperty() const { return d()->hasAccessorProperty; }
- inline void setHasAccessorProperty() { d()->hasAccessorProperty = true; }
-
bool isExtensible() const { return d()->extensible; }
void setExtensible(bool b) { d()->extensible = b; }
@@ -367,10 +364,7 @@ inline void Object::arraySet(uint index, const Property *p, PropertyAttributes a
{
// ### Clean up
arrayCreate();
- if (attributes.isAccessor()) {
- setHasAccessorProperty();
- initSparseArray();
- } else if (index > 0x1000 && index > 2*d()->arrayData->alloc) {
+ if (attributes.isAccessor() || (index > 0x1000 && index > 2*d()->arrayData->alloc)) {
initSparseArray();
} else {
arrayData()->vtable()->reallocate(this, index + 1, false);