aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/compiler/qv4ssa.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@digia.com>2013-09-25 13:52:15 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-09-28 13:33:32 +0200
commit4d40fa24c3ee8def2f27bd237fc8dec25cf3f473 (patch)
treecb4ad758f03cf204cbae1e7d086bfeaf73a64bc3 /src/qml/compiler/qv4ssa.cpp
parentabd82c68d564c97a4452a3afa2d63320e7292b30 (diff)
Move Value::toInteger(double) and related to Primitive
Also clean up a few other direct uses of Value Change-Id: Ie27d42c1b31b9e6d16d0a60071cb5e4e1c5b9e8b Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/compiler/qv4ssa.cpp')
-rw-r--r--src/qml/compiler/qv4ssa.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/qml/compiler/qv4ssa.cpp b/src/qml/compiler/qv4ssa.cpp
index f39517b647..13820851e7 100644
--- a/src/qml/compiler/qv4ssa.cpp
+++ b/src/qml/compiler/qv4ssa.cpp
@@ -1583,10 +1583,10 @@ public:
case DoubleType:
break;
case SInt32Type:
- c->value = QV4::Value::toInt32(c->value);
+ c->value = QV4::Primitive::toInt32(c->value);
break;
case UInt32Type:
- c->value = QV4::Value::toUInt32(c->value);
+ c->value = QV4::Primitive::toUInt32(c->value);
break;
case BoolType:
c->value = !(c->value == 0 || std::isnan(c->value));
@@ -1626,9 +1626,9 @@ protected:
virtual void visitConst(Const *c) {
if (_ty & NumberType && c->type & NumberType) {
if (_ty == SInt32Type)
- c->value = QV4::Value::toInt32(c->value);
+ c->value = QV4::Primitive::toInt32(c->value);
else if (_ty == UInt32Type)
- c->value = QV4::Value::toUInt32(c->value);
+ c->value = QV4::Primitive::toUInt32(c->value);
c->type = _ty;
}
}
@@ -2347,7 +2347,7 @@ void optimizeSSA(Function *function, DefUsesCalculator &defUses)
doneSomething = true;
break;
case OpCompl:
- constOperand->value = ~QV4::Value::toInt32(constOperand->value);
+ constOperand->value = ~QV4::Primitive::toInt32(constOperand->value);
constOperand->type = SInt32Type;
doneSomething = true;
break;