2
* This file is part of SwfLib
3
* Copyright (c)2004-2006 Nicolas Cannasse
5
* This program is free software; you can redistribute it and/or modify
6
* it under the terms of the GNU General Public License as published by
7
* the Free Software Foundation; either version 2 of the License, or
8
* (at your option) any later version.
10
* This program is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
* GNU General Public License for more details.
15
* You should have received a copy of the GNU General Public License
16
* along with this program; if not, write to the Free Software
17
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23
type as3_ident = string
25
type as3_float = float
76
type type_index = as3_type index
80
| A3GetSuper of type_index
81
| A3SetSuper of type_index
84
| A3Jump of as3_jump * int
85
| A3Switch of int * int list * int
100
| A3String of as3_ident index
101
| A3IntRef of as3_int index
102
| A3Float of as3_float index
104
| A3Next of reg * reg
105
| A3Function of as3_method_type index_nz
106
| A3StackCall of nargs
107
| A3StackNew of nargs
108
| A3SuperCall of type_index * nargs
109
| A3Call of type_index * nargs
112
| A3SuperConstr of nargs
113
| A3New of type_index * nargs
114
| A3SuperCallUnknown of type_index * nargs
115
| A3CallUnknown of type_index * nargs
120
| A3XmlOp1 of type_index
122
| A3GetInf of type_index
123
| A3SetInf of type_index
124
| A3GetProp of type_index
125
| A3SetProp of type_index
130
| A3Get of type_index
131
| A3Set of type_index
132
| A3Delete of type_index
141
| A3Cast of type_index
148
| A3DebugReg of int * int * int * int
150
| A3DebugFile of as3_ident index
155
| A3RPrivate of as3_ident index option
156
| A3RPublic of as3_ident index option
157
| A3RInternal of as3_ident index option
158
| A3RProtected of as3_ident index
159
| A3RUnknown1 of as3_ident index
160
| A3RUnknown2 of as3_ident index option
162
and as3_rights = as3_base_right index list
165
| A3TClassInterface of as3_ident index option * as3_rights index
166
| A3TMethodVar of as3_ident index * as3_base_right index
167
| A3TArrayAccess of as3_rights index
169
| A3TUnknown2 of int * int
175
| A3VString of as3_ident index
176
| A3VInt of as3_int index
177
| A3VFloat of as3_float index
178
| A3VNamespace of as3_base_right index
180
and as3_method_type = {
181
mt3_ret : as3_type index option;
182
mt3_args : as3_type index option list;
185
mt3_new_block : bool;
186
mt3_debug_name : as3_ident index option;
187
mt3_dparams : as3_value list option;
188
mt3_pnames : as3_ident index list option;
189
mt3_unk_flags : bool * bool * bool;
192
type as3_method_kind =
198
m3_type : as3_method_type index_nz;
201
m3_kind : as3_method_kind;
205
v3_type : as3_type index option;
206
v3_value : as3_value;
210
type as3_metadata = {
211
meta3_name : as3_ident index;
212
meta3_data : (as3_ident index option * as3_ident index) array;
215
type as3_field_kind =
216
| A3FMethod of as3_method
218
| A3FClass of as3_class index_nz
221
f3_name : as3_type index;
223
f3_kind : as3_field_kind;
224
f3_metas : as3_metadata index_nz array option;
228
cl3_name : as3_type index;
229
cl3_super : as3_type index option;
232
cl3_interface : bool;
233
cl3_rights : as3_base_right index option;
234
cl3_implements : as3_type index array;
235
cl3_construct : as3_method_type index_nz;
236
cl3_fields : as3_field array;
240
st3_method : as3_method_type index_nz;
241
st3_fields : as3_field array;
244
type as3_try_catch = {
248
tc3_type : as3_type index option;
249
tc3_name : as3_type index option;
252
type as3_function = {
253
fun3_id : as3_method_type index_nz;
254
fun3_stack_size : int;
257
fun3_max_scope : int;
258
fun3_code : as3_opcode list;
259
fun3_trys : as3_try_catch array;
260
fun3_locals : as3_field array;
264
as3_ints : as3_int array;
266
as3_floats : as3_float array;
267
as3_idents : as3_ident array;
268
as3_base_rights : as3_base_right array;
269
as3_rights : as3_rights array;
270
mutable as3_types : as3_type array;
271
mutable as3_method_types : as3_method_type array;
272
mutable as3_metadatas : as3_metadata array;
273
mutable as3_classes : as3_class array;
274
mutable as3_statics : as3_static array;
275
mutable as3_inits : as3_static array;
276
mutable as3_functions : as3_function array;
277
mutable as3_unknown : string;