diff options
author | Erik Verbruggen <erik.verbruggen@digia.com> | 2014-05-09 13:10:16 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-06-02 16:13:15 +0200 |
commit | bc9e86ef5813f6c2b28a2e10324cf0a2401e53df (patch) | |
tree | 18d6ee1951b875c982303f1535fca729cbce1c65 /src/qml/compiler/qv4isel_p.cpp | |
parent | b366e5509b2dcc6df73fc20d4167d663c6cad763 (diff) |
V4: support calling constants.
Consider:
function f() {
var a;
a();
}
Here the constant propagation will propagate the value for a (undefined)
to the call site. This was not yet handled, resulting in Q_UNIMPLEMENTED
warnings when running a debug build.
Change-Id: I5f85f681d975b54df7a9e00bd5b50e6f4350139a
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/compiler/qv4isel_p.cpp')
-rw-r--r-- | src/qml/compiler/qv4isel_p.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/qml/compiler/qv4isel_p.cpp b/src/qml/compiler/qv4isel_p.cpp index f5cb1905c5..1aa0c4dad8 100644 --- a/src/qml/compiler/qv4isel_p.cpp +++ b/src/qml/compiler/qv4isel_p.cpp @@ -239,7 +239,7 @@ void IRDecoder::visitExp(IR::Exp *s) // These are calls where the result is ignored. if (c->base->asName()) { callBuiltin(c, 0); - } else if (c->base->asTemp() || c->base->asArgLocal()) { + } else if (c->base->asTemp() || c->base->asArgLocal() || c->base->asConst()) { callValue(c->base, c->args, 0); } else if (Member *member = c->base->asMember()) { Q_ASSERT(member->base->asTemp() || member->base->asArgLocal()); @@ -247,10 +247,10 @@ void IRDecoder::visitExp(IR::Exp *s) } else if (Subscript *s = c->base->asSubscript()) { callSubscript(s->base, s->index, c->args, 0); } else { - Q_UNIMPLEMENTED(); + Q_UNREACHABLE(); } } else { - Q_UNIMPLEMENTED(); + Q_UNREACHABLE(); } } |