@nirguna/plugin-fasm 1.3.0 → 1.4.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.
@@ -2,19 +2,7 @@ import {types} from 'putout';
2
2
 
3
3
  const {isArrayExpression} = types;
4
4
 
5
- function getType(arg) {
6
- return arg.__nirguna_type || 'i16';
7
- }
8
-
9
- export const report = (path) => {
10
- const arg1 = path.get('left.0');
11
- const arg2 = path.get('right.0');
12
- const type1 = getType(arg1);
13
- const type2 = getType(arg2);
14
-
15
- if (type1 !== type2)
16
- return `Types mismatch: '${arg1}:${type1} = ${arg2}:${type2}'`;
17
-
5
+ export const report = () => {
18
6
  return `Use registers to address memory`;
19
7
  };
20
8
 
@@ -25,16 +13,8 @@ export const match = () => ({
25
13
  });
26
14
 
27
15
  export const replace = () => ({
28
- '[__a] = [__b]': (vars, path) => {
29
- const arg1 = path.get('left.0');
30
- const arg2 = path.get('right.0');
31
- const type1 = getType(arg1);
32
- const type2 = getType(arg2);
33
-
34
- if (type1 !== type2)
35
- return path;
36
-
37
- const reg = type1 === 'i8' ? 'al' : 'ax';
16
+ '[__a] = [__b]': () => {
17
+ const reg = 'ax';
38
18
 
39
19
  return `{
40
20
  mov(${reg}, [__b]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nirguna/plugin-fasm",
3
- "version": "1.3.0",
3
+ "version": "1.4.0",
4
4
  "type": "module",
5
5
  "author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)",
6
6
  "description": "🐊nirguna plugin adds ability to optimize fasm",