Mercurial > projects > ddmd
annotate dmd/OverExp.d @ 178:e3afd1303184
Many small bugs fixed
Made all classes derive from TObject to detect memory leaks (functionality is disabled for now)
Began work on overriding backend memory allocations (to avoid memory leaks)
author | korDen |
---|---|
date | Sun, 17 Oct 2010 07:42:00 +0400 |
parents | e28b18c23469 |
children | b0d41ff5e0df |
rev | line source |
---|---|
72 | 1 module dmd.OverExp; |
2 | |
114 | 3 import dmd.common; |
72 | 4 import dmd.Expression; |
5 import dmd.OverloadSet; | |
6 import dmd.Scope; | |
7 import dmd.Loc; | |
8 import dmd.TOK; | |
9 import dmd.Type; | |
10 | |
108
6da99741178e
e2ir.c changes, mainly accounts for static arrays being value types now
Trass3r
parents:
72
diff
changeset
|
11 //! overload set |
6da99741178e
e2ir.c changes, mainly accounts for static arrays being value types now
Trass3r
parents:
72
diff
changeset
|
12 version(DMDV2) |
0 | 13 class OverExp : Expression |
14 { | |
15 OverloadSet vars; | |
16 | |
17 this(OverloadSet s) | |
18 { | |
178 | 19 register(); |
72 | 20 super(loc, TOKoverloadset, OverExp.sizeof); |
21 //printf("OverExp(this = %p, '%s')\n", this, var.toChars()); | |
22 vars = s; | |
63 | 23 type = Type.tvoid; |
0 | 24 } |
25 | |
72 | 26 override int isLvalue() |
0 | 27 { |
108
6da99741178e
e2ir.c changes, mainly accounts for static arrays being value types now
Trass3r
parents:
72
diff
changeset
|
28 return true; |
0 | 29 } |
30 | |
72 | 31 override Expression toLvalue(Scope sc, Expression e) |
0 | 32 { |
108
6da99741178e
e2ir.c changes, mainly accounts for static arrays being value types now
Trass3r
parents:
72
diff
changeset
|
33 return this; |
0 | 34 } |
35 } | |
36 |