Mercurial > projects > ldc
comparison dmd/expression.c @ 82:d8dd47ef3973 trunk
[svn r86] Changed the way arguments are given storage. It is now detected if they will need it during semantic passes.
Initial support for debug information. Very limited, but MUCH better than nothing :)
author | lindquist |
---|---|
date | Fri, 02 Nov 2007 01:17:26 +0100 |
parents | a9d29e9f1fed |
children | 70d6113eeb8c |
comparison
equal
deleted
inserted
replaced
81:3587401b6eeb | 82:d8dd47ef3973 |
---|---|
3443 //var->semantic(sc); | 3443 //var->semantic(sc); |
3444 if (!type) | 3444 if (!type) |
3445 type = var->type->pointerTo(); | 3445 type = var->type->pointerTo(); |
3446 VarDeclaration *v = var->isVarDeclaration(); | 3446 VarDeclaration *v = var->isVarDeclaration(); |
3447 if (v) | 3447 if (v) |
3448 v->checkNestedReference(sc, loc); | 3448 { |
3449 v->checkNestedReference(sc, loc); | |
3450 v->llvmNeedsStorage = true; | |
3451 } | |
3449 return this; | 3452 return this; |
3450 } | 3453 } |
3451 | 3454 |
3452 int SymOffExp::isBool(int result) | 3455 int SymOffExp::isBool(int result) |
3453 { | 3456 { |
3587 | 3590 |
3588 VarDeclaration *v = var->isVarDeclaration(); | 3591 VarDeclaration *v = var->isVarDeclaration(); |
3589 if (v && v->canassign == 0 && | 3592 if (v && v->canassign == 0 && |
3590 (var->isConst() || (global.params.Dversion > 1 && var->isFinal()))) | 3593 (var->isConst() || (global.params.Dversion > 1 && var->isFinal()))) |
3591 error("cannot modify final variable '%s'", var->toChars()); | 3594 error("cannot modify final variable '%s'", var->toChars()); |
3595 v->llvmNeedsStorage = true; | |
3592 | 3596 |
3593 if (var->isCtorinit()) | 3597 if (var->isCtorinit()) |
3594 { // It's only modifiable if inside the right constructor | 3598 { // It's only modifiable if inside the right constructor |
3595 Dsymbol *s = sc->func; | 3599 Dsymbol *s = sc->func; |
3596 while (1) | 3600 while (1) |