diff options
author | Lars Knoll <lars.knoll@digia.com> | 2013-09-05 14:49:55 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-09-11 13:01:54 +0200 |
commit | a23158a41291055aa0f546869e4c9f8efb19c2dc (patch) | |
tree | 747b5daced2a361724953ff7d45d6c4e87870a6f /src/qml/compiler/qv4isel_moth_p.h | |
parent | 6e8e5d16e16d6ee683a5c06a24f8f202ed5239ff (diff) |
Generate CallData structures directly in the instruction selection
Like this we can hand the CallData through the runtime methods
without any need to modify them. This simplifies the code in there,
and should also speed them up to some degree.
Change-Id: Ibd92ff4a8f279a5c4a054c5678646f658cfed5ca
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/compiler/qv4isel_moth_p.h')
-rw-r--r-- | src/qml/compiler/qv4isel_moth_p.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/qml/compiler/qv4isel_moth_p.h b/src/qml/compiler/qv4isel_moth_p.h index 43e792ccc7..826d559dbc 100644 --- a/src/qml/compiler/qv4isel_moth_p.h +++ b/src/qml/compiler/qv4isel_moth_p.h @@ -161,11 +161,12 @@ private: } void simpleMove(V4IR::Move *); - void prepareCallArgs(V4IR::ExprList *, quint32 &, quint32 &); + void prepareCallArgs(V4IR::ExprList *, quint32 &, quint32 * = 0); - int outgoingArgumentTempStart() const { return _function->tempCount; } - int scratchTempIndex() const { return outgoingArgumentTempStart() + _function->maxNumberOfArguments; } - int frameSize() const { return scratchTempIndex() + 1; } + int scratchTempIndex() const { return _function->tempCount; } + int callDataStart() const { return scratchTempIndex() + 1; } + int outgoingArgumentTempStart() const { return callDataStart() + offsetof(QV4::CallData, args)/sizeof(QV4::Value); } + int frameSize() const { return outgoingArgumentTempStart() + _function->maxNumberOfArguments; } template <int Instr> inline ptrdiff_t addInstruction(const InstrData<Instr> &data); |