aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4numberobject.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@digia.com>2013-09-11 11:28:27 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-09-12 21:52:39 +0200
commita30799396472f2db5978036a64dcb4a4a74cd0b3 (patch)
tree667ac55038feaef3da0aeb18dba024221db2b1d1 /src/qml/jsruntime/qv4numberobject.cpp
parentc4b984d099b9653bfa0e282daed0bf466123c341 (diff)
Convert ReturnedValue into a primitive (typedef to quint64)
ReturnedValue is used to return values from runtime methods The type has to be a primitive type (no struct or union), so that the compiler will return it in a register on all platforms. They will be returned in rax on x64, [eax,edx] on x86 and [r0,r1] on arm. Change-Id: I38433e6fad252370dda5dc335d9c5be8f22e8c76 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/jsruntime/qv4numberobject.cpp')
-rw-r--r--src/qml/jsruntime/qv4numberobject.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/qml/jsruntime/qv4numberobject.cpp b/src/qml/jsruntime/qv4numberobject.cpp
index fe60be7075..e581bac35e 100644
--- a/src/qml/jsruntime/qv4numberobject.cpp
+++ b/src/qml/jsruntime/qv4numberobject.cpp
@@ -196,7 +196,7 @@ Value NumberPrototype::method_toFixed(SimpleCallContext *ctx)
else if (v < 1.e21)
str = QString::number(v, 'f', int (fdigits));
else
- return __qmljs_string_from_number(ctx, v).get();
+ return Value::fromReturnedValue(__qmljs_string_from_number(ctx, v));
return Value::fromString(ctx, str);
}
@@ -231,7 +231,7 @@ Value NumberPrototype::method_toPrecision(SimpleCallContext *ctx)
Value prec = ctx->argument(0);
if (prec.isUndefined())
- return __qmljs_to_string(v, ctx).get();
+ return Value::fromReturnedValue(__qmljs_to_string(v, ctx));
double precision = prec.toInt32();
if (precision < 1 || precision > 21) {