Mercurial > projects > ddmd
annotate dmd/StaticAssertStatement.d @ 191:52188e7e3fb5
Fixed deprecated features, now compiles with DMD2.058
Also changed Array allocation policy:
Now doesn't reallocate but malloc's, followed by a memcpy (no free).
(this fixes a crash while compiling druntime. Same bug in dmd)
author | korDen@korDen-pc |
---|---|
date | Sun, 25 Mar 2012 03:11:12 +0400 |
parents | b0d41ff5e0df |
children |
rev | line source |
---|---|
0 | 1 module dmd.StaticAssertStatement; |
2 | |
114 | 3 import dmd.common; |
0 | 4 import dmd.Statement; |
5 import dmd.StaticAssert; | |
6 import dmd.OutBuffer; | |
79 | 7 import dmd.BE; |
0 | 8 import dmd.HdrGenState; |
9 import dmd.Scope; | |
10 import dmd.Loc; | |
11 | |
187
b0d41ff5e0df
Added expandability scheme outlined in http://www.dsource.org/forums/viewtopic.php?t=5659&sid=6f2150ff5b0bffcd47512a6a7608d218
Abscissa
parents:
178
diff
changeset
|
12 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
|
13 |
0 | 14 class StaticAssertStatement : Statement |
15 { | |
187
b0d41ff5e0df
Added expandability scheme outlined in http://www.dsource.org/forums/viewtopic.php?t=5659&sid=6f2150ff5b0bffcd47512a6a7608d218
Abscissa
parents:
178
diff
changeset
|
16 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
|
17 |
0 | 18 StaticAssert sa; |
19 | |
20 this(StaticAssert sa) | |
21 { | |
178 | 22 register(); |
0 | 23 super(sa.loc); |
24 this.sa = sa; | |
25 } | |
26 | |
72 | 27 override Statement syntaxCopy() |
0 | 28 { |
51 | 29 StaticAssertStatement s = new StaticAssertStatement(cast(StaticAssert)sa.syntaxCopy(null)); |
30 return s; | |
0 | 31 } |
32 | |
72 | 33 override Statement semantic(Scope sc) |
0 | 34 { |
35 sa.semantic2(sc); | |
36 return null; | |
37 } | |
38 | |
79 | 39 override BE blockExit() |
40 { | |
41 return BE.BEfallthru; | |
42 } | |
43 | |
72 | 44 override void toCBuffer(OutBuffer buf, HdrGenState* hgs) |
0 | 45 { |
46 assert(false); | |
47 } | |
72 | 48 } |