浏览代码

* test for previous commit
* fixed wrapper generation for bigger offsets as well

git-svn-id: trunk@11059 -

florian 17 年之前
父节点
当前提交
67ef9f20ae
共有 3 个文件被更改,包括 24 次插入0 次删除
  1. 1 0
      .gitattributes
  2. 8 0
      compiler/arm/cgcpu.pas
  3. 15 0
      tests/webtbs/tw10831.pp

+ 1 - 0
.gitattributes

@@ -8238,6 +8238,7 @@ tests/webtbs/tw10807.pp svneol=native#text/plain
 tests/webtbs/tw1081.pp svneol=native#text/plain
 tests/webtbs/tw1081.pp svneol=native#text/plain
 tests/webtbs/tw10815.pp svneol=native#text/plain
 tests/webtbs/tw10815.pp svneol=native#text/plain
 tests/webtbs/tw10825.pp svneol=native#text/plain
 tests/webtbs/tw10825.pp svneol=native#text/plain
+tests/webtbs/tw10831.pp svneol=native#text/plain
 tests/webtbs/tw10833.pp svneol=native#text/plain
 tests/webtbs/tw10833.pp svneol=native#text/plain
 tests/webtbs/tw10863.pp svneol=native#text/plain
 tests/webtbs/tw10863.pp svneol=native#text/plain
 tests/webtbs/tw10890.pp svneol=native#text/plain
 tests/webtbs/tw10890.pp svneol=native#text/plain

+ 8 - 0
compiler/arm/cgcpu.pas

@@ -2009,6 +2009,10 @@ unit cgcpu;
         else
         else
           list.concat(Tai_symbol.Createname(labelname,AT_FUNCTION,0));
           list.concat(Tai_symbol.Createname(labelname,AT_FUNCTION,0));
 
 
+        { the wrapper might need aktlocaldata for the additional data to
+          load the constant }
+        current_procinfo:=cprocinfo.create(nil);
+
         { set param1 interface to self  }
         { set param1 interface to self  }
         g_adjust_self_value(list,procdef,ioffset);
         g_adjust_self_value(list,procdef,ioffset);
 
 
@@ -2021,6 +2025,10 @@ unit cgcpu;
         { case 0 }
         { case 0 }
         else
         else
           list.concat(taicpu.op_sym(A_B,current_asmdata.RefAsmSymbol(procdef.mangledname)));
           list.concat(taicpu.op_sym(A_B,current_asmdata.RefAsmSymbol(procdef.mangledname)));
+        list.concatlist(current_procinfo.aktlocaldata);
+
+        current_procinfo.Free;
+        current_procinfo:=nil;
 
 
         list.concat(Tai_symbol_end.Createname(labelname));
         list.concat(Tai_symbol_end.Createname(labelname));
       end;
       end;

+ 15 - 0
tests/webtbs/tw10831.pp

@@ -0,0 +1,15 @@
+program test;
+
+type
+  TForm = class(TInterfacedObject)
+    a : array[0..1000000] of byte;
+  end;
+
+  TMyForm = class(TForm, IInterface)
+  end;
+
+var
+  i : IInterface;
+begin
+  i:=TMyForm.Create;
+end.