comparison gen/toir.cpp @ 699:ed9a9e6dd1cc

Started changing target triple stuff, part of fixing #97
author Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
date Mon, 13 Oct 2008 17:28:39 +0200
parents 518b8cc84369
children 06576ece1a1b
comparison
equal deleted inserted replaced
698:f0ba5d37dd86 699:ed9a9e6dd1cc
469 DValue* newlen = e2->toElem(p); 469 DValue* newlen = e2->toElem(p);
470 DSliceValue* slice = DtoResizeDynArray(arrval.getType(), &arrval, newlen); 470 DSliceValue* slice = DtoResizeDynArray(arrval.getType(), &arrval, newlen);
471 DtoAssign(loc, &arrval, slice); 471 DtoAssign(loc, &arrval, slice);
472 return newlen; 472 return newlen;
473 } 473 }
474 else if (e1->op == TOKslice && !ismemset &&
475 (e2->op == TOKadd || e2->op == TOKmin ||
476 e2->op == TOKmul || e2->op == TOKdiv ||
477 e2->op == TOKmod || e2->op == TOKxor ||
478 e2->op == TOKand || e2->op == TOKor ||
479 e2->op == TOKtilde || e2->op == TOKneg))
480 {
481 assert(0 && "array op assignment is TODO");
482 }
474 483
475 Logger::println("performing normal assignment"); 484 Logger::println("performing normal assignment");
476 485
477 DValue* l = e1->toElem(p); 486 DValue* l = e1->toElem(p);
478 DValue* r = e2->toElem(p); 487 DValue* r = e2->toElem(p);
479 DtoAssign(loc, l, r); 488 DtoAssign(loc, l, r);
480 489
481 if (l->isSlice()) 490 if (l->isSlice())
482 return l; 491 return l;
483 492
484 #if 0
485 if (type->toBasetype()->ty == Tstruct && e2->type->isintegral())
486 {
487 // handle struct = 0;
488 return l;
489 }
490 else
491 {
492 return r;
493 }
494 #else
495 return r; 493 return r;
496 #endif
497 } 494 }
498 495
499 ////////////////////////////////////////////////////////////////////////////////////////// 496 //////////////////////////////////////////////////////////////////////////////////////////
500 497
501 DValue* AddExp::toElem(IRState* p) 498 DValue* AddExp::toElem(IRState* p)