nirguna 0.1.0 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ChangeLog +161 -161
- package/README.md +13 -11
- package/bin/{ishvara.js → nirguna.js} +1 -1
- package/package.json +4 -5
- package/packages/optimizer-fasm/optimizer.js +1 -1
- package/packages/optimizer-wasm/optimizer.js +1 -1
- package/packages/printer-wasm/printer/visitors/expression-statement/print-wasm-import.js +1 -1
- package/packages/printer-wasm/printer/visitors/expression-statement/print-wasm-memory.js +1 -1
- package/packages/transformer-fasm/transformer.js +8 -8
- package/packages/transformer-wasm/transformer.js +3 -3
- package/packages/translator-wasm/translator.js +1 -1
- /package/lib/{ishvara.js → nirguna.js} +0 -0
package/ChangeLog
CHANGED
|
@@ -1,64 +1,64 @@
|
|
|
1
1
|
2026.02.08, v3.0.0
|
|
2
2
|
|
|
3
3
|
fix:
|
|
4
|
-
- 6f48834
|
|
5
|
-
- 26db527
|
|
6
|
-
- d9a64c7
|
|
4
|
+
- 6f48834 nirguna: plugin-fasm: apply-types: multiple quotes
|
|
5
|
+
- 26db527 nirguna: plugin-fasm: apply-types: template
|
|
6
|
+
- d9a64c7 nirguna: cli-help: bundle first
|
|
7
7
|
- 27d9836 nemesis: find_file: pop
|
|
8
8
|
- 8413a28 nemesis: condition
|
|
9
9
|
|
|
10
10
|
feature:
|
|
11
|
-
- f66536f
|
|
12
|
-
- 29b01f8
|
|
13
|
-
- 23c2f48
|
|
14
|
-
- 105b625
|
|
11
|
+
- f66536f nirguna: plugin-fasm: apply-types: backslash
|
|
12
|
+
- 29b01f8 nirguna: cli-help: output: bundle
|
|
13
|
+
- 23c2f48 nirguna: cli-help: targets: asm/wast
|
|
14
|
+
- 105b625 nirguna: printer-fasm: string-literal: improve
|
|
15
15
|
- c58d11d drop support of node < 22
|
|
16
|
-
- 3591a99
|
|
17
|
-
- 84c7040
|
|
18
|
-
- fab315c
|
|
19
|
-
- cdaebc9
|
|
16
|
+
- 3591a99 nirguna: @putout/plugin-printer v7.1.1
|
|
17
|
+
- 84c7040 nirguna: @putout/plugin-esm v9.2.0
|
|
18
|
+
- fab315c nirguna: v86 v0.5.319
|
|
19
|
+
- cdaebc9 nirguna: update dependencies
|
|
20
20
|
- e9c308e nemesis: gets
|
|
21
|
-
- 96bcd68 @
|
|
21
|
+
- 96bcd68 @nirguna/plugin-fasm: extract-labele-blocks: nested
|
|
22
22
|
|
|
23
23
|
2025.07.25, v2.13.3
|
|
24
24
|
|
|
25
25
|
feature:
|
|
26
|
-
- 7c0c12c @
|
|
26
|
+
- 7c0c12c @nirguna/plugin-fasm: extract-labele-blocks: nested
|
|
27
27
|
|
|
28
28
|
2025.07.24, v2.13.2
|
|
29
29
|
|
|
30
30
|
fix:
|
|
31
|
-
- 4c4d3c1 @
|
|
31
|
+
- 4c4d3c1 @nirguna/plugin-fasm: convert-args-to-regs
|
|
32
32
|
|
|
33
33
|
feature:
|
|
34
|
-
- 6dd1438 @
|
|
34
|
+
- 6dd1438 @nirguna/operator-fasm: globals
|
|
35
35
|
|
|
36
36
|
2025.07.23, v2.13.1
|
|
37
37
|
|
|
38
38
|
feature:
|
|
39
|
-
- ed31929 @
|
|
39
|
+
- ed31929 @nirguna/plugin-fasm: remove-useless-promise
|
|
40
40
|
|
|
41
41
|
2025.07.22, v2.13.0
|
|
42
42
|
|
|
43
43
|
feature:
|
|
44
|
-
- 3980a88 @
|
|
44
|
+
- 3980a88 @nirguna/operator-nemesis: add
|
|
45
45
|
|
|
46
46
|
2025.07.22, v2.12.7
|
|
47
47
|
|
|
48
48
|
feature:
|
|
49
|
-
- 28cb12b @
|
|
50
|
-
- 9757627 @
|
|
49
|
+
- 28cb12b @nirguna/plugin-fasm: convert-do-while-to-jnz: break
|
|
50
|
+
- 9757627 @nirguna/plugin-nemesis: convert-find-first-to-int-0xff: add
|
|
51
51
|
|
|
52
52
|
2025.07.20, v2.12.6
|
|
53
53
|
|
|
54
54
|
feature:
|
|
55
|
-
- 4fc2b36
|
|
55
|
+
- 4fc2b36 nirguna: plugin-fasm: convert-if-to-jmp: or
|
|
56
56
|
|
|
57
57
|
2025.07.20, v2.12.5
|
|
58
58
|
|
|
59
59
|
feature:
|
|
60
60
|
- 828cb35 @putout/plugin-fasm: convert-assign-to-move: constants
|
|
61
|
-
- e2f186e @
|
|
61
|
+
- e2f186e @nirguna/transformer-fasm: remove-useless-operand: add
|
|
62
62
|
|
|
63
63
|
2025.07.19, v2.12.4
|
|
64
64
|
|
|
@@ -68,7 +68,7 @@ feature:
|
|
|
68
68
|
2025.07.19, v2.12.3
|
|
69
69
|
|
|
70
70
|
feature:
|
|
71
|
-
- 37d096a @
|
|
71
|
+
- 37d096a @nirguna/plugin-nemesis: colors
|
|
72
72
|
|
|
73
73
|
2025.07.19, v2.12.2
|
|
74
74
|
|
|
@@ -78,52 +78,52 @@ fix:
|
|
|
78
78
|
2025.07.19, v2.12.1
|
|
79
79
|
|
|
80
80
|
feature:
|
|
81
|
-
- 3321bd1
|
|
81
|
+
- 3321bd1 nirguna: plugin-fasm: convert-while-to-jz
|
|
82
82
|
|
|
83
83
|
2025.07.18, v2.12.0
|
|
84
84
|
|
|
85
85
|
feature:
|
|
86
|
-
- c1e341e
|
|
87
|
-
- 31c7d80
|
|
86
|
+
- c1e341e nirguna: plugin-fasm: convert-while-to-jz
|
|
87
|
+
- 31c7d80 nirguna: plugin-fasm: extract-labeled-block
|
|
88
88
|
|
|
89
89
|
2025.07.17, v2.11.1
|
|
90
90
|
|
|
91
91
|
feature:
|
|
92
|
-
- 12ddc96 @
|
|
92
|
+
- 12ddc96 @nirguna/plugin-nemesis: convert-gets-to-0xff
|
|
93
93
|
- cfb743f nemesis: sector: rm useless push
|
|
94
94
|
|
|
95
95
|
2025.07.15, v2.11.0
|
|
96
96
|
|
|
97
97
|
feature:
|
|
98
|
-
- e7713d7
|
|
98
|
+
- e7713d7 nirguna: include assembly
|
|
99
99
|
|
|
100
100
|
2025.07.14, v2.10.3
|
|
101
101
|
|
|
102
102
|
feature:
|
|
103
103
|
- ca49e32 plugin-bundler-fasm: replace-section-code-with-functions: exclude start
|
|
104
|
-
- f305e8f @
|
|
104
|
+
- f305e8f @nirguna/runner/fasm: externals
|
|
105
105
|
|
|
106
106
|
2025.07.14, v2.10.2
|
|
107
107
|
|
|
108
108
|
fix:
|
|
109
|
-
- bffa9f5 @
|
|
109
|
+
- bffa9f5 @nirguna-plugin-fasm: convert-while-to-js: jz -> jnz
|
|
110
110
|
|
|
111
111
|
2025.07.13, v2.10.1
|
|
112
112
|
|
|
113
113
|
fix:
|
|
114
|
-
- fbcf55d
|
|
114
|
+
- fbcf55d nirguna: runner-fasm: early return
|
|
115
115
|
|
|
116
116
|
2025.07.13, v2.10.0
|
|
117
117
|
|
|
118
118
|
feature:
|
|
119
|
-
- 1da9fed
|
|
120
|
-
- 1c27a4f
|
|
119
|
+
- 1da9fed nirguna: runner-fasm: add boot
|
|
120
|
+
- 1c27a4f nirguna: nemesis: build floppy image
|
|
121
121
|
|
|
122
122
|
2025.07.12, v2.9.0
|
|
123
123
|
|
|
124
124
|
feature:
|
|
125
|
-
- d98cffc @
|
|
126
|
-
- 9dda9f1 @
|
|
125
|
+
- d98cffc @nirguna/format-floppy: add
|
|
126
|
+
- 9dda9f1 @nirguna/format-floppy: add
|
|
127
127
|
- 1cb5e1a plugin-fasm: switch-cmp-operands: add
|
|
128
128
|
|
|
129
129
|
2025.07.11, v2.8.11
|
|
@@ -178,12 +178,12 @@ feature:
|
|
|
178
178
|
|
|
179
179
|
feature:
|
|
180
180
|
- bb4d88a plugin-fasm: convert-while-to-js: get-stiring-length: simplify
|
|
181
|
-
- 3b2ba8a
|
|
181
|
+
- 3b2ba8a nirguna: eslint-plugin-putout v28.0.0
|
|
182
182
|
|
|
183
183
|
2025.06.29, v2.8.1
|
|
184
184
|
|
|
185
185
|
feature:
|
|
186
|
-
- 7310af0
|
|
186
|
+
- 7310af0 nirguna: runner-wasm: local-set
|
|
187
187
|
- 54b08ab plugin-wasm: convert-await-to-call: add
|
|
188
188
|
|
|
189
189
|
2025.06.29, v2.8.0
|
|
@@ -194,134 +194,134 @@ feature:
|
|
|
194
194
|
2025.06.28, v2.7.5
|
|
195
195
|
|
|
196
196
|
feature:
|
|
197
|
-
- e284012
|
|
197
|
+
- e284012 nirguna: sum
|
|
198
198
|
|
|
199
199
|
2025.06.28, v2.7.4
|
|
200
200
|
|
|
201
201
|
feature:
|
|
202
|
-
- cc0e458
|
|
202
|
+
- cc0e458 nirguna: plugin-optimizer-fasm: apply-lodsb
|
|
203
203
|
- 59739ca runner-wasm: tests
|
|
204
|
-
- 77e12ac @
|
|
204
|
+
- 77e12ac @nirguna/test: add
|
|
205
205
|
|
|
206
206
|
2025.06.27, v2.7.3
|
|
207
207
|
|
|
208
208
|
feature:
|
|
209
|
-
- 58a9f51
|
|
209
|
+
- 58a9f51 nirguna: plugin-fasm: convert-linux-write-to-syscall
|
|
210
210
|
|
|
211
211
|
2025.06.27, v2.7.2
|
|
212
212
|
|
|
213
213
|
feature:
|
|
214
|
-
- a7f3419
|
|
214
|
+
- a7f3419 nirguna: bundler-fasm: add use directive
|
|
215
215
|
|
|
216
216
|
2025.06.26, v2.7.1
|
|
217
217
|
|
|
218
218
|
feature:
|
|
219
|
-
- 525bdc1
|
|
219
|
+
- 525bdc1 nirguna: improve support of x64
|
|
220
220
|
|
|
221
221
|
2025.06.26, v2.7.0
|
|
222
222
|
|
|
223
223
|
feature:
|
|
224
|
-
- b76ee18
|
|
225
|
-
- 5c0fa7e
|
|
224
|
+
- b76ee18 nirguna: emulator: ureg
|
|
225
|
+
- 5c0fa7e nirguna: emulator-fasm: bundle
|
|
226
226
|
|
|
227
227
|
2025.06.25, v2.6.4
|
|
228
228
|
|
|
229
229
|
fix:
|
|
230
|
-
- 01809f6
|
|
230
|
+
- 01809f6 nirguna: nemesis
|
|
231
231
|
|
|
232
232
|
2025.06.24, v2.6.3
|
|
233
233
|
|
|
234
234
|
feature:
|
|
235
|
-
- b05fb4c
|
|
235
|
+
- b05fb4c nirguna: plugin-fasm: convert-arguments-to-registers
|
|
236
236
|
|
|
237
237
|
2025.06.23, v2.6.2
|
|
238
238
|
|
|
239
239
|
feature:
|
|
240
|
-
- 6156f74
|
|
240
|
+
- 6156f74 nirguna: plugin-fasm: convert-arguments-to-registers: add esp -> ret size
|
|
241
241
|
- 8095442 nemesis: find-file
|
|
242
|
-
- 2c11137 @
|
|
242
|
+
- 2c11137 @nirguna/plugin-fasm: convert-const-to-equ
|
|
243
243
|
- c3c694e plugin-fasm: convet-do-while-to-jnz: false
|
|
244
244
|
|
|
245
245
|
2025.06.23, v2.6.1
|
|
246
246
|
|
|
247
247
|
feature:
|
|
248
|
-
- dd61391
|
|
249
|
-
- 8afcc92
|
|
250
|
-
- e6fbfd1
|
|
248
|
+
- dd61391 nirguna: plugin-fasm: convert-do-while-to-jnz: true
|
|
249
|
+
- 8afcc92 nirguna: plugin-fasm: apply-registers
|
|
250
|
+
- e6fbfd1 nirguna: plugin-nemesis: convert-read-sector-to-int-0xff
|
|
251
251
|
|
|
252
252
|
2025.06.22, v2.6.0
|
|
253
253
|
|
|
254
254
|
feature:
|
|
255
|
-
- 6608917
|
|
256
|
-
- 70ef92a
|
|
257
|
-
- ebaa93e
|
|
258
|
-
- ac72c23
|
|
255
|
+
- 6608917 nirguna: plugin-nemesis: convert-read-sector-to-int-0xff
|
|
256
|
+
- 70ef92a nirguna: improve error handling
|
|
257
|
+
- ebaa93e nirguna: add ability to log
|
|
258
|
+
- ac72c23 nirguna: add ability to log
|
|
259
259
|
|
|
260
260
|
2025.06.21, v2.5.5
|
|
261
261
|
|
|
262
262
|
feature:
|
|
263
|
-
- ccc0e5e
|
|
263
|
+
- ccc0e5e nirguna: convert-assign-to-or: add
|
|
264
264
|
|
|
265
265
|
2025.06.21, v2.5.4
|
|
266
266
|
|
|
267
267
|
fix:
|
|
268
|
-
- 01babcc
|
|
268
|
+
- 01babcc nirguna: plugin-nemesis: convert-printf-to-int-0xff
|
|
269
269
|
|
|
270
270
|
2025.06.21, v2.5.3
|
|
271
271
|
|
|
272
272
|
feature:
|
|
273
|
-
- 3c48c0e
|
|
273
|
+
- 3c48c0e nirguna: plugin-convert-assign-to-and
|
|
274
274
|
|
|
275
275
|
2025.06.20, v2.5.2
|
|
276
276
|
|
|
277
277
|
feature:
|
|
278
|
-
- 0575e5b
|
|
279
|
-
- 11971c0
|
|
278
|
+
- 0575e5b nirguna: fasm: in/out
|
|
279
|
+
- 11971c0 nirguna: min-max-col-line
|
|
280
280
|
|
|
281
281
|
2025.06.19, v2.5.1
|
|
282
282
|
|
|
283
283
|
fix:
|
|
284
|
-
- 61dcaed
|
|
284
|
+
- 61dcaed nirguna: plugin-optimizer-fasm: join-one-byte-registers
|
|
285
285
|
|
|
286
286
|
2025.06.19, v2.5.0
|
|
287
287
|
|
|
288
288
|
feature:
|
|
289
|
-
- 70681d0
|
|
289
|
+
- 70681d0 nirguna: join-one-byte-registers
|
|
290
290
|
- 06f8dd5 replace-section-data-with-let: add
|
|
291
291
|
|
|
292
292
|
2025.06.19, v2.4.6
|
|
293
293
|
|
|
294
294
|
feature:
|
|
295
|
-
- 3154976
|
|
296
|
-
- d7cfe9f
|
|
295
|
+
- 3154976 nirguna: remove-useless-xchg
|
|
296
|
+
- d7cfe9f nirguna: preserve al before call
|
|
297
297
|
|
|
298
298
|
2025.06.19, v2.4.5
|
|
299
299
|
|
|
300
300
|
feature:
|
|
301
|
-
- ec7ed97
|
|
302
|
-
- 786fba7
|
|
301
|
+
- ec7ed97 nirguna: fasm: type
|
|
302
|
+
- 786fba7 nirguna: nemesis: external
|
|
303
303
|
|
|
304
304
|
2025.06.17, v2.4.4
|
|
305
305
|
|
|
306
306
|
feature:
|
|
307
|
-
- a26bcc6
|
|
307
|
+
- a26bcc6 nirguna: plugin-bundler: replace-section-code-with-functions
|
|
308
308
|
|
|
309
309
|
2025.06.17, v2.4.3
|
|
310
310
|
|
|
311
311
|
feature:
|
|
312
|
-
- e615b08
|
|
312
|
+
- e615b08 nirguna: move iret to int-table
|
|
313
313
|
|
|
314
314
|
2025.06.16, v2.4.2
|
|
315
315
|
|
|
316
316
|
feature:
|
|
317
|
-
- 229ffe0
|
|
318
|
-
- 9177e26
|
|
319
|
-
- ac1bc22
|
|
317
|
+
- 229ffe0 nirguna: plugin-nemesis: add
|
|
318
|
+
- 9177e26 nirguna: read config
|
|
319
|
+
- ac1bc22 nirguna: readConfig: add
|
|
320
320
|
|
|
321
321
|
2025.06.15, v2.4.1
|
|
322
322
|
|
|
323
323
|
feature:
|
|
324
|
-
- 26ba4a6
|
|
324
|
+
- 26ba4a6 nirguna: plugin-fasm: move-equ-to-bottom
|
|
325
325
|
|
|
326
326
|
2025.06.15, v2.4.0
|
|
327
327
|
|
|
@@ -331,18 +331,18 @@ feature:
|
|
|
331
331
|
2025.06.15, v2.3.11
|
|
332
332
|
|
|
333
333
|
feature:
|
|
334
|
-
- df45154
|
|
334
|
+
- df45154 nirguna: split-assign-await-with-assign-eax
|
|
335
335
|
|
|
336
336
|
2025.06.14, v2.3.10
|
|
337
337
|
|
|
338
338
|
feature:
|
|
339
339
|
- 43c4267 plugin-fasm: convert-if-to-jmp: nested labels
|
|
340
|
-
- 699277b
|
|
340
|
+
- 699277b nirguna: apply-function-declaration
|
|
341
341
|
|
|
342
342
|
2025.06.14, v2.3.9
|
|
343
343
|
|
|
344
344
|
feature:
|
|
345
|
-
- 7b96723
|
|
345
|
+
- 7b96723 nirguna: plugin-fasm: convert-return-to-eax
|
|
346
346
|
|
|
347
347
|
2025.06.11, v2.3.8
|
|
348
348
|
|
|
@@ -357,9 +357,9 @@ feature:
|
|
|
357
357
|
2025.06.09, v2.3.6
|
|
358
358
|
|
|
359
359
|
feature:
|
|
360
|
-
- 7979d17
|
|
361
|
-
- ddcb9f7
|
|
362
|
-
- 6807d1b
|
|
360
|
+
- 7979d17 nirguna: plugin-fasm: convert-if-to-jmp: rm unused
|
|
361
|
+
- ddcb9f7 nirguna: convert-if-to-jmp: counter
|
|
362
|
+
- 6807d1b nirguna: printer-fasm: assignment-expression
|
|
363
363
|
|
|
364
364
|
2025.06.09, v2.3.5
|
|
365
365
|
|
|
@@ -369,18 +369,18 @@ feature:
|
|
|
369
369
|
2025.06.08, v2.3.4
|
|
370
370
|
|
|
371
371
|
feature:
|
|
372
|
-
- 824aae6
|
|
372
|
+
- 824aae6 nirguna: plugin-optimizer-fasm: remove-useless-jmp: add
|
|
373
373
|
|
|
374
374
|
2025.06.08, v2.3.3
|
|
375
375
|
|
|
376
376
|
feature:
|
|
377
|
-
- 0490645
|
|
377
|
+
- 0490645 nirguna: replace-section-code-with-functions
|
|
378
378
|
|
|
379
379
|
2025.06.07, v2.3.2
|
|
380
380
|
|
|
381
381
|
feature:
|
|
382
|
-
- 40d3439
|
|
383
|
-
- 2111a06
|
|
382
|
+
- 40d3439 nirguna: section: imports
|
|
383
|
+
- 2111a06 nirguna: fasm: import
|
|
384
384
|
|
|
385
385
|
2025.06.07, v2.3.1
|
|
386
386
|
|
|
@@ -388,7 +388,7 @@ fix:
|
|
|
388
388
|
- f98b52b bin: exit code
|
|
389
389
|
|
|
390
390
|
feature:
|
|
391
|
-
- 921a633
|
|
391
|
+
- 921a633 nirguna: plugin-optimizer-fasm: convert-mov-to-xor: exclude 8, 16 bit, when assign 1
|
|
392
392
|
|
|
393
393
|
2025.06.06, v2.3.0
|
|
394
394
|
|
|
@@ -399,12 +399,12 @@ feature:
|
|
|
399
399
|
2025.06.06, v2.2.27
|
|
400
400
|
|
|
401
401
|
feature:
|
|
402
|
-
- 07ee976
|
|
402
|
+
- 07ee976 nirguna: plugin-fasm: convert-do-while-to-jnz: not
|
|
403
403
|
|
|
404
404
|
2025.06.05, v2.2.26
|
|
405
405
|
|
|
406
406
|
feature:
|
|
407
|
-
- d6f81c3
|
|
407
|
+
- d6f81c3 nirguna: plugin-fasm: add-label-prefix: exclude MemberExpression
|
|
408
408
|
- 9b586ae do-while
|
|
409
409
|
|
|
410
410
|
2025.06.05, v2.2.25
|
|
@@ -415,7 +415,7 @@ feature:
|
|
|
415
415
|
2025.06.04, v2.2.24
|
|
416
416
|
|
|
417
417
|
feature:
|
|
418
|
-
- edf1b6c
|
|
418
|
+
- edf1b6c nirguna: plugin-fasm: convert-ternary-to-if: add
|
|
419
419
|
|
|
420
420
|
2025.06.04, v2.2.23
|
|
421
421
|
|
|
@@ -425,7 +425,7 @@ feature:
|
|
|
425
425
|
2025.06.04, v2.2.22
|
|
426
426
|
|
|
427
427
|
feature:
|
|
428
|
-
- e85f23e
|
|
428
|
+
- e85f23e nirguna: convert-bios-read-sector-to-int-13: assign
|
|
429
429
|
|
|
430
430
|
2025.06.04, v2.2.21
|
|
431
431
|
|
|
@@ -440,7 +440,7 @@ feature:
|
|
|
440
440
|
2025.06.04, v2.2.19
|
|
441
441
|
|
|
442
442
|
feature:
|
|
443
|
-
- a619346
|
|
443
|
+
- a619346 nirguna: plugin-fasm: convert-bios-reboot-to-jmp-far
|
|
444
444
|
|
|
445
445
|
2025.06.03, v2.2.18
|
|
446
446
|
|
|
@@ -450,23 +450,23 @@ feature:
|
|
|
450
450
|
2025.06.03, v2.2.17
|
|
451
451
|
|
|
452
452
|
feature:
|
|
453
|
-
- c63dcbc
|
|
454
|
-
- d220365
|
|
453
|
+
- c63dcbc nirguna: @putout/printer v15.0.0
|
|
454
|
+
- d220365 nirguna: @putout/babel v4.0.1
|
|
455
455
|
|
|
456
456
|
2025.05.30, v2.2.16
|
|
457
457
|
|
|
458
458
|
feature:
|
|
459
|
-
- 7cc5003
|
|
459
|
+
- 7cc5003 nirguna: optimizer-fasm: remove-useless-condition
|
|
460
460
|
|
|
461
461
|
2025.05.30, v2.2.15
|
|
462
462
|
|
|
463
463
|
feature:
|
|
464
|
-
- d304ae7
|
|
464
|
+
- d304ae7 nirguna: optimizer-fasm: remove-useless-ret
|
|
465
465
|
|
|
466
466
|
2025.05.30, v2.2.14
|
|
467
467
|
|
|
468
468
|
feature:
|
|
469
|
-
- e43bbdf
|
|
469
|
+
- e43bbdf nirguna: plugin-optimizer-fasm: join-one-bye-registers: xor
|
|
470
470
|
|
|
471
471
|
2025.05.30, v2.2.13
|
|
472
472
|
|
|
@@ -481,7 +481,7 @@ feature:
|
|
|
481
481
|
2025.05.29, v2.2.11
|
|
482
482
|
|
|
483
483
|
feature:
|
|
484
|
-
- 14e4bcd
|
|
484
|
+
- 14e4bcd nirguna: taget: asm
|
|
485
485
|
|
|
486
486
|
2025.05.29, v2.2.10
|
|
487
487
|
|
|
@@ -491,15 +491,15 @@ fix:
|
|
|
491
491
|
2025.05.29, v2.2.9
|
|
492
492
|
|
|
493
493
|
feature:
|
|
494
|
-
- e1a5984
|
|
494
|
+
- e1a5984 nirguna: plugin-optimizer-fasm: convert-js-to-jmp: test
|
|
495
495
|
|
|
496
496
|
2025.05.28, v2.2.8
|
|
497
497
|
|
|
498
498
|
fix:
|
|
499
|
-
- 2320d31
|
|
499
|
+
- 2320d31 nirguna: boot
|
|
500
500
|
|
|
501
501
|
feature:
|
|
502
|
-
- 815fac6
|
|
502
|
+
- 815fac6 nirguna: yargs-parser v22.0.0
|
|
503
503
|
|
|
504
504
|
2025.05.28, v2.2.7
|
|
505
505
|
|
|
@@ -507,28 +507,28 @@ fix:
|
|
|
507
507
|
- bcba6d7 rm loop
|
|
508
508
|
|
|
509
509
|
feature:
|
|
510
|
-
- b7853b7
|
|
511
|
-
- d5e20d2
|
|
510
|
+
- b7853b7 nirguna: plugin-optimizer-fasm: jmp far
|
|
511
|
+
- d5e20d2 nirguna: remove-useless-ret
|
|
512
512
|
|
|
513
513
|
2025.05.28, v2.2.6
|
|
514
514
|
|
|
515
515
|
feature:
|
|
516
|
-
- a8a8f0c
|
|
516
|
+
- a8a8f0c nirguna: if
|
|
517
517
|
|
|
518
518
|
2025.05.28, v2.2.5
|
|
519
519
|
|
|
520
520
|
feature:
|
|
521
|
-
- 861998e
|
|
521
|
+
- 861998e nirguna: getStringLength
|
|
522
522
|
|
|
523
523
|
2025.05.27, v2.2.4
|
|
524
524
|
|
|
525
525
|
feature:
|
|
526
|
-
- b8fece2
|
|
526
|
+
- b8fece2 nirguna: do-while
|
|
527
527
|
|
|
528
528
|
2025.05.27, v2.2.3
|
|
529
529
|
|
|
530
530
|
feature:
|
|
531
|
-
- 4540488
|
|
531
|
+
- 4540488 nirguna: bios.readChar: add
|
|
532
532
|
|
|
533
533
|
2025.05.27, v2.2.2
|
|
534
534
|
|
|
@@ -538,7 +538,7 @@ feature:
|
|
|
538
538
|
2025.05.27, v2.2.1
|
|
539
539
|
|
|
540
540
|
feature:
|
|
541
|
-
- 8f9e144
|
|
541
|
+
- 8f9e144 nirguna: await fn -> call(fn)
|
|
542
542
|
|
|
543
543
|
2025.05.26, v2.2.0
|
|
544
544
|
|
|
@@ -546,9 +546,9 @@ fix:
|
|
|
546
546
|
- 88c811b bundler
|
|
547
547
|
|
|
548
548
|
feature:
|
|
549
|
-
- 3d9899b
|
|
550
|
-
- 0de285b
|
|
551
|
-
- 3336d28
|
|
549
|
+
- 3d9899b nirguna: bios.clearScreen(): add
|
|
550
|
+
- 0de285b nirguna: fasm: boot
|
|
551
|
+
- 3336d28 nirguna: eslint-plugin-putout v27.0.0
|
|
552
552
|
|
|
553
553
|
2025.05.25, v2.1.13
|
|
554
554
|
|
|
@@ -558,7 +558,7 @@ feature:
|
|
|
558
558
|
2025.05.23, v2.1.12
|
|
559
559
|
|
|
560
560
|
feature:
|
|
561
|
-
- 43cb3a4
|
|
561
|
+
- 43cb3a4 nirguna: bundler
|
|
562
562
|
|
|
563
563
|
2025.05.23, v2.1.11
|
|
564
564
|
|
|
@@ -568,22 +568,22 @@ fix:
|
|
|
568
568
|
2025.05.23, v2.1.10
|
|
569
569
|
|
|
570
570
|
feature:
|
|
571
|
-
- c38e45f
|
|
571
|
+
- c38e45f nirguna: plugin-fasm: convert-function-to-label: useless stack operations
|
|
572
572
|
|
|
573
573
|
2025.05.23, v2.1.9
|
|
574
574
|
|
|
575
575
|
feature:
|
|
576
|
-
- 560486d
|
|
576
|
+
- 560486d nirguna: plugin-fasm: convert-if-to-jmp
|
|
577
577
|
|
|
578
578
|
2025.05.23, v2.1.8
|
|
579
579
|
|
|
580
580
|
fix:
|
|
581
|
-
- d2b08a9
|
|
581
|
+
- d2b08a9 nirguna: plugin-fasm: convert-if-to-jmp
|
|
582
582
|
|
|
583
583
|
2025.05.23, v2.1.7
|
|
584
584
|
|
|
585
585
|
feature:
|
|
586
|
-
- ca5ba79
|
|
586
|
+
- ca5ba79 nirguna: printer-wasm: return
|
|
587
587
|
|
|
588
588
|
2025.05.22, v2.1.6
|
|
589
589
|
|
|
@@ -598,67 +598,67 @@ feature:
|
|
|
598
598
|
2025.05.22, v2.1.4
|
|
599
599
|
|
|
600
600
|
feature:
|
|
601
|
-
- c2341d1
|
|
601
|
+
- c2341d1 nirguna: plugin-optimizer: convert-jz-to-jmp
|
|
602
602
|
|
|
603
603
|
2025.05.22, v2.1.3
|
|
604
604
|
|
|
605
605
|
feature:
|
|
606
|
-
- f88e473
|
|
606
|
+
- f88e473 nirguna: plugin-fasm: else
|
|
607
607
|
|
|
608
608
|
2025.05.22, v2.1.2
|
|
609
609
|
|
|
610
610
|
feature:
|
|
611
|
-
- b5675c0
|
|
611
|
+
- b5675c0 nirguna: remove-useless-if
|
|
612
612
|
|
|
613
613
|
2025.05.22, v2.1.1
|
|
614
614
|
|
|
615
615
|
feature:
|
|
616
|
-
- b559718
|
|
616
|
+
- b559718 nirguna: if
|
|
617
617
|
|
|
618
618
|
2025.05.21, v2.1.0
|
|
619
619
|
|
|
620
620
|
feature:
|
|
621
|
-
- 9e1d52b
|
|
621
|
+
- 9e1d52b nirguna: fasm: if
|
|
622
622
|
|
|
623
623
|
2025.05.21, v2.0.43
|
|
624
624
|
|
|
625
625
|
feature:
|
|
626
|
-
- 6a2536b
|
|
626
|
+
- 6a2536b nirguna: wasm: if expression
|
|
627
627
|
|
|
628
628
|
2025.05.21, v2.0.42
|
|
629
629
|
|
|
630
630
|
feature:
|
|
631
|
-
- e7fc3a7
|
|
631
|
+
- e7fc3a7 nirguna: printer: wasm: else
|
|
632
632
|
|
|
633
633
|
2025.05.21, v2.0.41
|
|
634
634
|
|
|
635
635
|
feature:
|
|
636
|
-
- c1043c4
|
|
636
|
+
- c1043c4 nirguna: plugin-optimizer-wasm: remove-useless-if: add
|
|
637
637
|
|
|
638
638
|
2025.05.20, v2.0.40
|
|
639
639
|
|
|
640
640
|
feature:
|
|
641
|
-
- 5c51e85
|
|
641
|
+
- 5c51e85 nirguna: plugin-wasm: if
|
|
642
642
|
|
|
643
643
|
2025.05.19, v2.0.39
|
|
644
644
|
|
|
645
645
|
feature:
|
|
646
|
-
- 54825f9
|
|
646
|
+
- 54825f9 nirguna: printer-wasm: if: then
|
|
647
647
|
|
|
648
648
|
2025.05.19, v2.0.38
|
|
649
649
|
|
|
650
650
|
feature:
|
|
651
|
-
- 7f238dd
|
|
651
|
+
- 7f238dd nirguna: printer-wasm: return
|
|
652
652
|
|
|
653
653
|
2025.05.19, v2.0.37
|
|
654
654
|
|
|
655
655
|
feature:
|
|
656
|
-
- 117389a
|
|
656
|
+
- 117389a nirguna: plugin-optimizer-wasm: remove-useless-return
|
|
657
657
|
|
|
658
658
|
2025.05.19, v2.0.36
|
|
659
659
|
|
|
660
660
|
feature:
|
|
661
|
-
- c5fd706
|
|
661
|
+
- c5fd706 nirguna: plugin-wasm: remove-useless-return
|
|
662
662
|
|
|
663
663
|
2025.05.18, v2.0.35
|
|
664
664
|
|
|
@@ -673,7 +673,7 @@ feature:
|
|
|
673
673
|
2025.05.18, v2.0.33
|
|
674
674
|
|
|
675
675
|
feature:
|
|
676
|
-
- d88a379
|
|
676
|
+
- d88a379 nirguna: plugin-wasm: apply-i32-const
|
|
677
677
|
- 05e47a5 cli-help: add
|
|
678
678
|
|
|
679
679
|
2025.05.16, v2.0.32
|
|
@@ -684,156 +684,156 @@ feature:
|
|
|
684
684
|
2025.05.16, v2.0.31
|
|
685
685
|
|
|
686
686
|
feature:
|
|
687
|
-
- f2b3c10
|
|
687
|
+
- f2b3c10 nirguna: plugin-optimizer-fasm: cdq
|
|
688
688
|
|
|
689
689
|
2025.05.16, v2.0.30
|
|
690
690
|
|
|
691
691
|
feature:
|
|
692
|
-
- 4f32ba4
|
|
692
|
+
- 4f32ba4 nirguna: optimized: add
|
|
693
693
|
|
|
694
694
|
2025.05.15, v2.0.29
|
|
695
695
|
|
|
696
696
|
feature:
|
|
697
|
-
- 991aa14
|
|
698
|
-
- 0e810f1
|
|
697
|
+
- 991aa14 nirguna: wasm: memory
|
|
698
|
+
- 0e810f1 nirguna: wasm: memory
|
|
699
699
|
- de618a8 plugin-wasm: apply-data-address-type
|
|
700
700
|
|
|
701
701
|
2025.05.15, v2.0.29
|
|
702
702
|
|
|
703
703
|
feature:
|
|
704
|
-
- 04a4eba
|
|
704
|
+
- 04a4eba nirguna: wasm: memory
|
|
705
705
|
- de618a8 plugin-wasm: apply-data-address-type
|
|
706
706
|
|
|
707
707
|
2025.05.15, v2.0.28
|
|
708
708
|
|
|
709
709
|
feature:
|
|
710
|
-
- 78de649
|
|
710
|
+
- 78de649 nirguna: data
|
|
711
711
|
|
|
712
712
|
2025.05.14, v2.0.27
|
|
713
713
|
|
|
714
714
|
feature:
|
|
715
|
-
- 0f6d345
|
|
715
|
+
- 0f6d345 nirguna: bitness
|
|
716
716
|
|
|
717
717
|
2025.05.14, v2.0.26
|
|
718
718
|
|
|
719
719
|
fix:
|
|
720
|
-
- bb4de39
|
|
720
|
+
- bb4de39 nirguna: dump
|
|
721
721
|
|
|
722
722
|
2025.05.14, v2.0.25
|
|
723
723
|
|
|
724
724
|
fix:
|
|
725
|
-
- 5aaff5a
|
|
725
|
+
- 5aaff5a nirguna: dump
|
|
726
726
|
|
|
727
727
|
2025.05.14, v2.0.24
|
|
728
728
|
|
|
729
729
|
feature:
|
|
730
|
-
- 91f482a
|
|
730
|
+
- 91f482a nirguna: wasm: write
|
|
731
731
|
|
|
732
732
|
2025.05.14, v2.0.23
|
|
733
733
|
|
|
734
734
|
feature:
|
|
735
|
-
- c55efbe
|
|
735
|
+
- c55efbe nirguna: printer-wasm: is-wasm-type
|
|
736
736
|
|
|
737
737
|
2025.05.14, v2.0.22
|
|
738
738
|
|
|
739
739
|
fix:
|
|
740
|
-
- 8e9ac92
|
|
740
|
+
- 8e9ac92 nirguna: printer-wasm: indent
|
|
741
741
|
|
|
742
742
|
2025.05.14, v2.0.21
|
|
743
743
|
|
|
744
744
|
fix:
|
|
745
|
-
- 9ea01ab
|
|
745
|
+
- 9ea01ab nirguna: plugin-wasm: apply-types
|
|
746
746
|
|
|
747
747
|
2025.05.14, v2.0.20
|
|
748
748
|
|
|
749
749
|
fix:
|
|
750
|
-
- 106a9b5
|
|
750
|
+
- 106a9b5 nirguna: plugin-wasm: convert-const-to-local
|
|
751
751
|
|
|
752
752
|
2025.05.14, v2.0.19
|
|
753
753
|
|
|
754
754
|
feature:
|
|
755
|
-
- 50eac47
|
|
756
|
-
- ef6a811
|
|
755
|
+
- 50eac47 nirguna: plugin-wasm: move-local-on-top
|
|
756
|
+
- ef6a811 nirguna: @putout/plugin-remove-nested-blocks v9.0.0
|
|
757
757
|
|
|
758
758
|
2025.05.14, v2.0.18
|
|
759
759
|
|
|
760
760
|
feature:
|
|
761
|
-
- 900c11c
|
|
761
|
+
- 900c11c nirguna: plugin-wasm: local.set
|
|
762
762
|
- fb8cf79 bin: RAW
|
|
763
763
|
|
|
764
764
|
2025.05.13, v2.0.17
|
|
765
765
|
|
|
766
766
|
feature:
|
|
767
|
-
- 67d2a52
|
|
767
|
+
- 67d2a52 nirguna: fasm: add-label-prefix
|
|
768
768
|
|
|
769
769
|
2025.05.13, v2.0.16
|
|
770
770
|
|
|
771
771
|
feature:
|
|
772
|
-
- 5451399
|
|
772
|
+
- 5451399 nirguna: fn
|
|
773
773
|
|
|
774
774
|
2025.05.13, v2.0.15
|
|
775
775
|
|
|
776
776
|
feature:
|
|
777
|
-
- a44417b
|
|
777
|
+
- a44417b nirguna: plugin-fasm: function -> label
|
|
778
778
|
|
|
779
779
|
2025.05.12, v2.0.14
|
|
780
780
|
|
|
781
781
|
feature:
|
|
782
|
-
- 1cc3556
|
|
782
|
+
- 1cc3556 nirguna: bundle: preserve labels
|
|
783
783
|
|
|
784
784
|
2025.05.11, v2.0.13
|
|
785
785
|
|
|
786
786
|
feature:
|
|
787
|
-
- 18e28b9
|
|
788
|
-
- 5eb2a5f
|
|
787
|
+
- 18e28b9 nirguna: use rollup instead of esbuild
|
|
788
|
+
- 5eb2a5f nirguna: fasm: apply-inc
|
|
789
789
|
|
|
790
790
|
2025.05.11, v2.0.12
|
|
791
791
|
|
|
792
792
|
feature:
|
|
793
|
-
- 6ac2072
|
|
793
|
+
- 6ac2072 nirguna: fasm: apply-inc
|
|
794
794
|
|
|
795
795
|
2025.05.11, v2.0.11
|
|
796
796
|
|
|
797
797
|
feature:
|
|
798
|
-
- a01cd16
|
|
798
|
+
- a01cd16 nirguna: fasm
|
|
799
799
|
|
|
800
800
|
2025.05.10, v2.0.10
|
|
801
801
|
|
|
802
802
|
feature:
|
|
803
|
-
- 147e1d5
|
|
803
|
+
- 147e1d5 nirguna: fash: label
|
|
804
804
|
|
|
805
805
|
2025.05.09, v2.0.9
|
|
806
806
|
|
|
807
807
|
feature:
|
|
808
|
-
- 828885c
|
|
808
|
+
- 828885c nirguna: plugin-fasm: convert-dec-to-hex
|
|
809
809
|
|
|
810
810
|
2025.05.09, v2.0.8
|
|
811
811
|
|
|
812
812
|
feature:
|
|
813
|
-
- 2620673
|
|
813
|
+
- 2620673 nirguna: improve bundle support
|
|
814
814
|
|
|
815
815
|
2025.05.09, v2.0.7
|
|
816
816
|
|
|
817
817
|
feature:
|
|
818
|
-
- 8f46f13
|
|
819
|
-
- d9e46c2
|
|
818
|
+
- 8f46f13 nirguna: transform-wasm: inline-export
|
|
819
|
+
- d9e46c2 nirguna: esbuild: add
|
|
820
820
|
- 935ac70 ishara: plugins
|
|
821
|
-
- 44fb512
|
|
821
|
+
- 44fb512 nirguna: fasm
|
|
822
822
|
|
|
823
823
|
2025.05.06, v2.0.6
|
|
824
824
|
|
|
825
825
|
feature:
|
|
826
|
-
- 05da434
|
|
826
|
+
- 05da434 nirguna: binary
|
|
827
827
|
|
|
828
828
|
2025.05.06, v2.0.5
|
|
829
829
|
|
|
830
830
|
feature:
|
|
831
|
-
- 494fe12
|
|
831
|
+
- 494fe12 nirguna: wasm: add
|
|
832
832
|
|
|
833
833
|
2025.05.05, v2.0.4
|
|
834
834
|
|
|
835
835
|
feature:
|
|
836
|
-
- 3ab6443
|
|
836
|
+
- 3ab6443 nirguna: apply-function-declaration
|
|
837
837
|
|
|
838
838
|
2025.05.05, v2.0.3
|
|
839
839
|
|
|
@@ -843,4 +843,4 @@ feature:
|
|
|
843
843
|
2025.05.01, v2.0.2
|
|
844
844
|
|
|
845
845
|
feature:
|
|
846
|
-
- 943c1cb
|
|
846
|
+
- 943c1cb nirguna: operator-wast
|
package/README.md
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
#
|
|
1
|
+
# nirguna
|
|
2
2
|
|
|
3
|
-

