Mercurial > projects > ddmd
annotate dmd/ModAssignExp.d @ 192:eb38fdcb3e62 default tip
updated to compile with dmd2.062
author | korDen |
---|---|
date | Sat, 02 Mar 2013 01:25:52 -0800 |
parents | b0d41ff5e0df |
children |
rev | line source |
---|---|
0 | 1 module dmd.ModAssignExp; |
2 | |
114 | 3 import dmd.common; |
117 | 4 import dmd.expression.Mod; |
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; | |
67 | 15 import dmd.backend.OPER; |
56 | 16 import dmd.Id; |
0 | 17 |
18 import dmd.backend.elem; | |
19 | |
187
b0d41ff5e0df
Added expandability scheme outlined in http://www.dsource.org/forums/viewtopic.php?t=5659&sid=6f2150ff5b0bffcd47512a6a7608d218
Abscissa
parents:
178
diff
changeset
|
20 import dmd.DDMDExtensions; |
b0d41ff5e0df
Added expandability scheme outlined in http://www.dsource.org/forums/viewtopic.php?t=5659&sid=6f2150ff5b0bffcd47512a6a7608d218
Abscissa
parents:
178
diff
changeset
|
21 |
0 | 22 class ModAssignExp : BinExp |
23 { | |
187
b0d41ff5e0df
Added expandability scheme outlined in http://www.dsource.org/forums/viewtopic.php?t=5659&sid=6f2150ff5b0bffcd47512a6a7608d218
Abscissa
parents:
178
diff
changeset
|
24 mixin insertMemberExtension!(typeof(this)); |
b0d41ff5e0df
Added expandability scheme outlined in http://www.dsource.org/forums/viewtopic.php?t=5659&sid=6f2150ff5b0bffcd47512a6a7608d218
Abscissa
parents:
178
diff
changeset
|
25 |
0 | 26 this(Loc loc, Expression e1, Expression e2) |
27 { | |
178 | 28 register(); |
19
01cadcfa4842
Implemented CompileExp, ConditionalDeclaration, ModAssignExp, parsingmixin statements, TemplateAliasParameters, TemplateMixins, TypeDArray.
Robert Clipsham <robert@octarineparrot.com>
parents:
0
diff
changeset
|
29 super(loc, TOK.TOKmodass, this.sizeof, e1, e2); |
0 | 30 } |
31 | |
72 | 32 override Expression semantic(Scope sc) |
0 | 33 { |
73 | 34 BinExp.semantic(sc); |
35 checkComplexMulAssign(); | |
36 return commonSemanticAssign(sc); | |
0 | 37 } |
38 | |
72 | 39 override Expression interpret(InterState istate) |
0 | 40 { |
117 | 41 return interpretAssignCommon(istate, &Mod); |
0 | 42 } |
43 | |
72 | 44 override void buildArrayIdent(OutBuffer buf, Expressions arguments) |
0 | 45 { |
123 | 46 AssignExp_buildArrayIdent(buf, arguments, "Mod"); |
0 | 47 } |
48 | |
130
60bb0fe4563e
dmdfe 2.037 first main iteration
Eldar Insafutdinov <e.insafutdinov@gmail.com>
parents:
123
diff
changeset
|
49 override Expression buildArrayLoop(Parameters fparams) |
0 | 50 { |
123 | 51 return AssignExp_buildArrayLoop!(typeof(this))(fparams); |
0 | 52 } |
53 | |
72 | 54 override Identifier opId() /* For operator overloading */ |
0 | 55 { |
56 | 56 return Id.modass; |
0 | 57 } |
58 | |
72 | 59 override elem* toElem(IRState* irs) |
0 | 60 { |
67 | 61 return toElemBin(irs,OPmodass); |
0 | 62 } |
19
01cadcfa4842
Implemented CompileExp, ConditionalDeclaration, ModAssignExp, parsingmixin statements, TemplateAliasParameters, TemplateMixins, TypeDArray.
Robert Clipsham <robert@octarineparrot.com>
parents:
0
diff
changeset
|
63 } |