aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/compiler/qv4instr_moth_p.h
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2017-08-30 15:16:15 +0200
committerLars Knoll <lars.knoll@qt.io>2017-09-01 12:30:43 +0000
commitcc7a858698063649f9770a89949354e2b58ae288 (patch)
tree5a79c1335192ed757edd69b5b9ded873423aa0bd /src/qml/compiler/qv4instr_moth_p.h
parent20596907289d50be3a5e1597ba62cefb733e6f19 (diff)
Unify JSStackFrame and CallData
Change-Id: I4494dae8166026074c9efc74bac62de9d3fa2342 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/compiler/qv4instr_moth_p.h')
-rw-r--r--src/qml/compiler/qv4instr_moth_p.h30
1 files changed, 0 insertions, 30 deletions
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(); }