|
|
4
|
+
|
|
5
|
+
> Nirguna (Sanskrit: निर्गुण) refers to the supreme, ultimate reality (Brahman) in Hinduism and other Indian philosophies as being without form, material attributes, or limitations (derived from nir, meaning "without," and guna, meaning "quality" or "attribute"). It signifies a transcendental, non-dual, and ineffable state of being
|
|
4
6
|
|
|
5
7
|
Compile JavaScript to WASM and Fasm.
|
|
6
8
|
|
|
@@ -9,7 +11,7 @@ Compile JavaScript to WASM and Fasm.
|
|
|
9
11
|
## Install
|
|
10
12
|
|
|
11
13
|
```
|
|
12
|
-
npm i
|
|
14
|
+
npm i nirguna -g
|
|
13
15
|
```
|
|
14
16
|
|
|
15
17
|
## Usage Example
|
|
@@ -32,13 +34,13 @@ You can compile it to fasm and wasm.
|
|
|
32
34
|
Let's compile javascript with:
|
|
33
35
|
|
|
34
36
|
```sh
|
|
35
|
-
|
|
37
|
+
nirguna --target fasm example/fn.ts -o code
|
|
36
38
|
```
|
|
37
39
|
|
|
38
40
|
To intermediate representation:
|
|
39
41
|
|
|
40
42
|
```js
|
|
41
|
-
|
|
43
|
+
__nirguna_add: {
|
|
42
44
|
mov(eax, 0x1);
|
|
43
45
|
mov(ebx, 0x2);
|
|
44
46
|
add(eax, ebx);
|
|
@@ -49,20 +51,20 @@ __ishvara_add: {
|
|
|
49
51
|
Also we can compile it with:
|
|
50
52
|
|
|
51
53
|
```sh
|
|
52
|
-
|
|
54
|
+
nirguna -t fasm example/fn.ts -o code
|
|
53
55
|
```
|
|
54
56
|
|
|
55
57
|
to assembly representation with:
|
|
56
58
|
|
|
57
59
|
```asm
|
|
58
|
-
|
|
60
|
+
__nirguna_add:
|
|
59
61
|
mov eax, 0x1
|
|
60
62
|
mov ebx, 0x2
|
|
61
63
|
add eax, ebx
|
|
62
64
|
ret
|
|
63
65
|
```
|
|
64
66
|
|
|
65
|
-
Also we can compile it to binary representation with `
|
|
67
|
+
Also we can compile it to binary representation with `nirguna fasm example/fn.ts`:
|
|
66
68
|
|
|
67
69
|
```sh
|
|
68
70
|
$ hexdump example/fn.bin
|
|
@@ -76,7 +78,7 @@ $ hexdump example/fn.bin
|
|
|
76
78
|
Let's suppose we have absolutely valid JavaScript file with types, which we can run with node v24.
|
|
77
79
|
|
|
78
80
|
```ts
|
|
79
|
-
import {create} from '#
|
|
81
|
+
import {create} from '#nirguna';
|
|
80
82
|
|
|
81
83
|
export const stack = [];
|
|
82
84
|
|
|
@@ -101,7 +103,7 @@ export function x(a: i32, b: i32): i32 {
|
|
|
101
103
|
}
|
|
102
104
|
```
|
|
103
105
|
|
|
104
|
-
Compiled with `
|
|
106
|
+
Compiled with `nirguna 1.wast.ts` to `1.wast`:
|
|
105
107
|
|
|
106
108
|
```wast
|
|
107
109
|
(module
|
|
@@ -116,7 +118,7 @@ Compiled with `ishvara 1.wast.ts` to `1.wast`:
|
|
|
116
118
|
With:
|
|
117
119
|
|
|
118
120
|
```js
|
|
119
|
-
import {compile} from '
|
|
121
|
+
import {compile} from 'nirguna/lib/nirguna.spec';
|
|
120
122
|
|
|
121
123
|
const wast = compile(wastts);
|
|
122
124
|
const binary = await translate(wast);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nirguna",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "1.0.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)",
|
|
6
6
|
"description": "Compile JavaScript to WASM and FASM",
|
|
@@ -33,14 +33,13 @@
|
|
|
33
33
|
"@nirguna/bundler": "*",
|
|
34
34
|
"@nirguna/cli-args": "*",
|
|
35
35
|
"@nirguna/cli-help": "*",
|
|
36
|
-
"@nirguna/operator-fasm": "*",
|
|
37
36
|
"@nirguna/plugin-bandler-fasm": "*",
|
|
38
|
-
"@nirguna/plugin-fasm": "
|
|
37
|
+
"@nirguna/plugin-fasm": "^1.0.0",
|
|
39
38
|
"@nirguna/plugin-nirguna": "*",
|
|
40
39
|
"@nirguna/plugin-nemesis": "*",
|
|
41
40
|
"@nirguna/plugin-optimizer-fasm": "*",
|
|
42
41
|
"@nirguna/plugin-optimizer-wasm": "*",
|
|
43
|
-
"@nirguna/plugin-wasm": "
|
|
42
|
+
"@nirguna/plugin-wasm": "^1.0.0",
|
|
44
43
|
"@nirguna/runner-fasm": "*",
|
|
45
44
|
"@nirguna/runner-wasm": "*",
|
|
46
45
|
"@putout/babel": "^5.2.12",
|
|
@@ -66,6 +65,7 @@
|
|
|
66
65
|
"putout"
|
|
67
66
|
],
|
|
68
67
|
"devDependencies": {
|
|
68
|
+
"@nirguna/operator-fasm": "^1.0.0",
|
|
69
69
|
"@putout/plugin-printer": "^7.1.1",
|
|
70
70
|
"@putout/test": "^15.1.1",
|
|
71
71
|
"c8": "^10.0.0",
|
|
@@ -98,7 +98,6 @@
|
|
|
98
98
|
"#transformer-wasm": "./packages/transformer-wasm/transformer.js",
|
|
99
99
|
"#transformer-fasm": "./packages/transformer-fasm/transformer.js",
|
|
100
100
|
"#operator-wasm": "./packages/operator-wasm/index.js",
|
|
101
|
-
"#operator-fasm": "./externals/operator-fasm/index.ts",
|
|
102
101
|
"#nirguna": "./lib/nirguna.js"
|
|
103
102
|
},
|
|
104
103
|
"license": "MIT",
|
|
@@ -3,7 +3,7 @@ import putout from 'putout';
|
|
|
3
3
|
import * as removeUselessOperand from '@putout/plugin-remove-useless-operand';
|
|
4
4
|
import * as removeNestedBlocks from '@putout/plugin-remove-nested-blocks';
|
|
5
5
|
import * as fasm from '@nirguna/plugin-fasm';
|
|
6
|
-
import * as
|
|
6
|
+
import * as nirguna from '@nirguna/plugin-nirguna';
|
|
7
7
|
import * as bundler from '@nirguna/plugin-bandler-fasm';
|
|
8
8
|
|
|
9
9
|
const defaultConfig = {
|
|
@@ -30,21 +30,21 @@ export const transform = (source, config) => {
|
|
|
30
30
|
const {code: bundled} = putout(source, {
|
|
31
31
|
isTS: true,
|
|
32
32
|
rules: {
|
|
33
|
-
'
|
|
33
|
+
'nirguna/bundler-fasm/apply-debug': ['on', {
|
|
34
34
|
debug,
|
|
35
35
|
count: 0,
|
|
36
36
|
variables,
|
|
37
37
|
functions,
|
|
38
38
|
}],
|
|
39
|
-
'
|
|
39
|
+
'nirguna/bundler-fasm/replace-section-data-with-let': ['on', {
|
|
40
40
|
variables,
|
|
41
41
|
}],
|
|
42
|
-
'
|
|
42
|
+
'nirguna/bundler-fasm/replace-section-code-with-functions': ['on', {
|
|
43
43
|
functions,
|
|
44
44
|
}],
|
|
45
45
|
},
|
|
46
46
|
plugins: [
|
|
47
|
-
['
|
|
47
|
+
['nirguna/bundler-fasm', bundler],
|
|
48
48
|
],
|
|
49
49
|
});
|
|
50
50
|
|
|
@@ -53,7 +53,7 @@ export const transform = (source, config) => {
|
|
|
53
53
|
isTS: true,
|
|
54
54
|
rules: {
|
|
55
55
|
...rules,
|
|
56
|
-
'
|
|
56
|
+
'nirguna/fasm/apply-include': ['on', {
|
|
57
57
|
readFileSync,
|
|
58
58
|
}],
|
|
59
59
|
},
|
|
@@ -61,8 +61,8 @@ export const transform = (source, config) => {
|
|
|
61
61
|
...plugins,
|
|
62
62
|
['remove-useless-operand', removeUselessOperand],
|
|
63
63
|
['remove-nested-blocks', removeNestedBlocks],
|
|
64
|
-
['
|
|
65
|
-
['
|
|
64
|
+
['nirguna/nirguna', nirguna],
|
|
65
|
+
['nirguna/fasm', fasm],
|
|
66
66
|
],
|
|
67
67
|
});
|
|
68
68
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import putout from 'putout';
|
|
2
2
|
import * as removeNestedBlocks from '@putout/plugin-remove-nested-blocks';
|
|
3
3
|
import * as esm from '@putout/plugin-esm';
|
|
4
|
-
import * as
|
|
4
|
+
import * as nirguna from '@nirguna/plugin-nirguna';
|
|
5
5
|
import * as wasm from '@nirguna/plugin-wasm';
|
|
6
6
|
|
|
7
7
|
export const transform = (source) => {
|
|
@@ -9,8 +9,8 @@ export const transform = (source) => {
|
|
|
9
9
|
fix: true,
|
|
10
10
|
isTS: true,
|
|
11
11
|
plugins: [
|
|
12
|
-
['
|
|
13
|
-
['
|
|
12
|
+
['nirguna/wasm', wasm],
|
|
13
|
+
['nirguna/nirguna', nirguna],
|
|
14
14
|
['esm', esm],
|
|
15
15
|
['remove-nested-blocks', removeNestedBlocks],
|
|
16
16
|
],
|
|
@@ -2,7 +2,7 @@ import createWabt from 'wabt';
|
|
|
2
2
|
import {tryCatch} from 'try-catch';
|
|
3
3
|
|
|
4
4
|
export const translate = async (wast, options = {}) => {
|
|
5
|
-
const {name = '
|
|
5
|
+
const {name = 'nirguna.wast', type} = options;
|
|
6
6
|
|
|
7
7
|
const {parseWat} = await createWabt();
|
|
8
8
|
const [error, parsedWat] = tryCatch(parseWat, name, wast);
|
|
File without changes
|