Browse Source

+ added WebAssembly node utils

Nikolay Nikolov 3 years ago
parent
commit
860e4487c3
2 changed files with 43 additions and 5 deletions
  1. 1 5
      compiler/wasm32/cpunode.pas
  2. 42 0
      compiler/wasm32/nwasmutil.pas

+ 1 - 5
compiler/wasm32/cpunode.pas

@@ -34,12 +34,8 @@ implementation
     ncgadd, ncgcal,ncgmat,ncginl,
     
     nwasmadd,nwasmcal,nwasmmat,nwasmflw,nwasmcon,nwasmcnv,nwasmset,nwasminl,
-    (* todo: WASM
-    njvmcnv,njvmcon,njvminl,njvmmem,njvmld,
-    njvmset,njvmvmt
     { these are not really nodes }
-    ,rgcpu,tgcpu,njvmutil,njvmtcon,
-    *)
+    nwasmutil,
     { symtable }
     symcpu;
     { no aasmdef, the WebAssembly uses the base TAsmData class (set in init code of aasmcpu) }

+ 42 - 0
compiler/wasm32/nwasmutil.pas

@@ -0,0 +1,42 @@
+{
+    Copyright (c) 2021 by Nikolay Nikolov
+
+    WebAssembly version of some node tree helper routines
+
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 2 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program; if not, write to the Free Software
+    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+ ****************************************************************************
+}
+unit nwasmutil;
+
+{$i fpcdefs.inc}
+
+interface
+
+  uses
+    ngenutil;
+
+  type
+
+    { twasmnodeutils }
+
+    twasmnodeutils = class(tnodeutils)
+    end;
+
+implementation
+
+begin
+  cnodeutils:=twasmnodeutils;
+end.