Przeglądaj źródła

+ emit a label in g_intf_wrapper, even though the entire function is not yet implemented. For now, this
is enough to avoid linking errors

git-svn-id: branches/z80@45068 -

nickysn 5 lat temu
rodzic
commit
91289fddf4
1 zmienionych plików z 27 dodań i 2 usunięć
  1. 27 2
      compiler/z80/hlcgcpu.pas

+ 27 - 2
compiler/z80/hlcgcpu.pas

@@ -44,11 +44,36 @@ implementation
 
   uses
     hlcgobj,
-    cgcpu;
+    aasmbase,aasmtai,
+    cgcpu,
+    symconst,
+    verbose,fmodule,cutils;
 
   procedure thlcgcpu.g_intf_wrapper(list: TAsmList; procdef: tprocdef; const labelname: string; ioffset: longint);
+    var
+      make_global: Boolean;
     begin
-      //internalerror(2011021324);
+      if not(procdef.proctypeoption in [potype_function,potype_procedure]) then
+        Internalerror(200006137);
+      if not assigned(procdef.struct) or
+         (procdef.procoptions*[po_classmethod, po_staticmethod,
+           po_methodpointer, po_interrupt, po_iocheck]<>[]) then
+        Internalerror(200006138);
+      if procdef.owner.symtabletype<>ObjectSymtable then
+        Internalerror(200109191);
+
+      make_global:=false;
+      if (not current_module.is_unit) or
+         create_smartlink or
+         (procdef.owner.defowner.owner.symtabletype=globalsymtable) then
+        make_global:=true;
+
+      if make_global then
+        List.concat(Tai_symbol.Createname_global(labelname,AT_FUNCTION,0,procdef))
+      else
+        List.concat(Tai_symbol.Createname_hidden(labelname,AT_FUNCTION,0,procdef));
+
+      list.Concat(tai_comment.Create(strpnew('WARNING! not implemented: g_intf_wrapper')));
     end;