From 28582874b00bc323539fbcc62d6e82fd5c08e9f1 Mon Sep 17 00:00:00 2001 From: Erik Verbruggen Date: Tue, 1 Aug 2017 15:30:49 +0200 Subject: Add commonly used JumpCompare instructions Change-Id: I00d4ed5d8b6ab30ee3459d1cc7a2737144474f8a Reviewed-by: Lars Knoll --- src/qml/jsruntime/qv4mathobject.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/qml/jsruntime/qv4mathobject.cpp') diff --git a/src/qml/jsruntime/qv4mathobject.cpp b/src/qml/jsruntime/qv4mathobject.cpp index 2d9d81c64b..98a5e5f1f7 100644 --- a/src/qml/jsruntime/qv4mathobject.cpp +++ b/src/qml/jsruntime/qv4mathobject.cpp @@ -185,7 +185,9 @@ void MathObject::method_exp(const BuiltinFunction *, Scope &scope, CallData *cal void MathObject::method_floor(const BuiltinFunction *, Scope &scope, CallData *callData) { double v = callData->argc ? callData->args[0].toNumber() : qt_qnan(); - RETURN_RESULT(Encode(std::floor(v))); + Value result = Primitive::fromDouble(std::floor(v)); + result.isInt32(); + RETURN_RESULT(result); } void MathObject::method_log(const BuiltinFunction *, Scope &scope, CallData *callData) -- cgit v1.2.1