diff options
author | Matthew Vogt <matthew.vogt@nokia.com> | 2012-08-09 13:26:32 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-08-16 01:13:50 +0200 |
commit | 6aeff1b5429ca97af052a7a172369585382096e8 (patch) | |
tree | 68347d53f95cbcb6162a0a4f2e3c198a77f455b1 /src/qml/qml/v4/qv4ir_p.h | |
parent | 6096f72e8cf23522cf675d6142492c58401e68b0 (diff) |
Reduce memory consumption of source coordinates
Reduce memory consumption by storing source location coordinates
as 16-bit variables (in run-time structures). Also modify qmlmin
to restrict line lengths so that the column bound is not normally
exceeded.
Change-Id: I08605626ffbdf081b6da2aea1116bdfe24998572
Reviewed-by: Yann Bodson <yann.bodson@nokia.com>
Diffstat (limited to 'src/qml/qml/v4/qv4ir_p.h')
-rw-r--r-- | src/qml/qml/v4/qv4ir_p.h | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/src/qml/qml/v4/qv4ir_p.h b/src/qml/qml/v4/qv4ir_p.h index 9b36762356..f6e20a7187 100644 --- a/src/qml/qml/v4/qv4ir_p.h +++ b/src/qml/qml/v4/qv4ir_p.h @@ -283,10 +283,10 @@ struct Name: Expr { QQmlPropertyData *property; Storage storage; BuiltinSymbol builtin; - quint32 line; - quint32 column; + quint16 line; + quint16 column; - void init(Name *base, Type type, const QString *id, Symbol symbol, quint32 line, quint32 column); + void init(Name *base, Type type, const QString *id, Symbol symbol, quint16 line, quint16 column); inline bool is(Symbol s) const { return s == symbol; } inline bool isNot(Symbol s) const { return s != symbol; } @@ -468,10 +468,10 @@ struct CJump: Stmt { struct Ret: Stmt { Expr *expr; Type type; - quint32 line; - quint32 column; + quint16 line; + quint16 column; - void init(Expr *expr, Type type, quint32 line, quint32 column) + void init(Expr *expr, Type type, quint16 line, quint16 column) { this->expr = expr; this->type = type; @@ -538,14 +538,14 @@ struct BasicBlock { Expr *CONST(Type type, double value); Expr *STRING(const QStringRef &value); - Name *NAME(const QString &id, quint32 line, quint32 column); - Name *NAME(Name *base, const QString &id, quint32 line, quint32 column); - Name *SYMBOL(Type type, const QString &id, const QQmlMetaObject &meta, QQmlPropertyData *property, Name::Storage storage, quint32 line, quint32 column); - Name *SYMBOL(Name *base, Type type, const QString &id, const QQmlMetaObject &meta, QQmlPropertyData *property, quint32 line, quint32 column); - Name *SYMBOL(Name *base, Type type, const QString &id, const QQmlMetaObject &meta, QQmlPropertyData *property, Name::Storage storage, quint32 line, quint32 column); - Name *ID_OBJECT(const QString &id, const QQmlScript::Object *object, quint32 line, quint32 column); - Name *ATTACH_TYPE(const QString &id, const QQmlType *attachType, Name::Storage storage, quint32 line, quint32 column); - Name *MODULE_OBJECT(const QString &id, const QQmlMetaObject &meta, Name::Storage storage, quint32 line, quint32 column); + Name *NAME(const QString &id, quint16 line, quint16 column); + Name *NAME(Name *base, const QString &id, quint16 line, quint16 column); + Name *SYMBOL(Type type, const QString &id, const QQmlMetaObject &meta, QQmlPropertyData *property, Name::Storage storage, quint16 line, quint16 column); + Name *SYMBOL(Name *base, Type type, const QString &id, const QQmlMetaObject &meta, QQmlPropertyData *property, quint16 line, quint16 column); + Name *SYMBOL(Name *base, Type type, const QString &id, const QQmlMetaObject &meta, QQmlPropertyData *property, Name::Storage storage, quint16 line, quint16 column); + Name *ID_OBJECT(const QString &id, const QQmlScript::Object *object, quint16 line, quint16 column); + Name *ATTACH_TYPE(const QString &id, const QQmlType *attachType, Name::Storage storage, quint16 line, quint16 column); + Name *MODULE_OBJECT(const QString &id, const QQmlMetaObject &meta, Name::Storage storage, quint16 line, quint16 column); Expr *UNOP(AluOp op, Expr *expr); Expr *BINOP(AluOp op, Expr *left, Expr *right); @@ -556,7 +556,7 @@ struct BasicBlock { Stmt *JUMP(BasicBlock *target); Stmt *CJUMP(Expr *cond, BasicBlock *iftrue, BasicBlock *iffalse); - Stmt *RET(Expr *expr, Type type, quint32 line, quint32 column); + Stmt *RET(Expr *expr, Type type, quint16 line, quint16 column); void dump(QTextStream &out); }; |