Update changelog
[pkg-ocaml-js-of-ocaml.git] / compiler / instr.mli
blob2f570da5051c4343abdbff3391f8abae43a9b959
1 (* Js_of_ocaml compiler
2 * http://www.ocsigen.org/js_of_ocaml/
3 * Copyright (C) 2010 Jérôme Vouillon
4 * Laboratoire PPS - CNRS Université Paris Diderot
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU Lesser General Public License as published by
8 * the Free Software Foundation, with linking exception;
9 * either version 2.1 of the License, or (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
21 type t =
22 ACC0
23 | ACC1
24 | ACC2
25 | ACC3
26 | ACC4
27 | ACC5
28 | ACC6
29 | ACC7
30 | ACC
31 | PUSH
32 | PUSHACC0
33 | PUSHACC1
34 | PUSHACC2
35 | PUSHACC3
36 | PUSHACC4
37 | PUSHACC5
38 | PUSHACC6
39 | PUSHACC7
40 | PUSHACC
41 | POP
42 | ASSIGN
43 | ENVACC1
44 | ENVACC2
45 | ENVACC3
46 | ENVACC4
47 | ENVACC
48 | PUSHENVACC1
49 | PUSHENVACC2
50 | PUSHENVACC3
51 | PUSHENVACC4
52 | PUSHENVACC
53 | PUSH_RETADDR
54 | APPLY
55 | APPLY1
56 | APPLY2
57 | APPLY3
58 | APPTERM
59 | APPTERM1
60 | APPTERM2
61 | APPTERM3
62 | RETURN
63 | RESTART
64 | GRAB
65 | CLOSURE
66 | CLOSUREREC
67 | OFFSETCLOSUREM2
68 | OFFSETCLOSURE0
69 | OFFSETCLOSURE2
70 | OFFSETCLOSURE
71 | PUSHOFFSETCLOSUREM2
72 | PUSHOFFSETCLOSURE0
73 | PUSHOFFSETCLOSURE2
74 | PUSHOFFSETCLOSURE
75 | GETGLOBAL
76 | PUSHGETGLOBAL
77 | GETGLOBALFIELD
78 | PUSHGETGLOBALFIELD
79 | SETGLOBAL
80 | ATOM0
81 | ATOM
82 | PUSHATOM0
83 | PUSHATOM
84 | MAKEBLOCK
85 | MAKEBLOCK1
86 | MAKEBLOCK2
87 | MAKEBLOCK3
88 | MAKEFLOATBLOCK
89 | GETFIELD0
90 | GETFIELD1
91 | GETFIELD2
92 | GETFIELD3
93 | GETFIELD
94 | GETFLOATFIELD
95 | SETFIELD0
96 | SETFIELD1
97 | SETFIELD2
98 | SETFIELD3
99 | SETFIELD
100 | SETFLOATFIELD
101 | VECTLENGTH
102 | GETVECTITEM
103 | SETVECTITEM
104 | GETSTRINGCHAR
105 | SETSTRINGCHAR
106 | BRANCH
107 | BRANCHIF
108 | BRANCHIFNOT
109 | SWITCH
110 | BOOLNOT
111 | PUSHTRAP
112 | POPTRAP
113 | RAISE
114 | CHECK_SIGNALS
115 | C_CALL1
116 | C_CALL2
117 | C_CALL3
118 | C_CALL4
119 | C_CALL5
120 | C_CALLN
121 | CONST0
122 | CONST1
123 | CONST2
124 | CONST3
125 | CONSTINT
126 | PUSHCONST0
127 | PUSHCONST1
128 | PUSHCONST2
129 | PUSHCONST3
130 | PUSHCONSTINT
131 | NEGINT
132 | ADDINT
133 | SUBINT
134 | MULINT
135 | DIVINT
136 | MODINT
137 | ANDINT
138 | ORINT
139 | XORINT
140 | LSLINT
141 | LSRINT
142 | ASRINT
143 | EQ
144 | NEQ
145 | LTINT
146 | LEINT
147 | GTINT
148 | GEINT
149 | OFFSETINT
150 | OFFSETREF
151 | ISINT
152 | GETMETHOD
153 | BEQ
154 | BNEQ
155 | BLTINT
156 | BLEINT
157 | BGTINT
158 | BGEINT
159 | ULTINT
160 | UGEINT
161 | BULTINT
162 | BUGEINT
163 | GETPUBMET
164 | GETDYNMET
165 | STOP
167 type kind =
168 | KNullary
169 | KUnary
170 | KBinary
171 | KJump
172 | KCond_jump
173 | KCmp_jump
174 | KSwitch
175 | KClosurerec
176 | KClosure
177 | KStop of int
179 type desc = { code : t; kind : kind; name : string; opcode : int }
181 exception Bad_instruction of int
183 val get_instr : string -> int -> desc
185 val gets : string -> int -> int
186 val getu : string -> int -> int
188 val print_obj : Format.formatter -> Obj.t -> unit