@markw65/monkeyc-optimizer 1.1.59 → 1.1.60
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 +4 -0
- package/build/api.cjs +34 -34
- package/build/{chunk-53Q62QUI.cjs → chunk-X2C4HXXZ.cjs} +7 -7
- package/build/optimizer.cjs +16 -16
- package/build/sdk-util.cjs +14 -14
- package/build/worker-thread.cjs +3 -3
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to the "monkeyc-optimizer" package will be documented in this file.
|
|
4
4
|
|
|
5
|
+
### 1.1.60
|
|
6
|
+
|
|
7
|
+
- Disable the "remove argc" optimization, as it's going to start breaking verification in the app store.
|
|
8
|
+
|
|
5
9
|
### 1.1.59
|
|
6
10
|
|
|
7
11
|
- Getv and Putv can directly access local 0 (Fixes #34)
|
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_X2C4HXXZ.checkCompilerVersion,
|
|
22
|
+
collectNamespaces: () => import_chunk_X2C4HXXZ.collectNamespaces,
|
|
23
|
+
createDocumentationMap: () => import_chunk_X2C4HXXZ.createDocumentationMap,
|
|
24
|
+
diagnostic: () => import_chunk_X2C4HXXZ.diagnostic,
|
|
25
|
+
diagnosticHelper: () => import_chunk_X2C4HXXZ.diagnosticHelper,
|
|
26
|
+
findNamesInScope: () => import_chunk_X2C4HXXZ.findNamesInScope,
|
|
27
|
+
findUsingForNode: () => import_chunk_X2C4HXXZ.findUsingForNode,
|
|
28
|
+
formatAst: () => import_chunk_X2C4HXXZ.formatAst,
|
|
29
|
+
formatAstLongLines: () => import_chunk_X2C4HXXZ.formatAstLongLines,
|
|
30
|
+
formatScopedName: () => import_chunk_X2C4HXXZ.formatScopedName,
|
|
31
|
+
getApiFunctionInfo: () => import_chunk_X2C4HXXZ.getApiFunctionInfo,
|
|
32
|
+
getApiMapping: () => import_chunk_X2C4HXXZ.getApiMapping,
|
|
33
|
+
getSuperClasses: () => import_chunk_X2C4HXXZ.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_X2C4HXXZ.isClassVariable,
|
|
36
|
+
isLocal: () => import_chunk_X2C4HXXZ.isLocal,
|
|
37
|
+
isLookupCandidate: () => import_chunk_X2C4HXXZ.isLookupCandidate,
|
|
38
|
+
isStateNode: () => import_chunk_X2C4HXXZ.isStateNode,
|
|
39
|
+
lookupByFullName: () => import_chunk_X2C4HXXZ.lookupByFullName,
|
|
40
|
+
lookupNext: () => import_chunk_X2C4HXXZ.lookupNext,
|
|
41
|
+
lookupResultContains: () => import_chunk_X2C4HXXZ.lookupResultContains,
|
|
42
|
+
lookupWithType: () => import_chunk_X2C4HXXZ.lookupWithType,
|
|
43
|
+
makeToyboxLink: () => import_chunk_X2C4HXXZ.makeToyboxLink,
|
|
44
|
+
mapVarDeclsByType: () => import_chunk_X2C4HXXZ.mapVarDeclsByType,
|
|
45
|
+
markInvokeClassMethod: () => import_chunk_X2C4HXXZ.markInvokeClassMethod,
|
|
46
|
+
parseSdkVersion: () => import_chunk_X2C4HXXZ.parseSdkVersion,
|
|
47
|
+
resolveDiagnostics: () => import_chunk_X2C4HXXZ.resolveDiagnostics,
|
|
48
|
+
resolveDiagnosticsMap: () => import_chunk_X2C4HXXZ.resolveDiagnosticsMap,
|
|
49
|
+
sameLookupResult: () => import_chunk_X2C4HXXZ.sameLookupResult,
|
|
50
50
|
traverseAst: () => import_chunk_MBTLUWXR.traverseAst,
|
|
51
|
-
variableDeclarationName: () =>
|
|
52
|
-
visitReferences: () =>
|
|
53
|
-
visit_resources: () =>
|
|
54
|
-
visitorNode: () =>
|
|
51
|
+
variableDeclarationName: () => import_chunk_X2C4HXXZ.variableDeclarationName,
|
|
52
|
+
visitReferences: () => import_chunk_X2C4HXXZ.visitReferences,
|
|
53
|
+
visit_resources: () => import_chunk_X2C4HXXZ.visit_resources,
|
|
54
|
+
visitorNode: () => import_chunk_X2C4HXXZ.visitorNode
|
|
55
55
|
});
|
|
56
56
|
module.exports = __toCommonJS(api_exports);
|
|
57
|
-
var
|
|
57
|
+
var import_chunk_X2C4HXXZ = require("./chunk-X2C4HXXZ.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_X2C4HXXZ.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_X2C4HXXZ_exports = {};
|
|
30
|
+
__export(chunk_X2C4HXXZ_exports, {
|
|
31
31
|
EnumTagsConst: () => EnumTagsConst,
|
|
32
32
|
LastTypeTag: () => LastTypeTag,
|
|
33
33
|
ObjectLikeTagsConst: () => ObjectLikeTagsConst,
|
|
@@ -133,7 +133,7 @@ __export(chunk_53Q62QUI_exports, {
|
|
|
133
133
|
visitorNode: () => visitorNode,
|
|
134
134
|
xml_util_exports: () => xml_util_exports
|
|
135
135
|
});
|
|
136
|
-
module.exports = __toCommonJS(
|
|
136
|
+
module.exports = __toCommonJS(chunk_X2C4HXXZ_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");
|
|
@@ -23157,13 +23157,13 @@ function doArrayInits(func, liveInState, context) {
|
|
|
23157
23157
|
);
|
|
23158
23158
|
return changes;
|
|
23159
23159
|
}
|
|
23160
|
-
function simpleOpts(func,
|
|
23160
|
+
function simpleOpts(func, _context) {
|
|
23161
23161
|
const equalsSym = 8388787;
|
|
23162
23162
|
const logging3 = (0, import_chunk_SG7ODKRM.wouldLog)("optimize", 5);
|
|
23163
23163
|
return Array.from(func.blocks.values()).reduce((changes, block) => {
|
|
23164
23164
|
for (let i = block.bytecodes.length; i--; ) {
|
|
23165
23165
|
const cur = block.bytecodes[i];
|
|
23166
|
-
if (cur.op === 0 || cur.op === 1 && cur.arg === 0
|
|
23166
|
+
if (cur.op === 0 || cur.op === 1 && cur.arg === 0) {
|
|
23167
23167
|
block.bytecodes.splice(i, 1);
|
|
23168
23168
|
changes = true;
|
|
23169
23169
|
if (logging3) {
|
|
@@ -29146,7 +29146,7 @@ async function generateOneConfig(buildConfig, manifestXML, dependencyFiles, conf
|
|
|
29146
29146
|
const opt_time = await (0, import_chunk_SG7ODKRM.first_modified)(
|
|
29147
29147
|
Object.values(fnMap).map((v) => v.output)
|
|
29148
29148
|
);
|
|
29149
|
-
if (source_time < opt_time &&
|
|
29149
|
+
if (source_time < opt_time && 1715292882674 < opt_time) {
|
|
29150
29150
|
return {
|
|
29151
29151
|
hasTests,
|
|
29152
29152
|
diagnostics: prevDiagnostics,
|
|
@@ -29185,7 +29185,7 @@ async function generateOneConfig(buildConfig, manifestXML, dependencyFiles, conf
|
|
|
29185
29185
|
hasTests: hasTests2,
|
|
29186
29186
|
diagnostics,
|
|
29187
29187
|
sdkVersion,
|
|
29188
|
-
optimizerVersion: "1.1.
|
|
29188
|
+
optimizerVersion: "1.1.60",
|
|
29189
29189
|
...Object.fromEntries(
|
|
29190
29190
|
configOptionsToCheck.map((option) => [option, config[option]])
|
|
29191
29191
|
)
|
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_X2C4HXXZ.StateNodeAttributes,
|
|
22
|
+
buildOptimizedProject: () => import_chunk_X2C4HXXZ.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_X2C4HXXZ.defaultConfig,
|
|
25
|
+
display: () => import_chunk_X2C4HXXZ.display,
|
|
26
|
+
generateOneConfig: () => import_chunk_X2C4HXXZ.generateOneConfig,
|
|
27
|
+
generateOptimizedProject: () => import_chunk_X2C4HXXZ.generateOptimizedProject,
|
|
28
|
+
getConfig: () => import_chunk_X2C4HXXZ.getConfig,
|
|
29
|
+
getProjectAnalysis: () => import_chunk_X2C4HXXZ.getProjectAnalysis,
|
|
30
|
+
get_jungle: () => import_chunk_X2C4HXXZ.get_jungle,
|
|
31
|
+
isErrorWithLocation: () => import_chunk_X2C4HXXZ.isErrorWithLocation,
|
|
32
|
+
launchSimulator: () => import_chunk_X2C4HXXZ.launchSimulator,
|
|
33
|
+
manifestProducts: () => import_chunk_X2C4HXXZ.manifestProducts,
|
|
34
|
+
mctree: () => import_chunk_X2C4HXXZ.mctree,
|
|
35
|
+
simulateProgram: () => import_chunk_X2C4HXXZ.simulateProgram
|
|
36
36
|
});
|
|
37
37
|
module.exports = __toCommonJS(optimizer_exports);
|
|
38
|
-
var
|
|
38
|
+
var import_chunk_X2C4HXXZ = require("./chunk-X2C4HXXZ.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_X2C4HXXZ.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_X2C4HXXZ.SectionKinds,
|
|
22
|
+
appSupport: () => import_chunk_X2C4HXXZ.appSupport,
|
|
23
|
+
connectiq: () => import_chunk_X2C4HXXZ.connectiq,
|
|
24
|
+
getDeviceInfo: () => import_chunk_X2C4HXXZ.getDeviceInfo,
|
|
25
|
+
getFunctionDocumentation: () => import_chunk_X2C4HXXZ.getFunctionDocumentation,
|
|
26
|
+
getLanguages: () => import_chunk_X2C4HXXZ.getLanguages,
|
|
27
|
+
getSdkPath: () => import_chunk_X2C4HXXZ.getSdkPath,
|
|
28
|
+
isWin: () => import_chunk_X2C4HXXZ.isWin,
|
|
29
|
+
optimizeProgram: () => import_chunk_X2C4HXXZ.optimizeProgram,
|
|
30
|
+
readPrg: () => import_chunk_X2C4HXXZ.readPrg,
|
|
31
|
+
readPrgWithOffsets: () => import_chunk_X2C4HXXZ.readPrgWithOffsets,
|
|
32
|
+
xmlUtil: () => import_chunk_X2C4HXXZ.xml_util_exports
|
|
33
33
|
});
|
|
34
34
|
module.exports = __toCommonJS(sdk_util_exports);
|
|
35
|
-
var
|
|
35
|
+
var import_chunk_X2C4HXXZ = require("./chunk-X2C4HXXZ.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_X2C4HXXZ.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/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_X2C4HXXZ = require("./chunk-X2C4HXXZ.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_X2C4HXXZ.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_X2C4HXXZ.performTask)(task));
|
|
35
35
|
});
|
|
36
36
|
}
|
|
37
37
|
}
|
package/package.json
CHANGED