changeset 1524:b265fb6ce15b

Merge.
author Robert Clipsham <robert@octarineparrot.com>
date Mon, 06 Jul 2009 23:56:11 +0100
parents 833337c65fd3 (diff) 6766485fb584 (current diff)
children d28cd7c45267
files gen/main.cpp gen/runtime.cpp
diffstat 3 files changed, 20 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/dmd2/expression.c	Fri Jul 03 18:49:42 2009 +0200
+++ b/dmd2/expression.c	Mon Jul 06 23:56:11 2009 +0100
@@ -8746,8 +8746,11 @@
     typeCombine(sc);
     e1->checkIntegral();
     e2 = e2->checkIntegral();
-    //e2 = e2->castTo(sc, Type::tshiftcnt);
-    e2 = e2->castTo(sc, e1->type); // LDC
+#if IN_DMD
+    e2 = e2->castTo(sc, Type::tshiftcnt);
+#elif IN_LLVM
+    e2 = e2->castTo(sc, e1->type);
+#endif
     return this;
 }
 
@@ -8775,8 +8778,11 @@
     typeCombine(sc);
     e1->checkIntegral();
     e2 = e2->checkIntegral();
-    //e2 = e2->castTo(sc, Type::tshiftcnt);
-    e2 = e2->castTo(sc, e1->type); // LDC
+#if IN_DMD
+    e2 = e2->castTo(sc, Type::tshiftcnt);
+#elif IN_LLVM
+    e2 = e2->castTo(sc, e1->type);
+#endif
     return this;
 }
 
@@ -9343,7 +9349,8 @@
 	e1 = e1->checkIntegral();
 	e2 = e2->checkIntegral();
 	e1 = e1->integralPromotions(sc);
-	e2 = e2->castTo(sc, Type::tshiftcnt);
+	//e2 = e2->castTo(sc, Type::tshiftcnt);
+    e2 = e2->castTo(sc, e1->type); // LDC
 	type = e1->type;
     }
     return this;
@@ -9367,7 +9374,8 @@
 	e1 = e1->checkIntegral();
 	e2 = e2->checkIntegral();
 	e1 = e1->integralPromotions(sc);
-	e2 = e2->castTo(sc, Type::tshiftcnt);
+	//e2 = e2->castTo(sc, Type::tshiftcnt);
+    e2 = e2->castTo(sc, e1->type); // LDC
 	type = e1->type;
     }
     return this;
--- a/gen/main.cpp	Fri Jul 03 18:49:42 2009 +0200
+++ b/gen/main.cpp	Mon Jul 06 23:56:11 2009 +0100
@@ -318,12 +318,14 @@
     }
     else if (!noDefaultLib)
     {
+#if !DMDV2
         global.params.linkswitches->push(mem.strdup("-lldc-runtime"));
         global.params.linkswitches->push(mem.strdup("-ltango-cc-tango"));
         global.params.linkswitches->push(mem.strdup("-ltango-gc-basic"));
         // pass the runtime again to resolve issues
         // with linking order
         global.params.linkswitches->push(mem.strdup("-lldc-runtime"));
+#endif
     }
 
     if (global.params.run)
--- a/gen/runtime.cpp	Fri Jul 03 18:49:42 2009 +0200
+++ b/gen/runtime.cpp	Mon Jul 06 23:56:11 2009 +0100
@@ -336,7 +336,11 @@
 
     // Object _d_allocclass(ClassInfo ci)
     {
+#if DMDV2
+        std::string fname("_d_newclass");
+#else
         std::string fname("_d_allocclass");
+#endif
         std::vector<const LLType*> types;
         types.push_back(classInfoTy);
         const llvm::FunctionType* fty = llvm::FunctionType::get(voidPtrTy, types, false);