@markw65/monkeyc-optimizer 1.1.89 → 1.1.91
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.md +10 -0
- package/build/api.cjs +44 -44
- package/build/cftinfo.cjs +7 -9
- package/build/{chunk-X7QCZR3F.cjs → chunk-KHQPCXSJ.cjs} +449 -517
- package/build/{chunk-7CG7CM26.cjs → chunk-OCIRSLOJ.cjs} +4078 -4547
- package/build/{chunk-JDC43A3I.cjs → chunk-UBAYZSM3.cjs} +15 -25
- package/build/{chunk-ABYVSU2C.cjs → chunk-VS2QQHAK.cjs} +5 -6
- package/build/optimizer.cjs +22 -22
- package/build/sdk-util.cjs +17 -17
- package/build/src/type-flow/inference-type.d.ts +2 -0
- package/build/src/type-flow/interp.d.ts +1 -1
- package/build/src/type-flow/types.d.ts +5 -1
- package/build/src/unzip7.d.ts +3 -0
- package/build/util.cjs +27 -27
- package/build/worker-thread.cjs +7 -7
- package/package.json +4 -3
|
@@ -16,8 +16,8 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
16
16
|
return to;
|
|
17
17
|
};
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var
|
|
20
|
-
__export(
|
|
19
|
+
var chunk_UBAYZSM3_exports = {};
|
|
20
|
+
__export(chunk_UBAYZSM3_exports, {
|
|
21
21
|
adjustLoc: () => adjustLoc,
|
|
22
22
|
cloneDeep: () => cloneDeep,
|
|
23
23
|
getLiteralNode: () => getLiteralNode,
|
|
@@ -36,23 +36,21 @@ __export(chunk_JDC43A3I_exports, {
|
|
|
36
36
|
withLocDeep: () => withLocDeep,
|
|
37
37
|
wrap: () => wrap
|
|
38
38
|
});
|
|
39
|
-
module.exports = __toCommonJS(
|
|
40
|
-
var
|
|
39
|
+
module.exports = __toCommonJS(chunk_UBAYZSM3_exports);
|
|
40
|
+
var import_chunk_VS2QQHAK = require("./chunk-VS2QQHAK.cjs");
|
|
41
41
|
var import_prettier_plugin_monkeyc = require("@markw65/prettier-plugin-monkeyc");
|
|
42
42
|
function isMCTreeNode(node) {
|
|
43
43
|
return node ? typeof node === "object" && "type" in node : false;
|
|
44
44
|
}
|
|
45
45
|
function traverseAst(node, pre, post, parent) {
|
|
46
46
|
const nodes = pre && pre(node);
|
|
47
|
-
if (nodes === false)
|
|
48
|
-
return;
|
|
47
|
+
if (nodes === false) return;
|
|
49
48
|
if (!mctreeTypeInfo[node.type]) {
|
|
50
49
|
throw new Error("what?");
|
|
51
50
|
}
|
|
52
51
|
for (const key of nodes || mctreeTypeInfo[node.type].keys) {
|
|
53
52
|
const value = node[key];
|
|
54
|
-
if (!value)
|
|
55
|
-
continue;
|
|
53
|
+
if (!value) continue;
|
|
56
54
|
if (Array.isArray(value)) {
|
|
57
55
|
const values = value;
|
|
58
56
|
const deletions = values.reduce(
|
|
@@ -60,12 +58,10 @@ function traverseAst(node, pre, post, parent) {
|
|
|
60
58
|
if (isMCTreeNode(obj)) {
|
|
61
59
|
const repl = traverseAst(obj, pre, post, node);
|
|
62
60
|
if (repl === false) {
|
|
63
|
-
if (!state)
|
|
64
|
-
state = {};
|
|
61
|
+
if (!state) state = {};
|
|
65
62
|
state[i] = true;
|
|
66
63
|
} else if (repl != null) {
|
|
67
|
-
if (!state)
|
|
68
|
-
state = {};
|
|
64
|
+
if (!state) state = {};
|
|
69
65
|
values[i] = repl;
|
|
70
66
|
}
|
|
71
67
|
}
|
|
@@ -130,8 +126,7 @@ function hasProperty(obj, prop) {
|
|
|
130
126
|
function withLoc(node, start, end) {
|
|
131
127
|
if (start && start.loc) {
|
|
132
128
|
node.start = start.start;
|
|
133
|
-
if (!node.end)
|
|
134
|
-
node.end = start.end;
|
|
129
|
+
if (!node.end) node.end = start.end;
|
|
135
130
|
node.loc = { ...node.loc || start.loc, start: start.loc.start };
|
|
136
131
|
if (end === start && start.origins) {
|
|
137
132
|
node.origins = start.origins;
|
|
@@ -155,8 +150,7 @@ function withLocDeep(node, start, end, inplace) {
|
|
|
155
150
|
}
|
|
156
151
|
for (const key of mctreeTypeInfo[node.type].keys) {
|
|
157
152
|
const value = node[key];
|
|
158
|
-
if (!value)
|
|
159
|
-
continue;
|
|
153
|
+
if (!value) continue;
|
|
160
154
|
const fix = (v) => isMCTreeNode(v) ? withLocDeep(v, start, end, inplace) : v;
|
|
161
155
|
const repl = Array.isArray(value) ? value.map(fix) : fix(value);
|
|
162
156
|
inplace || (node[key] = repl);
|
|
@@ -257,21 +251,17 @@ function makeScopedName(dotted, l, base) {
|
|
|
257
251
|
},
|
|
258
252
|
{ cur: base, offset: 0 }
|
|
259
253
|
).cur;
|
|
260
|
-
if (!result)
|
|
261
|
-
throw new Error("Failed to make a ScopedName");
|
|
254
|
+
if (!result) throw new Error("Failed to make a ScopedName");
|
|
262
255
|
return result;
|
|
263
256
|
}
|
|
264
257
|
function getLiteralNode(node) {
|
|
265
|
-
if (node == null)
|
|
266
|
-
|
|
267
|
-
if (node.type === "Literal")
|
|
268
|
-
return node;
|
|
258
|
+
if (node == null) return null;
|
|
259
|
+
if (node.type === "Literal") return node;
|
|
269
260
|
if (node.type === "BinaryExpression" && node.operator === "as") {
|
|
270
261
|
return getLiteralNode(node.left) && node;
|
|
271
262
|
}
|
|
272
263
|
if (node.type === "UnaryExpression") {
|
|
273
|
-
if (node.argument.type !== "Literal")
|
|
274
|
-
return null;
|
|
264
|
+
if (node.argument.type !== "Literal") return null;
|
|
275
265
|
switch (node.operator) {
|
|
276
266
|
case "-": {
|
|
277
267
|
const [arg, type] = getNodeValue(node.argument);
|
|
@@ -284,7 +274,7 @@ function getLiteralNode(node) {
|
|
|
284
274
|
return null;
|
|
285
275
|
}
|
|
286
276
|
var mctreeTypeInfo;
|
|
287
|
-
var init_ast = (0,
|
|
277
|
+
var init_ast = (0, import_chunk_VS2QQHAK.__esm)({
|
|
288
278
|
"src/ast.ts"() {
|
|
289
279
|
"use strict";
|
|
290
280
|
mctreeTypeInfo = {
|
|
@@ -16,15 +16,15 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
16
16
|
return to;
|
|
17
17
|
};
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var
|
|
20
|
-
__export(
|
|
19
|
+
var chunk_VS2QQHAK_exports = {};
|
|
20
|
+
__export(chunk_VS2QQHAK_exports, {
|
|
21
21
|
__commonJS: () => __commonJS,
|
|
22
22
|
__esm: () => __esm,
|
|
23
23
|
__export: () => __export2,
|
|
24
24
|
__require: () => __require,
|
|
25
25
|
__toESM: () => __toESM
|
|
26
26
|
});
|
|
27
|
-
module.exports = __toCommonJS(
|
|
27
|
+
module.exports = __toCommonJS(chunk_VS2QQHAK_exports);
|
|
28
28
|
var __create = Object.create;
|
|
29
29
|
var __defProp2 = Object.defineProperty;
|
|
30
30
|
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
@@ -34,9 +34,8 @@ var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
|
|
34
34
|
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
35
35
|
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
|
36
36
|
}) : x)(function(x) {
|
|
37
|
-
if (typeof require !== "undefined")
|
|
38
|
-
|
|
39
|
-
throw new Error('Dynamic require of "' + x + '" is not supported');
|
|
37
|
+
if (typeof require !== "undefined") return require.apply(this, arguments);
|
|
38
|
+
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
40
39
|
});
|
|
41
40
|
var __esm = (fn, res) => function __init() {
|
|
42
41
|
return fn && (res = (0, fn[__getOwnPropNames2(fn)[0]])(fn = 0)), res;
|
package/build/optimizer.cjs
CHANGED
|
@@ -18,30 +18,30 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
19
|
var optimizer_exports = {};
|
|
20
20
|
__export(optimizer_exports, {
|
|
21
|
-
StateNodeAttributes: () =>
|
|
22
|
-
buildConfigDescription: () =>
|
|
23
|
-
buildOptimizedProject: () =>
|
|
24
|
-
copyRecursiveAsNeeded: () =>
|
|
25
|
-
defaultConfig: () =>
|
|
26
|
-
display: () =>
|
|
27
|
-
generateOneConfig: () =>
|
|
28
|
-
generateOptimizedProject: () =>
|
|
29
|
-
getConfig: () =>
|
|
30
|
-
getFnMapAnalysis: () =>
|
|
31
|
-
getProjectAnalysis: () =>
|
|
32
|
-
get_jungle: () =>
|
|
33
|
-
isErrorWithLocation: () =>
|
|
34
|
-
launchSimulator: () =>
|
|
35
|
-
manifestProducts: () =>
|
|
36
|
-
mctree: () =>
|
|
37
|
-
simulateProgram: () =>
|
|
21
|
+
StateNodeAttributes: () => import_chunk_OCIRSLOJ.StateNodeAttributes,
|
|
22
|
+
buildConfigDescription: () => import_chunk_OCIRSLOJ.buildConfigDescription,
|
|
23
|
+
buildOptimizedProject: () => import_chunk_OCIRSLOJ.buildOptimizedProject,
|
|
24
|
+
copyRecursiveAsNeeded: () => import_chunk_KHQPCXSJ.copyRecursiveAsNeeded,
|
|
25
|
+
defaultConfig: () => import_chunk_OCIRSLOJ.defaultConfig,
|
|
26
|
+
display: () => import_chunk_OCIRSLOJ.display,
|
|
27
|
+
generateOneConfig: () => import_chunk_OCIRSLOJ.generateOneConfig,
|
|
28
|
+
generateOptimizedProject: () => import_chunk_OCIRSLOJ.generateOptimizedProject,
|
|
29
|
+
getConfig: () => import_chunk_OCIRSLOJ.getConfig,
|
|
30
|
+
getFnMapAnalysis: () => import_chunk_OCIRSLOJ.getFnMapAnalysis,
|
|
31
|
+
getProjectAnalysis: () => import_chunk_OCIRSLOJ.getProjectAnalysis,
|
|
32
|
+
get_jungle: () => import_chunk_OCIRSLOJ.get_jungle,
|
|
33
|
+
isErrorWithLocation: () => import_chunk_OCIRSLOJ.isErrorWithLocation,
|
|
34
|
+
launchSimulator: () => import_chunk_OCIRSLOJ.launchSimulator,
|
|
35
|
+
manifestProducts: () => import_chunk_OCIRSLOJ.manifestProducts,
|
|
36
|
+
mctree: () => import_chunk_OCIRSLOJ.mctree,
|
|
37
|
+
simulateProgram: () => import_chunk_OCIRSLOJ.simulateProgram
|
|
38
38
|
});
|
|
39
39
|
module.exports = __toCommonJS(optimizer_exports);
|
|
40
|
-
var
|
|
41
|
-
var
|
|
42
|
-
var
|
|
43
|
-
var
|
|
44
|
-
(0,
|
|
40
|
+
var import_chunk_OCIRSLOJ = require("./chunk-OCIRSLOJ.cjs");
|
|
41
|
+
var import_chunk_KHQPCXSJ = require("./chunk-KHQPCXSJ.cjs");
|
|
42
|
+
var import_chunk_UBAYZSM3 = require("./chunk-UBAYZSM3.cjs");
|
|
43
|
+
var import_chunk_VS2QQHAK = require("./chunk-VS2QQHAK.cjs");
|
|
44
|
+
(0, import_chunk_OCIRSLOJ.init_optimizer)();
|
|
45
45
|
// Annotate the CommonJS export names for ESM import in node:
|
|
46
46
|
0 && (module.exports = {
|
|
47
47
|
StateNodeAttributes,
|
package/build/sdk-util.cjs
CHANGED
|
@@ -18,25 +18,25 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
19
|
var sdk_util_exports = {};
|
|
20
20
|
__export(sdk_util_exports, {
|
|
21
|
-
SectionKinds: () =>
|
|
22
|
-
appSupport: () =>
|
|
23
|
-
connectiq: () =>
|
|
24
|
-
getDeviceInfo: () =>
|
|
25
|
-
getFunctionDocumentation: () =>
|
|
26
|
-
getLanguages: () =>
|
|
27
|
-
getSdkPath: () =>
|
|
28
|
-
isWin: () =>
|
|
29
|
-
optimizeProgram: () =>
|
|
30
|
-
readPrg: () =>
|
|
31
|
-
readPrgWithOffsets: () =>
|
|
32
|
-
xmlUtil: () =>
|
|
21
|
+
SectionKinds: () => import_chunk_OCIRSLOJ.SectionKinds,
|
|
22
|
+
appSupport: () => import_chunk_OCIRSLOJ.appSupport,
|
|
23
|
+
connectiq: () => import_chunk_OCIRSLOJ.connectiq,
|
|
24
|
+
getDeviceInfo: () => import_chunk_OCIRSLOJ.getDeviceInfo,
|
|
25
|
+
getFunctionDocumentation: () => import_chunk_OCIRSLOJ.getFunctionDocumentation,
|
|
26
|
+
getLanguages: () => import_chunk_OCIRSLOJ.getLanguages,
|
|
27
|
+
getSdkPath: () => import_chunk_OCIRSLOJ.getSdkPath,
|
|
28
|
+
isWin: () => import_chunk_OCIRSLOJ.isWin,
|
|
29
|
+
optimizeProgram: () => import_chunk_OCIRSLOJ.optimizeProgram,
|
|
30
|
+
readPrg: () => import_chunk_OCIRSLOJ.readPrg,
|
|
31
|
+
readPrgWithOffsets: () => import_chunk_OCIRSLOJ.readPrgWithOffsets,
|
|
32
|
+
xmlUtil: () => import_chunk_OCIRSLOJ.xml_util_exports
|
|
33
33
|
});
|
|
34
34
|
module.exports = __toCommonJS(sdk_util_exports);
|
|
35
|
-
var
|
|
36
|
-
var
|
|
37
|
-
var
|
|
38
|
-
var
|
|
39
|
-
(0,
|
|
35
|
+
var import_chunk_OCIRSLOJ = require("./chunk-OCIRSLOJ.cjs");
|
|
36
|
+
var import_chunk_KHQPCXSJ = require("./chunk-KHQPCXSJ.cjs");
|
|
37
|
+
var import_chunk_UBAYZSM3 = require("./chunk-UBAYZSM3.cjs");
|
|
38
|
+
var import_chunk_VS2QQHAK = require("./chunk-VS2QQHAK.cjs");
|
|
39
|
+
(0, import_chunk_OCIRSLOJ.init_sdk_util)();
|
|
40
40
|
// Annotate the CommonJS export names for ESM import in node:
|
|
41
41
|
0 && (module.exports = {
|
|
42
42
|
SectionKinds,
|
|
@@ -38,7 +38,7 @@ export declare function evaluateUnaryTypes(op: mctree.UnaryOperator, argument: E
|
|
|
38
38
|
type: ExactOrUnion;
|
|
39
39
|
} & OpMatch;
|
|
40
40
|
export declare function deEnumerate(t: ExactOrUnion): ExactOrUnion;
|
|
41
|
-
export declare function getLhsConstraint(istate: InterpState, node: mctree.MemberExpression | mctree.Identifier): import("./types").UnionType | import("./types").NumberType | import("./types").LongType | import("./types").FloatType | import("./types").DoubleType | import("./types").CharType | import("./types").StringType | import("./types").ArrayType | import("./types").DictionaryType | import("./types").MethodType | import("./types").ModuleType | import("./types").FunctionType | import("./types").ClassType | ObjectType | import("./types").EnumType | import("./types").SymbolType | import("./types").TypedefType | null
|
|
41
|
+
export declare function getLhsConstraint(istate: InterpState, node: mctree.MemberExpression | mctree.Identifier): import("./types").UnionType | import("./types").NumberType | import("./types").LongType | import("./types").FloatType | import("./types").DoubleType | import("./types").CharType | import("./types").StringType | import("./types").ArrayType | import("./types").DictionaryType | import("./types").MethodType | import("./types").ModuleType | import("./types").FunctionType | import("./types").ClassType | ObjectType | import("./types").EnumType | import("./types").SymbolType | import("./types").TypedefType | null;
|
|
42
42
|
export declare function evaluateNode(istate: InterpState, node: mctree.Node): void;
|
|
43
43
|
export declare function roundToFloat(value: number): number;
|
|
44
44
|
export declare function mustBeIdentical(a: ExactOrUnion, b: ExactOrUnion): boolean;
|
|
@@ -184,7 +184,9 @@ export declare function isSingleton(v: AbstractValue): v is SingletonType;
|
|
|
184
184
|
export declare function hasValue(v: AbstractValue): v is WithValue<ExactTypes>;
|
|
185
185
|
export declare function hasNoData(v: AbstractValue, t: TypeTag): boolean;
|
|
186
186
|
export declare function cloneType<T extends ExactOrUnion>(t: T): T;
|
|
187
|
-
export declare function relaxType(type: ExactOrUnion):
|
|
187
|
+
export declare function relaxType(type: ExactOrUnion): {
|
|
188
|
+
type: number;
|
|
189
|
+
};
|
|
188
190
|
export declare function typeFromTypeStateNode(state: ProgramStateAnalysis, sn: StateNodeDecl, classVsObj?: boolean): ExactOrUnion;
|
|
189
191
|
export declare function typeFromTypeStateNodes(state: ProgramStateAnalysis, sns: StateNodeDecl[], classVsObj?: boolean): ExactOrUnion;
|
|
190
192
|
export declare function arrayLiteralKeyFromType(k: ExactOrUnion | null | undefined): number | null;
|
|
@@ -213,4 +215,6 @@ export declare function getStateNodeDeclsWithExactFromType(state: ProgramStateAn
|
|
|
213
215
|
exact: boolean;
|
|
214
216
|
}[];
|
|
215
217
|
export declare function typeFromEnumValue(arg: EnumType["value"] | null): UnionType | NumberType | LongType | FloatType | DoubleType | CharType | StringType | ArrayType | DictionaryType | MethodType | ModuleType | FunctionType | ClassType | ObjectType | EnumType | SymbolType | TypedefType;
|
|
218
|
+
export type ActiveTypeMap = Map<ExactOrUnion, Set<ExactOrUnion>>;
|
|
219
|
+
export declare function guardRecursiveTypedef<T>(activeTypeMap: ActiveTypeMap, a: ExactOrUnion, b: ExactOrUnion, callback: (a: ExactOrUnion, b: ExactOrUnion) => T): true | T;
|
|
216
220
|
export {};
|
package/build/util.cjs
CHANGED
|
@@ -18,35 +18,35 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
19
|
var util_exports = {};
|
|
20
20
|
__export(util_exports, {
|
|
21
|
-
AwaitedError: () =>
|
|
22
|
-
GenericQueue: () =>
|
|
23
|
-
bumpLogging: () =>
|
|
24
|
-
copyRecursiveAsNeeded: () =>
|
|
25
|
-
every: () =>
|
|
26
|
-
first_modified: () =>
|
|
27
|
-
forEach: () =>
|
|
28
|
-
globSome: () =>
|
|
29
|
-
globa: () =>
|
|
30
|
-
last_modified: () =>
|
|
31
|
-
log: () =>
|
|
32
|
-
logPromise: () =>
|
|
33
|
-
logger: () =>
|
|
34
|
-
map: () =>
|
|
35
|
-
popcount: () =>
|
|
36
|
-
promiseAll: () =>
|
|
37
|
-
pushUnique: () =>
|
|
38
|
-
readByLine: () =>
|
|
39
|
-
reduce: () =>
|
|
40
|
-
sameArrays: () =>
|
|
41
|
-
setBanner: () =>
|
|
42
|
-
some: () =>
|
|
43
|
-
spawnByLine: () =>
|
|
44
|
-
wouldLog: () =>
|
|
21
|
+
AwaitedError: () => import_chunk_KHQPCXSJ.AwaitedError,
|
|
22
|
+
GenericQueue: () => import_chunk_KHQPCXSJ.GenericQueue,
|
|
23
|
+
bumpLogging: () => import_chunk_KHQPCXSJ.bumpLogging,
|
|
24
|
+
copyRecursiveAsNeeded: () => import_chunk_KHQPCXSJ.copyRecursiveAsNeeded,
|
|
25
|
+
every: () => import_chunk_KHQPCXSJ.every,
|
|
26
|
+
first_modified: () => import_chunk_KHQPCXSJ.first_modified,
|
|
27
|
+
forEach: () => import_chunk_KHQPCXSJ.forEach,
|
|
28
|
+
globSome: () => import_chunk_KHQPCXSJ.globSome,
|
|
29
|
+
globa: () => import_chunk_KHQPCXSJ.globa,
|
|
30
|
+
last_modified: () => import_chunk_KHQPCXSJ.last_modified,
|
|
31
|
+
log: () => import_chunk_KHQPCXSJ.log,
|
|
32
|
+
logPromise: () => import_chunk_KHQPCXSJ.logPromise,
|
|
33
|
+
logger: () => import_chunk_KHQPCXSJ.logger,
|
|
34
|
+
map: () => import_chunk_KHQPCXSJ.map,
|
|
35
|
+
popcount: () => import_chunk_KHQPCXSJ.popcount,
|
|
36
|
+
promiseAll: () => import_chunk_KHQPCXSJ.promiseAll,
|
|
37
|
+
pushUnique: () => import_chunk_KHQPCXSJ.pushUnique,
|
|
38
|
+
readByLine: () => import_chunk_KHQPCXSJ.readByLine,
|
|
39
|
+
reduce: () => import_chunk_KHQPCXSJ.reduce,
|
|
40
|
+
sameArrays: () => import_chunk_KHQPCXSJ.sameArrays,
|
|
41
|
+
setBanner: () => import_chunk_KHQPCXSJ.setBanner,
|
|
42
|
+
some: () => import_chunk_KHQPCXSJ.some,
|
|
43
|
+
spawnByLine: () => import_chunk_KHQPCXSJ.spawnByLine,
|
|
44
|
+
wouldLog: () => import_chunk_KHQPCXSJ.wouldLog
|
|
45
45
|
});
|
|
46
46
|
module.exports = __toCommonJS(util_exports);
|
|
47
|
-
var
|
|
48
|
-
var
|
|
49
|
-
(0,
|
|
47
|
+
var import_chunk_KHQPCXSJ = require("./chunk-KHQPCXSJ.cjs");
|
|
48
|
+
var import_chunk_VS2QQHAK = require("./chunk-VS2QQHAK.cjs");
|
|
49
|
+
(0, import_chunk_KHQPCXSJ.init_util)();
|
|
50
50
|
// Annotate the CommonJS export names for ESM import in node:
|
|
51
51
|
0 && (module.exports = {
|
|
52
52
|
AwaitedError,
|
package/build/worker-thread.cjs
CHANGED
|
@@ -21,17 +21,17 @@ __export(worker_thread_exports, {
|
|
|
21
21
|
default: () => worker_thread_default
|
|
22
22
|
});
|
|
23
23
|
module.exports = __toCommonJS(worker_thread_exports);
|
|
24
|
-
var
|
|
25
|
-
var
|
|
26
|
-
var
|
|
27
|
-
var
|
|
24
|
+
var import_chunk_OCIRSLOJ = require("./chunk-OCIRSLOJ.cjs");
|
|
25
|
+
var import_chunk_KHQPCXSJ = require("./chunk-KHQPCXSJ.cjs");
|
|
26
|
+
var import_chunk_UBAYZSM3 = require("./chunk-UBAYZSM3.cjs");
|
|
27
|
+
var import_chunk_VS2QQHAK = require("./chunk-VS2QQHAK.cjs");
|
|
28
28
|
var import_node_worker_threads = require("node:worker_threads");
|
|
29
|
-
var require_worker_thread = (0,
|
|
29
|
+
var require_worker_thread = (0, import_chunk_VS2QQHAK.__commonJS)({
|
|
30
30
|
"src/worker-thread.ts"() {
|
|
31
|
-
(0,
|
|
31
|
+
(0, import_chunk_OCIRSLOJ.init_worker_task)();
|
|
32
32
|
if (import_node_worker_threads.parentPort) {
|
|
33
33
|
import_node_worker_threads.parentPort.on("message", async (task) => {
|
|
34
|
-
return import_node_worker_threads.parentPort.postMessage(await (0,
|
|
34
|
+
return import_node_worker_threads.parentPort.postMessage(await (0, import_chunk_OCIRSLOJ.performTask)(task));
|
|
35
35
|
});
|
|
36
36
|
}
|
|
37
37
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@markw65/monkeyc-optimizer",
|
|
3
3
|
"type": "commonjs",
|
|
4
|
-
"version": "1.1.
|
|
4
|
+
"version": "1.1.91",
|
|
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",
|
|
@@ -56,7 +56,8 @@
|
|
|
56
56
|
"author": "markw65",
|
|
57
57
|
"license": "MIT",
|
|
58
58
|
"dependencies": {
|
|
59
|
-
"@markw65/prettier-plugin-monkeyc": "^1.0.61"
|
|
59
|
+
"@markw65/prettier-plugin-monkeyc": "^1.0.61",
|
|
60
|
+
"7z-wasm": "^1.2.0"
|
|
60
61
|
},
|
|
61
62
|
"devDependencies": {
|
|
62
63
|
"@markw65/peggy-optimizer": "^1.0.1",
|
|
@@ -70,7 +71,7 @@
|
|
|
70
71
|
"@typescript-eslint/eslint-plugin": "^5.28.0",
|
|
71
72
|
"@typescript-eslint/parser": "^5.28.0",
|
|
72
73
|
"chai": "^4.3.7",
|
|
73
|
-
"esbuild": "^0.
|
|
74
|
+
"esbuild": "^0.25.8",
|
|
74
75
|
"eslint": "^8.12.0",
|
|
75
76
|
"extract-zip": "^2.0.1",
|
|
76
77
|
"fast-glob": "^3.2.12",
|