Mercurial > projects > ldc
comparison gen/arrays.cpp @ 291:068cb3c60afb trunk
[svn r312] Changed assert codegen to insert an unreachable terminator after the call to the assert function, which currently calls abort().
Changed array comparison runtime support to pass the array typeinfo instead of the element typeinfo. This allows a cleaner and faster implementation.
author | lindquist |
---|---|
date | Sat, 21 Jun 2008 21:16:26 +0200 |
parents | 00eb2c967c3a |
children | ebfa488f4abc |
comparison
equal
deleted
inserted
replaced
290:ebaf65fc4726 | 291:068cb3c60afb |
---|---|
780 Logger::cout() << *lmem << '\n'; | 780 Logger::cout() << *lmem << '\n'; |
781 Logger::cout() << *rmem << '\n'; | 781 Logger::cout() << *rmem << '\n'; |
782 args.push_back(DtoBitCast(lmem,pt)); | 782 args.push_back(DtoBitCast(lmem,pt)); |
783 args.push_back(DtoBitCast(rmem,pt)); | 783 args.push_back(DtoBitCast(rmem,pt)); |
784 | 784 |
785 // pass element typeinfo ? | 785 // pass array typeinfo ? |
786 if (useti) { | 786 if (useti) { |
787 Type* t = DtoDType(l->getType())->next; | 787 Type* t = l->getType(); |
788 LLValue* tival = DtoTypeInfoOf(t); | 788 LLValue* tival = DtoTypeInfoOf(t); |
789 // DtoTypeInfoOf only does declare, not enough in this case :/ | 789 // DtoTypeInfoOf only does declare, not enough in this case :/ |
790 DtoForceConstInitDsymbol(t->vtinfo); | 790 DtoForceConstInitDsymbol(t->vtinfo); |
791 Logger::cout() << "typeinfo decl: " << *tival << '\n'; | 791 Logger::cout() << "typeinfo decl: " << *tival << '\n'; |
792 | 792 |