@markw65/monkeyc-optimizer 1.1.49 → 1.1.51
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 +11 -0
- package/bin/cft-font-info.js +0 -0
- package/build/api.cjs +34 -34
- package/build/{chunk-DZ7YMTUE.cjs → chunk-HKWBVOEL.cjs} +49 -12
- package/build/optimizer.cjs +16 -16
- package/build/sdk-util.cjs +14 -14
- package/build/src/inliner.d.ts +1 -0
- package/build/worker-thread.cjs +3 -3
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,17 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to the "monkeyc-optimizer" package will be documented in this file.
|
|
4
4
|
|
|
5
|
+
### 1.1.51
|
|
6
|
+
|
|
7
|
+
- Fix a bug where a call with mismatched arguments could be marked as side-effect free, and then removed.
|
|
8
|
+
- Don't inline functions with mis-matched arguments, and issue a diagnostic.
|
|
9
|
+
|
|
10
|
+
### 1.1.50
|
|
11
|
+
|
|
12
|
+
- Add a diagnostic when an inline function doesn't get removed
|
|
13
|
+
- No diagnostics for String + Symbol, or String + Method, or String + Object, or String + Enum (Fixes #9)
|
|
14
|
+
- Fix a bug in minimizeLocals (Fixes #15)
|
|
15
|
+
|
|
5
16
|
### 1.1.49
|
|
6
17
|
|
|
7
18
|
- Fix a bug in cleanupUnusedVars that could cause the wrong variable to be removed
|
package/bin/cft-font-info.js
CHANGED
|
File without changes
|
package/build/api.cjs
CHANGED
|
@@ -18,47 +18,47 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
19
|
var api_exports = {};
|
|
20
20
|
__export(api_exports, {
|
|
21
|
-
checkCompilerVersion: () =>
|
|
22
|
-
collectNamespaces: () =>
|
|
23
|
-
createDocumentationMap: () =>
|
|
24
|
-
diagnostic: () =>
|
|
25
|
-
diagnosticHelper: () =>
|
|
26
|
-
findNamesInScope: () =>
|
|
27
|
-
findUsingForNode: () =>
|
|
28
|
-
formatAst: () =>
|
|
29
|
-
formatAstLongLines: () =>
|
|
30
|
-
formatScopedName: () =>
|
|
31
|
-
getApiFunctionInfo: () =>
|
|
32
|
-
getApiMapping: () =>
|
|
33
|
-
getSuperClasses: () =>
|
|
21
|
+
checkCompilerVersion: () => import_chunk_HKWBVOEL.checkCompilerVersion,
|
|
22
|
+
collectNamespaces: () => import_chunk_HKWBVOEL.collectNamespaces,
|
|
23
|
+
createDocumentationMap: () => import_chunk_HKWBVOEL.createDocumentationMap,
|
|
24
|
+
diagnostic: () => import_chunk_HKWBVOEL.diagnostic,
|
|
25
|
+
diagnosticHelper: () => import_chunk_HKWBVOEL.diagnosticHelper,
|
|
26
|
+
findNamesInScope: () => import_chunk_HKWBVOEL.findNamesInScope,
|
|
27
|
+
findUsingForNode: () => import_chunk_HKWBVOEL.findUsingForNode,
|
|
28
|
+
formatAst: () => import_chunk_HKWBVOEL.formatAst,
|
|
29
|
+
formatAstLongLines: () => import_chunk_HKWBVOEL.formatAstLongLines,
|
|
30
|
+
formatScopedName: () => import_chunk_HKWBVOEL.formatScopedName,
|
|
31
|
+
getApiFunctionInfo: () => import_chunk_HKWBVOEL.getApiFunctionInfo,
|
|
32
|
+
getApiMapping: () => import_chunk_HKWBVOEL.getApiMapping,
|
|
33
|
+
getSuperClasses: () => import_chunk_HKWBVOEL.getSuperClasses,
|
|
34
34
|
hasProperty: () => import_chunk_MBTLUWXR.hasProperty,
|
|
35
|
-
isClassVariable: () =>
|
|
36
|
-
isLocal: () =>
|
|
37
|
-
isLookupCandidate: () =>
|
|
38
|
-
isStateNode: () =>
|
|
39
|
-
lookupByFullName: () =>
|
|
40
|
-
lookupNext: () =>
|
|
41
|
-
lookupResultContains: () =>
|
|
42
|
-
lookupWithType: () =>
|
|
43
|
-
makeToyboxLink: () =>
|
|
44
|
-
mapVarDeclsByType: () =>
|
|
45
|
-
markInvokeClassMethod: () =>
|
|
46
|
-
parseSdkVersion: () =>
|
|
47
|
-
resolveDiagnostics: () =>
|
|
48
|
-
resolveDiagnosticsMap: () =>
|
|
49
|
-
sameLookupResult: () =>
|
|
35
|
+
isClassVariable: () => import_chunk_HKWBVOEL.isClassVariable,
|
|
36
|
+
isLocal: () => import_chunk_HKWBVOEL.isLocal,
|
|
37
|
+
isLookupCandidate: () => import_chunk_HKWBVOEL.isLookupCandidate,
|
|
38
|
+
isStateNode: () => import_chunk_HKWBVOEL.isStateNode,
|
|
39
|
+
lookupByFullName: () => import_chunk_HKWBVOEL.lookupByFullName,
|
|
40
|
+
lookupNext: () => import_chunk_HKWBVOEL.lookupNext,
|
|
41
|
+
lookupResultContains: () => import_chunk_HKWBVOEL.lookupResultContains,
|
|
42
|
+
lookupWithType: () => import_chunk_HKWBVOEL.lookupWithType,
|
|
43
|
+
makeToyboxLink: () => import_chunk_HKWBVOEL.makeToyboxLink,
|
|
44
|
+
mapVarDeclsByType: () => import_chunk_HKWBVOEL.mapVarDeclsByType,
|
|
45
|
+
markInvokeClassMethod: () => import_chunk_HKWBVOEL.markInvokeClassMethod,
|
|
46
|
+
parseSdkVersion: () => import_chunk_HKWBVOEL.parseSdkVersion,
|
|
47
|
+
resolveDiagnostics: () => import_chunk_HKWBVOEL.resolveDiagnostics,
|
|
48
|
+
resolveDiagnosticsMap: () => import_chunk_HKWBVOEL.resolveDiagnosticsMap,
|
|
49
|
+
sameLookupResult: () => import_chunk_HKWBVOEL.sameLookupResult,
|
|
50
50
|
traverseAst: () => import_chunk_MBTLUWXR.traverseAst,
|
|
51
|
-
variableDeclarationName: () =>
|
|
52
|
-
visitReferences: () =>
|
|
53
|
-
visit_resources: () =>
|
|
54
|
-
visitorNode: () =>
|
|
51
|
+
variableDeclarationName: () => import_chunk_HKWBVOEL.variableDeclarationName,
|
|
52
|
+
visitReferences: () => import_chunk_HKWBVOEL.visitReferences,
|
|
53
|
+
visit_resources: () => import_chunk_HKWBVOEL.visit_resources,
|
|
54
|
+
visitorNode: () => import_chunk_HKWBVOEL.visitorNode
|
|
55
55
|
});
|
|
56
56
|
module.exports = __toCommonJS(api_exports);
|
|
57
|
-
var
|
|
57
|
+
var import_chunk_HKWBVOEL = require("./chunk-HKWBVOEL.cjs");
|
|
58
58
|
var import_chunk_SG7ODKRM = require("./chunk-SG7ODKRM.cjs");
|
|
59
59
|
var import_chunk_MBTLUWXR = require("./chunk-MBTLUWXR.cjs");
|
|
60
60
|
var import_chunk_ABYVSU2C = require("./chunk-ABYVSU2C.cjs");
|
|
61
|
-
(0,
|
|
61
|
+
(0, import_chunk_HKWBVOEL.init_api)();
|
|
62
62
|
// Annotate the CommonJS export names for ESM import in node:
|
|
63
63
|
0 && (module.exports = {
|
|
64
64
|
checkCompilerVersion,
|
|
@@ -26,8 +26,8 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
26
26
|
mod
|
|
27
27
|
));
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
var
|
|
30
|
-
__export(
|
|
29
|
+
var chunk_HKWBVOEL_exports = {};
|
|
30
|
+
__export(chunk_HKWBVOEL_exports, {
|
|
31
31
|
EnumTagsConst: () => EnumTagsConst,
|
|
32
32
|
LastTypeTag: () => LastTypeTag,
|
|
33
33
|
ObjectLikeTagsConst: () => ObjectLikeTagsConst,
|
|
@@ -133,7 +133,7 @@ __export(chunk_DZ7YMTUE_exports, {
|
|
|
133
133
|
visitorNode: () => visitorNode,
|
|
134
134
|
xml_util_exports: () => xml_util_exports
|
|
135
135
|
});
|
|
136
|
-
module.exports = __toCommonJS(
|
|
136
|
+
module.exports = __toCommonJS(chunk_HKWBVOEL_exports);
|
|
137
137
|
var import_chunk_SG7ODKRM = require("./chunk-SG7ODKRM.cjs");
|
|
138
138
|
var import_chunk_MBTLUWXR = require("./chunk-MBTLUWXR.cjs");
|
|
139
139
|
var import_chunk_ABYVSU2C = require("./chunk-ABYVSU2C.cjs");
|
|
@@ -5828,15 +5828,18 @@ function inliningLooksUseful(func, node) {
|
|
|
5828
5828
|
}
|
|
5829
5829
|
return false;
|
|
5830
5830
|
}
|
|
5831
|
-
function
|
|
5832
|
-
const excludeAnnotations = func.
|
|
5833
|
-
if (func.
|
|
5831
|
+
function inlineRequestedNode(state, func) {
|
|
5832
|
+
const excludeAnnotations = func.loc?.source && state.fnMap[func.loc?.source]?.excludeAnnotations || {};
|
|
5833
|
+
if (func.attrs && func.attrs.attributes && func.attrs.attributes.elements.some(
|
|
5834
5834
|
(attr) => attr.type === "UnaryExpression" && (attr.argument.name === "inline" || attr.argument.name.startsWith("inline_") && !(0, import_chunk_MBTLUWXR.hasProperty)(excludeAnnotations, attr.argument.name.substring(7)))
|
|
5835
5835
|
)) {
|
|
5836
5836
|
return true;
|
|
5837
5837
|
}
|
|
5838
5838
|
return false;
|
|
5839
5839
|
}
|
|
5840
|
+
function inlineRequested(state, func) {
|
|
5841
|
+
return inlineRequestedNode(state, func.node);
|
|
5842
|
+
}
|
|
5840
5843
|
function shouldInline(state, func, call, context) {
|
|
5841
5844
|
if (state.inlining || (state.localsStack?.length ?? 0) <= 1) {
|
|
5842
5845
|
return false;
|
|
@@ -5861,6 +5864,15 @@ function shouldInline(state, func, call, context) {
|
|
|
5861
5864
|
return true;
|
|
5862
5865
|
}
|
|
5863
5866
|
}
|
|
5867
|
+
if (requested && func.node.params.length !== args.length) {
|
|
5868
|
+
inlineDiagnostic(
|
|
5869
|
+
state,
|
|
5870
|
+
func,
|
|
5871
|
+
call,
|
|
5872
|
+
"This function cannot be inlined due to incorrect arguments"
|
|
5873
|
+
);
|
|
5874
|
+
return false;
|
|
5875
|
+
}
|
|
5864
5876
|
if (!context && requested) {
|
|
5865
5877
|
inlineDiagnostic(
|
|
5866
5878
|
state,
|
|
@@ -6430,6 +6442,28 @@ function fixNodeScope(state, lookupNode, nodeStack) {
|
|
|
6430
6442
|
}
|
|
6431
6443
|
return null;
|
|
6432
6444
|
}
|
|
6445
|
+
function reportFailedInlining(state, ast) {
|
|
6446
|
+
(0, import_chunk_MBTLUWXR.traverseAst)(ast, (node) => {
|
|
6447
|
+
switch (node.type) {
|
|
6448
|
+
case "FunctionDeclaration":
|
|
6449
|
+
if (inlineRequestedNode(state, node)) {
|
|
6450
|
+
if (!state.inlineDiagnostics) {
|
|
6451
|
+
state.inlineDiagnostics = {};
|
|
6452
|
+
}
|
|
6453
|
+
diagnosticHelper(
|
|
6454
|
+
state.inlineDiagnostics,
|
|
6455
|
+
node,
|
|
6456
|
+
`The inline function ${node.id.name} was not removed from the program`,
|
|
6457
|
+
"INFO",
|
|
6458
|
+
void 0
|
|
6459
|
+
);
|
|
6460
|
+
}
|
|
6461
|
+
return false;
|
|
6462
|
+
default:
|
|
6463
|
+
return null;
|
|
6464
|
+
}
|
|
6465
|
+
});
|
|
6466
|
+
}
|
|
6433
6467
|
var init_inliner = (0, import_chunk_ABYVSU2C.__esm)({
|
|
6434
6468
|
"src/inliner.ts"() {
|
|
6435
6469
|
"use strict";
|
|
@@ -8355,7 +8389,7 @@ function common_types(left, right, allowed) {
|
|
|
8355
8389
|
const types = left.type | right.type;
|
|
8356
8390
|
let mask = (6 | 120) & allowed;
|
|
8357
8391
|
if (types & allowed & 256) {
|
|
8358
|
-
mask |= 256 | 6 | 128 | 1 | 1024 | 512;
|
|
8392
|
+
mask |= 256 | 6 | 128 | 1 | 1024 | 512 | 131072 | 32768 | 65536 | 2048;
|
|
8359
8393
|
} else if (types & allowed & 128) {
|
|
8360
8394
|
mask |= 128;
|
|
8361
8395
|
}
|
|
@@ -9046,6 +9080,8 @@ function checkCallArgs(istate, node, callees, args) {
|
|
|
9046
9080
|
if (cur.info === false) {
|
|
9047
9081
|
argEffects = false;
|
|
9048
9082
|
}
|
|
9083
|
+
if (effects)
|
|
9084
|
+
result.embeddedEffects = true;
|
|
9049
9085
|
const needsCheck = checker && (cur === callees || !isOverride(cur, callees));
|
|
9050
9086
|
const expectedArgs = (argTypes || cur.node.params).length;
|
|
9051
9087
|
if (args.length !== expectedArgs) {
|
|
@@ -9152,8 +9188,6 @@ function checkCallArgs(istate, node, callees, args) {
|
|
|
9152
9188
|
result.value.type = 524287;
|
|
9153
9189
|
delete result.value.value;
|
|
9154
9190
|
}
|
|
9155
|
-
if (effects)
|
|
9156
|
-
result.embeddedEffects = true;
|
|
9157
9191
|
return result;
|
|
9158
9192
|
},
|
|
9159
9193
|
{
|
|
@@ -14313,7 +14347,7 @@ function minimizeLocals(state, func) {
|
|
|
14313
14347
|
case "AssignmentExpression":
|
|
14314
14348
|
if (info) {
|
|
14315
14349
|
(0, import_node_assert4.default)(node.left.type === "Identifier");
|
|
14316
|
-
if (node.right.type === "Identifier" && node.right.name === info.name) {
|
|
14350
|
+
if (node.right.type === "Identifier" && node.right.name === info.name && node.operator === "=") {
|
|
14317
14351
|
return (0, import_chunk_MBTLUWXR.withLoc)(
|
|
14318
14352
|
{ type: "Literal", value: null, raw: "null" },
|
|
14319
14353
|
node,
|
|
@@ -16988,6 +17022,9 @@ async function optimizeMonkeyCHelper(fnMap, resourcesMap, manifestXML, config) {
|
|
|
16988
17022
|
cleanupAll();
|
|
16989
17023
|
config.checkCompilerLookupRules = checkLookupRules;
|
|
16990
17024
|
reportMissingSymbols(state, config);
|
|
17025
|
+
Object.values(fnMap).forEach(
|
|
17026
|
+
({ ast }) => ast && reportFailedInlining(state, ast)
|
|
17027
|
+
);
|
|
16991
17028
|
if (state.inlineDiagnostics) {
|
|
16992
17029
|
if (!state.diagnostics) {
|
|
16993
17030
|
state.diagnostics = state.inlineDiagnostics;
|
|
@@ -28528,7 +28565,7 @@ async function generateOneConfig(buildConfig, manifestXML, dependencyFiles, conf
|
|
|
28528
28565
|
const opt_time = await (0, import_chunk_SG7ODKRM.first_modified)(
|
|
28529
28566
|
Object.values(fnMap).map((v) => v.output)
|
|
28530
28567
|
);
|
|
28531
|
-
if (source_time < opt_time &&
|
|
28568
|
+
if (source_time < opt_time && 1711474096407 < opt_time) {
|
|
28532
28569
|
return {
|
|
28533
28570
|
hasTests,
|
|
28534
28571
|
diagnostics: prevDiagnostics,
|
|
@@ -28567,7 +28604,7 @@ async function generateOneConfig(buildConfig, manifestXML, dependencyFiles, conf
|
|
|
28567
28604
|
hasTests: hasTests2,
|
|
28568
28605
|
diagnostics,
|
|
28569
28606
|
sdkVersion,
|
|
28570
|
-
optimizerVersion: "1.1.
|
|
28607
|
+
optimizerVersion: "1.1.51",
|
|
28571
28608
|
...Object.fromEntries(
|
|
28572
28609
|
configOptionsToCheck.map((option) => [option, config[option]])
|
|
28573
28610
|
)
|
package/build/optimizer.cjs
CHANGED
|
@@ -18,28 +18,28 @@ 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
|
-
buildOptimizedProject: () =>
|
|
21
|
+
StateNodeAttributes: () => import_chunk_HKWBVOEL.StateNodeAttributes,
|
|
22
|
+
buildOptimizedProject: () => import_chunk_HKWBVOEL.buildOptimizedProject,
|
|
23
23
|
copyRecursiveAsNeeded: () => import_chunk_SG7ODKRM.copyRecursiveAsNeeded,
|
|
24
|
-
defaultConfig: () =>
|
|
25
|
-
display: () =>
|
|
26
|
-
generateOneConfig: () =>
|
|
27
|
-
generateOptimizedProject: () =>
|
|
28
|
-
getConfig: () =>
|
|
29
|
-
getProjectAnalysis: () =>
|
|
30
|
-
get_jungle: () =>
|
|
31
|
-
isErrorWithLocation: () =>
|
|
32
|
-
launchSimulator: () =>
|
|
33
|
-
manifestProducts: () =>
|
|
34
|
-
mctree: () =>
|
|
35
|
-
simulateProgram: () =>
|
|
24
|
+
defaultConfig: () => import_chunk_HKWBVOEL.defaultConfig,
|
|
25
|
+
display: () => import_chunk_HKWBVOEL.display,
|
|
26
|
+
generateOneConfig: () => import_chunk_HKWBVOEL.generateOneConfig,
|
|
27
|
+
generateOptimizedProject: () => import_chunk_HKWBVOEL.generateOptimizedProject,
|
|
28
|
+
getConfig: () => import_chunk_HKWBVOEL.getConfig,
|
|
29
|
+
getProjectAnalysis: () => import_chunk_HKWBVOEL.getProjectAnalysis,
|
|
30
|
+
get_jungle: () => import_chunk_HKWBVOEL.get_jungle,
|
|
31
|
+
isErrorWithLocation: () => import_chunk_HKWBVOEL.isErrorWithLocation,
|
|
32
|
+
launchSimulator: () => import_chunk_HKWBVOEL.launchSimulator,
|
|
33
|
+
manifestProducts: () => import_chunk_HKWBVOEL.manifestProducts,
|
|
34
|
+
mctree: () => import_chunk_HKWBVOEL.mctree,
|
|
35
|
+
simulateProgram: () => import_chunk_HKWBVOEL.simulateProgram
|
|
36
36
|
});
|
|
37
37
|
module.exports = __toCommonJS(optimizer_exports);
|
|
38
|
-
var
|
|
38
|
+
var import_chunk_HKWBVOEL = require("./chunk-HKWBVOEL.cjs");
|
|
39
39
|
var import_chunk_SG7ODKRM = require("./chunk-SG7ODKRM.cjs");
|
|
40
40
|
var import_chunk_MBTLUWXR = require("./chunk-MBTLUWXR.cjs");
|
|
41
41
|
var import_chunk_ABYVSU2C = require("./chunk-ABYVSU2C.cjs");
|
|
42
|
-
(0,
|
|
42
|
+
(0, import_chunk_HKWBVOEL.init_optimizer)();
|
|
43
43
|
// Annotate the CommonJS export names for ESM import in node:
|
|
44
44
|
0 && (module.exports = {
|
|
45
45
|
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_HKWBVOEL.SectionKinds,
|
|
22
|
+
appSupport: () => import_chunk_HKWBVOEL.appSupport,
|
|
23
|
+
connectiq: () => import_chunk_HKWBVOEL.connectiq,
|
|
24
|
+
getDeviceInfo: () => import_chunk_HKWBVOEL.getDeviceInfo,
|
|
25
|
+
getFunctionDocumentation: () => import_chunk_HKWBVOEL.getFunctionDocumentation,
|
|
26
|
+
getLanguages: () => import_chunk_HKWBVOEL.getLanguages,
|
|
27
|
+
getSdkPath: () => import_chunk_HKWBVOEL.getSdkPath,
|
|
28
|
+
isWin: () => import_chunk_HKWBVOEL.isWin,
|
|
29
|
+
optimizeProgram: () => import_chunk_HKWBVOEL.optimizeProgram,
|
|
30
|
+
readPrg: () => import_chunk_HKWBVOEL.readPrg,
|
|
31
|
+
readPrgWithOffsets: () => import_chunk_HKWBVOEL.readPrgWithOffsets,
|
|
32
|
+
xmlUtil: () => import_chunk_HKWBVOEL.xml_util_exports
|
|
33
33
|
});
|
|
34
34
|
module.exports = __toCommonJS(sdk_util_exports);
|
|
35
|
-
var
|
|
35
|
+
var import_chunk_HKWBVOEL = require("./chunk-HKWBVOEL.cjs");
|
|
36
36
|
var import_chunk_SG7ODKRM = require("./chunk-SG7ODKRM.cjs");
|
|
37
37
|
var import_chunk_MBTLUWXR = require("./chunk-MBTLUWXR.cjs");
|
|
38
38
|
var import_chunk_ABYVSU2C = require("./chunk-ABYVSU2C.cjs");
|
|
39
|
-
(0,
|
|
39
|
+
(0, import_chunk_HKWBVOEL.init_sdk_util)();
|
|
40
40
|
// Annotate the CommonJS export names for ESM import in node:
|
|
41
41
|
0 && (module.exports = {
|
|
42
42
|
SectionKinds,
|
package/build/src/inliner.d.ts
CHANGED
|
@@ -10,4 +10,5 @@ export declare function inlineDiagnostic(state: ProgramStateAnalysis, func: Func
|
|
|
10
10
|
export type InlineContext = mctree.ReturnStatement | mctree.IfStatement | mctree.AssignmentExpression | mctree.ExpressionStatement | mctree.VariableDeclarator;
|
|
11
11
|
export declare function inlineFunction(state: ProgramStateAnalysis, func: FunctionStateNode, call: mctree.CallExpression, context: InlineContext | null): InlineBody | null;
|
|
12
12
|
export declare function applyTypeIfNeeded(node: mctree.Node): mctree.Node;
|
|
13
|
+
export declare function reportFailedInlining(state: ProgramStateAnalysis, ast: mctree.Program): void;
|
|
13
14
|
export {};
|
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
|
|
24
|
+
var import_chunk_HKWBVOEL = require("./chunk-HKWBVOEL.cjs");
|
|
25
25
|
var import_chunk_SG7ODKRM = require("./chunk-SG7ODKRM.cjs");
|
|
26
26
|
var import_chunk_MBTLUWXR = require("./chunk-MBTLUWXR.cjs");
|
|
27
27
|
var import_chunk_ABYVSU2C = require("./chunk-ABYVSU2C.cjs");
|
|
28
28
|
var import_node_worker_threads = require("node:worker_threads");
|
|
29
29
|
var require_worker_thread = (0, import_chunk_ABYVSU2C.__commonJS)({
|
|
30
30
|
"src/worker-thread.ts"() {
|
|
31
|
-
(0,
|
|
31
|
+
(0, import_chunk_HKWBVOEL.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_HKWBVOEL.performTask)(task));
|
|
35
35
|
});
|
|
36
36
|
}
|
|
37
37
|
}
|
package/package.json
CHANGED