diff options
author | Erik Verbruggen <erik.verbruggen@qt.io> | 2017-01-24 11:45:40 +0100 |
---|---|---|
committer | Erik Verbruggen <erik.verbruggen@qt.io> | 2017-01-25 12:00:33 +0000 |
commit | 3ca8c880c163708757a5e88fb7e01268b775dc0e (patch) | |
tree | f340e772ab1d0b2f81a698ba929f11f4edde2806 /src/qml/jit/qv4isel_masm.cpp | |
parent | b07a6cf8c5788b7e4ca722c9aa8c06e76e688c5d (diff) |
Allow constants in IR as binop operands
There is no reason not to do this, plus it only takes up memory (for
assignment to temporaries) and makes SSA transformation more costly.
Change-Id: I09edbabe6ed50ab1a61b29ebd2ab541bccc95fad
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/qml/jit/qv4isel_masm.cpp')
-rw-r--r-- | src/qml/jit/qv4isel_masm.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/qml/jit/qv4isel_masm.cpp b/src/qml/jit/qv4isel_masm.cpp index 20752b5c34..279ccabf81 100644 --- a/src/qml/jit/qv4isel_masm.cpp +++ b/src/qml/jit/qv4isel_masm.cpp @@ -1712,6 +1712,13 @@ bool InstructionSelection::visitCJumpStrictBool(IR::Binop *binop, IR::BasicBlock // neither operands are statically typed as bool, so bail out. return false; } + if (otherSrc->type == IR::UnknownType) { + // Ok, we really need to call into the runtime. + // (This case doesn't happen when the optimizer ran, because everything will be typed (yes, + // possibly as "var" meaning anything), but it does happen for $0===true, which is generated + // for things where the optimizer didn't run (like functions with a try block).) + return false; + } Assembler::RelationalCondition cond = binop->op == IR::OpStrictEqual ? Assembler::Equal : Assembler::NotEqual; |