* tai_impexp renamed tai_export_name

* ait_importexport renamed ait_export_name
This commit is contained in:
Nikolay Nikolov 2021-09-26 18:35:10 +03:00
parent 2940d0f45f
commit 346b57e238
5 changed files with 20 additions and 22 deletions

View File

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

View File

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

View File

@ -241,7 +241,7 @@ var
nm : TSymStr; nm : TSymStr;
begin begin
nm := tprocdef(tprocsym(hp.sym).ProcdefList[0]).mangledname; 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; end;
procedure texportlibwasi.exportvar(hp: texported_item); procedure texportlibwasi.exportvar(hp: texported_item);

View File

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

View File

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