diff options
author | Lars Knoll <lars.knoll@digia.com> | 2013-04-08 15:38:30 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@digia.com> | 2013-04-12 14:25:21 +0200 |
commit | 1e87e39a1987da9f0ad454b8b4f6c40055e50799 (patch) | |
tree | 864b0405eb46e578045741883e03ad39532ac869 /src/v4/qv4string.cpp | |
parent | 78bef0f2288de34f68525721733e43c769eb4496 (diff) |
Change internal class when attributes of properties change
This should allow us to share property attributes for different
class instances saving quite some memory. In addition, it
can be used to speed up property access (as we then know in the
lookup whether it's a data or accessor property).
Change-Id: Ide9c6168a07b5c83a1e73d075d8fc4f6594e08fd
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/v4/qv4string.cpp')
-rw-r--r-- | src/v4/qv4string.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/v4/qv4string.cpp b/src/v4/qv4string.cpp index 46e56cc4de..c16be933be 100644 --- a/src/v4/qv4string.cpp +++ b/src/v4/qv4string.cpp @@ -150,15 +150,15 @@ void String::putIndexed(Managed *m, ExecutionContext *ctx, uint index, const Val o->putIndexed(ctx, index, value); } -PropertyFlags String::query(Managed *m, ExecutionContext *ctx, String *name) +PropertyAttributes String::query(Managed *m, ExecutionContext *ctx, String *name) { - return PropertyFlags(0); + return Attr_Invalid; } -PropertyFlags String::queryIndexed(Managed *m, ExecutionContext *ctx, uint index) +PropertyAttributes String::queryIndexed(Managed *m, ExecutionContext *ctx, uint index) { String *that = static_cast<String *>(m); - return (index < that->_text.length()) ? PropertyFlags(Enumerable) : PropertyFlags(0); + return (index < that->_text.length()) ? Attr_NotConfigurable|Attr_NotWritable : Attr_Invalid; } bool String::deleteProperty(Managed *m, ExecutionContext *ctx, String *name) |