annotate dmd/IndexExp.d @ 129:010eb8f0e18d

further work on dmd test suite
author korDen
date Sun, 05 Sep 2010 15:32:22 +0400
parents 9e39c7de8438
children 60bb0fe4563e
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
72
2e2a5c3f943a reduced warnings by adding override to the methods
Trass3r
parents: 63
diff changeset
1 module dmd.IndexExp;
2e2a5c3f943a reduced warnings by adding override to the methods
Trass3r
parents: 63
diff changeset
2
114
e28b18c23469 added a module dmd.common for commonly used stuff
Trass3r
parents: 113
diff changeset
3 import dmd.common;
72
2e2a5c3f943a reduced warnings by adding override to the methods
Trass3r
parents: 63
diff changeset
4 import dmd.Expression;
2e2a5c3f943a reduced warnings by adding override to the methods
Trass3r
parents: 63
diff changeset
5 import dmd.backend.elem;
2e2a5c3f943a reduced warnings by adding override to the methods
Trass3r
parents: 63
diff changeset
6 import dmd.InterState;
2e2a5c3f943a reduced warnings by adding override to the methods
Trass3r
parents: 63
diff changeset
7 import dmd.OutBuffer;
2e2a5c3f943a reduced warnings by adding override to the methods
Trass3r
parents: 63
diff changeset
8 import dmd.Loc;
2e2a5c3f943a reduced warnings by adding override to the methods
Trass3r
parents: 63
diff changeset
9 import dmd.Scope;
2e2a5c3f943a reduced warnings by adding override to the methods
Trass3r
parents: 63
diff changeset
10 import dmd.VarDeclaration;
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
11 import dmd.InlineDoState;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
12 import dmd.Type;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
13 import dmd.ScopeDsymbol;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
14 import dmd.TY;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
15 import dmd.ArrayScopeSymbol;
129
010eb8f0e18d further work on dmd test suite
korDen
parents: 123
diff changeset
16 import dmd.PREC;
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
17 import dmd.TypeNext;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
18 import dmd.TypeSArray;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
19 import dmd.TypeAArray;
72
2e2a5c3f943a reduced warnings by adding override to the methods
Trass3r
parents: 63
diff changeset
20 import dmd.UnaExp;
2e2a5c3f943a reduced warnings by adding override to the methods
Trass3r
parents: 63
diff changeset
21 import dmd.IRState;
2e2a5c3f943a reduced warnings by adding override to the methods
Trass3r
parents: 63
diff changeset
22 import dmd.BinExp;
2e2a5c3f943a reduced warnings by adding override to the methods
Trass3r
parents: 63
diff changeset
23 import dmd.HdrGenState;
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
24 import dmd.TOK;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
25 import dmd.WANT;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
26 import dmd.TupleExp;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
27 import dmd.TypeTuple;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
28 import dmd.Argument;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
29 import dmd.TypeExp;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
30 import dmd.VarExp;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
31 import dmd.STC;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
32 import dmd.GlobalExpressions;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
33 import dmd.ExpInitializer;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
34 import dmd.Global;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
35
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
36 import dmd.expression.util.arrayTypeCompatible;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
37 import dmd.expression.Util;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
38 import dmd.expression.Index;
129
010eb8f0e18d further work on dmd test suite
korDen
parents: 123
diff changeset
39 import dmd.expression.ArrayLength;
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
40
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
41 import dmd.backend.Symbol;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
42 import dmd.backend.Util;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
43 import dmd.codegen.Util;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
44 import dmd.backend.OPER;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
45 import dmd.backend.mTY;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
46 import dmd.backend.TYM;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
47
72
2e2a5c3f943a reduced warnings by adding override to the methods
Trass3r
parents: 63
diff changeset
48 import core.stdc.string;
73
ef02e2e203c2 Updating to dmd2.033
korDen
parents: 72
diff changeset
49 import core.stdc.stdio;
ef02e2e203c2 Updating to dmd2.033
korDen
parents: 72
diff changeset
50
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
51 class IndexExp : BinExp
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
52 {
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
53 VarDeclaration lengthVar;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
54 int modifiable = 0; // assume it is an rvalue
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
55
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
56 this(Loc loc, Expression e1, Expression e2)
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
57 {
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
58 super(loc, TOK.TOKindex, IndexExp.sizeof, e1, e2);
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
59 //printf("IndexExp.IndexExp('%s')\n", toChars());
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
60 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
61
72
2e2a5c3f943a reduced warnings by adding override to the methods
Trass3r
parents: 63
diff changeset
62 override Expression semantic(Scope sc)
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
63 {
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
64 Expression e;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
65 BinExp b;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
66 UnaExp u;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
67 Type t1;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
68 ScopeDsymbol sym;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
69
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
70 version (LOGSEMANTIC) {
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
71 printf("IndexExp.semantic('%s')\n", toChars());
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
72 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
73 if (type)
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
74 return this;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
75 if (!e1.type)
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
76 e1 = e1.semantic(sc);
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
77 assert(e1.type); // semantic() should already be run on it
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
78 e = this;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
79
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
80 // Note that unlike C we do not implement the int[ptr]
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
81
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
82 t1 = e1.type.toBasetype();
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
83
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
84 if (t1.ty == Tsarray || t1.ty == Tarray || t1.ty == Ttuple)
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
85 {
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
86 // Create scope for 'length' variable
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
87 sym = new ArrayScopeSymbol(sc, this);
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
88 sym.loc = loc;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
89 sym.parent = sc.scopesym;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
90 sc = sc.push(sym);
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
91 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
92
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
93 e2 = e2.semantic(sc);
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
94 if (!e2.type)
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
95 {
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
96 error("%s has no value", e2.toChars());
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
97 e2.type = Type.terror;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
98 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
99 e2 = resolveProperties(sc, e2);
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
100
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
101 if (t1.ty == Tsarray || t1.ty == Tarray || t1.ty == Ttuple)
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
102 sc = sc.pop();
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
103
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
104 switch (t1.ty)
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
105 {
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
106 case Tpointer:
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
107 case Tarray:
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
108 e2 = e2.implicitCastTo(sc, Type.tsize_t);
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
109 e.type = (cast(TypeNext)t1).next;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
110 break;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
111
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
112 case Tsarray:
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
113 {
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
114 e2 = e2.implicitCastTo(sc, Type.tsize_t);
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
115
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
116 TypeSArray tsa = cast(TypeSArray)t1;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
117
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
118 static if (false) {
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
119 // Don't do now, because it might be short-circuit evaluated
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
120 // Do compile time array bounds checking if possible
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
121 e2 = e2.optimize(WANTvalue);
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
122 if (e2.op == TOKint64)
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
123 {
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
124 ulong index = e2.toInteger();
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
125 ulong length = tsa.dim.toInteger();
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
126 if (index < 0 || index >= length)
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
127 error("array index [%lld] is outside array bounds [0 .. %lld]", index, length);
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
128 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
129 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
130 e.type = t1.nextOf();
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
131 break;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
132 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
133
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
134 case Taarray:
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
135 {
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
136 TypeAArray taa = cast(TypeAArray)t1;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
137 if (!arrayTypeCompatible(e2.loc, e2.type, taa.index))
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
138 {
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
139 e2 = e2.implicitCastTo(sc, taa.index); // type checking
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
140 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
141 type = taa.next;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
142 break;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
143 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
144
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
145 case Ttuple:
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
146 {
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
147 e2 = e2.implicitCastTo(sc, Type.tsize_t);
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
148 e2 = e2.optimize(WANTvalue | WANTinterpret);
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
149 ulong index = e2.toUInteger();
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
150 size_t length;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
151 TupleExp te;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
152 TypeTuple tup;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
153
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
154 if (e1.op == TOKtuple)
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
155 {
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
156 te = cast(TupleExp)e1;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
157 length = te.exps.dim;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
158 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
159 else if (e1.op == TOKtype)
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
160 {
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
161 tup = cast(TypeTuple)t1;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
162 length = Argument.dim(tup.arguments);
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
163 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
164 else
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
165 assert(0);
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
166
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
167 if (index < length)
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
168 {
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
169 if (e1.op == TOKtuple)
113
3482c73a991b More cleanup for arrays
Eldar Insafutdinov <e.insafutdinov@gmail.com>
parents: 79
diff changeset
170 e = te.exps[cast(size_t)index];
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
171 else
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
172 e = new TypeExp(e1.loc, Argument.getNth(tup.arguments, cast(size_t)index).type);
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
173 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
174 else
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
175 {
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
176 error("array index [%ju] is outside array bounds [0 .. %zu]", index, length);
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
177 e = e1;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
178 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
179 break;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
180 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
181
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
182 default:
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
183 error("%s must be an array or pointer type, not %s", e1.toChars(), e1.type.toChars());
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
184 type = Type.tint32;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
185 break;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
186 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
187
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
188 return e;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
189 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
190
72
2e2a5c3f943a reduced warnings by adding override to the methods
Trass3r
parents: 63
diff changeset
191 override int isLvalue()
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
192 {
129
010eb8f0e18d further work on dmd test suite
korDen
parents: 123
diff changeset
193 return true;
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
194 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
195
72
2e2a5c3f943a reduced warnings by adding override to the methods
Trass3r
parents: 63
diff changeset
196 override Expression toLvalue(Scope sc, Expression e)
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
197 {
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
198 // if (type && type.toBasetype().ty == Tvoid)
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
199 // error("voids have no value");
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
200 return this;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
201 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
202
72
2e2a5c3f943a reduced warnings by adding override to the methods
Trass3r
parents: 63
diff changeset
203 override Expression modifiableLvalue(Scope sc, Expression e)
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
204 {
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
205 //printf("IndexExp::modifiableLvalue(%s)\n", toChars());
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
206 modifiable = 1;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
207 if (e1.op == TOKstring)
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
208 error("string literals are immutable");
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
209 if (type && !type.isMutable())
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
210 error("%s isn't mutable", e.toChars());
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
211 if (e1.type.toBasetype().ty == Taarray)
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
212 e1 = e1.modifiableLvalue(sc, e1);
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
213 return toLvalue(sc, e);
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
214 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
215
72
2e2a5c3f943a reduced warnings by adding override to the methods
Trass3r
parents: 63
diff changeset
216 override void toCBuffer(OutBuffer buf, HdrGenState* hgs)
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
217 {
129
010eb8f0e18d further work on dmd test suite
korDen
parents: 123
diff changeset
218 expToCBuffer(buf, hgs, e1, PREC.PREC_primary);
010eb8f0e18d further work on dmd test suite
korDen
parents: 123
diff changeset
219 buf.writeByte('[');
010eb8f0e18d further work on dmd test suite
korDen
parents: 123
diff changeset
220 expToCBuffer(buf, hgs, e2, PREC.PREC_assign);
010eb8f0e18d further work on dmd test suite
korDen
parents: 123
diff changeset
221 buf.writeByte(']');
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
222 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
223
72
2e2a5c3f943a reduced warnings by adding override to the methods
Trass3r
parents: 63
diff changeset
224 override Expression optimize(int result)
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
225 {
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
226 Expression e;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
227
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
228 //printf("IndexExp::optimize(result = %d) %s\n", result, toChars());
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
229 Expression e1 = this.e1.optimize(WANTvalue | (result & WANTinterpret));
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
230 e1 = fromConstInitializer(result, e1);
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
231 if (this.e1.op == TOKvar)
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
232 {
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
233 VarExp ve = cast(VarExp)this.e1;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
234 if (ve.var.storage_class & STCmanifest)
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
235 {
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
236 /* We generally don't want to have more than one copy of an
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
237 * array literal, but if it's an enum we have to because the
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
238 * enum isn't stored elsewhere. See Bugzilla 2559
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
239 */
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
240 this.e1 = e1;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
241 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
242 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
243
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
244 e2 = e2.optimize(WANTvalue | (result & WANTinterpret));
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
245 e = Index(type, e1, e2);
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
246 if (e is EXP_CANT_INTERPRET)
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
247 e = this;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
248
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
249 return e;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
250 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
251
72
2e2a5c3f943a reduced warnings by adding override to the methods
Trass3r
parents: 63
diff changeset
252 override Expression interpret(InterState istate)
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
253 {
129
010eb8f0e18d further work on dmd test suite
korDen
parents: 123
diff changeset
254 Expression e;
010eb8f0e18d further work on dmd test suite
korDen
parents: 123
diff changeset
255 Expression e1;
010eb8f0e18d further work on dmd test suite
korDen
parents: 123
diff changeset
256 Expression e2;
010eb8f0e18d further work on dmd test suite
korDen
parents: 123
diff changeset
257
010eb8f0e18d further work on dmd test suite
korDen
parents: 123
diff changeset
258 version (LOG) {
010eb8f0e18d further work on dmd test suite
korDen
parents: 123
diff changeset
259 printf("IndexExp.interpret() %s\n", toChars());
010eb8f0e18d further work on dmd test suite
korDen
parents: 123
diff changeset
260 }
010eb8f0e18d further work on dmd test suite
korDen
parents: 123
diff changeset
261 e1 = this.e1.interpret(istate);
010eb8f0e18d further work on dmd test suite
korDen
parents: 123
diff changeset
262 if (e1 is EXP_CANT_INTERPRET)
010eb8f0e18d further work on dmd test suite
korDen
parents: 123
diff changeset
263 goto Lcant;
010eb8f0e18d further work on dmd test suite
korDen
parents: 123
diff changeset
264
010eb8f0e18d further work on dmd test suite
korDen
parents: 123
diff changeset
265 if (e1.op == TOKstring || e1.op == TOKarrayliteral)
010eb8f0e18d further work on dmd test suite
korDen
parents: 123
diff changeset
266 {
010eb8f0e18d further work on dmd test suite
korDen
parents: 123
diff changeset
267 /* Set the $ variable
010eb8f0e18d further work on dmd test suite
korDen
parents: 123
diff changeset
268 */
010eb8f0e18d further work on dmd test suite
korDen
parents: 123
diff changeset
269 e = ArrayLength(Type.tsize_t, e1);
010eb8f0e18d further work on dmd test suite
korDen
parents: 123
diff changeset
270 if (e is EXP_CANT_INTERPRET)
010eb8f0e18d further work on dmd test suite
korDen
parents: 123
diff changeset
271 goto Lcant;
010eb8f0e18d further work on dmd test suite
korDen
parents: 123
diff changeset
272 if (lengthVar)
010eb8f0e18d further work on dmd test suite
korDen
parents: 123
diff changeset
273 lengthVar.value = e;
010eb8f0e18d further work on dmd test suite
korDen
parents: 123
diff changeset
274 }
010eb8f0e18d further work on dmd test suite
korDen
parents: 123
diff changeset
275
010eb8f0e18d further work on dmd test suite
korDen
parents: 123
diff changeset
276 e2 = this.e2.interpret(istate);
010eb8f0e18d further work on dmd test suite
korDen
parents: 123
diff changeset
277 if (e2 is EXP_CANT_INTERPRET)
010eb8f0e18d further work on dmd test suite
korDen
parents: 123
diff changeset
278 goto Lcant;
010eb8f0e18d further work on dmd test suite
korDen
parents: 123
diff changeset
279 return Index(type, e1, e2);
010eb8f0e18d further work on dmd test suite
korDen
parents: 123
diff changeset
280
010eb8f0e18d further work on dmd test suite
korDen
parents: 123
diff changeset
281 Lcant:
010eb8f0e18d further work on dmd test suite
korDen
parents: 123
diff changeset
282 return EXP_CANT_INTERPRET;
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
283 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
284
72
2e2a5c3f943a reduced warnings by adding override to the methods
Trass3r
parents: 63
diff changeset
285 override Expression doInline(InlineDoState ids)
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
286 {
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
287 IndexExp are = cast(IndexExp)copy();
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
288
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
289 are.e1 = e1.doInline(ids);
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
290
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
291 if (lengthVar)
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
292 { //printf("lengthVar\n");
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
293 VarDeclaration vd = lengthVar;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
294 ExpInitializer ie;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
295 ExpInitializer ieto;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
296 VarDeclaration vto;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
297
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
298 vto = new VarDeclaration(vd.loc, vd.type, vd.ident, vd.init);
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
299 ///*vto = *vd;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
300 memcpy(cast(void*)vto, cast(void*)vd, VarDeclaration.classinfo.init.length);
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
301 vto.parent = ids.parent;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
302 vto.csym = null;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
303 vto.isym = null;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
304
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
305 ids.from.push(cast(void*)vd);
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
306 ids.to.push(cast(void*)vto);
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
307
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
308 if (vd.init)
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
309 {
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
310 ie = vd.init.isExpInitializer();
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
311 assert(ie);
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
312 ieto = new ExpInitializer(ie.loc, ie.exp.doInline(ids));
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
313 vto.init = ieto;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
314 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
315
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
316 are.lengthVar = vto;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
317 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
318 are.e2 = e2.doInline(ids);
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
319 return are;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
320 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
321
72
2e2a5c3f943a reduced warnings by adding override to the methods
Trass3r
parents: 63
diff changeset
322 override void scanForNestedRef(Scope sc)
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
323 {
123
9e39c7de8438 Make dmd test suite compile
korDen
parents: 114
diff changeset
324 e1.scanForNestedRef(sc);
9e39c7de8438 Make dmd test suite compile
korDen
parents: 114
diff changeset
325
9e39c7de8438 Make dmd test suite compile
korDen
parents: 114
diff changeset
326 if (lengthVar)
9e39c7de8438 Make dmd test suite compile
korDen
parents: 114
diff changeset
327 {
9e39c7de8438 Make dmd test suite compile
korDen
parents: 114
diff changeset
328 //printf("lengthVar\n");
9e39c7de8438 Make dmd test suite compile
korDen
parents: 114
diff changeset
329 lengthVar.parent = sc.parent;
9e39c7de8438 Make dmd test suite compile
korDen
parents: 114
diff changeset
330 }
9e39c7de8438 Make dmd test suite compile
korDen
parents: 114
diff changeset
331 e2.scanForNestedRef(sc);
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
332 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
333
72
2e2a5c3f943a reduced warnings by adding override to the methods
Trass3r
parents: 63
diff changeset
334 override elem* toElem(IRState* irs)
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
335 {
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
336 elem* e;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
337 elem* n1 = e1.toElem(irs);
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
338 elem* eb = null;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
339
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
340 //printf("IndexExp.toElem() %s\n", toChars());
79
43073c7c7769 updated to 2.035
Trass3r
parents: 73
diff changeset
341 Type t1 = e1.type.toBasetype();
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
342 if (t1.ty == Taarray)
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
343 {
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
344 // set to:
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
345 // *aaGet(aa, keyti, valuesize, index);
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
346
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
347 TypeAArray taa = cast(TypeAArray)t1;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
348 elem* keyti;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
349 elem* ep;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
350 int vsize = cast(int)taa.next.size();
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
351 Symbol* s;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
352
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
353 // n2 becomes the index, also known as the key
79
43073c7c7769 updated to 2.035
Trass3r
parents: 73
diff changeset
354 elem* n2 = e2.toElem(irs);
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
355 if (tybasic(n2.Ety) == TYstruct || tybasic(n2.Ety) == TYarray)
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
356 {
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
357 n2 = el_una(OPstrpar, TYstruct, n2);
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
358 n2.Enumbytes = n2.E1.Enumbytes;
79
43073c7c7769 updated to 2.035
Trass3r
parents: 73
diff changeset
359 if (taa.index.ty == Tsarray)
43073c7c7769 updated to 2.035
Trass3r
parents: 73
diff changeset
360 {
43073c7c7769 updated to 2.035
Trass3r
parents: 73
diff changeset
361 assert(e2.type.size() == taa.index.size());
43073c7c7769 updated to 2.035
Trass3r
parents: 73
diff changeset
362 n2.Enumbytes = cast(size_t) taa.index.size();
43073c7c7769 updated to 2.035
Trass3r
parents: 73
diff changeset
363 }
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
364 //printf("numbytes = %d\n", n2.Enumbytes);
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
365 assert(n2.Enumbytes);
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
366 }
79
43073c7c7769 updated to 2.035
Trass3r
parents: 73
diff changeset
367 elem* valuesize = el_long(TYuint, vsize); // BUG: should be TYsize_t
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
368 //printf("valuesize: "); elem_print(valuesize);
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
369 if (modifiable)
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
370 {
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
371 n1 = el_una(OPaddr, TYnptr, n1);
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
372 s = taa.aaGetSymbol("Get", 1);
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
373 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
374 else
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
375 {
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
376 s = taa.aaGetSymbol("GetRvalue", 1);
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
377 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
378 //printf("taa.index = %s\n", taa.index.toChars());
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
379 keyti = taa.index.getInternalTypeInfo(null).toElem(irs);
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
380 //keyti = taa.index.getTypeInfo(null).toElem(irs);
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
381 //printf("keyti:\n");
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
382 //elem_print(keyti);
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
383 ep = el_params(n2, valuesize, keyti, n1, null);
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
384 e = el_bin(OPcall, TYnptr, el_var(s), ep);
79
43073c7c7769 updated to 2.035
Trass3r
parents: 73
diff changeset
385
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
386 if (global.params.useArrayBounds)
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
387 {
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
388 elem* ea;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
389
79
43073c7c7769 updated to 2.035
Trass3r
parents: 73
diff changeset
390 elem* n = el_same(&e);
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
391
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
392 // Construct: ((e || ModuleAssert(line)),n)
79
43073c7c7769 updated to 2.035
Trass3r
parents: 73
diff changeset
393 Symbol* sassert = irs.blx.module_.toModuleArray();
43073c7c7769 updated to 2.035
Trass3r
parents: 73
diff changeset
394
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
395 ea = el_bin(OPcall,TYvoid,el_var(sassert),
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
396 el_long(TYint, loc.linnum));
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
397 e = el_bin(OPoror,TYvoid,e,ea);
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
398 e = el_bin(OPcomma, TYnptr, e, n);
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
399 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
400 e = el_una(OPind, type.totym(), e);
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
401 if (tybasic(e.Ety) == TYstruct)
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
402 e.Enumbytes = cast(uint)type.size();
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
403 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
404 else
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
405 {
79
43073c7c7769 updated to 2.035
Trass3r
parents: 73
diff changeset
406 elem* einit = resolveLengthVar(lengthVar, &n1, t1);
43073c7c7769 updated to 2.035
Trass3r
parents: 73
diff changeset
407 elem* n2 = e2.toElem(irs);
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
408
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
409 if (global.params.useArrayBounds)
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
410 {
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
411 elem* elength;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
412 elem* n2x;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
413 elem* ea;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
414
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
415 if (t1.ty == Tsarray)
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
416 {
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
417 TypeSArray tsa = cast(TypeSArray)t1;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
418 ulong length = tsa.dim.toInteger();
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
419
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
420 elength = el_long(TYuint, length);
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
421 goto L1;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
422 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
423 else if (t1.ty == Tarray)
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
424 {
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
425 elength = n1;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
426 n1 = el_same(&elength);
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
427 elength = el_una(OP64_32, TYuint, elength);
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
428 L1:
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
429 n2x = n2;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
430 n2 = el_same(&n2x);
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
431 n2x = el_bin(OPlt, TYint, n2x, elength);
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
432
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
433 // Construct: (n2x || ModuleAssert(line))
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
434 Symbol* sassert;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
435
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
436 sassert = irs.blx.module_.toModuleArray();
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
437 ea = el_bin(OPcall,TYvoid,el_var(sassert),
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
438 el_long(TYint, loc.linnum));
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
439 eb = el_bin(OPoror,TYvoid,n2x,ea);
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
440 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
441 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
442
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
443 n1 = array_toPtr(t1, n1);
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
444
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
445 {
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
446 elem* escale;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
447
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
448 escale = el_long(TYint, t1.nextOf().size());
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
449 n2 = el_bin(OPmul, TYint, n2, escale);
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
450 e = el_bin(OPadd, TYnptr, n1, n2);
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
451 e = el_una(OPind, type.totym(), e);
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
452 if (tybasic(e.Ety) == TYstruct || tybasic(e.Ety) == TYarray)
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
453 {
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
454 e.Ety = TYstruct;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
455 e.Enumbytes = cast(uint)type.size();
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
456 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
457 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
458
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
459 eb = el_combine(einit, eb);
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
460 e = el_combine(eb, e);
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
461 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
462
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
463 el_setLoc(e,loc);
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
464
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
465 return e;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
466 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
467 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
468