diff options
author | Erik Verbruggen <erik.verbruggen@qt.io> | 2017-08-01 15:30:49 +0200 |
---|---|---|
committer | Erik Verbruggen <erik.verbruggen@qt.io> | 2017-08-02 14:08:33 +0000 |
commit | 28582874b00bc323539fbcc62d6e82fd5c08e9f1 (patch) | |
tree | 7aecdac187d9cf7dccd62938d3d564d389824a94 /src/qml/jsruntime/qv4mathobject.cpp | |
parent | bc37e95445829a4e6479a7d5c5d78e93b63103d4 (diff) |
Add commonly used JumpCompare instructions
Change-Id: I00d4ed5d8b6ab30ee3459d1cc7a2737144474f8a
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/qml/jsruntime/qv4mathobject.cpp')
-rw-r--r-- | src/qml/jsruntime/qv4mathobject.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
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) |