aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/compiler/qv4ssa.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@digia.com>2014-03-10 19:58:05 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-03-11 08:37:01 +0100
commit8ed6c62dc76ebc2e510ecc028c34c160018af86c (patch)
tree335e73bcdb52b1a8300a67c1f91299e7bc97972a /src/qml/compiler/qv4ssa.cpp
parentdfed088a50298fe4a9d0eb8a9d0a2711dfc206c1 (diff)
Cleanup our runtime methods
Move all our runtime methods into the QV4::Runtime struct and give them nicer names without underscores. Sort them logically and remove a few unused methods. Change-Id: Ib69b71764ff194d0ba211aac581f9a99734d8180 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/compiler/qv4ssa.cpp')
-rw-r--r--src/qml/compiler/qv4ssa.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/qml/compiler/qv4ssa.cpp b/src/qml/compiler/qv4ssa.cpp
index 85f1677563..ca0bbb1bb3 100644
--- a/src/qml/compiler/qv4ssa.cpp
+++ b/src/qml/compiler/qv4ssa.cpp
@@ -3096,22 +3096,22 @@ bool tryOptimizingComparison(Expr *&expr)
switch (b->op) {
case OpGt:
- leftConst->value = __qmljs_cmp_gt(&l, &r);
+ leftConst->value = Runtime::compareGreaterThan(&l, &r);
leftConst->type = BoolType;
expr = leftConst;
return true;
case OpLt:
- leftConst->value = __qmljs_cmp_lt(&l, &r);
+ leftConst->value = Runtime::compareLessThan(&l, &r);
leftConst->type = BoolType;
expr = leftConst;
return true;
case OpGe:
- leftConst->value = __qmljs_cmp_ge(&l, &r);
+ leftConst->value = Runtime::compareGreaterEqual(&l, &r);
leftConst->type = BoolType;
expr = leftConst;
return true;
case OpLe:
- leftConst->value = __qmljs_cmp_le(&l, &r);
+ leftConst->value = Runtime::compareLessEqual(&l, &r);
leftConst->type = BoolType;
expr = leftConst;
return true;
@@ -3120,7 +3120,7 @@ bool tryOptimizingComparison(Expr *&expr)
return false;
// intentional fall-through
case OpEqual:
- leftConst->value = __qmljs_cmp_eq(&l, &r);
+ leftConst->value = Runtime::compareEqual(&l, &r);
leftConst->type = BoolType;
expr = leftConst;
return true;
@@ -3129,7 +3129,7 @@ bool tryOptimizingComparison(Expr *&expr)
return false;
// intentional fall-through
case OpNotEqual:
- leftConst->value = __qmljs_cmp_ne(&l, &r);
+ leftConst->value = Runtime::compareNotEqual(&l, &r);
leftConst->type = BoolType;
expr = leftConst;
return true;
@@ -3366,8 +3366,8 @@ void optimizeSSA(IR::Function *function, DefUsesCalculator &defUses, DominatorTr
QV4::Primitive lc = convertToValue(leftConst);
QV4::Primitive rc = convertToValue(rightConst);
- double l = __qmljs_to_number(&lc);
- double r = __qmljs_to_number(&rc);
+ double l = RuntimeHelpers::toNumber(&lc);
+ double r = RuntimeHelpers::toNumber(&rc);
switch (binop->op) {
case OpMul: