Mercurial > projects > ddmd
diff dmd/SwitchStatement.d @ 2:7427ded8caf7
Removed unreferenced modules
First step at fixing GC issues - now calling GC.malloc instead of malloc (ditto calloc and realloc), get rid of free
author | korDen |
---|---|
date | Sun, 25 Oct 2009 03:20:59 +0300 |
parents | 10317f0c89a5 |
children | d706d958e4e8 |
line wrap: on
line diff
--- a/dmd/SwitchStatement.d Sat Oct 24 17:25:59 2009 +0400 +++ b/dmd/SwitchStatement.d Sun Oct 25 03:20:59 2009 +0300 @@ -47,6 +47,8 @@ import dmd.backend.RTLSYM; import dmd.backend.targ_types; +import dmd.Memory; + class SwitchStatement : Statement { Expression condition; @@ -406,7 +408,7 @@ block_appendexp(mystate.switchBlock, econd); block_next(blx,BCswitch,null); - targ_llong* pu = cast(targ_llong*) malloc(targ_llong.sizeof * (numcases + 1)); + targ_llong* pu = cast(targ_llong*) GC.malloc(targ_llong.sizeof * (numcases + 1)); mystate.switchBlock.Bswitch = pu; /* First pair is the number of cases, and the default block */