diff --git a/compiler/aasmtai.pas b/compiler/aasmtai.pas index 7829cf9766..1a9b12daff 100644 --- a/compiler/aasmtai.pas +++ b/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, diff --git a/compiler/aggas.pas b/compiler/aggas.pas index 5c201a9056..c97408a72e 100644 --- a/compiler/aggas.pas +++ b/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: diff --git a/compiler/systems/t_wasi.pas b/compiler/systems/t_wasi.pas index 7dea927715..9bb5016a4e 100644 --- a/compiler/systems/t_wasi.pas +++ b/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); diff --git a/compiler/wasm32/aasmcpu.pas b/compiler/wasm32/aasmcpu.pas index 157fb9ccc2..0ffd6c9b16 100644 --- a/compiler/wasm32/aasmcpu.pas +++ b/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; diff --git a/compiler/wasm32/agwat.pas b/compiler/wasm32/agwat.pas index 13684044dd..129d1bb678 100644 --- a/compiler/wasm32/agwat.pas +++ b/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;