Mercurial > projects > ldc
comparison dmd/expression.c @ 723:55f6c2e454d7
Implemented correct parameter order according to x86-32 ABI documentation.
Changed AA types to just a void* .
author | Tomas Lindquist Olsen <tomas.l.olsen@gmail.com> |
---|---|
date | Sat, 25 Oct 2008 06:03:28 +0200 |
parents | a26b0c5d5942 |
children | ef7fe998f9b3 |
comparison
equal
deleted
inserted
replaced
722:bd56056a581f | 723:55f6c2e454d7 |
---|---|
682 | 682 |
683 //if (arg->op == TOKslice) | 683 //if (arg->op == TOKslice) |
684 //arg->error("cannot modify slice %s", arg->toChars()); | 684 //arg->error("cannot modify slice %s", arg->toChars()); |
685 } | 685 } |
686 | 686 |
687 // LDC we don't want this! | |
688 #if !IN_LLVM | |
687 // Convert static arrays to pointers | 689 // Convert static arrays to pointers |
688 tb = arg->type->toBasetype(); | 690 tb = arg->type->toBasetype(); |
689 if (tb->ty == Tsarray) | 691 if (tb->ty == Tsarray) |
690 { | 692 { |
691 arg = arg->checkToPointer(); | 693 arg = arg->checkToPointer(); |
692 } | 694 } |
695 #endif | |
696 | |
693 | 697 |
694 // Convert lazy argument to a delegate | 698 // Convert lazy argument to a delegate |
695 if (p->storageClass & STClazy) | 699 if (p->storageClass & STClazy) |
696 { | 700 { |
697 arg = arg->toDelegate(sc, p->type); | 701 arg = arg->toDelegate(sc, p->type); |
699 } | 703 } |
700 else | 704 else |
701 { | 705 { |
702 | 706 |
703 // If not D linkage, do promotions | 707 // If not D linkage, do promotions |
704 if (tf->linkage != LINKd) | 708 // LDC: don't do promotions on intrinsics |
709 if (tf->linkage != LINKd && tf->linkage != LINKintrinsic) | |
705 { | 710 { |
706 // Promote bytes, words, etc., to ints | 711 // Promote bytes, words, etc., to ints |
707 arg = arg->integralPromotions(sc); | 712 arg = arg->integralPromotions(sc); |
708 | 713 |
709 // Promote floats to doubles | 714 // Promote floats to doubles |