@mirascript/mirascript 0.1.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.
- package/dist/chunk-5FQWUJIY.js +766 -0
- package/dist/chunk-5FQWUJIY.js.map +6 -0
- package/dist/chunk-BTDGMWFK.js +202 -0
- package/dist/chunk-BTDGMWFK.js.map +6 -0
- package/dist/chunk-DCXIWIW5.js +3419 -0
- package/dist/chunk-DCXIWIW5.js.map +6 -0
- package/dist/chunk-RAPJ3XLV.js +10 -0
- package/dist/chunk-RAPJ3XLV.js.map +6 -0
- package/dist/cli/execute.d.ts +4 -0
- package/dist/cli/execute.d.ts.map +1 -0
- package/dist/cli/index.d.ts +2 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +191 -0
- package/dist/cli/index.js.map +6 -0
- package/dist/cli/print.d.ts +4 -0
- package/dist/cli/print.d.ts.map +1 -0
- package/dist/compiler/compile-bytecode.d.ts +12 -0
- package/dist/compiler/compile-bytecode.d.ts.map +1 -0
- package/dist/compiler/compile-fast.d.ts +7 -0
- package/dist/compiler/compile-fast.d.ts.map +1 -0
- package/dist/compiler/create-script.d.ts +7 -0
- package/dist/compiler/create-script.d.ts.map +1 -0
- package/dist/compiler/diagnostic.d.ts +56 -0
- package/dist/compiler/diagnostic.d.ts.map +1 -0
- package/dist/compiler/emit.d.ts +4 -0
- package/dist/compiler/emit.d.ts.map +1 -0
- package/dist/compiler/index.d.ts +13 -0
- package/dist/compiler/index.d.ts.map +1 -0
- package/dist/compiler/types.d.ts +16 -0
- package/dist/compiler/types.d.ts.map +1 -0
- package/dist/compiler/worker-manager.d.ts +6 -0
- package/dist/compiler/worker-manager.d.ts.map +1 -0
- package/dist/compiler/worker.d.ts +6 -0
- package/dist/compiler/worker.d.ts.map +1 -0
- package/dist/compiler/worker.js +34 -0
- package/dist/compiler/worker.js.map +6 -0
- package/dist/helpers/constants.d.ts +3 -0
- package/dist/helpers/constants.d.ts.map +1 -0
- package/dist/helpers/serialize.d.ts +45 -0
- package/dist/helpers/serialize.d.ts.map +1 -0
- package/dist/helpers/utils.d.ts +36 -0
- package/dist/helpers/utils.d.ts.map +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +61 -0
- package/dist/index.js.map +6 -0
- package/dist/subtle.d.ts +7 -0
- package/dist/subtle.d.ts.map +1 -0
- package/dist/subtle.js +30 -0
- package/dist/subtle.js.map +6 -0
- package/dist/vm/env.d.ts +3 -0
- package/dist/vm/env.d.ts.map +1 -0
- package/dist/vm/error.d.ts +11 -0
- package/dist/vm/error.d.ts.map +1 -0
- package/dist/vm/helpers.d.ts +21 -0
- package/dist/vm/helpers.d.ts.map +1 -0
- package/dist/vm/index.d.ts +5 -0
- package/dist/vm/index.d.ts.map +1 -0
- package/dist/vm/lib/_helpers.d.ts +35 -0
- package/dist/vm/lib/_helpers.d.ts.map +1 -0
- package/dist/vm/lib/_loader.d.ts +16 -0
- package/dist/vm/lib/_loader.d.ts.map +1 -0
- package/dist/vm/lib/global/bit.d.ts +9 -0
- package/dist/vm/lib/global/bit.d.ts.map +1 -0
- package/dist/vm/lib/global/debug.d.ts +5 -0
- package/dist/vm/lib/global/debug.d.ts.map +1 -0
- package/dist/vm/lib/global/index.d.ts +10 -0
- package/dist/vm/lib/global/index.d.ts.map +1 -0
- package/dist/vm/lib/global/json.d.ts +4 -0
- package/dist/vm/lib/global/json.d.ts.map +1 -0
- package/dist/vm/lib/global/math-additional.d.ts +3 -0
- package/dist/vm/lib/global/math-additional.d.ts.map +1 -0
- package/dist/vm/lib/global/math-arr.d.ts +8 -0
- package/dist/vm/lib/global/math-arr.d.ts.map +1 -0
- package/dist/vm/lib/global/math-const.d.ts +3 -0
- package/dist/vm/lib/global/math-const.d.ts.map +1 -0
- package/dist/vm/lib/global/math-unary.d.ts +29 -0
- package/dist/vm/lib/global/math-unary.d.ts.map +1 -0
- package/dist/vm/lib/global/math.d.ts +9 -0
- package/dist/vm/lib/global/math.d.ts.map +1 -0
- package/dist/vm/lib/global/mod/index.d.ts +3 -0
- package/dist/vm/lib/global/mod/index.d.ts.map +1 -0
- package/dist/vm/lib/global/mod/matrix.d.ts +16 -0
- package/dist/vm/lib/global/mod/matrix.d.ts.map +1 -0
- package/dist/vm/lib/global/sequence/all-any.d.ts +4 -0
- package/dist/vm/lib/global/sequence/all-any.d.ts.map +1 -0
- package/dist/vm/lib/global/sequence/entries.d.ts +12 -0
- package/dist/vm/lib/global/sequence/entries.d.ts.map +1 -0
- package/dist/vm/lib/global/sequence/find.d.ts +10 -0
- package/dist/vm/lib/global/sequence/find.d.ts.map +1 -0
- package/dist/vm/lib/global/sequence/flatten.d.ts +3 -0
- package/dist/vm/lib/global/sequence/flatten.d.ts.map +1 -0
- package/dist/vm/lib/global/sequence/index.d.ts +12 -0
- package/dist/vm/lib/global/sequence/index.d.ts.map +1 -0
- package/dist/vm/lib/global/sequence/len.d.ts +3 -0
- package/dist/vm/lib/global/sequence/len.d.ts.map +1 -0
- package/dist/vm/lib/global/sequence/map-filter.d.ts +9 -0
- package/dist/vm/lib/global/sequence/map-filter.d.ts.map +1 -0
- package/dist/vm/lib/global/sequence/repeat.d.ts +4 -0
- package/dist/vm/lib/global/sequence/repeat.d.ts.map +1 -0
- package/dist/vm/lib/global/sequence/reverse.d.ts +3 -0
- package/dist/vm/lib/global/sequence/reverse.d.ts.map +1 -0
- package/dist/vm/lib/global/sequence/sort.d.ts +5 -0
- package/dist/vm/lib/global/sequence/sort.d.ts.map +1 -0
- package/dist/vm/lib/global/sequence/with.d.ts +5 -0
- package/dist/vm/lib/global/sequence/with.d.ts.map +1 -0
- package/dist/vm/lib/global/sequence/zip.d.ts +4 -0
- package/dist/vm/lib/global/sequence/zip.d.ts.map +1 -0
- package/dist/vm/lib/global/string.d.ts +12 -0
- package/dist/vm/lib/global/string.d.ts.map +1 -0
- package/dist/vm/lib/global/time.d.ts +15 -0
- package/dist/vm/lib/global/time.d.ts.map +1 -0
- package/dist/vm/lib/global/to-primitive.d.ts +6 -0
- package/dist/vm/lib/global/to-primitive.d.ts.map +1 -0
- package/dist/vm/operations.d.ts +49 -0
- package/dist/vm/operations.d.ts.map +1 -0
- package/dist/vm/types/checker.d.ts +30 -0
- package/dist/vm/types/checker.d.ts.map +1 -0
- package/dist/vm/types/context.d.ts +43 -0
- package/dist/vm/types/context.d.ts.map +1 -0
- package/dist/vm/types/extern.d.ts +32 -0
- package/dist/vm/types/extern.d.ts.map +1 -0
- package/dist/vm/types/function.d.ts +49 -0
- package/dist/vm/types/function.d.ts.map +1 -0
- package/dist/vm/types/index.d.ts +75 -0
- package/dist/vm/types/index.d.ts.map +1 -0
- package/dist/vm/types/module.d.ts +25 -0
- package/dist/vm/types/module.d.ts.map +1 -0
- package/dist/vm/types/script.d.ts +14 -0
- package/dist/vm/types/script.d.ts.map +1 -0
- package/dist/vm/types/wrapper.d.ts +25 -0
- package/dist/vm/types/wrapper.d.ts.map +1 -0
- package/package.json +55 -0
- package/src/cli/execute.ts +32 -0
- package/src/cli/index.ts +73 -0
- package/src/cli/print.ts +41 -0
- package/src/compiler/compile-bytecode.ts +65 -0
- package/src/compiler/compile-fast.ts +81 -0
- package/src/compiler/create-script.ts +34 -0
- package/src/compiler/diagnostic.ts +175 -0
- package/src/compiler/emit.ts +764 -0
- package/src/compiler/index.ts +67 -0
- package/src/compiler/types.ts +16 -0
- package/src/compiler/worker-manager.ts +60 -0
- package/src/compiler/worker.ts +37 -0
- package/src/helpers/constants.ts +3 -0
- package/src/helpers/serialize.ts +280 -0
- package/src/helpers/utils.ts +16 -0
- package/src/index.ts +3 -0
- package/src/subtle.ts +6 -0
- package/src/vm/env.ts +16 -0
- package/src/vm/error.ts +22 -0
- package/src/vm/helpers.ts +121 -0
- package/src/vm/index.ts +5 -0
- package/src/vm/lib/_helpers.ts +215 -0
- package/src/vm/lib/_loader.ts +51 -0
- package/src/vm/lib/global/bit.ts +93 -0
- package/src/vm/lib/global/debug.ts +36 -0
- package/src/vm/lib/global/index.ts +9 -0
- package/src/vm/lib/global/json.ts +45 -0
- package/src/vm/lib/global/math-additional.ts +71 -0
- package/src/vm/lib/global/math-arr.ts +62 -0
- package/src/vm/lib/global/math-const.ts +2 -0
- package/src/vm/lib/global/math-unary.ts +171 -0
- package/src/vm/lib/global/math.ts +27 -0
- package/src/vm/lib/global/mod/index.ts +4 -0
- package/src/vm/lib/global/mod/matrix.ts +579 -0
- package/src/vm/lib/global/sequence/all-any.ts +73 -0
- package/src/vm/lib/global/sequence/entries.ts +67 -0
- package/src/vm/lib/global/sequence/find.ts +49 -0
- package/src/vm/lib/global/sequence/flatten.ts +16 -0
- package/src/vm/lib/global/sequence/index.ts +11 -0
- package/src/vm/lib/global/sequence/len.ts +15 -0
- package/src/vm/lib/global/sequence/map-filter.ts +82 -0
- package/src/vm/lib/global/sequence/repeat.ts +28 -0
- package/src/vm/lib/global/sequence/reverse.ts +17 -0
- package/src/vm/lib/global/sequence/sort.ts +88 -0
- package/src/vm/lib/global/sequence/with.ts +43 -0
- package/src/vm/lib/global/sequence/zip.ts +40 -0
- package/src/vm/lib/global/string.ts +149 -0
- package/src/vm/lib/global/time.ts +73 -0
- package/src/vm/lib/global/to-primitive.ts +58 -0
- package/src/vm/operations.ts +497 -0
- package/src/vm/types/checker.ts +164 -0
- package/src/vm/types/context.ts +161 -0
- package/src/vm/types/extern.ts +166 -0
- package/src/vm/types/function.ts +136 -0
- package/src/vm/types/index.ts +124 -0
- package/src/vm/types/module.ts +40 -0
- package/src/vm/types/script.ts +18 -0
- package/src/vm/types/wrapper.ts +28 -0
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import {
|
|
2
|
+
compileBytecode,
|
|
3
|
+
emit
|
|
4
|
+
} from "../chunk-5FQWUJIY.js";
|
|
5
|
+
import "../chunk-RAPJ3XLV.js";
|
|
6
|
+
|
|
7
|
+
// src/compiler/worker.ts
|
|
8
|
+
async function compile(script, options) {
|
|
9
|
+
const [bytecode, errors] = await compileBytecode(script, options);
|
|
10
|
+
if (bytecode == null) {
|
|
11
|
+
return [void 0, errors];
|
|
12
|
+
}
|
|
13
|
+
const generatedCode = emit(script, bytecode, options);
|
|
14
|
+
return [generatedCode, errors];
|
|
15
|
+
}
|
|
16
|
+
addEventListener("message", (ev) => {
|
|
17
|
+
const data = ev.data;
|
|
18
|
+
if (!Array.isArray(data)) return;
|
|
19
|
+
const [seq, ...args] = data;
|
|
20
|
+
if (typeof seq != "number" || !args.length) return;
|
|
21
|
+
void compile(...args).then(([script, errors]) => {
|
|
22
|
+
postMessage([seq, script, errors], { transfer: [errors.buffer] });
|
|
23
|
+
}).catch((error) => {
|
|
24
|
+
postMessage([seq, error instanceof Error ? error : new Error(String(error))]);
|
|
25
|
+
});
|
|
26
|
+
});
|
|
27
|
+
compile("{}", {}).then(
|
|
28
|
+
() => postMessage("ready"),
|
|
29
|
+
(ex) => postMessage(ex)
|
|
30
|
+
);
|
|
31
|
+
export {
|
|
32
|
+
compile
|
|
33
|
+
};
|
|
34
|
+
//# sourceMappingURL=worker.js.map
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/compiler/worker.ts"],
|
|
4
|
+
"mappings": ";;;;;;;AAOA,eAAsB,QAClB,QACA,SAC0C;AAC1C,QAAM,CAAC,UAAU,MAAM,IAAI,MAAM,gBAAgB,QAAQ,OAAO;AAChE,MAAI,YAAY,MAAM;AAClB,WAAO,CAAC,QAAW,MAAM;AAAA,EAC7B;AACA,QAAM,gBAAgB,KAAK,QAAQ,UAAU,OAAO;AACpD,SAAO,CAAC,eAAe,MAAM;AACjC;AAEA,iBAAiB,WAAW,CAAC,OAAO;AAChC,QAAM,OAAO,GAAG;AAChB,MAAI,CAAC,MAAM,QAAQ,IAAI,EAAG;AAC1B,QAAM,CAAC,KAAK,GAAG,IAAI,IAAI;AACvB,MAAI,OAAO,OAAO,YAAY,CAAC,KAAK,OAAQ;AAC5C,OAAK,QAAQ,GAAG,IAAI,EACf,KAAK,CAAC,CAAC,QAAQ,MAAM,MAAM;AACxB,gBAAY,CAAC,KAAK,QAAQ,MAAM,GAAG,EAAE,UAAU,CAAC,OAAO,MAAM,EAAE,CAAC;AAAA,EACpE,CAAC,EACA,MAAM,CAAC,UAAU;AACd,gBAAY,CAAC,KAAK,iBAAiB,QAAQ,QAAQ,IAAI,MAAM,OAAO,KAAK,CAAC,CAAC,CAAC;AAAA,EAChF,CAAC;AACT,CAAC;AAED,QAAQ,MAAM,CAAC,CAAC,EAAE;AAAA,EACd,MAAM,YAAY,OAAO;AAAA,EACzB,CAAC,OAAO,YAAY,EAAE;AAC1B;",
|
|
5
|
+
"names": []
|
|
6
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/helpers/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc,QAAkD,CAAC;AAC9E,eAAO,MAAM,WAAW,QAC2I,CAAC"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { type VmArray, type VmExtern, type VmFunction, type VmModule, type VmAny, type VmRecord } from '../vm/index.js';
|
|
2
|
+
/** 序列化设置 */
|
|
3
|
+
export interface SerializeOptions {
|
|
4
|
+
/** 最大递归深度,超过该深度的值将被序列化为 `nil`,默认值为 128 */
|
|
5
|
+
maxDepth: number;
|
|
6
|
+
/** 序列化 nil 值 */
|
|
7
|
+
serializeNil: (options: SerializeOptions) => string;
|
|
8
|
+
/** 序列化布尔值 */
|
|
9
|
+
serializeBoolean: (value: boolean, options: SerializeOptions) => string;
|
|
10
|
+
/** 序列化数字 */
|
|
11
|
+
serializeNumber: (value: number, options: SerializeOptions) => string;
|
|
12
|
+
/** 序列化字符串 */
|
|
13
|
+
serializeString: (value: string, options: SerializeOptions) => string;
|
|
14
|
+
/** 序列化字符串引号 */
|
|
15
|
+
serializeStringQuote: (value: string, open: boolean, options: SerializeOptions) => string;
|
|
16
|
+
/** 序列化字符串转义序列 */
|
|
17
|
+
serializeStringEscape: (value: string, options: SerializeOptions) => string;
|
|
18
|
+
/** 序列化字符串常规内容 */
|
|
19
|
+
serializeStringContent: (value: string, options: SerializeOptions) => string;
|
|
20
|
+
/** 序列化函数 */
|
|
21
|
+
serializeFunction: (value: VmFunction, options: SerializeOptions) => string;
|
|
22
|
+
/** 序列化数组 */
|
|
23
|
+
serializeArray: (value: VmArray, depth: number, options: SerializeOptions) => string;
|
|
24
|
+
/** 序列化记录 */
|
|
25
|
+
serializeRecord: (value: VmRecord, depth: number, options: SerializeOptions) => string;
|
|
26
|
+
/** 序列化属性名 */
|
|
27
|
+
serializePropName: (value: string | number, options: SerializeOptions) => string;
|
|
28
|
+
/** 序列化模块 */
|
|
29
|
+
serializeModule: (value: VmModule, depth: number, options: SerializeOptions) => string;
|
|
30
|
+
/** 序列化外部值 */
|
|
31
|
+
serializeExtern: (value: VmExtern, depth: number, options: SerializeOptions) => string;
|
|
32
|
+
}
|
|
33
|
+
/** 获取选项 */
|
|
34
|
+
export declare function getSerializeOptions(options: Partial<SerializeOptions> | undefined): SerializeOptions;
|
|
35
|
+
/**
|
|
36
|
+
* 将 MiraScript 字符串序列化为 MiraScript 字面量。
|
|
37
|
+
*/
|
|
38
|
+
export declare function serializeString(value: string, options?: Partial<SerializeOptions>): string;
|
|
39
|
+
/** 序列化属性名 */
|
|
40
|
+
export declare function serializePropName(value: string, options?: Partial<SerializeOptions>): string;
|
|
41
|
+
/**
|
|
42
|
+
* 将 MiraScript 值序列化为 MiraScript 字面量字符串,非常量值将被转换为 `nil`。
|
|
43
|
+
*/
|
|
44
|
+
export declare function serialize(value: VmAny, options?: Partial<SerializeOptions>): string;
|
|
45
|
+
//# sourceMappingURL=serialize.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"serialize.d.ts","sourceRoot":"","sources":["../../src/helpers/serialize.ts"],"names":[],"mappings":"AAAA,OAAO,EAGH,KAAK,OAAO,EACZ,KAAK,QAAQ,EACb,KAAK,UAAU,EACf,KAAK,QAAQ,EACb,KAAK,KAAK,EACV,KAAK,QAAQ,EAIhB,MAAM,gBAAgB,CAAC;AAOxB,YAAY;AACZ,MAAM,WAAW,gBAAgB;IAC7B,0CAA0C;IAC1C,QAAQ,EAAE,MAAM,CAAC;IACjB,gBAAgB;IAChB,YAAY,EAAE,CAAC,OAAO,EAAE,gBAAgB,KAAK,MAAM,CAAC;IACpD,aAAa;IACb,gBAAgB,EAAE,CAAC,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,gBAAgB,KAAK,MAAM,CAAC;IACxE,YAAY;IACZ,eAAe,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,gBAAgB,KAAK,MAAM,CAAC;IACtE,aAAa;IACb,eAAe,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,gBAAgB,KAAK,MAAM,CAAC;IACtE,eAAe;IACf,oBAAoB,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,gBAAgB,KAAK,MAAM,CAAC;IAC1F,iBAAiB;IACjB,qBAAqB,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,gBAAgB,KAAK,MAAM,CAAC;IAC5E,iBAAiB;IACjB,sBAAsB,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,gBAAgB,KAAK,MAAM,CAAC;IAC7E,YAAY;IACZ,iBAAiB,EAAE,CAAC,KAAK,EAAE,UAAU,EAAE,OAAO,EAAE,gBAAgB,KAAK,MAAM,CAAC;IAC5E,YAAY;IACZ,cAAc,EAAE,CAAC,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,gBAAgB,KAAK,MAAM,CAAC;IACrF,YAAY;IACZ,eAAe,EAAE,CAAC,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,gBAAgB,KAAK,MAAM,CAAC;IACvF,aAAa;IACb,iBAAiB,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,OAAO,EAAE,gBAAgB,KAAK,MAAM,CAAC;IACjF,YAAY;IACZ,eAAe,EAAE,CAAC,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,gBAAgB,KAAK,MAAM,CAAC;IACvF,aAAa;IACb,eAAe,EAAE,CAAC,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,gBAAgB,KAAK,MAAM,CAAC;CAC1F;AAmBD,WAAW;AACX,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,OAAO,CAAC,gBAAgB,CAAC,GAAG,SAAS,GAAG,gBAAgB,CAUpG;AAqDD;;GAEG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,OAAO,CAAC,gBAAgB,CAAC,GAAG,MAAM,CAE1F;AAgBD,aAAa;AACb,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,OAAO,CAAC,gBAAgB,CAAC,GAAG,MAAM,CAE5F;AAsHD;;GAEG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,KAAK,EAAE,OAAO,CAAC,EAAE,OAAO,CAAC,gBAAgB,CAAC,GAAG,MAAM,CAEnF"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
export declare const isArray: (arg: any) => arg is unknown[];
|
|
2
|
+
export declare const isFinite: (number: unknown) => boolean, isNaN: (number: unknown) => boolean, isInteger: (number: unknown) => boolean, isSafeInteger: (number: unknown) => boolean;
|
|
3
|
+
export declare const hasOwn: <Obj extends object, Key extends PropertyKey>(o: Obj, v: Key) => o is Obj & (string extends Key ? {} : number extends Key ? {} : symbol extends Key ? {} : Key extends PropertyKey ? { [key in Key]: unknown; } : {}), keys: {
|
|
4
|
+
(o: object): string[];
|
|
5
|
+
(o: {}): string[];
|
|
6
|
+
}, values: {
|
|
7
|
+
<T>(o: ArrayLike<T>): T[];
|
|
8
|
+
<K extends PropertyKey, V>(o: Record<K, V>): (string extends K ? V : number extends K ? V : unknown)[];
|
|
9
|
+
(o: {}): unknown[];
|
|
10
|
+
}, entries: {
|
|
11
|
+
<T>(o: ArrayLike<T>): [string, T][];
|
|
12
|
+
<K extends PropertyKey, V>(o: Record<K, V>): [string, string extends K ? V : number extends K ? V : unknown][];
|
|
13
|
+
(o: {}): [string, unknown][];
|
|
14
|
+
}, create: {
|
|
15
|
+
<O extends object>(o: O): O;
|
|
16
|
+
(o: null): {};
|
|
17
|
+
<O extends object, P extends Record<PropertyKey, PropertyDescriptor>>(o: O, properties: P & ThisType<any>): { [K in keyof (O & P)]: P[K] extends {
|
|
18
|
+
value: infer V;
|
|
19
|
+
} ? V : P[K] extends {
|
|
20
|
+
get: () => infer V;
|
|
21
|
+
} ? V : K extends keyof O ? O[K] : unknown; };
|
|
22
|
+
<P extends Record<string, PropertyDescriptor>>(o: null, properties: P & ThisType<any>): { [K in keyof P]: P[K] extends {
|
|
23
|
+
value: infer V;
|
|
24
|
+
} ? V : P[K] extends {
|
|
25
|
+
get: () => infer V;
|
|
26
|
+
} ? V : unknown; };
|
|
27
|
+
}, getPrototypeOf: (o: {}) => unknown, fromEntries: <T extends readonly [PropertyKey, unknown]>(entries: Iterable<T>) => Record<T[0], T[1]>, defineProperty: <O extends object, P extends PropertyKey, D extends PropertyDescriptor>(o: O, p: P, attributes: D & ThisType<any>) => O & (P extends PropertyKey ? { [K in P]: D extends {
|
|
28
|
+
value: infer V;
|
|
29
|
+
} ? V : D extends {
|
|
30
|
+
get: () => infer V;
|
|
31
|
+
} ? V : unknown; } : unknown);
|
|
32
|
+
/**
|
|
33
|
+
* Determines whether an object has an enumerable property with the specified name.
|
|
34
|
+
*/
|
|
35
|
+
export declare const hasOwnEnumerable: (o: object, v: PropertyKey) => boolean;
|
|
36
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/helpers/utils.ts"],"names":[],"mappings":"AAAA,eAAO,MAAQ,OAAO,gCAAU,CAAC;AACjC,eAAO,MAAQ,QAAQ,gCAAE,KAAK,gCAAE,SAAS,gCAAE,aAAa,8BAAW,CAAC;AACpE,eAAO,MAAQ,MAAM,yNAAE,IAAI;;;GAAE,MAAM;;;;GAAE,OAAO;;;;GAAE,MAAM;;;;;;;;;;;;;GAAE,cAAc,sBAAE,WAAW,2FAAE,cAAc;;;;6BAAW,CAAC;AAE7G;;GAEG;AACH,eAAO,MAAM,gBAAgB,wCAQ5B,CAAC"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,cAAc,qBAAqB,CAAC;AACpC,cAAc,eAAe,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import {
|
|
2
|
+
compile,
|
|
3
|
+
compileSync
|
|
4
|
+
} from "./chunk-BTDGMWFK.js";
|
|
5
|
+
import {
|
|
6
|
+
VM_ARRAY_MAX_LENGTH,
|
|
7
|
+
VmError,
|
|
8
|
+
VmExtern,
|
|
9
|
+
VmFunction,
|
|
10
|
+
VmModule,
|
|
11
|
+
configCheckpoint,
|
|
12
|
+
createVmContext,
|
|
13
|
+
defineVmContextValue,
|
|
14
|
+
getVmFunctionInfo,
|
|
15
|
+
isVmAny,
|
|
16
|
+
isVmArray,
|
|
17
|
+
isVmConst,
|
|
18
|
+
isVmContext,
|
|
19
|
+
isVmExtern,
|
|
20
|
+
isVmFunction,
|
|
21
|
+
isVmImmutable,
|
|
22
|
+
isVmModule,
|
|
23
|
+
isVmPrimitive,
|
|
24
|
+
isVmRecord,
|
|
25
|
+
isVmScript,
|
|
26
|
+
isVmValue,
|
|
27
|
+
serialize,
|
|
28
|
+
unwrapFromVmValue,
|
|
29
|
+
wrapToVmValue
|
|
30
|
+
} from "./chunk-DCXIWIW5.js";
|
|
31
|
+
import "./chunk-5FQWUJIY.js";
|
|
32
|
+
import "./chunk-RAPJ3XLV.js";
|
|
33
|
+
export {
|
|
34
|
+
VM_ARRAY_MAX_LENGTH,
|
|
35
|
+
VmError,
|
|
36
|
+
VmExtern,
|
|
37
|
+
VmFunction,
|
|
38
|
+
VmModule,
|
|
39
|
+
compile,
|
|
40
|
+
compileSync,
|
|
41
|
+
configCheckpoint,
|
|
42
|
+
createVmContext,
|
|
43
|
+
defineVmContextValue,
|
|
44
|
+
getVmFunctionInfo,
|
|
45
|
+
isVmAny,
|
|
46
|
+
isVmArray,
|
|
47
|
+
isVmConst,
|
|
48
|
+
isVmContext,
|
|
49
|
+
isVmExtern,
|
|
50
|
+
isVmFunction,
|
|
51
|
+
isVmImmutable,
|
|
52
|
+
isVmModule,
|
|
53
|
+
isVmPrimitive,
|
|
54
|
+
isVmRecord,
|
|
55
|
+
isVmScript,
|
|
56
|
+
isVmValue,
|
|
57
|
+
serialize,
|
|
58
|
+
unwrapFromVmValue,
|
|
59
|
+
wrapToVmValue
|
|
60
|
+
};
|
|
61
|
+
//# sourceMappingURL=index.js.map
|
package/dist/subtle.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export * as constants from './helpers/constants.js';
|
|
2
|
+
export { VmSharedContext, DefaultVmContext } from './vm/types/context.js';
|
|
3
|
+
export * as operations from './vm/operations.js';
|
|
4
|
+
export { serialize, serializeString, serializePropName, type SerializeOptions } from './helpers/serialize.js';
|
|
5
|
+
export { lib } from './vm/lib/_loader.js';
|
|
6
|
+
export * from './compiler/diagnostic.js';
|
|
7
|
+
//# sourceMappingURL=subtle.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"subtle.d.ts","sourceRoot":"","sources":["../src/subtle.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,SAAS,MAAM,wBAAwB,CAAC;AACpD,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAC1E,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,iBAAiB,EAAE,KAAK,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC9G,OAAO,EAAE,GAAG,EAAE,MAAM,qBAAqB,CAAC;AAC1C,cAAc,0BAA0B,CAAC"}
|
package/dist/subtle.js
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import {
|
|
2
|
+
DefaultVmContext,
|
|
3
|
+
DiagnosticCode,
|
|
4
|
+
VmSharedContext,
|
|
5
|
+
constants_exports,
|
|
6
|
+
formatDiagnostic,
|
|
7
|
+
getDiagnosticMessage,
|
|
8
|
+
lib,
|
|
9
|
+
operations_exports,
|
|
10
|
+
parseDiagnostics,
|
|
11
|
+
serialize,
|
|
12
|
+
serializePropName,
|
|
13
|
+
serializeString
|
|
14
|
+
} from "./chunk-DCXIWIW5.js";
|
|
15
|
+
import "./chunk-RAPJ3XLV.js";
|
|
16
|
+
export {
|
|
17
|
+
DefaultVmContext,
|
|
18
|
+
DiagnosticCode,
|
|
19
|
+
VmSharedContext,
|
|
20
|
+
constants_exports as constants,
|
|
21
|
+
formatDiagnostic,
|
|
22
|
+
getDiagnosticMessage,
|
|
23
|
+
lib,
|
|
24
|
+
operations_exports as operations,
|
|
25
|
+
parseDiagnostics,
|
|
26
|
+
serialize,
|
|
27
|
+
serializePropName,
|
|
28
|
+
serializeString
|
|
29
|
+
};
|
|
30
|
+
//# sourceMappingURL=subtle.js.map
|
package/dist/vm/env.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"env.d.ts","sourceRoot":"","sources":["../../src/vm/env.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,IAAI,EAAE,MAAM,EAAO,CAAC;AACjC,eAAO,MAAM,MAAM,EAAE,OAAO,EAAO,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { VmAny } from './types/index.js';
|
|
2
|
+
/**
|
|
3
|
+
* VM 预期的错误
|
|
4
|
+
*/
|
|
5
|
+
export declare class VmError extends Error {
|
|
6
|
+
readonly recovered: VmAny;
|
|
7
|
+
constructor(message: string, recovered: VmAny);
|
|
8
|
+
/** 从其他错误构造 */
|
|
9
|
+
static from(prefix: string, error: unknown, recovered: VmAny): VmError;
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=error.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"error.d.ts","sourceRoot":"","sources":["../../src/vm/error.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAE9C;;GAEG;AACH,qBAAa,OAAQ,SAAQ,KAAK;IAG1B,QAAQ,CAAC,SAAS,EAAE,KAAK;gBADzB,OAAO,EAAE,MAAM,EACN,SAAS,EAAE,KAAK;IAM7B,cAAc;IACd,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,SAAS,EAAE,KAAK,GAAG,OAAO;CAMzE"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { VmFunctionLike } from './types/function.js';
|
|
2
|
+
import { type VmContext } from './types/context.js';
|
|
3
|
+
import { VmFunction, type VmConst, type VmAny, type VmArray, type VmValue } from './types/index.js';
|
|
4
|
+
export declare const Vargs: (varags: VmAny[]) => VmArray;
|
|
5
|
+
export declare const Element: (value: VmAny) => VmConst;
|
|
6
|
+
export declare const ElementOpt: (key: string, value: VmAny) => VmConst;
|
|
7
|
+
export declare const Function: (fn: VmFunctionLike) => VmFunction;
|
|
8
|
+
export declare const Upvalue: (value: VmAny) => VmValue;
|
|
9
|
+
export declare const ArrayRange: (start: VmAny, end: VmAny) => VmArray;
|
|
10
|
+
export declare const ArrayRangeExclusive: (start: VmAny, end: VmAny) => VmArray;
|
|
11
|
+
/** 检查点 */
|
|
12
|
+
export declare function Cp(): void;
|
|
13
|
+
/** 检查点 */
|
|
14
|
+
export declare function CpEnter(): void;
|
|
15
|
+
/** 检查点 */
|
|
16
|
+
export declare function CpExit(): void;
|
|
17
|
+
/** 设置检查点超时时间 */
|
|
18
|
+
export declare function configCheckpoint(timeout?: number): void;
|
|
19
|
+
/** 默认执行上下文 */
|
|
20
|
+
export declare function GlobalFallback(): VmContext;
|
|
21
|
+
//# sourceMappingURL=helpers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../src/vm/helpers.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,EAAoB,KAAK,SAAS,EAAE,MAAM,oBAAoB,CAAC;AACtE,OAAO,EAEH,UAAU,EACV,KAAK,OAAO,EACZ,KAAK,KAAK,EACV,KAAK,OAAO,EACZ,KAAK,OAAO,EAEf,MAAM,kBAAkB,CAAC;AAG1B,eAAO,MAAM,KAAK,GAAI,QAAQ,KAAK,EAAE,KAAG,OAQvC,CAAC;AACF,eAAO,MAAM,OAAO,GAAI,OAAO,KAAK,KAAG,OAItC,CAAC;AAEF,eAAO,MAAM,UAAU,GAAI,KAAK,MAAM,EAAE,OAAO,KAAK,KAAG,OAItD,CAAC;AAEF,eAAO,MAAM,QAAQ,GAAI,IAAI,cAAc,KAAG,UAE7C,CAAC;AAEF,eAAO,MAAM,OAAO,GAAI,OAAO,KAAK,KAAG,OAGtC,CAAC;AAUF,eAAO,MAAM,UAAU,GAAI,OAAO,KAAK,EAAE,KAAK,KAAK,KAAG,OAUrD,CAAC;AACF,eAAO,MAAM,mBAAmB,GAAI,OAAO,KAAK,EAAE,KAAK,KAAK,KAAG,OAU9D,CAAC;AAOF,UAAU;AACV,wBAAgB,EAAE,IAAI,IAAI,CAMzB;AACD,UAAU;AACV,wBAAgB,OAAO,IAAI,IAAI,CAU9B;AACD,UAAU;AACV,wBAAgB,MAAM,IAAI,IAAI,CAQ7B;AACD,gBAAgB;AAChB,wBAAgB,gBAAgB,CAAC,OAAO,SAAM,GAAG,IAAI,CAKpD;AACD,cAAc;AACd,wBAAgB,cAAc,IAAI,SAAS,CAE1C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/vm/index.ts"],"names":[],"mappings":"AAAA,OAAO,kBAAkB,CAAC;AAE1B,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC;AACjC,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { type VmExtern, type VmFunction, type VmAny, type VmArray, type VmValue, type VmRecord, type VmModule, type VmConst } from '../types/index.js';
|
|
2
|
+
import type { VmFunctionLike, VmFunctionOption } from '../types/function.js';
|
|
3
|
+
/** 抛出异常 */
|
|
4
|
+
export declare function throwError(message: string, recovered: VmAny | (() => VmAny)): never;
|
|
5
|
+
/** 抛出预期外类型异常 */
|
|
6
|
+
export declare function throwUnexpectedTypeError(name: string | number, expected: string, value: VmAny, recovered: VmAny | (() => VmAny)): never;
|
|
7
|
+
/** 重新抛出异常 */
|
|
8
|
+
export declare function rethrowError(prefix: string, error: unknown, recovered: VmAny | (() => VmAny)): never;
|
|
9
|
+
/** 标记参数为必须项 */
|
|
10
|
+
export declare function required<const T = VmValue>(name: string | number, value: T | undefined, recovered: VmAny | (() => VmAny)): asserts value is T;
|
|
11
|
+
/** 标记参数为数组 */
|
|
12
|
+
export declare function expectArray(name: string | number, value: VmAny, recovered: VmAny | (() => VmAny)): asserts value is VmArray;
|
|
13
|
+
/** 标记参数为记录 */
|
|
14
|
+
export declare function expectRecord(name: string | number, value: VmAny, recovered: VmAny | (() => VmAny)): asserts value is VmRecord;
|
|
15
|
+
/** 标记参数为数组或记录 */
|
|
16
|
+
export declare function expectArrayOrRecord(name: string | number, value: VmAny, recovered: VmAny | (() => VmAny)): asserts value is VmArray | VmRecord;
|
|
17
|
+
/** 标记参数为复合类型 */
|
|
18
|
+
export declare function expectCompound(name: string | number, value: VmAny, recovered: VmAny | (() => VmAny)): asserts value is VmArray | VmRecord | VmModule | VmExtern;
|
|
19
|
+
/** 标记参数为常量 */
|
|
20
|
+
export declare function expectConst(name: string | number, value: VmAny, recovered: VmAny | (() => VmAny)): asserts value is VmConst;
|
|
21
|
+
/** 标记为可调用 */
|
|
22
|
+
export declare function expectCallable(name: string | number, value: VmAny, recovered: VmAny | (() => VmAny)): asserts value is VmFunction | VmExtern;
|
|
23
|
+
/** Get numbers from the arguments. */
|
|
24
|
+
export declare function getNumbers(args: readonly VmAny[]): number[];
|
|
25
|
+
/** 将值转为数组长度 */
|
|
26
|
+
export declare function arrayLen(len: number | null | undefined): number;
|
|
27
|
+
/** 应用映射函数 */
|
|
28
|
+
export declare function map(data: VmConst, mapper: (value: VmConst, index: number | string | null, data: VmConst) => VmConst | undefined): VmConst;
|
|
29
|
+
/** 库函数选项 */
|
|
30
|
+
export type VmLibOption = Pick<VmFunctionOption, 'summary' | 'params' | 'paramsType' | 'returns' | 'returnsType' | 'examples'>;
|
|
31
|
+
/** 库函数 */
|
|
32
|
+
export type VmLib<T extends VmFunctionLike = VmFunctionLike> = T & VmLibOption;
|
|
33
|
+
/** 创建库函数 */
|
|
34
|
+
export declare function VmLib<T extends VmFunctionLike>(fn: T, option: VmLibOption): VmLib<T>;
|
|
35
|
+
//# sourceMappingURL=_helpers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"_helpers.d.ts","sourceRoot":"","sources":["../../../src/vm/lib/_helpers.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { VmFunction, VmModule, type VmConst, type VmFunctionLike } from '../types/index.js';
|
|
2
|
+
import type { VmLib } from './_helpers.js';
|
|
3
|
+
import * as global from './global/index.js';
|
|
4
|
+
/** 原始值 */
|
|
5
|
+
type RawValue = VmLib | VmConst | VmModule;
|
|
6
|
+
/** 包装值 */
|
|
7
|
+
type ToWrappedValue<V extends RawValue> = V extends VmFunctionLike ? VmFunction<V> : V;
|
|
8
|
+
/** 创建模块 */
|
|
9
|
+
export type ToWrappedModule<T extends Record<string, RawValue>> = VmModule<{
|
|
10
|
+
[key in keyof T]: ToWrappedValue<T[key]>;
|
|
11
|
+
}>;
|
|
12
|
+
/** 创建模块 */
|
|
13
|
+
export declare function createModule<const T extends Record<string, RawValue>>(name: string, lib: T): ToWrappedModule<T>;
|
|
14
|
+
export declare const lib: typeof global;
|
|
15
|
+
export {};
|
|
16
|
+
//# sourceMappingURL=_loader.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"_loader.d.ts","sourceRoot":"","sources":["../../../src/vm/lib/_loader.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,KAAK,OAAO,EAAE,KAAK,cAAc,EAAoB,MAAM,mBAAmB,CAAC;AAI9G,OAAO,KAAK,EAAE,KAAK,EAAe,MAAM,eAAe,CAAC;AACxD,OAAO,KAAK,MAAM,MAAM,mBAAmB,CAAC;AAM5C,UAAU;AACV,KAAK,QAAQ,GAAG,KAAK,GAAG,OAAO,GAAG,QAAQ,CAAC;AAC3C,UAAU;AACV,KAAK,cAAc,CAAC,CAAC,SAAS,QAAQ,IAAI,CAAC,SAAS,cAAc,GAAG,UAAU,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;AAsBvF,WAAW;AACX,MAAM,MAAM,eAAe,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC,IAAI,QAAQ,CAAC;KACtE,GAAG,IAAI,MAAM,CAAC,GAAG,cAAc,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;CAC3C,CAAC,CAAC;AAEH,WAAW;AACX,wBAAgB,YAAY,CAAC,KAAK,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC,GAAG,eAAe,CAAC,CAAC,CAAC,CAM/G;AAED,eAAO,MAAM,GAAG,eAAS,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { VmLib } from '../_helpers.js';
|
|
2
|
+
export declare const b_and: VmLib<(x: import("../../index.js").VmValue | undefined, y: import("../../index.js").VmValue | undefined) => number>;
|
|
3
|
+
export declare const b_or: VmLib<(x: import("../../index.js").VmValue | undefined, y: import("../../index.js").VmValue | undefined) => number>;
|
|
4
|
+
export declare const b_not: VmLib<(x: import("../../index.js").VmValue | undefined) => number>;
|
|
5
|
+
export declare const b_xor: VmLib<(x: import("../../index.js").VmValue | undefined, y: import("../../index.js").VmValue | undefined) => number>;
|
|
6
|
+
export declare const shl: VmLib<(x: import("../../index.js").VmValue | undefined, y: import("../../index.js").VmValue | undefined) => number>;
|
|
7
|
+
export declare const sar: VmLib<(x: import("../../index.js").VmValue | undefined, y: import("../../index.js").VmValue | undefined) => number>;
|
|
8
|
+
export declare const shr: VmLib<(x: import("../../index.js").VmValue | undefined, y: import("../../index.js").VmValue | undefined) => number>;
|
|
9
|
+
//# sourceMappingURL=bit.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bit.d.ts","sourceRoot":"","sources":["../../../../src/vm/lib/global/bit.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAEvC,eAAO,MAAM,KAAK,qHAWjB,CAAC;AAEF,eAAO,MAAM,IAAI,qHAWhB,CAAC;AAEF,eAAO,MAAM,KAAK,oEAWjB,CAAC;AAEF,eAAO,MAAM,KAAK,qHAWjB,CAAC;AAEF,eAAO,MAAM,GAAG,qHAWf,CAAC;AAEF,eAAO,MAAM,GAAG,qHAWf,CAAC;AAEF,eAAO,MAAM,GAAG,qHAWf,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { VmAny } from '../../types/index.js';
|
|
2
|
+
import { VmLib } from '../_helpers.js';
|
|
3
|
+
export declare const debug_print: VmLib<(...args: readonly (import("../../types/index.js").VmValue | undefined)[]) => void>;
|
|
4
|
+
export declare const panic: VmLib<(message: VmAny) => never>;
|
|
5
|
+
//# sourceMappingURL=debug.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"debug.d.ts","sourceRoot":"","sources":["../../../../src/vm/lib/global/debug.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAEvC,eAAO,MAAM,WAAW,2FAYvB,CAAC;AAEF,eAAO,MAAM,KAAK,kBACJ,KAAK,WAelB,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export * from './math.js';
|
|
2
|
+
export * from './bit.js';
|
|
3
|
+
export * from './sequence/index.js';
|
|
4
|
+
export * from './debug.js';
|
|
5
|
+
export * from './json.js';
|
|
6
|
+
export * from './to-primitive.js';
|
|
7
|
+
export * from './string.js';
|
|
8
|
+
export * from './time.js';
|
|
9
|
+
export * from './mod/index.js';
|
|
10
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/vm/lib/global/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,qBAAqB,CAAC;AACpC,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,mBAAmB,CAAC;AAClC,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { VmLib } from '../_helpers.js';
|
|
2
|
+
export declare const to_json: VmLib<(data: import("../../types/index.js").VmValue | undefined) => string | null>;
|
|
3
|
+
export declare const from_json: VmLib<(json: import("../../types/index.js").VmValue | undefined, fallback: import("../../types/index.js").VmValue | undefined) => string | number | boolean | import("../../types/index.js").VmRecord | import("../../types/index.js").VmArray | import("../../types/function.js").VmFunction | import("../../types/module.js").VmModule<Record<string, import("../../types/index.js").VmValue>> | import("../../types/extern.js").VmExtern<object> | null>;
|
|
4
|
+
//# sourceMappingURL=json.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"json.d.ts","sourceRoot":"","sources":["../../../../src/vm/lib/global/json.ts"],"names":[],"mappings":"AACA,OAAO,EAA0B,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAG/D,eAAO,MAAM,OAAO,oFAoBnB,CAAC;AAEF,eAAO,MAAM,SAAS,6bAkBrB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"math-additional.d.ts","sourceRoot":"","sources":["../../../../src/vm/lib/global/math-additional.ts"],"names":[],"mappings":"AAGA,OAAO,EAAY,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAejD,eAAO,MAAM,SAAS,6DACb,MAAM,CAmDd,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { VmAny } from '../../types/index.js';
|
|
2
|
+
import { VmLib } from '../_helpers.js';
|
|
3
|
+
export declare const max: VmLib<(...values: readonly VmAny[]) => number>;
|
|
4
|
+
export declare const min: VmLib<(...values: readonly VmAny[]) => number>;
|
|
5
|
+
export declare const hypot: VmLib<(...values: readonly VmAny[]) => number>;
|
|
6
|
+
export declare const sum: VmLib<(...values: readonly VmAny[]) => number>;
|
|
7
|
+
export declare const product: VmLib<(...values: readonly VmAny[]) => number>;
|
|
8
|
+
//# sourceMappingURL=math-arr.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"math-arr.d.ts","sourceRoot":"","sources":["../../../../src/vm/lib/global/math-arr.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAc,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAUnD,eAAO,MAAM,GAAG,oBAPyD,SAAS,KAAK,EAAE,KAAK,MAAM,CAalG,CAAC;AAEH,eAAO,MAAM,GAAG,oBAfyD,SAAS,KAAK,EAAE,KAAK,MAAM,CAqBlG,CAAC;AAEH,eAAO,MAAM,KAAK,oBAvBuD,SAAS,KAAK,EAAE,KAAK,MAAM,CA6BlG,CAAC;AAEH,eAAO,MAAM,GAAG,oBACA,SAAS,KAAK,EAAE,YAW/B,CAAC;AAEF,eAAO,MAAM,OAAO,oBACJ,SAAS,KAAK,EAAE,YAW/B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"math-const.d.ts","sourceRoot":"","sources":["../../../../src/vm/lib/global/math-const.ts"],"names":[],"mappings":"AAAA,QAAA,MAAQ,EAAE,UAAE,CAAC,QAAS,CAAC;AACvB,OAAO,EAAE,EAAE,IAAI,KAAK,EAAE,CAAC,IAAI,IAAI,EAAE,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { VmAny } from '../../index.js';
|
|
2
|
+
import { VmLib } from '../_helpers.js';
|
|
3
|
+
export declare const trunc: VmLib<(x: VmAny) => number>;
|
|
4
|
+
export declare const floor: VmLib<(x: VmAny) => number>;
|
|
5
|
+
export declare const ceil: VmLib<(x: VmAny) => number>;
|
|
6
|
+
export declare const round: VmLib<(x: VmAny) => number>;
|
|
7
|
+
export declare const sign: VmLib<(x: VmAny) => number>;
|
|
8
|
+
export declare const abs: VmLib<(x: VmAny) => number>;
|
|
9
|
+
export declare const acos: VmLib<(x: VmAny) => number>;
|
|
10
|
+
export declare const acosh: VmLib<(x: VmAny) => number>;
|
|
11
|
+
export declare const asin: VmLib<(x: VmAny) => number>;
|
|
12
|
+
export declare const asinh: VmLib<(x: VmAny) => number>;
|
|
13
|
+
export declare const atan: VmLib<(x: VmAny) => number>;
|
|
14
|
+
export declare const atanh: VmLib<(x: VmAny) => number>;
|
|
15
|
+
export declare const cos: VmLib<(x: VmAny) => number>;
|
|
16
|
+
export declare const cosh: VmLib<(x: VmAny) => number>;
|
|
17
|
+
export declare const sin: VmLib<(x: VmAny) => number>;
|
|
18
|
+
export declare const sinh: VmLib<(x: VmAny) => number>;
|
|
19
|
+
export declare const tan: VmLib<(x: VmAny) => number>;
|
|
20
|
+
export declare const tanh: VmLib<(x: VmAny) => number>;
|
|
21
|
+
export declare const exp: VmLib<(x: VmAny) => number>;
|
|
22
|
+
export declare const expm1: VmLib<(x: VmAny) => number>;
|
|
23
|
+
export declare const log: VmLib<(x: VmAny) => number>;
|
|
24
|
+
export declare const log10: VmLib<(x: VmAny) => number>;
|
|
25
|
+
export declare const log1p: VmLib<(x: VmAny) => number>;
|
|
26
|
+
export declare const log2: VmLib<(x: VmAny) => number>;
|
|
27
|
+
export declare const sqrt: VmLib<(x: VmAny) => number>;
|
|
28
|
+
export declare const cbrt: VmLib<(x: VmAny) => number>;
|
|
29
|
+
//# sourceMappingURL=math-unary.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"math-unary.d.ts","sourceRoot":"","sources":["../../../../src/vm/lib/global/math-unary.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAE5C,OAAO,EAAY,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAUjD,eAAO,MAAM,KAAK,YAP4B,KAAK,KAAK,MAAM,CAY5D,CAAC;AACH,eAAO,MAAM,KAAK,YAb4B,KAAK,KAAK,MAAM,CAkB5D,CAAC;AACH,eAAO,MAAM,IAAI,YAnB6B,KAAK,KAAK,MAAM,CAwB5D,CAAC;AACH,eAAO,MAAM,KAAK,YAzB4B,KAAK,KAAK,MAAM,CA8B5D,CAAC;AACH,eAAO,MAAM,IAAI,YA/B6B,KAAK,KAAK,MAAM,CAoC5D,CAAC;AACH,eAAO,MAAM,GAAG,YArC8B,KAAK,KAAK,MAAM,CA0C5D,CAAC;AAEH,eAAO,MAAM,IAAI,YA5C6B,KAAK,KAAK,MAAM,CAiD5D,CAAC;AACH,eAAO,MAAM,KAAK,YAlD4B,KAAK,KAAK,MAAM,CAuD5D,CAAC;AACH,eAAO,MAAM,IAAI,YAxD6B,KAAK,KAAK,MAAM,CA6D5D,CAAC;AACH,eAAO,MAAM,KAAK,YA9D4B,KAAK,KAAK,MAAM,CAmE5D,CAAC;AACH,eAAO,MAAM,IAAI,YApE6B,KAAK,KAAK,MAAM,CAyE5D,CAAC;AACH,eAAO,MAAM,KAAK,YA1E4B,KAAK,KAAK,MAAM,CA+E5D,CAAC;AACH,eAAO,MAAM,GAAG,YAhF8B,KAAK,KAAK,MAAM,CAqF5D,CAAC;AACH,eAAO,MAAM,IAAI,YAtF6B,KAAK,KAAK,MAAM,CA2F5D,CAAC;AACH,eAAO,MAAM,GAAG,YA5F8B,KAAK,KAAK,MAAM,CAiG5D,CAAC;AACH,eAAO,MAAM,IAAI,YAlG6B,KAAK,KAAK,MAAM,CAuG5D,CAAC;AACH,eAAO,MAAM,GAAG,YAxG8B,KAAK,KAAK,MAAM,CA6G5D,CAAC;AACH,eAAO,MAAM,IAAI,YA9G6B,KAAK,KAAK,MAAM,CAmH5D,CAAC;AAEH,eAAO,MAAM,GAAG,YArH8B,KAAK,KAAK,MAAM,CA0H5D,CAAC;AACH,eAAO,MAAM,KAAK,YA3H4B,KAAK,KAAK,MAAM,CAgI5D,CAAC;AACH,eAAO,MAAM,GAAG,YAjI8B,KAAK,KAAK,MAAM,CAsI5D,CAAC;AACH,eAAO,MAAM,KAAK,YAvI4B,KAAK,KAAK,MAAM,CA4I5D,CAAC;AACH,eAAO,MAAM,KAAK,YA7I4B,KAAK,KAAK,MAAM,CAkJ5D,CAAC;AACH,eAAO,MAAM,IAAI,YAnJ6B,KAAK,KAAK,MAAM,CAwJ5D,CAAC;AAEH,eAAO,MAAM,IAAI,YA1J6B,KAAK,KAAK,MAAM,CA+J5D,CAAC;AACH,eAAO,MAAM,IAAI,YAhK6B,KAAK,KAAK,MAAM,CAqK5D,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { VmLib } from '../_helpers.js';
|
|
2
|
+
export declare const atan2: VmLib<(x: import("../../index.js").VmValue | undefined, y: import("../../index.js").VmValue | undefined) => number>;
|
|
3
|
+
export declare const pow: VmLib<(x: import("../../index.js").VmValue | undefined, y: import("../../index.js").VmValue | undefined) => number>;
|
|
4
|
+
export declare const random: VmLib<() => number>;
|
|
5
|
+
export * from './math-arr.js';
|
|
6
|
+
export * from './math-const.js';
|
|
7
|
+
export * from './math-unary.js';
|
|
8
|
+
export * from './math-additional.js';
|
|
9
|
+
//# sourceMappingURL=math.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"math.d.ts","sourceRoot":"","sources":["../../../../src/vm/lib/global/math.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAGvC,eAAO,MAAM,KAAK,qHAKhB,CAAC;AACH,eAAO,MAAM,GAAG,qHAKd,CAAC;AACH,eAAO,MAAM,MAAM,qBAKjB,CAAC;AAEH,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,sBAAsB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/vm/lib/global/mod/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,OAAO,MAAM,aAAa,CAAC;AAEvC,eAAO,MAAM,MAAM,4DAAkC,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { type VmArray, type VmConst, type VmValue } from '../../../types/index.js';
|
|
2
|
+
import { VmLib } from '../../_helpers.js';
|
|
3
|
+
export declare const size: VmLib<(matrix: VmValue | undefined) => [] | [number, number] | [number]>;
|
|
4
|
+
export declare const transpose: VmLib<(matrix: VmValue | undefined) => string | number | boolean | import("../../../types/index.js").VmRecord | VmArray | import("../../../types/function.js").VmFunction | import("../../../types/module.js").VmModule<Record<string, VmValue>> | import("../../../types/extern.js").VmExtern<object> | null>;
|
|
5
|
+
export declare const entrywise: VmLib<(a: VmValue | undefined, b: VmValue | undefined, f: VmValue | undefined) => VmConst>;
|
|
6
|
+
export declare const add: VmLib<(a: VmValue | undefined, b: VmValue | undefined) => VmConst>;
|
|
7
|
+
export declare const subtract: VmLib<(a: VmValue | undefined, b: VmValue | undefined) => VmConst>;
|
|
8
|
+
export declare const entrywise_multiply: VmLib<(a: VmValue | undefined, b: VmValue | undefined) => VmConst>;
|
|
9
|
+
export declare const entrywise_divide: VmLib<(a: VmValue | undefined, b: VmValue | undefined) => VmConst>;
|
|
10
|
+
export declare const multiply: VmLib<(a: VmValue | undefined, b: VmValue | undefined) => VmConst>;
|
|
11
|
+
export declare const invert: VmLib<(a: VmValue | undefined) => VmConst>;
|
|
12
|
+
export declare const zeros: VmLib<(...size: readonly (VmValue | undefined)[]) => VmArray>;
|
|
13
|
+
export declare const ones: VmLib<(...size: readonly (VmValue | undefined)[]) => VmArray>;
|
|
14
|
+
export declare const identity: VmLib<(...size: readonly (VmValue | undefined)[]) => number[][]>;
|
|
15
|
+
export declare const diagonal: VmLib<(x: VmValue | undefined, k?: VmValue | undefined) => VmConst[]>;
|
|
16
|
+
//# sourceMappingURL=matrix.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"matrix.d.ts","sourceRoot":"","sources":["../../../../../src/vm/lib/global/mod/matrix.ts"],"names":[],"mappings":"AAGA,OAAO,EAAoC,KAAK,OAAO,EAAE,KAAK,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,yBAAyB,CAAC;AACrH,OAAO,EACH,KAAK,EASR,MAAM,mBAAmB,CAAC;AA0B3B,eAAO,MAAM,IAAI,0EAYhB,CAAC;AAEF,eAAO,MAAM,SAAS,gTA0BrB,CAAC;AA8HF,eAAO,MAAM,SAAS,4FAmBrB,CAAC;AAEF,eAAO,MAAM,GAAG,oEAaf,CAAC;AAEF,eAAO,MAAM,QAAQ,oEAapB,CAAC;AAEF,eAAO,MAAM,kBAAkB,oEAa9B,CAAC;AAEF,eAAO,MAAM,gBAAgB,oEAa5B,CAAC;AAEF,eAAO,MAAM,QAAQ,oEAiEpB,CAAC;AAEF,eAAO,MAAM,MAAM,4CAsHlB,CAAC;AAkBF,eAAO,MAAM,KAAK,+DAMhB,CAAC;AAEH,eAAO,MAAM,IAAI,+DAMf,CAAC;AAEH,eAAO,MAAM,QAAQ,kEA0BpB,CAAC;AAEF,eAAO,MAAM,QAAQ,uEA4CpB,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { VmLib } from '../../_helpers.js';
|
|
2
|
+
export declare const all: VmLib<(data: import("../../../types/index.js").VmValue | undefined, predicate: import("../../../types/index.js").VmValue | undefined) => boolean>;
|
|
3
|
+
export declare const any: VmLib<(data: import("../../../types/index.js").VmValue | undefined, predicate: import("../../../types/index.js").VmValue | undefined) => boolean>;
|
|
4
|
+
//# sourceMappingURL=all-any.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"all-any.d.ts","sourceRoot":"","sources":["../../../../../src/vm/lib/global/sequence/all-any.ts"],"names":[],"mappings":"AAIA,OAAO,EAAuC,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAE/E,eAAO,MAAM,GAAG,mJAgCf,CAAC;AAEF,eAAO,MAAM,GAAG,mJAgCf,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type VmConst } from '../../../types/index.js';
|
|
2
|
+
import { VmLib } from '../../_helpers.js';
|
|
3
|
+
export declare const keys: VmLib<(data: import("../../../types/index.js").VmValue | undefined) => string[] | number[]>;
|
|
4
|
+
export declare const values: VmLib<(data: import("../../../types/index.js").VmValue | undefined) => import("../../../types/index.js").VmArray>;
|
|
5
|
+
export declare const entries: VmLib<(data: import("../../../types/index.js").VmValue | undefined) => {
|
|
6
|
+
0: number;
|
|
7
|
+
1: VmConst;
|
|
8
|
+
}[] | {
|
|
9
|
+
0: string;
|
|
10
|
+
1: string | number | boolean | import("../../../types/index.js").VmRecord | import("../../../types/index.js").VmArray | null;
|
|
11
|
+
}[]>;
|
|
12
|
+
//# sourceMappingURL=entries.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"entries.d.ts","sourceRoot":"","sources":["../../../../../src/vm/lib/global/sequence/entries.ts"],"names":[],"mappings":"AAAA,OAAO,EAAyB,KAAK,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAC9E,OAAO,EAAE,KAAK,EAAuC,MAAM,mBAAmB,CAAC;AAG/E,eAAO,MAAM,IAAI,6FAuBhB,CAAC;AAEF,eAAO,MAAM,MAAM,mHAelB,CAAC;AAEF,eAAO,MAAM,OAAO;OAIc,MAAM;OAAK,OAAO;;;;IAgBnD,CAAC"}
|