Mercurial > projects > dmdscript-tango
comparison dmdscript_tango/ir.d @ 0:55c2951c07be
initial, files origin, premoved tree
author | saaadel |
---|---|
date | Sun, 24 Jan 2010 12:34:47 +0200 |
parents | |
children | 8363a4bf6a8f |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:55c2951c07be |
---|---|
1 | |
2 /* Digital Mars DMDScript source code. | |
3 * Copyright (c) 2000-2002 by Chromium Communications | |
4 * D version Copyright (c) 2004-2005 by Digital Mars | |
5 * All Rights Reserved | |
6 * written by Walter Bright | |
7 * www.digitalmars.com | |
8 * Use at your own risk. There is no warranty, express or implied. | |
9 * License for redistribution is by the GNU General Public License in gpl.txt. | |
10 * | |
11 * A binary, non-exclusive license for commercial use can be | |
12 * purchased from www.digitalmars.com/dscript/buy.html. | |
13 * | |
14 * DMDScript is implemented in the D Programming Language, | |
15 * www.digitalmars.com/d/ | |
16 * | |
17 * For a C++ implementation of DMDScript, including COM support, | |
18 * see www.digitalmars.com/dscript/cppscript.html. | |
19 */ | |
20 | |
21 | |
22 // Opcodes for our Intermediate Representation (IR) | |
23 | |
24 module dmdscript.ir; | |
25 | |
26 enum | |
27 { | |
28 IRerror, | |
29 IRnop, // no operation | |
30 IRend, // end of function | |
31 IRstring, | |
32 IRthisget, | |
33 IRnumber, | |
34 IRobject, | |
35 IRthis, | |
36 IRnull, | |
37 IRundefined, | |
38 IRboolean, | |
39 IRcall, | |
40 IRcalls = IRcall + 1, | |
41 IRcallscope = IRcalls + 1, | |
42 IRcallv = IRcallscope + 1, | |
43 IRputcall, | |
44 IRputcalls = IRputcall + 1, | |
45 IRputcallscope = IRputcalls + 1, | |
46 IRputcallv = IRputcallscope + 1, | |
47 IRget, | |
48 IRgets = IRget + 1, // 's' versions must be original + 1 | |
49 IRgetscope = IRgets + 1, | |
50 IRput, | |
51 IRputs = IRput + 1, | |
52 IRputscope = IRputs + 1, | |
53 IRdel, | |
54 IRdels = IRdel + 1, | |
55 IRdelscope = IRdels + 1, | |
56 IRnext, | |
57 IRnexts = IRnext + 1, | |
58 IRnextscope = IRnexts + 1, | |
59 IRaddass, | |
60 IRaddasss = IRaddass + 1, | |
61 IRaddassscope = IRaddasss + 1, | |
62 IRputthis, | |
63 IRputdefault, | |
64 IRmov, | |
65 IRret, | |
66 IRretexp, | |
67 IRimpret, | |
68 IRneg, | |
69 IRpos, | |
70 IRcom, | |
71 IRnot, | |
72 IRadd, | |
73 IRsub, | |
74 IRmul, | |
75 IRdiv, | |
76 IRmod, | |
77 IRshl, | |
78 IRshr, | |
79 IRushr, | |
80 IRand, | |
81 IRor, | |
82 IRxor, | |
83 | |
84 IRpreinc, | |
85 IRpreincs = IRpreinc + 1, | |
86 IRpreincscope = IRpreincs + 1, | |
87 | |
88 IRpredec, | |
89 IRpredecs = IRpredec + 1, | |
90 IRpredecscope = IRpredecs + 1, | |
91 | |
92 IRpostinc, | |
93 IRpostincs = IRpostinc + 1, | |
94 IRpostincscope = IRpostincs + 1, | |
95 | |
96 IRpostdec, | |
97 IRpostdecs = IRpostdec + 1, | |
98 IRpostdecscope = IRpostdecs + 1, | |
99 | |
100 IRnew, | |
101 | |
102 IRclt, | |
103 IRcle, | |
104 IRcgt, | |
105 IRcge, | |
106 IRceq, | |
107 IRcne, | |
108 IRcid, | |
109 IRcnid, | |
110 | |
111 IRjt, | |
112 IRjf, | |
113 IRjtb, | |
114 IRjfb, | |
115 IRjmp, | |
116 | |
117 IRjlt, // commonly appears as loop control | |
118 IRjle, // commonly appears as loop control | |
119 | |
120 IRjltc, // commonly appears as loop control | |
121 IRjlec, // commonly appears as loop control | |
122 | |
123 IRtypeof, | |
124 IRinstance, | |
125 | |
126 IRpush, | |
127 IRpop, | |
128 | |
129 IRiter, | |
130 IRassert, | |
131 | |
132 IRthrow, | |
133 IRtrycatch, | |
134 IRtryfinally, | |
135 IRfinallyret, | |
136 | |
137 IRMAX | |
138 } | |
139 | |
140 |