瀏覽代碼

+ introduced ait_tagtype and tai_tagtype

Nikolay Nikolov 3 年之前
父節點
當前提交
3022f59ff4
共有 2 個文件被更改,包括 20 次插入1 次删除
  1. 3 1
      compiler/aasmtai.pas
  2. 17 0
      compiler/wasm32/aasmcpu.pas

+ 3 - 1
compiler/aasmtai.pas

@@ -95,6 +95,7 @@ interface
           ait_importexport,
           ait_local,
           ait_functype,
+          ait_tagtype,
 {$endif}
           { SEH directives used in ARM,MIPS and x86_64 COFF targets }
           ait_seh_directive,
@@ -242,6 +243,7 @@ interface
           'importexport',
           'local',
           'functype',
+          'tagtype',
 {$endif}
           'cfi',
           'seh_directive',
@@ -357,7 +359,7 @@ interface
                      ait_llvmmetadatarefoperand,
 {$endif llvm}
 {$ifdef wasm}
-                     ait_importexport,ait_local,ait_functype,
+                     ait_importexport,ait_local,ait_functype,ait_tagtype,
 {$endif wasm}
                      ait_seh_directive,
                      ait_cfi,

+ 17 - 0
compiler/wasm32/aasmcpu.pas

@@ -114,6 +114,14 @@ uses
         destructor destroy;override;
       end;
 
+      { tai_tagtype }
+
+      tai_tagtype = class(tai)
+        tagname: string;
+        params: TWasmResultType;
+        constructor create(const atagname: string; aparams: TWasmResultType);
+      end;
+
     procedure InitAsm;
     procedure DoneAsm;
 
@@ -139,6 +147,15 @@ implementation
         inherited;
       end;
 
+    { tai_tagtype }
+
+    constructor tai_tagtype.create(const atagname: string; aparams: TWasmResultType);
+      begin
+        typ:=ait_tagtype;
+        tagname:=atagname;
+        params:=aparams;
+      end;
+
     { tai_local }
 
     constructor tai_local.create(abasictype: TWasmBasicType; const aname: string);