diff options
author | Lars Knoll <[email protected]> | 2013-08-29 14:31:32 +0200 |
---|---|---|
committer | The Qt Project <[email protected]> | 2013-09-02 17:27:36 +0200 |
commit | edee5c3dc0d922ec3b6a44d66193e9a57b8a979e (patch) | |
tree | 5e40caa777c01a7999d736ead63ae239d1eb5b98 /src/qml/jsruntime/qv4regexpobject_p.h | |
parent | 3ad8b0f0e8193bb7b62ffee6b33588ef6b51459c (diff) |
Move prototype pointer into QV4::InternalClass
The prototype is actually the same for most objects. By
moving it into the internal class, we can save 8 bytes
per object, as well as allowing for some future
optimizations.
Also fix a bug in the implementation of the Error
prototype objects.
Change-Id: I4d4b641055f644a9b088f27be34bfdb0446279b7
Reviewed-by: Simon Hausmann <[email protected]>
Diffstat (limited to 'src/qml/jsruntime/qv4regexpobject_p.h')
-rw-r--r-- | src/qml/jsruntime/qv4regexpobject_p.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/qml/jsruntime/qv4regexpobject_p.h b/src/qml/jsruntime/qv4regexpobject_p.h index 2179dbdb7d..6c4f12c1e4 100644 --- a/src/qml/jsruntime/qv4regexpobject_p.h +++ b/src/qml/jsruntime/qv4regexpobject_p.h @@ -77,6 +77,8 @@ struct RegExpObject: Object { RegExp* value; Property *lastIndexProperty(ExecutionContext *ctx); bool global; + + RegExpObject(InternalClass *ic); RegExpObject(ExecutionEngine *engine, RegExp* value, bool global); RegExpObject(ExecutionEngine *engine, const QRegExp &re); ~RegExpObject() {} @@ -107,7 +109,7 @@ protected: struct RegExpPrototype: RegExpObject { - RegExpPrototype(ExecutionEngine* engine): RegExpObject(engine, RegExp::create(engine, QString()), false) {} + RegExpPrototype(InternalClass *ic): RegExpObject(ic) {} void init(ExecutionContext *ctx, const Value &ctor); static Value method_exec(SimpleCallContext *ctx); |