Prechádzať zdrojové kódy

* tai_impexp renamed tai_export_name
* ait_importexport renamed ait_export_name

Nikolay Nikolov 3 rokov pred
rodič
commit
346b57e238

+ 3 - 3
compiler/aasmtai.pas

@@ -92,7 +92,7 @@ interface
           ait_llvmmetadatarefoperand, { llvm metadata referece: !metadataname !id }
 {$endif}
 {$ifdef wasm}
-          ait_importexport,
+          ait_export_name,
           ait_local,
           ait_functype,
           ait_tagtype,
@@ -242,7 +242,7 @@ interface
           'llvmmetadatarefop',
 {$endif}
 {$ifdef wasm}
-          'importexport',
+          'export_name',
           'local',
           'functype',
           'tagtype',
@@ -363,7 +363,7 @@ interface
                      ait_llvmmetadatarefoperand,
 {$endif llvm}
 {$ifdef wasm}
-                     ait_importexport,ait_local,ait_functype,ait_tagtype,ait_import_module,ait_import_name,
+                     ait_export_name,ait_local,ait_functype,ait_tagtype,ait_import_module,ait_import_name,
 {$endif wasm}
                      ait_seh_directive,
                      ait_cfi,

+ 3 - 3
compiler/aggas.pas

@@ -820,7 +820,7 @@ implementation
         end;
 
 
-      procedure WriteImportExport(hp:tai_impexp);
+      procedure WriteImportExport(hp:tai_export_name);
         var
           symstypestr: string;
         begin
@@ -1645,8 +1645,8 @@ implementation
              end;
            ait_functype:
              WriteFuncTypeDirective(tai_functype(hp));
-           ait_importexport:
-             WriteImportExport(tai_impexp(hp));
+           ait_export_name:
+             WriteImportExport(tai_export_name(hp));
            ait_tagtype:
              WriteTagType(tai_tagtype(hp));
            ait_import_module:

+ 1 - 1
compiler/systems/t_wasi.pas

@@ -241,7 +241,7 @@ var
   nm : TSymStr;
 begin
   nm := tprocdef(tprocsym(hp.sym).ProcdefList[0]).mangledname;
-  current_asmdata.asmlists[al_exports].Concat(tai_impexp.create(hp.name^, nm, ie_Func));
+  current_asmdata.asmlists[al_exports].Concat(tai_export_name.create(hp.name^, nm, ie_Func));
 end;
 
 procedure texportlibwasi.exportvar(hp: texported_item);

+ 4 - 6
compiler/wasm32/aasmcpu.pas

@@ -83,11 +83,9 @@ uses
         ie_Global  // global variables
       );
 
-      // the actual use is defined by the assembly section used
+      { tai_export_name }
 
-      { timpexp_ai }
-
-      tai_impexp = class(tai)
+      tai_export_name = class(tai)
         extname : ansistring; // external name
         intname : ansistring; // internal name
         symstype: TImpExpType;
@@ -208,11 +206,11 @@ uses
 
     { timpexp_ai }
 
-      constructor tai_impexp.create(const aextname, aintname: ansistring;
+      constructor tai_export_name.create(const aextname, aintname: ansistring;
           asymtype: timpexptype);
         begin
           inherited create;
-          typ := ait_importexport;
+          typ := ait_export_name;
           extname := aextname;
           intname := aintname;
           symstype:= asymtype;

+ 9 - 9
compiler/wasm32/agwat.pas

@@ -853,7 +853,7 @@ implementation
     procedure TWabtTextAssembler.WriteExports(p: TAsmList);
     var
       hp: tai;
-      x: tai_impexp;
+      x: tai_export_name;
       cnt: integer;
     begin
       if not Assigned(p) then Exit;
@@ -863,12 +863,12 @@ implementation
       cnt := 0;
       while Assigned(hp) do begin
         case hp.typ of
-          ait_importexport:
+          ait_export_name:
             inc(cnt);
           else
             ;
         end;
-        hp := tai_impexp(hp.Next);
+        hp := tai_export_name(hp.Next);
       end;
 
       // writting out table, so wat2wasm can create reallocation symbols
@@ -880,16 +880,16 @@ implementation
       hp:=tai(p.First);
       while Assigned(hp) do begin
         case hp.typ of
-          ait_importexport:
+          ait_export_name:
           begin
-            x:=tai_impexp(hp);
+            x:=tai_export_name(hp);
             writer.AsmWrite(#9#9);
             writer.AsmWriteLn(GetWasmName(x.intname));
           end;
           else
             ;
         end;
-        hp := tai_impexp(hp.Next);
+        hp := tai_export_name(hp.Next);
       end;
       writer.AsmWriteLn(#9') ');
 
@@ -897,9 +897,9 @@ implementation
       hp:=tai(p.First);
       while Assigned(hp) do begin
         case hp.typ of
-          ait_importexport:
+          ait_export_name:
           begin
-            x:=tai_impexp(hp);
+            x:=tai_export_name(hp);
             writer.AsmWrite(#9#9'(export "');
             writer.AsmWrite(x.extname);
             writer.AsmWrite('" (');
@@ -916,7 +916,7 @@ implementation
           else
             ;
         end;
-        hp := tai_impexp(hp.Next);
+        hp := tai_export_name(hp.Next);
       end;
     end;