aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4dateobject_p.h
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@digia.com>2013-08-29 14:31:32 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-09-02 17:27:36 +0200
commitedee5c3dc0d922ec3b6a44d66193e9a57b8a979e (patch)
tree5e40caa777c01a7999d736ead63ae239d1eb5b98 /src/qml/jsruntime/qv4dateobject_p.h
parent3ad8b0f0e8193bb7b62ffee6b33588ef6b51459c (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 <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/jsruntime/qv4dateobject_p.h')
-rw-r--r--src/qml/jsruntime/qv4dateobject_p.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/qml/jsruntime/qv4dateobject_p.h b/src/qml/jsruntime/qv4dateobject_p.h
index 89ca057a1b..8c925d46e2 100644
--- a/src/qml/jsruntime/qv4dateobject_p.h
+++ b/src/qml/jsruntime/qv4dateobject_p.h
@@ -53,6 +53,7 @@ namespace QV4 {
struct DateObject: Object {
Value value;
+ DateObject(InternalClass *ic): Object(ic), value(Value::fromDouble(qSNaN())) { type = Type_DateObject; }
DateObject(ExecutionEngine *engine, const Value &value): Object(engine), value(value) { type = Type_DateObject; }
DateObject(ExecutionEngine *engine, const QDateTime &value);
@@ -72,7 +73,7 @@ protected:
struct DatePrototype: DateObject
{
- DatePrototype(ExecutionEngine *engine): DateObject(engine, Value::fromDouble(qSNaN())) {}
+ DatePrototype(InternalClass *ic): DateObject(ic) {}
void init(ExecutionContext *ctx, const Value &ctor);
static double getThisDate(ExecutionContext *ctx);