Usermode/ld-acess - Fixing Elf64 support (and incorrect Uint* sizes)
[tpg/acess2.git] / Usermode / Libraries / libspiderscript.so_src / bytecode.h
1 /*
2  * SpiderScript
3  * - Bytecode definitions
4  */
5 #ifndef _BYTECODE_H_
6 #define _BYTECODE_H_
7
8 #include "bytecode_ops.h"
9
10 #define BC_NS_SEPARATOR '@'
11
12 typedef struct sBC_Op   tBC_Op;
13 typedef struct sBC_Function     tBC_Function;
14
15 struct sBC_Op
16 {
17         tBC_Op  *Next;
18          int    Operation;
19         char    bUseInteger;    // Used for serialisation
20         char    bUseString;     // Used for serialisation
21         union {
22                 struct {
23                          int    Integer;
24                         char    String[];
25                 } StringInt;
26                 
27                 uint64_t        Integer;
28                 double  Real;
29         } Content;
30 };
31
32 struct sBC_Function
33 {
34          int    LabelCount;
35          int    LabelSpace;
36         tBC_Op  **Labels;
37         
38          int    MaxVariableCount;
39         // NOTE: These fields are invalid after compilation
40          int    VariableCount;
41          int    VariableSpace;
42         const char      **VariableNames;
43          int    CurContextDepth;        // Used to get the real var count
44
45          int    OperationCount;
46         tBC_Op  *Operations;
47         tBC_Op  *OperationsEnd;
48 };
49
50 #endif

UCC git Repository :: git.ucc.asn.au