@markw65/monkeyc-optimizer 1.1.2 → 1.1.3
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/README.md +25 -0
- package/build/api.cjs +65 -27
- package/build/optimizer.cjs +4179 -1261
- package/build/sdk-util.cjs +7 -4
- package/build/src/api.d.ts +8 -4
- package/build/src/ast.d.ts +1 -1
- package/build/src/control-flow.d.ts +2 -1
- package/build/src/data-flow.d.ts +68 -4
- package/build/src/mc-rewrite.d.ts +1 -8
- package/build/src/optimizer-types.d.ts +22 -10
- package/build/src/optimizer.d.ts +2 -16
- package/build/src/projects.d.ts +1 -1
- package/build/src/type-flow/could-be.d.ts +1 -0
- package/build/src/type-flow/dead-store.d.ts +5 -0
- package/build/src/type-flow/interp-call.d.ts +15 -3
- package/build/src/type-flow/interp.d.ts +7 -1
- package/build/src/type-flow/optimize.d.ts +1 -0
- package/build/src/type-flow/type-flow-util.d.ts +16 -0
- package/build/src/type-flow/types.d.ts +40 -39
- package/build/src/type-flow/union-type.d.ts +1 -0
- package/build/src/type-flow.d.ts +11 -2
- package/build/src/unused-exprs.d.ts +1 -1
- package/build/src/util.d.ts +3 -2
- package/build/src/worker-task.d.ts +2 -16
- package/build/util.cjs +10 -1
- package/package.json +2 -2
|
@@ -24,14 +24,7 @@ export declare const workerTaskHandlers: {
|
|
|
24
24
|
program: string;
|
|
25
25
|
product: string | null;
|
|
26
26
|
hasTests: boolean;
|
|
27
|
-
diagnostics: Record<string,
|
|
28
|
-
type: import("./optimizer-types").DiagnosticType;
|
|
29
|
-
loc: {
|
|
30
|
-
start: import("@markw65/prettier-plugin-monkeyc/build/estree-types").Position;
|
|
31
|
-
end: import("@markw65/prettier-plugin-monkeyc/build/estree-types").Position;
|
|
32
|
-
};
|
|
33
|
-
message: string;
|
|
34
|
-
}[]> | undefined;
|
|
27
|
+
diagnostics: Record<string, import("./optimizer-types").Diagnostic[]> | undefined;
|
|
35
28
|
}>;
|
|
36
29
|
readonly generateOptimizedProject: (data: GenerateOptimizedProject["data"]) => Promise<{
|
|
37
30
|
jungleFiles: string | undefined;
|
|
@@ -44,14 +37,7 @@ export declare const workerTaskHandlers: {
|
|
|
44
37
|
xml: import("./xml-util").Document;
|
|
45
38
|
program: string;
|
|
46
39
|
hasTests: boolean;
|
|
47
|
-
diagnostics: Record<string,
|
|
48
|
-
type: import("./optimizer-types").DiagnosticType;
|
|
49
|
-
loc: {
|
|
50
|
-
start: import("@markw65/prettier-plugin-monkeyc/build/estree-types").Position;
|
|
51
|
-
end: import("@markw65/prettier-plugin-monkeyc/build/estree-types").Position;
|
|
52
|
-
};
|
|
53
|
-
message: string;
|
|
54
|
-
}[]>;
|
|
40
|
+
diagnostics: Record<string, import("./optimizer-types").Diagnostic[]>;
|
|
55
41
|
}>;
|
|
56
42
|
};
|
|
57
43
|
declare type RemovePromise<T> = T extends Promise<infer U> ? U : T;
|
package/build/util.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
0 && (module.exports = {copyRecursiveAsNeeded,every,first_modified,forEach,globSome,globa,last_modified,map,promiseAll,pushUnique,readByLine,reduce,sameArrays,some,spawnByLine});
|
|
1
|
+
0 && (module.exports = {copyRecursiveAsNeeded,every,first_modified,forEach,globSome,globa,last_modified,map,popcount,promiseAll,pushUnique,readByLine,reduce,sameArrays,some,spawnByLine});
|
|
2
2
|
/******/ (() => { // webpackBootstrap
|
|
3
3
|
/******/ var __webpack_modules__ = ({
|
|
4
4
|
|
|
@@ -7720,6 +7720,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
7720
7720
|
"globa": () => (/* binding */ globa),
|
|
7721
7721
|
"last_modified": () => (/* binding */ last_modified),
|
|
7722
7722
|
"map": () => (/* binding */ map),
|
|
7723
|
+
"popcount": () => (/* binding */ popcount),
|
|
7723
7724
|
"promiseAll": () => (/* binding */ promiseAll),
|
|
7724
7725
|
"pushUnique": () => (/* binding */ pushUnique),
|
|
7725
7726
|
"readByLine": () => (/* binding */ readByLine),
|
|
@@ -7944,6 +7945,14 @@ async function copyRecursiveAsNeeded(source, target, filter) {
|
|
|
7944
7945
|
}
|
|
7945
7946
|
}
|
|
7946
7947
|
}
|
|
7948
|
+
function popcount(x) {
|
|
7949
|
+
x -= (x >> 1) & 0x55555555;
|
|
7950
|
+
x = (x & 0x33333333) + ((x >> 2) & 0x33333333);
|
|
7951
|
+
x = (x + (x >> 4)) & 0x0f0f0f0f;
|
|
7952
|
+
x += x >> 8;
|
|
7953
|
+
x += x >> 16;
|
|
7954
|
+
return x & 0x7f;
|
|
7955
|
+
}
|
|
7947
7956
|
|
|
7948
7957
|
})();
|
|
7949
7958
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@markw65/monkeyc-optimizer",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.1.
|
|
4
|
+
"version": "1.1.3",
|
|
5
5
|
"description": "Source to source optimizer for Garmin Monkey C code",
|
|
6
6
|
"main": "build/optimizer.cjs",
|
|
7
7
|
"types": "build/src/optimizer.d.ts",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"author": "markw65",
|
|
41
41
|
"license": "MIT",
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@markw65/prettier-plugin-monkeyc": "^1.0.
|
|
43
|
+
"@markw65/prettier-plugin-monkeyc": "^1.0.42"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"@types/chai": "^4.3.4",
|