comparison dmd/Catch.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 af724d3510d7
children b0d41ff5e0df
comparison
equal deleted inserted replaced
177:1475fd394c9e 178:e3afd1303184
13 import dmd.Util; 13 import dmd.Util;
14 import dmd.ScopeDsymbol; 14 import dmd.ScopeDsymbol;
15 import dmd.HdrGenState; 15 import dmd.HdrGenState;
16 import dmd.BE; 16 import dmd.BE;
17 17
18 class Catch 18 import dmd.TObject;
19
20 class Catch : TObject
19 { 21 {
20 Loc loc; 22 Loc loc;
21 Type type; 23 Type type;
22 Identifier ident; 24 Identifier ident;
23 VarDeclaration var = null; 25 VarDeclaration var = null;
24 Statement handler; 26 Statement handler;
25 27
26 this(Loc loc, Type t, Identifier id, Statement handler) 28 this(Loc loc, Type t, Identifier id, Statement handler)
27 { 29 {
30 register();
31
28 //printf("Catch(%s, loc = %s)\n", id.toChars(), loc.toChars()); 32 //printf("Catch(%s, loc = %s)\n", id.toChars(), loc.toChars());
29 this.loc = loc; 33 this.loc = loc;
30 this.type = t; 34 this.type = t;
31 this.ident = id; 35 this.ident = id;
32 this.handler = handler; 36 this.handler = handler;