diff options
author | Lars Knoll <lars.knoll@qt.io> | 2017-11-07 12:10:39 +0100 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2017-11-15 18:46:53 +0000 |
commit | 996e54602a05649e3a84a505b439742809172d6f (patch) | |
tree | d30e96682e97106e9df13bd2c920e67670e8e796 /src/qml/jsruntime/qv4functionobject_p.h | |
parent | 1417f3878574978182b669147bc4aed6870f4838 (diff) |
Allow tuning the amount of inline properties per object type
Different JS objects need different amount of properties by
default. Tune the amount of inline properties we pre-allocate
by what's usually needed for the object.
Change-Id: I2703d123939f9b7e3a06531361cbb6a3a3c04944
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
Diffstat (limited to 'src/qml/jsruntime/qv4functionobject_p.h')
-rw-r--r-- | src/qml/jsruntime/qv4functionobject_p.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/qml/jsruntime/qv4functionobject_p.h b/src/qml/jsruntime/qv4functionobject_p.h index 27024b3455..d61006a6b0 100644 --- a/src/qml/jsruntime/qv4functionobject_p.h +++ b/src/qml/jsruntime/qv4functionobject_p.h @@ -147,6 +147,7 @@ struct Q_QML_EXPORT FunctionObject: Object { V4_INTERNALCLASS(FunctionObject) V4_PROTOTYPE(functionPrototype) V4_NEEDS_DESTROY + enum { NInlineProperties = 1 }; Heap::ExecutionContext *scope() const { return d()->scope; } Function *function() const { return d()->function; } @@ -238,6 +239,7 @@ void Heap::IndexedBuiltinFunction::init(QV4::ExecutionContext *scope, uint index struct ScriptFunction : FunctionObject { V4_OBJECT2(ScriptFunction, FunctionObject) V4_INTERNALCLASS(ScriptFunction) + enum { NInlineProperties = 3 }; static ReturnedValue callAsConstructor(const FunctionObject *, const Value *argv, int argc); static ReturnedValue call(const FunctionObject *f, const Value *thisObject, const Value *argv, int argc); |