mirror of
				https://gitlab.com/freepascal.org/fpc/source.git
				synced 2025-10-31 03:31:36 +01:00 
			
		
		
		
	* problem with virtual methods and interfaces fixed, fixes #8158
git-svn-id: trunk@6099 -
This commit is contained in:
		
							parent
							
								
									8c48cb108a
								
							
						
					
					
						commit
						eda8184e21
					
				| @ -123,6 +123,8 @@ implementation | |||||||
|           begin |           begin | ||||||
|             pd:=tprocdef(tprocsym(p).ProcdefList[i]); |             pd:=tprocdef(tprocsym(p).ProcdefList[i]); | ||||||
|             insertdef(TAsmList(arg),pd.returndef); |             insertdef(TAsmList(arg),pd.returndef); | ||||||
|  |             if (po_virtualmethod in pd.procoptions) then | ||||||
|  |               insertdef(TAsmList(arg),pd._class); | ||||||
|           end; |           end; | ||||||
|       end; |       end; | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -249,10 +249,12 @@ implementation | |||||||
|           so they won't be written implicitly } |           so they won't be written implicitly } | ||||||
|         if (def.typ=procdef) then |         if (def.typ=procdef) then | ||||||
|           def.dbg_state:=dbg_state_written; |           def.dbg_state:=dbg_state_written; | ||||||
|  | 
 | ||||||
|         { Stab must already be written, or we must be busy writing it } |         { Stab must already be written, or we must be busy writing it } | ||||||
|         if writing_def_stabs and |         if writing_def_stabs and | ||||||
|            not(def.dbg_state in [dbg_state_writing,dbg_state_written]) then |            not(def.dbg_state in [dbg_state_writing,dbg_state_written]) then | ||||||
|           internalerror(200403091); |           internalerror(200403091); | ||||||
|  | 
 | ||||||
|         { Keep track of used stabs, this info is only usefull for stabs |         { Keep track of used stabs, this info is only usefull for stabs | ||||||
|           referenced by the symbols. Definitions will always include all |           referenced by the symbols. Definitions will always include all | ||||||
|           required stabs } |           required stabs } | ||||||
| @ -798,6 +800,7 @@ implementation | |||||||
|       var |       var | ||||||
|         anc : tobjectdef; |         anc : tobjectdef; | ||||||
|         oldtypesym : tsym; |         oldtypesym : tsym; | ||||||
|  |         i : longint; | ||||||
|       begin |       begin | ||||||
|         if (def.dbg_state in [dbg_state_writing,dbg_state_written]) then |         if (def.dbg_state in [dbg_state_writing,dbg_state_written]) then | ||||||
|           exit; |           exit; | ||||||
| @ -854,12 +857,18 @@ implementation | |||||||
|           objectdef : |           objectdef : | ||||||
|             begin |             begin | ||||||
|               insertdef(list,vmtarraytype); |               insertdef(list,vmtarraytype); | ||||||
|  |               if assigned(tobjectdef(def).ImplementedInterfaces) then | ||||||
|  |                 for i:=0 to tobjectdef(def).ImplementedInterfaces.Count-1 do | ||||||
|  |                   insertdef(list,TImplementedInterface(tobjectdef(def).ImplementedInterfaces[i]).IntfDef); | ||||||
|               { first the parents } |               { first the parents } | ||||||
|               anc:=tobjectdef(def); |               anc:=tobjectdef(def); | ||||||
|               while assigned(anc.childof) do |               while assigned(anc.childof) do | ||||||
|                 begin |                 begin | ||||||
|                   anc:=anc.childof; |                   anc:=anc.childof; | ||||||
|                   insertdef(list,anc); |                   insertdef(list,anc); | ||||||
|  |                   if assigned(anc.ImplementedInterfaces) then | ||||||
|  |                     for i:=0 to anc.ImplementedInterfaces.Count-1 do | ||||||
|  |                       insertdef(list,TImplementedInterface(anc.ImplementedInterfaces[i]).IntfDef); | ||||||
|                 end; |                 end; | ||||||
|               tobjectdef(def).symtable.symList.ForEachCall(@field_write_defs,list); |               tobjectdef(def).symtable.symList.ForEachCall(@field_write_defs,list); | ||||||
|               tobjectdef(def).symtable.symList.ForEachCall(@method_write_defs,list); |               tobjectdef(def).symtable.symList.ForEachCall(@method_write_defs,list); | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 florian
						florian