summaryrefslogtreecommitdiffstats
path: root/src/declarative/qml/script/instructions.h
blob: a21cbce4dab60dbc3d6c7edb257f37285fbd0dec (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
#ifndef _INSTRUCTIONS_H_
#define _INSTRUCTIONS_H_

struct ScriptInstruction {
    enum {
        Load,       // fetch
        Fetch,       // fetch

        Add,         // NA
        Subtract,    // NA
        Multiply,    // NA
        Equals,      // NA
        And,         // NA

        Int,         // integer
        Bool,        // boolean
    } type;

    union {
        struct {
            int idx;
        } fetch;
        struct {
            int value;
        } integer;
        struct {
            bool value;
        } boolean;
    };
};

#endif // _INSTRUCTIONS_H_