comparison gen/asmstmt.cpp @ 1141:f99a3b393c03

Reorganize EnclosingHandlers to require less changes to the frontend and allow us to implement the synchronized storage class for functions.
author Christian Kamm <kamm incasoftware de>
date Tue, 24 Mar 2009 21:18:18 +0100
parents b30fe7e1dbb9
children 7d28dcbff23e
comparison
equal deleted inserted replaced
1137:45d73f0a9b43 1141:f99a3b393c03
442 ////////////////////////////////////////////////////////////////////////////// 442 //////////////////////////////////////////////////////////////////////////////
443 443
444 AsmBlockStatement::AsmBlockStatement(Loc loc, Statements* s) 444 AsmBlockStatement::AsmBlockStatement(Loc loc, Statements* s)
445 : CompoundStatement(loc, s) 445 : CompoundStatement(loc, s)
446 { 446 {
447 enclosinghandler = NULL; 447 enclosingFinally = NULL;
448 tf = NULL; 448 enclosingScopeExit = NULL;
449 449
450 abiret = NULL; 450 abiret = NULL;
451 } 451 }
452 452
453 // rewrite argument indices to the block scope indices 453 // rewrite argument indices to the block scope indices
770 { 770 {
771 llvm::BasicBlock* casebb = llvm::BasicBlock::Create("case", p->topfunc(), bb); 771 llvm::BasicBlock* casebb = llvm::BasicBlock::Create("case", p->topfunc(), bb);
772 sw->addCase(llvm::ConstantInt::get(llvm::IntegerType::get(32), it->second), casebb); 772 sw->addCase(llvm::ConstantInt::get(llvm::IntegerType::get(32), it->second), casebb);
773 773
774 p->scope() = IRScope(casebb,bb); 774 p->scope() = IRScope(casebb,bb);
775 DtoGoto(&loc, it->first, enclosinghandler, tf); 775 DtoGoto(loc, it->first);
776 } 776 }
777 777
778 p->scope() = IRScope(bb,oldend); 778 p->scope() = IRScope(bb,oldend);
779 } 779 }
780 } 780 }
801 } 801 }
802 802
803 // necessary for in-asm branches 803 // necessary for in-asm branches
804 Statement *AsmBlockStatement::semantic(Scope *sc) 804 Statement *AsmBlockStatement::semantic(Scope *sc)
805 { 805 {
806 enclosinghandler = sc->tfOfTry; 806 enclosingFinally = sc->enclosingFinally;
807 tf = sc->tf; 807 enclosingScopeExit = sc->enclosingScopeExit;
808 808
809 return CompoundStatement::semantic(sc); 809 return CompoundStatement::semantic(sc);
810 } 810 }
811 811
812 ////////////////////////////////////////////////////////////////////////////// 812 //////////////////////////////////////////////////////////////////////////////