compiler: Compiler fixes for 64 bit
authorJerome St-Louis <jerome@ecere.com>
Fri, 8 Feb 2013 19:20:33 +0000 (14:20 -0500)
committerJerome St-Louis <jerome@ecere.com>
Sat, 16 Feb 2013 06:03:01 +0000 (01:03 -0500)
- Casting terminating null to pointer for ellipsis
- Class property now using int64 type

compiler/libec/src/pass1.ec
compiler/libec/src/pass15.ec
compiler/libec/src/pass2.ec

index e7d334b..59a19e4 100644 (file)
@@ -1677,7 +1677,7 @@ static void ProcessClass(ClassType classType, OldList definitions, Symbol symbol
                   OldList * args = MkList();
                   ListAdd(args, MkExpIdentifier(MkIdentifier("class")));
                   ListAdd(args, MkExpString(QMkString(def.id.string)));
-                  ListAdd(args, MkExpCast(MkTypeName(MkListOne(MkSpecifier(INT)), null), def.initializer.exp));
+                  ListAdd(args, MkExpCast(MkTypeName(MkListOne(MkSpecifier(INT64)), null), def.initializer.exp));
 
                   def.initializer.exp = null;
 
index 78b56e4..d48d30e 100644 (file)
@@ -12185,6 +12185,7 @@ void ComputeDataTypes()
    DeclareFunctionUtil("eSystem_New0");
    DeclareFunctionUtil("eSystem_Renew");
    DeclareFunctionUtil("eSystem_Renew0");
+   DeclareFunctionUtil("eClass_GetProperty");
 
    DeclareStruct("ecere::com::Class", false);
    DeclareStruct("ecere::com::Instance", false);
index e1e20c1..cd73a64 100644 (file)
@@ -710,7 +710,7 @@ static void ProcessExpression(Expression exp)
                               exp.call.arguments = MkList();
                               ListAdd(exp.call.arguments, classExp);
                               ListAdd(exp.call.arguments, MkExpString(QMkString(id.string)));
-                              ListAdd(exp.call.arguments, MkExpCast(MkTypeName(MkListOne(MkSpecifier(INT)), null), value));
+                              ListAdd(exp.call.arguments, MkExpCast(MkTypeName(MkListOne(MkSpecifier(INT64)), null), value));
 
                               FreeIdentifier(id);
 
@@ -2163,7 +2163,7 @@ static void ProcessExpression(Expression exp)
                   (exp.call.exp.expType && exp.call.exp.expType.kind == functionType && exp.call.exp.expType.params.last && 
                    ((Type)exp.call.exp.expType.params.last).kind == ellipsisType))
                {
-                  exp.call.arguments->Insert(exp.call.arguments->last, MkExpConstant("0"));
+                  exp.call.arguments->Insert(exp.call.arguments->last, MkExpCast(MkTypeName(MkListOne(MkSpecifier(VOID)), MkDeclaratorPointer(MkPointer(null, null),null)),MkExpConstant("0")));
                }
             }
          }