aboutsummaryrefslogtreecommitdiffstats
path: root/moth/qv4vme_moth_p.h
blob: 428cd4e31d245328d90e6368cbac2ff0e64f74db (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#ifndef QV4VME_MOTH_P_H
#define QV4VME_MOTH_P_H

#include "qmljs_runtime.h"
#include "qv4instr_moth_p.h"

namespace QQmlJS {
namespace Moth {

class VME
{
public:
    static void exec(VM::ExecutionContext *, const uchar *);

    void operator()(QQmlJS::VM::ExecutionContext *, const uchar *code
#ifdef MOTH_THREADED_INTERPRETER
            , void ***storeJumpTable = 0
#endif
            );

#ifdef MOTH_THREADED_INTERPRETER
    static void **instructionJumpTable();
#endif

private:
    static void restoreState(VM::ExecutionContext *context, int &targetTempIndex, const uchar *&code);
    static void saveState(VM::ExecutionContext *context, int targetTempIndex, const uchar *code);
};

} // namespace Moth
} // namespace QQmlJS

#endif // QV4VME_MOTH_P_H