~ubuntu-branches/ubuntu/oneiric/haxe/oneiric

« back to all changes in this revision

Viewing changes to ocaml/swflib/as3hl.mli

  • Committer: Bazaar Package Importer
  • Author(s): Jens Peter Secher
  • Date: 2008-06-15 11:04:09 UTC
  • mfrom: (2.1.6 intrepid)
  • Revision ID: james.westby@ubuntu.com-20080615110409-7pyykgwmk5v0cues
Tags: 1:1.19-3
* Remove bashism in script.
  (Closes: #484390)
* Upgrade to Policy 3.8.0 by including a README.source explaining how to
  use dpatch.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
(*
 
2
 *  This file is part of SwfLib
 
3
 *  Copyright (c)2004-2008 Nicolas Cannasse
 
4
 *
 
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.
 
9
 *
 
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.
 
14
 *
 
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
 
18
 *)
 
19
open As3
 
20
 
 
21
type hl_ident = string
 
22
type hl_int = int32
 
23
type hl_uint = int32
 
24
type hl_float = float
 
25
type hl_slot = int
 
26
type hl_jump = as3_jump
 
27
type hl_op = as3_op
 
28
 
 
29
type hl_opcode =
 
30
        | HBreakPoint
 
31
        | HNop
 
32
        | HThrow
 
33
        | HGetSuper of hl_name
 
34
        | HSetSuper of hl_name
 
35
        | HRegKill of reg
 
36
        | HLabel
 
37
        | HJump of hl_jump * int
 
38
        | HSwitch of int * int list
 
39
        | HPushWith
 
40
        | HPopScope
 
41
        | HForIn
 
42
        | HHasNext
 
43
        | HNull
 
44
        | HUndefined
 
45
        | HForEach
 
46
        | HSmallInt of int
 
47
        | HInt of int
 
48
        | HTrue
 
49
        | HFalse
 
50
        | HNaN
 
51
        | HPop
 
52
        | HDup
 
53
        | HSwap
 
54
        | HString of hl_ident
 
55
        | HIntRef of hl_int
 
56
        | HUIntRef of hl_uint
 
57
        | HFloat of hl_float
 
58
        | HScope
 
59
        | HNamespace of hl_namespace
 
60
        | HNext of reg * reg
 
61
        | HFunction of hl_method
 
62
        | HCallStack of nargs
 
63
        | HConstruct of nargs
 
64
        | HCallMethod of hl_slot * nargs
 
65
        | HCallStatic of hl_method * nargs
 
66
        | HCallSuper of hl_name * nargs
 
67
        | HCallProperty of hl_name * nargs
 
68
        | HRetVoid
 
69
        | HRet
 
70
        | HConstructSuper of nargs
 
71
        | HConstructProperty of hl_name * nargs
 
72
        | HCallPropLex of hl_name * nargs
 
73
        | HCallSuperVoid of hl_name * nargs
 
74
        | HCallPropVoid of hl_name * nargs
 
75
        | HObject of nargs
 
76
        | HArray of nargs
 
77
        | HNewBlock
 
78
        | HClassDef of hl_class
 
79
        | HCatch of int
 
80
        | HFindPropStrict of hl_name
 
81
        | HFindProp of hl_name
 
82
        | HFindDefinition of hl_name
 
83
        | HGetLex of hl_name
 
84
        | HSetProp of hl_name
 
85
        | HReg of reg
 
86
        | HSetReg of reg
 
87
        | HGetGlobalScope
 
88
        | HGetScope of int
 
89
        | HGetProp of hl_name
 
90
        | HInitProp of hl_name
 
91
        | HDeleteProp of hl_name
 
92
        | HGetSlot of hl_slot
 
93
        | HSetSlot of hl_slot
 
94
        | HToString
 
95
        | HToXml
 
96
        | HToXmlAttr
 
97
        | HToInt
 
98
        | HToUInt
 
99
        | HToNumber
 
100
        | HToBool
 
101
        | HToObject
 
102
        | HCheckIsXml
 
103
        | HCast of hl_name
 
104
        | HAsAny
 
105
        | HAsString
 
106
        | HAsType of hl_name
 
107
        | HAsObject
 
108
        | HIncrReg of reg
 
109
        | HDecrReg of reg
 
110
        | HTypeof
 
111
        | HInstanceOf
 
112
        | HIsType of hl_name
 
113
        | HIncrIReg of reg
 
114
        | HDecrIReg of reg
 
115
        | HThis
 
116
        | HSetThis
 
117
        | HDebugReg of hl_ident * reg * int
 
118
        | HDebugLine of int
 
119
        | HDebugFile of hl_ident
 
120
        | HBreakPointLine of int
 
121
        | HTimestamp
 
122
        | HOp of hl_op
 
123
        | HUnk of char
 
124
 
 
125
and hl_namespace =
 
126
        | HNPrivate of hl_ident option
 
127
        | HNPublic of hl_ident option
 
128
        | HNInternal of hl_ident option
 
129
        | HNProtected of hl_ident
 
130
        | HNNamespace of hl_ident
 
131
        | HNExplicit of hl_ident
 
132
        | HNStaticProtected of hl_ident option
 
133
 
 
134
and hl_ns_set = hl_namespace list
 
135
 
 
136
and hl_name =
 
137
        | HMPath of hl_ident list * hl_ident
 
138
        | HMName of hl_ident * hl_namespace
 
139
        | HMMultiName of hl_ident option * hl_ns_set
 
140
        | HMRuntimeName of hl_ident
 
141
        | HMRuntimeNameLate
 
142
        | HMMultiNameLate of hl_ns_set
 
143
        | HMAttrib of hl_name
 
144
 
 
145
and hl_value =
 
146
        | HVNone
 
147
        | HVNull
 
148
        | HVBool of bool
 
149
        | HVString of hl_ident
 
150
        | HVInt of hl_int
 
151
        | HVUInt of hl_uint
 
152
        | HVFloat of hl_float
 
153
        | HVNamespace of int * hl_namespace
 
154
 
 
155
and hl_method = {
 
156
        hlmt_mark : int; (* unique id, for internal usage *)
 
157
        hlmt_ret : hl_name option;
 
158
        hlmt_args : hl_name option list;
 
159
        hlmt_native : bool;
 
160
        hlmt_var_args : bool;
 
161
        hlmt_arguments_defined : bool;
 
162
        hlmt_uses_dxns : bool;
 
163
        hlmt_new_block : bool;
 
164
        hlmt_unused_flag : bool;
 
165
        hlmt_debug_name : hl_ident option;
 
166
        hlmt_dparams : hl_value list option;
 
167
        hlmt_pnames : hl_ident option list option;
 
168
        hlmt_function : hl_function option; (* None for interfaces constructors only *)
 
169
}
 
170
 
 
171
and hl_try_catch = {
 
172
        hltc_start : int;
 
173
        hltc_end : int;
 
174
        hltc_handle : int;
 
175
        hltc_type : hl_name option;
 
176
        hltc_name : hl_name option;
 
177
}
 
178
 
 
179
and hl_function = {
 
180
        hlf_stack_size : int;
 
181
        hlf_nregs : int;
 
182
        hlf_init_scope : int;
 
183
        hlf_max_scope : int;
 
184
        mutable hlf_code : hl_opcode array;
 
185
        hlf_trys : hl_try_catch array;
 
186
        hlf_locals : (hl_name * hl_name option * hl_slot) array;
 
187
}
 
188
 
 
189
and hl_method_kind = as3_method_kind
 
190
 
 
191
and hl_method_field = {
 
192
        hlm_type : hl_method;
 
193
        hlm_final : bool;
 
194
        hlm_override : bool;
 
195
        hlm_kind : hl_method_kind;
 
196
}
 
197
 
 
198
and hl_var_field = {
 
199
        hlv_type : hl_name option;
 
200
        hlv_value : hl_value;
 
201
        hlv_const : bool;
 
202
}
 
203
 
 
204
and hl_metadata = {
 
205
        hlmeta_name : hl_ident;
 
206
        hlmeta_data : (hl_ident option * hl_ident) array;
 
207
}
 
208
 
 
209
and hl_field_kind =
 
210
        | HFMethod of hl_method_field
 
211
        | HFVar of hl_var_field
 
212
        | HFFunction of hl_method
 
213
        | HFClass of hl_class (* only for hl_static fields *)
 
214
 
 
215
and hl_field = {
 
216
        hlf_name : hl_name;
 
217
        hlf_slot : hl_slot;
 
218
        hlf_kind : hl_field_kind;
 
219
        hlf_metas : hl_metadata array option;
 
220
}
 
221
 
 
222
and hl_class = {
 
223
        hlc_name : hl_name;
 
224
        hlc_super : hl_name option;
 
225
        hlc_sealed : bool;
 
226
        hlc_final : bool;
 
227
        hlc_interface : bool;
 
228
        hlc_namespace : hl_namespace option;
 
229
        hlc_implements : hl_name array;
 
230
        hlc_construct : hl_method;
 
231
        hlc_fields : hl_field array;
 
232
        hlc_static_construct : hl_method;
 
233
        hlc_static_fields : hl_field array;
 
234
}
 
235
 
 
236
and hl_static = {
 
237
        hls_method : hl_method;
 
238
        hls_fields : hl_field array;
 
239
}
 
240
 
 
241
and hl_tag = hl_static list