浏览代码

* Generate exception filters data on i386-win32 and x86_64-win64 without using global labels.

git-svn-id: trunk@29512 -
sergei 10 年之前
父节点
当前提交
ed4e876f4f
共有 2 个文件被更改,包括 6 次插入10 次删除
  1. 3 5
      compiler/i386/n386flw.pas
  2. 3 5
      compiler/x86_64/nx64flw.pas

+ 3 - 5
compiler/i386/n386flw.pas

@@ -535,7 +535,7 @@ procedure ti386tryexceptnode.pass_generate_code;
     { start of scope }
     { start of scope }
     if assigned(right) then
     if assigned(right) then
       begin
       begin
-        current_asmdata.getdatalabel(filterlabel);
+        current_asmdata.getaddrlabel(filterlabel);
         emit_scope_start(
         emit_scope_start(
           current_asmdata.RefAsmSymbol('__FPC_on_handler'),
           current_asmdata.RefAsmSymbol('__FPC_on_handler'),
           filterlabel);
           filterlabel);
@@ -609,8 +609,7 @@ procedure ti386tryexceptnode.pass_generate_code;
           begin
           begin
             if hnode.nodetype<>onn then
             if hnode.nodetype<>onn then
               InternalError(2011103101);
               InternalError(2011103101);
-            { TODO: make it done without using global label }
-            current_asmdata.getglobaljumplabel(onlabel);
+            current_asmdata.getjumplabel(onlabel);
             hlist.concat(tai_const.create_sym(current_asmdata.RefAsmSymbol(tonnode(hnode).excepttype.vmt_mangledname,AT_DATA)));
             hlist.concat(tai_const.create_sym(current_asmdata.RefAsmSymbol(tonnode(hnode).excepttype.vmt_mangledname,AT_DATA)));
             hlist.concat(tai_const.create_sym(onlabel));
             hlist.concat(tai_const.create_sym(onlabel));
             cg.a_label(current_asmdata.CurrAsmList,onlabel);
             cg.a_label(current_asmdata.CurrAsmList,onlabel);
@@ -626,8 +625,7 @@ procedure ti386tryexceptnode.pass_generate_code;
             inc(onnodecount.value);
             inc(onnodecount.value);
           end;
           end;
         { now move filter table to permanent list all at once }
         { now move filter table to permanent list all at once }
-        maybe_new_object_file(current_asmdata.asmlists[al_typedconsts]);
-        current_asmdata.asmlists[al_typedconsts].concatlist(hlist);
+        current_procinfo.aktlocaldata.concatlist(hlist);
         hlist.free;
         hlist.free;
       end;
       end;
 
 

+ 3 - 5
compiler/x86_64/nx64flw.pas

@@ -448,7 +448,7 @@ procedure tx64tryexceptnode.pass_generate_code;
       begin
       begin
         { emit filter table to a temporary asmlist }
         { emit filter table to a temporary asmlist }
         hlist:=TAsmList.Create;
         hlist:=TAsmList.Create;
-        current_asmdata.getdatalabel(filterlabel);
+        current_asmdata.getaddrlabel(filterlabel);
         new_section(hlist,sec_rodata_norel,filterlabel.name,4);
         new_section(hlist,sec_rodata_norel,filterlabel.name,4);
         cg.a_label(hlist,filterlabel);
         cg.a_label(hlist,filterlabel);
         onnodecount:=tai_const.create_32bit(0);
         onnodecount:=tai_const.create_32bit(0);
@@ -459,8 +459,7 @@ procedure tx64tryexceptnode.pass_generate_code;
           begin
           begin
             if hnode.nodetype<>onn then
             if hnode.nodetype<>onn then
               InternalError(2011103101);
               InternalError(2011103101);
-            { TODO: make it done without using global label }
-            current_asmdata.getglobaljumplabel(onlabel);
+            current_asmdata.getjumplabel(onlabel);
             hlist.concat(tai_const.create_rva_sym(current_asmdata.RefAsmSymbol(tonnode(hnode).excepttype.vmt_mangledname,AT_DATA)));
             hlist.concat(tai_const.create_rva_sym(current_asmdata.RefAsmSymbol(tonnode(hnode).excepttype.vmt_mangledname,AT_DATA)));
             hlist.concat(tai_const.create_rva_sym(onlabel));
             hlist.concat(tai_const.create_rva_sym(onlabel));
             cg.a_label(current_asmdata.CurrAsmList,onlabel);
             cg.a_label(current_asmdata.CurrAsmList,onlabel);
@@ -476,8 +475,7 @@ procedure tx64tryexceptnode.pass_generate_code;
             inc(onnodecount.value);
             inc(onnodecount.value);
           end;
           end;
         { now move filter table to permanent list all at once }
         { now move filter table to permanent list all at once }
-        maybe_new_object_file(current_asmdata.asmlists[al_typedconsts]);
-        current_asmdata.asmlists[al_typedconsts].concatlist(hlist);
+        current_procinfo.aktlocaldata.concatlist(hlist);
         hlist.free;
         hlist.free;
       end;
       end;