diff options
author | David Walter Seikel | 2012-01-23 23:36:30 +1000 |
---|---|---|
committer | David Walter Seikel | 2012-01-23 23:36:30 +1000 |
commit | 6523585c66c04cea54df50013df8886b589847d8 (patch) | |
tree | 0b22aee7064166d88595eda260ca2d17c0773da5 /libraries/luajit-2.0/src/lj_bcdump.h | |
parent | Update the EFL to what I'm actually using, coz I'm using some stuff not yet r... (diff) | |
download | SledjHamr-6523585c66c04cea54df50013df8886b589847d8.zip SledjHamr-6523585c66c04cea54df50013df8886b589847d8.tar.gz SledjHamr-6523585c66c04cea54df50013df8886b589847d8.tar.bz2 SledjHamr-6523585c66c04cea54df50013df8886b589847d8.tar.xz |
Add luaproc and LuaJIT libraries.
Two versions of LuaJIT, the stable release, and the dev version. Try the dev version first, until ih fails badly.
Diffstat (limited to '')
-rw-r--r-- | libraries/luajit-2.0/src/lj_bcdump.h | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/libraries/luajit-2.0/src/lj_bcdump.h b/libraries/luajit-2.0/src/lj_bcdump.h new file mode 100644 index 0000000..49b59e8 --- /dev/null +++ b/libraries/luajit-2.0/src/lj_bcdump.h | |||
@@ -0,0 +1,66 @@ | |||
1 | /* | ||
2 | ** Bytecode dump definitions. | ||
3 | ** Copyright (C) 2005-2011 Mike Pall. See Copyright Notice in luajit.h | ||
4 | */ | ||
5 | |||
6 | #ifndef _LJ_BCDUMP_H | ||
7 | #define _LJ_BCDUMP_H | ||
8 | |||
9 | #include "lj_obj.h" | ||
10 | #include "lj_lex.h" | ||
11 | |||
12 | /* -- Bytecode dump format ------------------------------------------------ */ | ||
13 | |||
14 | /* | ||
15 | ** dump = header proto+ 0U | ||
16 | ** header = ESC 'L' 'J' versionB flagsU [namelenU nameB*] | ||
17 | ** proto = lengthU pdata | ||
18 | ** pdata = phead bcinsW* uvdataH* kgc* knum* [debugB*] | ||
19 | ** phead = flagsB numparamsB framesizeB numuvB numkgcU numknU numbcU | ||
20 | ** [debuglenU [firstlineU numlineU]] | ||
21 | ** kgc = kgctypeU { ktab | (loU hiU) | (rloU rhiU iloU ihiU) | strB* } | ||
22 | ** knum = intU0 | (loU1 hiU) | ||
23 | ** ktab = narrayU nhashU karray* khash* | ||
24 | ** karray = ktabk | ||
25 | ** khash = ktabk ktabk | ||
26 | ** ktabk = ktabtypeU { intU | (loU hiU) | strB* } | ||
27 | ** | ||
28 | ** B = 8 bit, H = 16 bit, W = 32 bit, U = ULEB128 of W, U0/U1 = ULEB128 of W+1 | ||
29 | */ | ||
30 | |||
31 | /* Bytecode dump header. */ | ||
32 | #define BCDUMP_HEAD1 0x1b | ||
33 | #define BCDUMP_HEAD2 0x4c | ||
34 | #define BCDUMP_HEAD3 0x4a | ||
35 | |||
36 | /* If you perform *any* kind of private modifications to the bytecode itself | ||
37 | ** or to the dump format, you *must* set BCDUMP_VERSION to 0x80 or higher. | ||
38 | */ | ||
39 | #define BCDUMP_VERSION 1 | ||
40 | |||
41 | /* Compatibility flags. */ | ||
42 | #define BCDUMP_F_BE 0x01 | ||
43 | #define BCDUMP_F_STRIP 0x02 | ||
44 | #define BCDUMP_F_FFI 0x04 | ||
45 | |||
46 | #define BCDUMP_F_KNOWN (BCDUMP_F_FFI*2-1) | ||
47 | |||
48 | /* Type codes for the GC constants of a prototype. Plus length for strings. */ | ||
49 | enum { | ||
50 | BCDUMP_KGC_CHILD, BCDUMP_KGC_TAB, BCDUMP_KGC_I64, BCDUMP_KGC_U64, | ||
51 | BCDUMP_KGC_COMPLEX, BCDUMP_KGC_STR | ||
52 | }; | ||
53 | |||
54 | /* Type codes for the keys/values of a constant table. */ | ||
55 | enum { | ||
56 | BCDUMP_KTAB_NIL, BCDUMP_KTAB_FALSE, BCDUMP_KTAB_TRUE, | ||
57 | BCDUMP_KTAB_INT, BCDUMP_KTAB_NUM, BCDUMP_KTAB_STR | ||
58 | }; | ||
59 | |||
60 | /* -- Bytecode reader/writer ---------------------------------------------- */ | ||
61 | |||
62 | LJ_FUNC int lj_bcwrite(lua_State *L, GCproto *pt, lua_Writer writer, | ||
63 | void *data, int strip); | ||
64 | LJ_FUNC GCproto *lj_bcread(LexState *ls); | ||
65 | |||
66 | #endif | ||