Mercurial > projects > ddmd
annotate dmd/OrAssignExp.d @ 130:60bb0fe4563e
dmdfe 2.037 first main iteration
author | Eldar Insafutdinov <e.insafutdinov@gmail.com> |
---|---|
date | Thu, 09 Sep 2010 22:51:44 +0100 |
parents | 9e39c7de8438 |
children | e3afd1303184 |
rev | line source |
---|---|
0 | 1 module dmd.OrAssignExp; |
2 | |
114 | 3 import dmd.common; |
117 | 4 import dmd.expression.Or; |
0 | 5 import dmd.BinExp; |
6 import dmd.Loc; | |
7 import dmd.Expression; | |
8 import dmd.Scope; | |
9 import dmd.InterState; | |
10 import dmd.OutBuffer; | |
11 import dmd.ArrayTypes; | |
12 import dmd.Identifier; | |
13 import dmd.IRState; | |
14 import dmd.TOK; | |
15 import dmd.Id; | |
16 | |
17 import dmd.backend.elem; | |
18 import dmd.backend.OPER; | |
19 | |
20 class OrAssignExp : BinExp | |
21 { | |
22 this(Loc loc, Expression e1, Expression e2) | |
23 { | |
24 super(loc, TOK.TOKorass, OrAssignExp.sizeof, e1, e2); | |
25 } | |
26 | |
72 | 27 override Expression semantic(Scope sc) |
0 | 28 { |
29 return commonSemanticAssignIntegral(sc); | |
30 } | |
31 | |
72 | 32 override Expression interpret(InterState istate) |
0 | 33 { |
117 | 34 return interpretAssignCommon(istate, &Or); |
0 | 35 } |
36 | |
72 | 37 override void buildArrayIdent(OutBuffer buf, Expressions arguments) |
0 | 38 { |
123 | 39 AssignExp_buildArrayIdent(buf, arguments, "Or"); |
0 | 40 } |
41 | |
130
60bb0fe4563e
dmdfe 2.037 first main iteration
Eldar Insafutdinov <e.insafutdinov@gmail.com>
parents:
123
diff
changeset
|
42 override Expression buildArrayLoop(Parameters fparams) |
0 | 43 { |
123 | 44 return AssignExp_buildArrayLoop!(typeof(this))(fparams); |
0 | 45 } |
46 | |
72 | 47 override Identifier opId() /* For operator overloading */ |
0 | 48 { |
49 return Id.orass; | |
50 } | |
51 | |
72 | 52 override elem* toElem(IRState* irs) |
0 | 53 { |
54 return toElemBin(irs, OPorass); | |
55 } | |
72 | 56 } |