comparison dmd/statement.c @ 305:2b72433d5c8c trunk

[svn r326] Fixed a bunch of issues with printf's that MinGW32 did not support. Fixed problems with label collisions when using labels inside inline asm. LabelStatement is now easily reached given its Identifier, which should be useful elsewhere too. Enabled inline asm for building the lib/compiler/llvmdc runtime code, fixing branches out of asm makes this possible.
author lindquist
date Fri, 27 Jun 2008 22:04:35 +0200
parents 3ebc136702dd
children d59c363fccad
comparison
equal deleted inserted replaced
304:3ebc136702dd 305:2b72433d5c8c
3517 this->tf = NULL; 3517 this->tf = NULL;
3518 this->enclosingtryfinally = NULL; 3518 this->enclosingtryfinally = NULL;
3519 this->lblock = NULL; 3519 this->lblock = NULL;
3520 this->isReturnLabel = 0; 3520 this->isReturnLabel = 0;
3521 this->llvmBB = NULL; 3521 this->llvmBB = NULL;
3522 this->asmLabel = false;
3522 } 3523 }
3523 3524
3524 Statement *LabelStatement::syntaxCopy() 3525 Statement *LabelStatement::syntaxCopy()
3525 { 3526 {
3526 LabelStatement *s = new LabelStatement(loc, ident, statement->syntaxCopy()); 3527 LabelStatement *s = new LabelStatement(loc, ident, statement->syntaxCopy());
3544 sc->callSuper |= CSXlabel; 3545 sc->callSuper |= CSXlabel;
3545 sc->slabel = this; 3546 sc->slabel = this;
3546 if (statement) 3547 if (statement)
3547 statement = statement->semantic(sc); 3548 statement = statement->semantic(sc);
3548 sc->pop(); 3549 sc->pop();
3550
3551 // LLVMDC put in labmap
3552 fd->labmap[ident->toChars()] = this;
3553
3549 return this; 3554 return this;
3550 } 3555 }
3551 3556
3552 Statements *LabelStatement::flatten(Scope *sc) 3557 Statements *LabelStatement::flatten(Scope *sc)
3553 { 3558 {
3603 3608
3604 LabelDsymbol::LabelDsymbol(Identifier *ident) 3609 LabelDsymbol::LabelDsymbol(Identifier *ident)
3605 : Dsymbol(ident) 3610 : Dsymbol(ident)
3606 { 3611 {
3607 statement = NULL; 3612 statement = NULL;
3608 asmLabel = false;
3609 } 3613 }
3610 3614
3611 LabelDsymbol *LabelDsymbol::isLabel() // is this a LabelDsymbol()? 3615 LabelDsymbol *LabelDsymbol::isLabel() // is this a LabelDsymbol()?
3612 { 3616 {
3613 return this; 3617 return this;