Mercurial > projects > ldc
comparison dmd/template.c @ 139:0ab29b838084 trunk
[svn r143] Fixed: a few bugs in debug information, still only line info, but should be correct files now :)
Fixed: tango.io.Console seems to be working now.
author | lindquist |
---|---|
date | Tue, 22 Jan 2008 00:01:16 +0100 |
parents | a7dfa0ed966c |
children | 5acec6b2eef8 |
comparison
equal
deleted
inserted
replaced
138:aeddd4d533b3 | 139:0ab29b838084 |
---|---|
1 | 1 |
2 // Compiler implementation of the D programming language | 2 // Compiler implementation of the D programming language |
3 // Copyright (c) 1999-2007 by Digital Mars | 3 // Copyright (c) 1999-2008 by Digital Mars |
4 // All Rights Reserved | 4 // All Rights Reserved |
5 // written by Walter Bright | 5 // written by Walter Bright |
6 // http://www.digitalmars.com | 6 // http://www.digitalmars.com |
7 // License for redistribution is by either the Artistic License | 7 // License for redistribution is by either the Artistic License |
8 // in artistic.txt, or the GNU General Public License in gnu.txt. | 8 // in artistic.txt, or the GNU General Public License in gnu.txt. |
1538 } | 1538 } |
1539 } | 1539 } |
1540 else if (tempinst->tempdecl != tp->tempinst->tempdecl) | 1540 else if (tempinst->tempdecl != tp->tempinst->tempdecl) |
1541 goto Lnomatch; | 1541 goto Lnomatch; |
1542 | 1542 |
1543 if (tempinst->tiargs->dim != tp->tempinst->tiargs->dim) | |
1544 goto Lnomatch; | |
1545 | |
1543 for (int i = 0; i < tempinst->tiargs->dim; i++) | 1546 for (int i = 0; i < tempinst->tiargs->dim; i++) |
1544 { | 1547 { |
1545 //printf("test: [%d]\n", i); | 1548 //printf("test: [%d]\n", i); |
1546 Object *o1 = (Object *)tempinst->tiargs->data[i]; | 1549 Object *o1 = (Object *)tempinst->tiargs->data[i]; |
1547 Object *o2 = (Object *)tp->tempinst->tiargs->data[i]; | 1550 Object *o2 = (Object *)tp->tempinst->tiargs->data[i]; |
3006 } | 3009 } |
3007 assert(ea); | 3010 assert(ea); |
3008 ea = ea->semantic(sc); | 3011 ea = ea->semantic(sc); |
3009 ea = ea->optimize(WANTvalue | WANTinterpret); | 3012 ea = ea->optimize(WANTvalue | WANTinterpret); |
3010 tiargs->data[j] = ea; | 3013 tiargs->data[j] = ea; |
3014 if (ea->op == TOKtype) | |
3015 tiargs->data[j] = ea->type; | |
3011 } | 3016 } |
3012 else if (sa) | 3017 else if (sa) |
3013 { | 3018 { |
3014 } | 3019 } |
3015 else | 3020 else |
3290 else if (sa) | 3295 else if (sa) |
3291 { | 3296 { |
3292 Lsa: | 3297 Lsa: |
3293 Declaration *d = sa->isDeclaration(); | 3298 Declaration *d = sa->isDeclaration(); |
3294 if (d && !d->isDataseg() && | 3299 if (d && !d->isDataseg() && |
3300 #if V2 | |
3301 !(d->storage_class & STCmanifest) && | |
3302 #endif | |
3295 (!d->isFuncDeclaration() || d->isFuncDeclaration()->isNested()) && | 3303 (!d->isFuncDeclaration() || d->isFuncDeclaration()->isNested()) && |
3296 !isTemplateMixin()) | 3304 !isTemplateMixin()) |
3297 { | 3305 { |
3298 // if module level template | 3306 // if module level template |
3299 if (tempdecl->toParent()->isModule()) | 3307 if (tempdecl->toParent()->isModule()) |