From cc7a858698063649f9770a89949354e2b58ae288 Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Wed, 30 Aug 2017 15:16:15 +0200 Subject: Unify JSStackFrame and CallData Change-Id: I4494dae8166026074c9efc74bac62de9d3fa2342 Reviewed-by: Simon Hausmann --- src/qml/compiler/qv4instr_moth_p.h | 30 ------------------------------ 1 file changed, 30 deletions(-) (limited to 'src/qml/compiler/qv4instr_moth_p.h') diff --git a/src/qml/compiler/qv4instr_moth_p.h b/src/qml/compiler/qv4instr_moth_p.h index c70440fedd..8922493163 100644 --- a/src/qml/compiler/qv4instr_moth_p.h +++ b/src/qml/compiler/qv4instr_moth_p.h @@ -447,38 +447,8 @@ public: return t; } - static StackSlot createArgument(int nFormals, int index) { - Q_ASSERT(index >= -1); - StackSlot t; - t.index = index - nFormals; - return t; - } - - bool isRegister() const { return index >= 0; } - bool isArgument() const { return index < 0; } - - int argIndex() const { - Q_ASSERT(isArgument()); - return -index - 1; - } - int stackSlot() const { return index; } operator int() const { return index; } - - static QString dump(int reg, int nFormals) { - StackSlot t; - t.index = reg; - return t.dump(nFormals); - } - QString dump(int nFormals) const { - if (isRegister()) - return QStringLiteral("r%1").arg(index); - - if (nFormals + index == -1) - return QStringLiteral("(this)"); - - return QStringLiteral("a%1").arg(nFormals + index); - } }; inline bool operator==(const StackSlot &l, const StackSlot &r) { return l.stackSlot() == r.stackSlot(); } -- cgit v1.2.3