summaryrefslogtreecommitdiff
path: root/src/qml/compiler/qv4codegen.cpp
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@qt.io>2018-07-20 13:58:27 +0200
committerSimon Hausmann <simon.hausmann@qt.io>2018-07-30 19:46:29 +0000
commitf67ffaad9742cd1fc0d2576de0a2fd20bc48c3e6 (patch)
tree7251caba699d5a212480fba00b01b95bf7e694d6 /src/qml/compiler/qv4codegen.cpp
parent21842ecf2de5f13949a06988ef93f777576a96f8 (diff)
downloadqtdeclarative-f67ffaad9742cd1fc0d2576de0a2fd20bc48c3e6.tar.gz
Fix AOT byte code generation of unary ops with constants
When generating code for unary operations with constants, then we should produce constants in the bytecode instead of run-time codes even when compiling ahead of time. Change-Id: Ied902f3729eb6602674eac56edafc4372b209923 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/qml/compiler/qv4codegen.cpp')
-rw-r--r--src/qml/compiler/qv4codegen.cpp2
1 files changed, 0 insertions, 2 deletions
diff --git a/src/qml/compiler/qv4codegen.cpp b/src/qml/compiler/qv4codegen.cpp
index 4b766accbd..b0e9d4ce66 100644
--- a/src/qml/compiler/qv4codegen.cpp
+++ b/src/qml/compiler/qv4codegen.cpp
@@ -151,7 +151,6 @@ Codegen::Reference Codegen::unop(UnaryOperation op, const Reference &expr)
if (hasError)
return _expr.result();
-#ifndef V4_BOOTSTRAP
if (expr.isConstant()) {
auto v = Value::fromReturnedValue(expr.constant);
if (v.isNumber()) {
@@ -169,7 +168,6 @@ Codegen::Reference Codegen::unop(UnaryOperation op, const Reference &expr)
}
}
}
-#endif // V4_BOOTSTRAP
switch (op) {
case UMinus: {