diff options
author | Jacek Antonelli | 2008-08-15 23:44:46 -0500 |
---|---|---|
committer | Jacek Antonelli | 2008-08-15 23:44:46 -0500 |
commit | 38d6d37f2d982fa959e9e8a4a3f7e1ccfad7b5d4 (patch) | |
tree | adca584755d22ca041a2dbfc35d4eca01f70b32c /linden/indra/lscript/lscript_execute/lscript_readlso.h | |
parent | README.txt (diff) | |
download | meta-impy-38d6d37f2d982fa959e9e8a4a3f7e1ccfad7b5d4.zip meta-impy-38d6d37f2d982fa959e9e8a4a3f7e1ccfad7b5d4.tar.gz meta-impy-38d6d37f2d982fa959e9e8a4a3f7e1ccfad7b5d4.tar.bz2 meta-impy-38d6d37f2d982fa959e9e8a4a3f7e1ccfad7b5d4.tar.xz |
Second Life viewer sources 1.13.2.12
Diffstat (limited to 'linden/indra/lscript/lscript_execute/lscript_readlso.h')
-rw-r--r-- | linden/indra/lscript/lscript_execute/lscript_readlso.h | 166 |
1 files changed, 166 insertions, 0 deletions
diff --git a/linden/indra/lscript/lscript_execute/lscript_readlso.h b/linden/indra/lscript/lscript_execute/lscript_readlso.h new file mode 100644 index 0000000..7f72dfd --- /dev/null +++ b/linden/indra/lscript/lscript_execute/lscript_readlso.h | |||
@@ -0,0 +1,166 @@ | |||
1 | /** | ||
2 | * @file lscript_readlso.h | ||
3 | * @brief classes to read lso file | ||
4 | * | ||
5 | * Copyright (c) 2002-2007, Linden Research, Inc. | ||
6 | * | ||
7 | * The source code in this file ("Source Code") is provided by Linden Lab | ||
8 | * to you under the terms of the GNU General Public License, version 2.0 | ||
9 | * ("GPL"), unless you have obtained a separate licensing agreement | ||
10 | * ("Other License"), formally executed by you and Linden Lab. Terms of | ||
11 | * the GPL can be found in doc/GPL-license.txt in this distribution, or | ||
12 | * online at http://secondlife.com/developers/opensource/gplv2 | ||
13 | * | ||
14 | * There are special exceptions to the terms and conditions of the GPL as | ||
15 | * it is applied to this Source Code. View the full text of the exception | ||
16 | * in the file doc/FLOSS-exception.txt in this software distribution, or | ||
17 | * online at http://secondlife.com/developers/opensource/flossexception | ||
18 | * | ||
19 | * By copying, modifying or distributing this software, you acknowledge | ||
20 | * that you have read and understood your obligations described above, | ||
21 | * and agree to abide by those obligations. | ||
22 | * | ||
23 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO | ||
24 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, | ||
25 | * COMPLETENESS OR PERFORMANCE. | ||
26 | */ | ||
27 | |||
28 | #ifndef LL_LSCRIPT_READLSO_H | ||
29 | #define LL_LSCRIPT_READLSO_H | ||
30 | |||
31 | #include "lscript_byteconvert.h" | ||
32 | #include "linked_lists.h" | ||
33 | |||
34 | // list of op code print functions | ||
35 | void print_noop(FILE *fp, U8 *buffer, S32 &offset, S32 tabs); | ||
36 | void print_pop(FILE *fp, U8 *buffer, S32 &offset, S32 tabs); | ||
37 | void print_pops(FILE *fp, U8 *buffer, S32 &offset, S32 tabs); | ||
38 | void print_popl(FILE *fp, U8 *buffer, S32 &offset, S32 tabs); | ||
39 | void print_popv(FILE *fp, U8 *buffer, S32 &offset, S32 tabs); | ||
40 | void print_popq(FILE *fp, U8 *buffer, S32 &offset, S32 tabs); | ||
41 | void print_poparg(FILE *fp, U8 *buffer, S32 &offset, S32 tabs); | ||
42 | void print_popip(FILE *fp, U8 *buffer, S32 &offset, S32 tabs); | ||
43 | void print_popbp(FILE *fp, U8 *buffer, S32 &offset, S32 tabs); | ||
44 | void print_popsp(FILE *fp, U8 *buffer, S32 &offset, S32 tabs); | ||
45 | void print_popslr(FILE *fp, U8 *buffer, S32 &offset, S32 tabs); | ||
46 | |||
47 | void print_dup(FILE *fp, U8 *buffer, S32 &offset, S32 tabs); | ||
48 | void print_dups(FILE *fp, U8 *buffer, S32 &offset, S32 tabs); | ||
49 | void print_dupl(FILE *fp, U8 *buffer, S32 &offset, S32 tabs); | ||
50 | void print_dupv(FILE *fp, U8 *buffer, S32 &offset, S32 tabs); | ||
51 | void print_dupq(FILE *fp, U8 *buffer, S32 &offset, S32 tabs); | ||
52 | |||
53 | void print_store(FILE *fp, U8 *buffer, S32 &offset, S32 tabs); | ||
54 | void print_stores(FILE *fp, U8 *buffer, S32 &offset, S32 tabs); | ||
55 | void print_storel(FILE *fp, U8 *buffer, S32 &offset, S32 tabs); | ||
56 | void print_storev(FILE *fp, U8 *buffer, S32 &offset, S32 tabs); | ||
57 | void print_storeq(FILE *fp, U8 *buffer, S32 &offset, S32 tabs); | ||
58 | void print_storeg(FILE *fp, U8 *buffer, S32 &offset, S32 tabs); | ||
59 | void print_storegs(FILE *fp, U8 *buffer, S32 &offset, S32 tabs); | ||
60 | void print_storegl(FILE *fp, U8 *buffer, S32 &offset, S32 tabs); | ||
61 | void print_storegv(FILE *fp, U8 *buffer, S32 &offset, S32 tabs); | ||
62 | void print_storegq(FILE *fp, U8 *buffer, S32 &offset, S32 tabs); | ||
63 | void print_loadp(FILE *fp, U8 *buffer, S32 &offset, S32 tabs); | ||
64 | void print_loadsp(FILE *fp, U8 *buffer, S32 &offset, S32 tabs); | ||
65 | void print_loadlp(FILE *fp, U8 *buffer, S32 &offset, S32 tabs); | ||
66 | void print_loadvp(FILE *fp, U8 *buffer, S32 &offset, S32 tabs); | ||
67 | void print_loadqp(FILE *fp, U8 *buffer, S32 &offset, S32 tabs); | ||
68 | void print_loadgp(FILE *fp, U8 *buffer, S32 &offset, S32 tabs); | ||
69 | void print_loadgsp(FILE *fp, U8 *buffer, S32 &offset, S32 tabs); | ||
70 | void print_loadglp(FILE *fp, U8 *buffer, S32 &offset, S32 tabs); | ||
71 | void print_loadgvp(FILE *fp, U8 *buffer, S32 &offset, S32 tabs); | ||
72 | void print_loadgqp(FILE *fp, U8 *buffer, S32 &offset, S32 tabs); | ||
73 | |||
74 | void print_push(FILE *fp, U8 *buffer, S32 &offset, S32 tabs); | ||
75 | void print_pushl(FILE *fp, U8 *buffer, S32 &offset, S32 tabs); | ||
76 | void print_pushs(FILE *fp, U8 *buffer, S32 &offset, S32 tabs); | ||
77 | void print_pushv(FILE *fp, U8 *buffer, S32 &offset, S32 tabs); | ||
78 | void print_pushq(FILE *fp, U8 *buffer, S32 &offset, S32 tabs); | ||
79 | void print_pushg(FILE *fp, U8 *buffer, S32 &offset, S32 tabs); | ||
80 | void print_pushgl(FILE *fp, U8 *buffer, S32 &offset, S32 tabs); | ||
81 | void print_pushgs(FILE *fp, U8 *buffer, S32 &offset, S32 tabs); | ||
82 | void print_pushgv(FILE *fp, U8 *buffer, S32 &offset, S32 tabs); | ||
83 | void print_pushgq(FILE *fp, U8 *buffer, S32 &offset, S32 tabs); | ||
84 | void print_puship(FILE *fp, U8 *buffer, S32 &offset, S32 tabs); | ||
85 | void print_pushbp(FILE *fp, U8 *buffer, S32 &offset, S32 tabs); | ||
86 | void print_pushsp(FILE *fp, U8 *buffer, S32 &offset, S32 tabs); | ||
87 | void print_pushargb(FILE *fp, U8 *buffer, S32 &offset, S32 tabs); | ||
88 | void print_pushargi(FILE *fp, U8 *buffer, S32 &offset, S32 tabs); | ||
89 | void print_pushargf(FILE *fp, U8 *buffer, S32 &offset, S32 tabs); | ||
90 | void print_pushargs(FILE *fp, U8 *buffer, S32 &offset, S32 tabs); | ||
91 | void print_pushargv(FILE *fp, U8 *buffer, S32 &offset, S32 tabs); | ||
92 | void print_pushargq(FILE *fp, U8 *buffer, S32 &offset, S32 tabs); | ||
93 | void print_pushe(FILE *fp, U8 *buffer, S32 &offset, S32 tabs); | ||
94 | void print_pushev(FILE *fp, U8 *buffer, S32 &offset, S32 tabs); | ||
95 | void print_pusheq(FILE *fp, U8 *buffer, S32 &offset, S32 tabs); | ||
96 | void print_pusharge(FILE *fp, U8 *buffer, S32 &offset, S32 tabs); | ||
97 | |||
98 | void print_add(FILE *fp, U8 *buffer, S32 &offset, S32 tabs); | ||
99 | void print_sub(FILE *fp, U8 *buffer, S32 &offset, S32 tabs); | ||
100 | void print_mul(FILE *fp, U8 *buffer, S32 &offset, S32 tabs); | ||
101 | void print_div(FILE *fp, U8 *buffer, S32 &offset, S32 tabs); | ||
102 | void print_mod(FILE *fp, U8 *buffer, S32 &offset, S32 tabs); | ||
103 | |||
104 | void print_eq(FILE *fp, U8 *buffer, S32 &offset, S32 tabs); | ||
105 | void print_neq(FILE *fp, U8 *buffer, S32 &offset, S32 tabs); | ||
106 | void print_leq(FILE *fp, U8 *buffer, S32 &offset, S32 tabs); | ||
107 | void print_geq(FILE *fp, U8 *buffer, S32 &offset, S32 tabs); | ||
108 | void print_less(FILE *fp, U8 *buffer, S32 &offset, S32 tabs); | ||
109 | void print_greater(FILE *fp, U8 *buffer, S32 &offset, S32 tabs); | ||
110 | |||
111 | void print_bitand(FILE *fp, U8 *buffer, S32 &offset, S32 tabs); | ||
112 | void print_bitor(FILE *fp, U8 *buffer, S32 &offset, S32 tabs); | ||
113 | void print_bitxor(FILE *fp, U8 *buffer, S32 &offset, S32 tabs); | ||
114 | void print_booland(FILE *fp, U8 *buffer, S32 &offset, S32 tabs); | ||
115 | void print_boolor(FILE *fp, U8 *buffer, S32 &offset, S32 tabs); | ||
116 | |||
117 | void print_shl(FILE *fp, U8 *buffer, S32 &offset, S32 tabs); | ||
118 | void print_shr(FILE *fp, U8 *buffer, S32 &offset, S32 tabs); | ||
119 | |||
120 | void print_neg(FILE *fp, U8 *buffer, S32 &offset, S32 tabs); | ||
121 | void print_bitnot(FILE *fp, U8 *buffer, S32 &offset, S32 tabs); | ||
122 | void print_boolnot(FILE *fp, U8 *buffer, S32 &offset, S32 tabs); | ||
123 | |||
124 | void print_jump(FILE *fp, U8 *buffer, S32 &offset, S32 tabs); | ||
125 | void print_jumpif(FILE *fp, U8 *buffer, S32 &offset, S32 tabs); | ||
126 | void print_jumpnif(FILE *fp, U8 *buffer, S32 &offset, S32 tabs); | ||
127 | |||
128 | void print_state(FILE *fp, U8 *buffer, S32 &offset, S32 tabs); | ||
129 | void print_call(FILE *fp, U8 *buffer, S32 &offset, S32 tabs); | ||
130 | void print_return(FILE *fp, U8 *buffer, S32 &offset, S32 tabs); | ||
131 | void print_cast(FILE *fp, U8 *buffer, S32 &offset, S32 tabs); | ||
132 | void print_stacktos(FILE *fp, U8 *buffer, S32 &offset, S32 tabs); | ||
133 | void print_stacktol(FILE *fp, U8 *buffer, S32 &offset, S32 tabs); | ||
134 | |||
135 | void print_print(FILE *fp, U8 *buffer, S32 &offset, S32 tabs); | ||
136 | |||
137 | void print_calllib(FILE *fp, U8 *buffer, S32 &offset, S32 tabs); | ||
138 | void print_calllib_two_byte(FILE *fp, U8 *buffer, S32 &offset, S32 tabs); | ||
139 | |||
140 | class LLScriptLSOParse | ||
141 | { | ||
142 | public: | ||
143 | LLScriptLSOParse(FILE *fp); | ||
144 | LLScriptLSOParse(U8 *buffer); | ||
145 | ~LLScriptLSOParse(); | ||
146 | |||
147 | void initOpCodePrinting(); | ||
148 | |||
149 | void printData(FILE *fp); | ||
150 | void printNameDesc(FILE *fp); | ||
151 | void printRegisters(FILE *fp); | ||
152 | void printGlobals(FILE *fp); | ||
153 | void printGlobalFunctions(FILE *fp); | ||
154 | void printStates(FILE *fp); | ||
155 | void printHeap(FILE *fp); | ||
156 | void printOpCodes(FILE *fp, S32 &offset, S32 tabs); | ||
157 | void printOpCodeRange(FILE *fp, S32 start, S32 end, S32 tabs); | ||
158 | |||
159 | U8 *mRawData; | ||
160 | void (*mPrintOpCodes[0x100])(FILE *fp, U8 *buffer, S32 &offset, S32 tabs); | ||
161 | }; | ||
162 | |||
163 | |||
164 | void lso_print_tabs(FILE *fp, S32 tabs); | ||
165 | |||
166 | #endif | ||