aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/compiler/qv4codegen.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/qv4codegen.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/qv4codegen.cpp')
-rw-r--r--src/qml/compiler/qv4codegen.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/qml/compiler/qv4codegen.cpp b/src/qml/compiler/qv4codegen.cpp
index bf2cb8e5c5..74aa0892f9 100644
--- a/src/qml/compiler/qv4codegen.cpp
+++ b/src/qml/compiler/qv4codegen.cpp
@@ -556,7 +556,7 @@ V4IR::Expr *Codegen::unop(V4IR::AluOp op, V4IR::Expr *expr)
case V4IR::OpUPlus:
return expr;
case V4IR::OpCompl:
- return _block->CONST(V4IR::NumberType, ~QV4::Value::toInt32(c->value));
+ return _block->CONST(V4IR::NumberType, ~QV4::Primitive::toInt32(c->value));
case V4IR::OpIncrement:
return _block->CONST(V4IR::NumberType, c->value + 1);
case V4IR::OpDecrement:
@@ -595,13 +595,13 @@ V4IR::Expr *Codegen::binop(V4IR::AluOp op, V4IR::Expr *left, V4IR::Expr *right)
case V4IR::OpGt: return _block->CONST(V4IR::BoolType, c1->value > c2->value);
case V4IR::OpLe: return _block->CONST(V4IR::BoolType, c1->value <= c2->value);
case V4IR::OpLt: return _block->CONST(V4IR::BoolType, c1->value < c2->value);
- case V4IR::OpLShift: return _block->CONST(V4IR::NumberType, QV4::Value::toInt32(c1->value) << (QV4::Value::toUInt32(c2->value) & 0x1f));
+ case V4IR::OpLShift: return _block->CONST(V4IR::NumberType, QV4::Primitive::toInt32(c1->value) << (QV4::Primitive::toUInt32(c2->value) & 0x1f));
case V4IR::OpMod: return _block->CONST(V4IR::NumberType, std::fmod(c1->value, c2->value));
case V4IR::OpMul: return _block->CONST(V4IR::NumberType, c1->value * c2->value);
case V4IR::OpOr: return _block->CONST(V4IR::NumberType, c1->value ? c1->value : c2->value);
- case V4IR::OpRShift: return _block->CONST(V4IR::NumberType, QV4::Value::toInt32(c1->value) >> (QV4::Value::toUInt32(c2->value) & 0x1f));
+ case V4IR::OpRShift: return _block->CONST(V4IR::NumberType, QV4::Primitive::toInt32(c1->value) >> (QV4::Primitive::toUInt32(c2->value) & 0x1f));
case V4IR::OpSub: return _block->CONST(V4IR::NumberType, c1->value - c2->value);
- case V4IR::OpURShift: return _block->CONST(V4IR::NumberType,QV4::Value::toUInt32(c1->value) >> (QV4::Value::toUInt32(c2->value) & 0x1f));
+ case V4IR::OpURShift: return _block->CONST(V4IR::NumberType,QV4::Primitive::toUInt32(c1->value) >> (QV4::Primitive::toUInt32(c2->value) & 0x1f));
case V4IR::OpInstanceof:
case V4IR::OpIn: