diff ast/Exp.d @ 96:438e6ed4cda1 new_gen

Now D-Mangling the function types. Still need to mangle "scopes" - by that i mean structs, classes and modules.
author Anders Johnsen <skabet@gmail.com>
date Tue, 06 May 2008 18:51:08 +0200
parents 621cedba53ea
children 7f9240d4ddc1
line wrap: on
line diff
--- a/ast/Exp.d	Tue May 06 17:01:00 2008 +0200
+++ b/ast/Exp.d	Tue May 06 18:51:08 2008 +0200
@@ -505,6 +505,16 @@
     {
         return name;
     }
+    
+    char[] getMangled()
+    {
+        DType t = type;
+
+        if(name == "main")
+            return "_Dmain";
+
+        return "_D"~name~t.mangle;
+    }
 
     hash_t toHash()
     {