diff options
author | Lars Knoll <lars.knoll@qt.io> | 2016-12-12 09:26:36 +0100 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2016-12-13 08:27:48 +0000 |
commit | 612ad6b08db2d96f6adad26c6b04d56b3bd01271 (patch) | |
tree | dd0c07396e11390f4c26114e082f12c7bee1daf7 /src/qml/jsruntime/qv4argumentsobject_p.h | |
parent | f893d66382549b4d1285ae98b66a1fdd4719036a (diff) |
Optimize Arguments Object
Avoid creation of the Array in most cases. Fix FunctionObject::method_apply
so that it correctly recognizes this case and does the right thing.
Add a getLength() method to ArgumentsObject to speed up the lookup of that
property.
Improves the RayTrace benchmark by around 15%.
Change-Id: I53eb34a1f9515e59a191ee6f0eb23a3f4c6882d1
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/jsruntime/qv4argumentsobject_p.h')
-rw-r--r-- | src/qml/jsruntime/qv4argumentsobject_p.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/qml/jsruntime/qv4argumentsobject_p.h b/src/qml/jsruntime/qv4argumentsobject_p.h index 37a8d0a94a..0a2ea3b42a 100644 --- a/src/qml/jsruntime/qv4argumentsobject_p.h +++ b/src/qml/jsruntime/qv4argumentsobject_p.h @@ -132,8 +132,10 @@ struct ArgumentsObject: Object { static bool deleteIndexedProperty(Managed *m, uint index); static PropertyAttributes queryIndexed(const Managed *m, uint index); static void markObjects(Heap::Base *that, ExecutionEngine *e); + static uint getLength(const Managed *m); void fullyCreate(); + }; } |