소스 검색

* disable vtentry code until a clean implementation is done

git-svn-id: trunk@3934 -
peter 19 년 전
부모
커밋
722c91e8f3
2개의 변경된 파일6개의 추가작업 그리고 0개의 파일을 삭제
  1. 2 0
      compiler/ncgcal.pas
  2. 4 0
      compiler/nobj.pas

+ 2 - 0
compiler/ncgcal.pas

@@ -894,6 +894,7 @@ implementation
                     not(is_cppclass(tprocdef(procdefinition)._class)) then
                    cg.g_maybe_testvmt(current_asmdata.CurrAsmList,vmtreg,tprocdef(procdefinition)._class);
 
+{$ifdef vtentry}
                  { Call through VMT, generate a VTREF symbol to notify the linker }
                  vmtoffset:=tprocdef(procdefinition)._class.vmtmethodoffset(tprocdef(procdefinition).extnumber);
                  if not is_interface(tprocdef(procdefinition)._class) then
@@ -901,6 +902,7 @@ implementation
                      inc(current_asmdata.NextVTEntryNr);
                      current_asmdata.CurrAsmList.Concat(tai_symbol.CreateName('VTREF'+tostr(current_asmdata.NextVTEntryNr)+'_'+tprocdef(procdefinition)._class.vmt_mangledname+'$$'+tostr(vmtoffset div sizeof(aint)),AT_FUNCTION,0));
                    end;
+{$endif vtentry}
 
                  reference_reset_base(href,vmtreg,vmtoffset);
 

+ 4 - 0
compiler/nobj.pas

@@ -1234,8 +1234,10 @@ implementation
                             else
                               procname:=procdefcoll^.data.mangledname;
                             List.concat(Tai_const.createname(procname,0));
+{$ifdef vtentry}			    
                             hs:='VTENTRY'+'_'+_class.vmt_mangledname+'$$'+tostr(_class.vmtmethodoffset(i) div sizeof(aint));
                             current_asmdata.asmlists[al_globals].concat(tai_symbol.CreateName(hs,AT_DATA,0));
+{$endif vtentry}			    
                             break;
                           end;
                         procdefcoll:=procdefcoll^.next;
@@ -1358,6 +1360,7 @@ implementation
          current_asmdata.asmlists[al_globals].concat(Tai_const.create(aitconst_ptr,0));
          { write the size of the VMT }
          current_asmdata.asmlists[al_globals].concat(Tai_symbol_end.Createname(_class.vmt_mangledname));
+{$ifdef vtentry}	 
          { write vtinherit symbol to notify the linker of the class inheritance tree }
          hs:='VTINHERIT'+'_'+_class.vmt_mangledname+'$$';
          if assigned(_class.childof) then
@@ -1365,6 +1368,7 @@ implementation
          else
            hs:=hs+_class.vmt_mangledname;
          current_asmdata.asmlists[al_globals].concat(tai_symbol.CreateName(hs,AT_DATA,0));
+{$endif vtentry}	 
       end;