Mercurial > projects > ldc
comparison dmd/expression.c @ 42:0b9b286b67b6 trunk
[svn r46] fix for shift operations
added a simple opengl binding in demos
author | lindquist |
---|---|
date | Fri, 19 Oct 2007 15:16:11 +0200 |
parents | 3cfcb944304e |
children | a9d29e9f1fed |
comparison
equal
deleted
inserted
replaced
41:835320b88ad6 | 42:0b9b286b67b6 |
---|---|
7410 e1->checkNoBool(); | 7410 e1->checkNoBool(); |
7411 type = e1->type; | 7411 type = e1->type; |
7412 typeCombine(sc); | 7412 typeCombine(sc); |
7413 e1->checkIntegral(); | 7413 e1->checkIntegral(); |
7414 e2 = e2->checkIntegral(); | 7414 e2 = e2->checkIntegral(); |
7415 e2 = e2->castTo(sc, Type::tshiftcnt); | 7415 //e2 = e2->castTo(sc, Type::tshiftcnt); |
7416 e2 = e2->castTo(sc, e1->type); // LLVMDC | |
7416 return this; | 7417 return this; |
7417 } | 7418 } |
7418 | 7419 |
7419 /************************************************************/ | 7420 /************************************************************/ |
7420 | 7421 |
7438 e1->checkNoBool(); | 7439 e1->checkNoBool(); |
7439 type = e1->type; | 7440 type = e1->type; |
7440 typeCombine(sc); | 7441 typeCombine(sc); |
7441 e1->checkIntegral(); | 7442 e1->checkIntegral(); |
7442 e2 = e2->checkIntegral(); | 7443 e2 = e2->checkIntegral(); |
7443 e2 = e2->castTo(sc, Type::tshiftcnt); | 7444 //e2 = e2->castTo(sc, Type::tshiftcnt); |
7445 e2 = e2->castTo(sc, e1->type); // LLVMDC | |
7444 return this; | 7446 return this; |
7445 } | 7447 } |
7446 | 7448 |
7447 /************************************************************/ | 7449 /************************************************************/ |
7448 | 7450 |
7466 e1->checkNoBool(); | 7468 e1->checkNoBool(); |
7467 type = e1->type; | 7469 type = e1->type; |
7468 typeCombine(sc); | 7470 typeCombine(sc); |
7469 e1->checkIntegral(); | 7471 e1->checkIntegral(); |
7470 e2 = e2->checkIntegral(); | 7472 e2 = e2->checkIntegral(); |
7471 e2 = e2->castTo(sc, Type::tshiftcnt); | 7473 //e2 = e2->castTo(sc, Type::tshiftcnt); |
7474 e2 = e2->castTo(sc, e1->type); // LLVMDC | |
7472 return this; | 7475 return this; |
7473 } | 7476 } |
7474 | 7477 |
7475 /************************************************************/ | 7478 /************************************************************/ |
7476 | 7479 |
7939 if (e) | 7942 if (e) |
7940 return e; | 7943 return e; |
7941 e1 = e1->checkIntegral(); | 7944 e1 = e1->checkIntegral(); |
7942 e2 = e2->checkIntegral(); | 7945 e2 = e2->checkIntegral(); |
7943 e1 = e1->integralPromotions(sc); | 7946 e1 = e1->integralPromotions(sc); |
7944 e2 = e2->castTo(sc, Type::tshiftcnt); | 7947 //e2 = e2->castTo(sc, Type::tshiftcnt); |
7948 e2 = e2->castTo(sc, e1->type); // LLVMDC | |
7945 type = e1->type; | 7949 type = e1->type; |
7946 } | 7950 } |
7947 return this; | 7951 return this; |
7948 } | 7952 } |
7949 | 7953 |
7963 if (e) | 7967 if (e) |
7964 return e; | 7968 return e; |
7965 e1 = e1->checkIntegral(); | 7969 e1 = e1->checkIntegral(); |
7966 e2 = e2->checkIntegral(); | 7970 e2 = e2->checkIntegral(); |
7967 e1 = e1->integralPromotions(sc); | 7971 e1 = e1->integralPromotions(sc); |
7968 e2 = e2->castTo(sc, Type::tshiftcnt); | 7972 //e2 = e2->castTo(sc, Type::tshiftcnt); |
7973 e2 = e2->castTo(sc, e1->type); // LLVMDC | |
7969 type = e1->type; | 7974 type = e1->type; |
7970 } | 7975 } |
7971 return this; | 7976 return this; |
7972 } | 7977 } |
7973 | 7978 |
7987 if (e) | 7992 if (e) |
7988 return e; | 7993 return e; |
7989 e1 = e1->checkIntegral(); | 7994 e1 = e1->checkIntegral(); |
7990 e2 = e2->checkIntegral(); | 7995 e2 = e2->checkIntegral(); |
7991 e1 = e1->integralPromotions(sc); | 7996 e1 = e1->integralPromotions(sc); |
7992 e2 = e2->castTo(sc, Type::tshiftcnt); | 7997 //e2 = e2->castTo(sc, Type::tshiftcnt); |
7998 e2 = e2->castTo(sc, e1->type); // LLVMDC | |
7993 type = e1->type; | 7999 type = e1->type; |
7994 } | 8000 } |
7995 return this; | 8001 return this; |
7996 } | 8002 } |
7997 | 8003 |