浏览代码

* defutil.pas: added UnicodeString to automatable types, fixes compilation of webtbs/tw2649.pp after r16360. However it requires RTL support similar to one for AnsiString to be complete.
* ncal.pas, translate_disp_call(): fixed parameter alignment once more, this time it should be correct for both 32 and 64 bit platforms.

git-svn-id: trunk@16394 -

sergei 14 年之前
父节点
当前提交
b4ac714201
共有 2 个文件被更改,包括 4 次插入4 次删除
  1. 1 1
      compiler/defutil.pas
  2. 3 3
      compiler/ncal.pas

+ 1 - 1
compiler/defutil.pas

@@ -1047,7 +1047,7 @@ implementation
           floatdef:
           floatdef:
             result:=tfloatdef(p).floattype in [s64currency,s64real,s32real];
             result:=tfloatdef(p).floattype in [s64currency,s64real,s32real];
           stringdef:
           stringdef:
-            result:=tstringdef(p).stringtype in [st_ansistring,st_widestring];
+            result:=tstringdef(p).stringtype in [st_ansistring,st_widestring,st_unicodestring];
           variantdef:
           variantdef:
             result:=true;
             result:=true;
           objectdef:
           objectdef:

+ 3 - 3
compiler/ncal.pas

@@ -400,7 +400,7 @@ implementation
 
 
             { we've to know the parameter size to allocate the temp. space }
             { we've to know the parameter size to allocate the temp. space }
             is_byref_para(assignmenttype);
             is_byref_para(assignmenttype);
-            inc(paramssize, assignmenttype.size);
+            inc(paramssize,max(voidpointertype.size,assignmenttype.size));
 
 
             para:=tcallparanode(para.nextpara);
             para:=tcallparanode(para.nextpara);
           end;
           end;
@@ -454,7 +454,7 @@ implementation
               restype:=restype or $80;
               restype:=restype or $80;
 
 
             { assign the argument/parameter to the temporary location }
             { assign the argument/parameter to the temporary location }
-            { we always pass Variants by reference, RTL helpers must handle it
+            { for Variants, we always pass a pointer, RTL helpers must handle it
               depending on byref bit }
               depending on byref bit }
 
 
             if assignmenttype=voidpointertype then
             if assignmenttype=voidpointertype then
@@ -474,7 +474,7 @@ implementation
                 )),assignmenttype),
                 )),assignmenttype),
                 ctypeconvnode.create_internal(para.left,assignmenttype)));
                 ctypeconvnode.create_internal(para.left,assignmenttype)));
 
 
-            inc(paramssize,assignmenttype.size);
+            inc(paramssize,max(voidpointertype.size,assignmenttype.size));
             calldescnode.appendbyte(restype);
             calldescnode.appendbyte(restype);
 
 
             para.left:=nil;
             para.left:=nil;