porffor 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/CNAME +1 -0
- package/LICENSE +21 -0
- package/README.md +275 -0
- package/compiler/builtins/base64.js +92 -0
- package/compiler/builtins.js +770 -0
- package/compiler/codeGen.js +2027 -0
- package/compiler/decompile.js +102 -0
- package/compiler/embedding.js +19 -0
- package/compiler/encoding.js +217 -0
- package/compiler/expression.js +70 -0
- package/compiler/index.js +67 -0
- package/compiler/opt.js +436 -0
- package/compiler/parse.js +8 -0
- package/compiler/prototype.js +272 -0
- package/compiler/sections.js +154 -0
- package/compiler/wasmSpec.js +200 -0
- package/compiler/wrap.js +119 -0
- package/index.html +1264 -0
- package/logo.png +0 -0
- package/package.json +23 -0
- package/porf.cmd +2 -0
- package/runner/compare.js +35 -0
- package/runner/index.js +32 -0
- package/runner/info.js +54 -0
- package/runner/profile.js +47 -0
- package/runner/repl.js +99 -0
- package/runner/sizes.js +38 -0
- package/runner/transform.js +36 -0
- package/sw.js +26 -0
- package/test/array_1.js +8 -0
- package/test/array_push.js +8 -0
- package/test/assignop_1.js +15 -0
- package/test/bitwise_1.js +6 -0
- package/test/bool_1.js +3 -0
- package/test/boolean.js +6 -0
- package/test/break_1.js +6 -0
- package/test/break_2.js +12 -0
- package/test/conditional_1.js +3 -0
- package/test/conditional_2.js +4 -0
- package/test/console_1.js +2 -0
- package/test/continue_1.js +6 -0
- package/test/continue_2.js +10 -0
- package/test/empty.js +1 -0
- package/test/ending_exp_1.js +2 -0
- package/test/ending_exp_2.js +6 -0
- package/test/eq_1.js +4 -0
- package/test/eq_2.js +4 -0
- package/test/eq_3.js +5 -0
- package/test/export_1.js +9 -0
- package/test/factorial.js +3 -0
- package/test/fibonacci.js +16 -0
- package/test/float_div0.js +2 -0
- package/test/float_frac.js +2 -0
- package/test/float_isfinite.js +29 -0
- package/test/float_isinteger.js +13 -0
- package/test/float_isnan.js +20 -0
- package/test/float_issafeinteger.js +11 -0
- package/test/float_large.js +2 -0
- package/test/float_math_funcs.js +24 -0
- package/test/float_math_random.js +6 -0
- package/test/float_nan.js +3 -0
- package/test/float_number_values.js +12 -0
- package/test/for_1.js +4 -0
- package/test/for_2.js +4 -0
- package/test/func_1.js +16 -0
- package/test/func_2.js +6 -0
- package/test/func_3.js +10 -0
- package/test/global_1.js +8 -0
- package/test/global_2.js +10 -0
- package/test/if_1.js +6 -0
- package/test/if_2.js +9 -0
- package/test/if_3.js +7 -0
- package/test/iife_1.js +8 -0
- package/test/iife_2.js +8 -0
- package/test/index.js +93 -0
- package/test/int_number_values.js +6 -0
- package/test/logic_1.js +7 -0
- package/test/logic_2.js +7 -0
- package/test/math_1.js +6 -0
- package/test/math_2.js +12 -0
- package/test/math_3.js +6 -0
- package/test/number_func.js +4 -0
- package/test/return_1.js +8 -0
- package/test/return_2.js +11 -0
- package/test/tailcall_1.js +10 -0
- package/test/throw_1.js +2 -0
- package/test/throw_2.js +4 -0
- package/test/throw_3.js +2 -0
- package/test/throw_4.js +3 -0
- package/test/try_1.js +7 -0
- package/test/unary_1.js +4 -0
- package/test/unary_2.js +5 -0
- package/test/unary_3.js +6 -0
- package/test/unary_4.js +12 -0
- package/test/unary_5.js +8 -0
- package/test/undefined_1.js +8 -0
- package/test/undefined_2.js +10 -0
- package/test/updateexp_1.js +9 -0
- package/test/vars_1.js +5 -0
- package/test/vars_2.js +9 -0
- package/test/while_1.js +6 -0
- package/test262/compare.js +30 -0
- package/test262/index.js +314 -0
- package/test262/node_modules/.bin/esparse +12 -0
- package/test262/node_modules/.bin/esparse.cmd +17 -0
- package/test262/node_modules/.bin/esparse.ps1 +28 -0
- package/test262/node_modules/.bin/esvalidate +12 -0
- package/test262/node_modules/.bin/esvalidate.cmd +17 -0
- package/test262/node_modules/.bin/esvalidate.ps1 +28 -0
- package/test262/node_modules/.bin/js-yaml +12 -0
- package/test262/node_modules/.bin/js-yaml.cmd +17 -0
- package/test262/node_modules/.bin/js-yaml.ps1 +28 -0
- package/test262/node_modules/.package-lock.json +0 -0
- package/test262/node_modules/@nodelib/fs.scandir/LICENSE +21 -0
- package/test262/node_modules/@nodelib/fs.scandir/README.md +171 -0
- package/test262/node_modules/@nodelib/fs.scandir/out/adapters/fs.d.ts +20 -0
- package/test262/node_modules/@nodelib/fs.scandir/out/adapters/fs.js +19 -0
- package/test262/node_modules/@nodelib/fs.scandir/out/constants.d.ts +4 -0
- package/test262/node_modules/@nodelib/fs.scandir/out/constants.js +17 -0
- package/test262/node_modules/@nodelib/fs.scandir/out/index.d.ts +12 -0
- package/test262/node_modules/@nodelib/fs.scandir/out/index.js +26 -0
- package/test262/node_modules/@nodelib/fs.scandir/out/providers/async.d.ts +7 -0
- package/test262/node_modules/@nodelib/fs.scandir/out/providers/async.js +104 -0
- package/test262/node_modules/@nodelib/fs.scandir/out/providers/common.d.ts +1 -0
- package/test262/node_modules/@nodelib/fs.scandir/out/providers/common.js +13 -0
- package/test262/node_modules/@nodelib/fs.scandir/out/providers/sync.d.ts +5 -0
- package/test262/node_modules/@nodelib/fs.scandir/out/providers/sync.js +54 -0
- package/test262/node_modules/@nodelib/fs.scandir/out/settings.d.ts +20 -0
- package/test262/node_modules/@nodelib/fs.scandir/out/settings.js +24 -0
- package/test262/node_modules/@nodelib/fs.scandir/out/types/index.d.ts +20 -0
- package/test262/node_modules/@nodelib/fs.scandir/out/types/index.js +2 -0
- package/test262/node_modules/@nodelib/fs.scandir/out/utils/fs.d.ts +2 -0
- package/test262/node_modules/@nodelib/fs.scandir/out/utils/fs.js +19 -0
- package/test262/node_modules/@nodelib/fs.scandir/out/utils/index.d.ts +2 -0
- package/test262/node_modules/@nodelib/fs.scandir/out/utils/index.js +5 -0
- package/test262/node_modules/@nodelib/fs.scandir/package.json +44 -0
- package/test262/node_modules/@nodelib/fs.stat/LICENSE +21 -0
- package/test262/node_modules/@nodelib/fs.stat/README.md +126 -0
- package/test262/node_modules/@nodelib/fs.stat/out/adapters/fs.d.ts +13 -0
- package/test262/node_modules/@nodelib/fs.stat/out/adapters/fs.js +17 -0
- package/test262/node_modules/@nodelib/fs.stat/out/index.d.ts +12 -0
- package/test262/node_modules/@nodelib/fs.stat/out/index.js +26 -0
- package/test262/node_modules/@nodelib/fs.stat/out/providers/async.d.ts +4 -0
- package/test262/node_modules/@nodelib/fs.stat/out/providers/async.js +36 -0
- package/test262/node_modules/@nodelib/fs.stat/out/providers/sync.d.ts +3 -0
- package/test262/node_modules/@nodelib/fs.stat/out/providers/sync.js +23 -0
- package/test262/node_modules/@nodelib/fs.stat/out/settings.d.ts +16 -0
- package/test262/node_modules/@nodelib/fs.stat/out/settings.js +16 -0
- package/test262/node_modules/@nodelib/fs.stat/out/types/index.d.ts +4 -0
- package/test262/node_modules/@nodelib/fs.stat/out/types/index.js +2 -0
- package/test262/node_modules/@nodelib/fs.stat/package.json +37 -0
- package/test262/node_modules/@nodelib/fs.walk/LICENSE +21 -0
- package/test262/node_modules/@nodelib/fs.walk/README.md +215 -0
- package/test262/node_modules/@nodelib/fs.walk/out/index.d.ts +14 -0
- package/test262/node_modules/@nodelib/fs.walk/out/index.js +34 -0
- package/test262/node_modules/@nodelib/fs.walk/out/providers/async.d.ts +12 -0
- package/test262/node_modules/@nodelib/fs.walk/out/providers/async.js +30 -0
- package/test262/node_modules/@nodelib/fs.walk/out/providers/index.d.ts +4 -0
- package/test262/node_modules/@nodelib/fs.walk/out/providers/index.js +9 -0
- package/test262/node_modules/@nodelib/fs.walk/out/providers/stream.d.ts +12 -0
- package/test262/node_modules/@nodelib/fs.walk/out/providers/stream.js +34 -0
- package/test262/node_modules/@nodelib/fs.walk/out/providers/sync.d.ts +10 -0
- package/test262/node_modules/@nodelib/fs.walk/out/providers/sync.js +14 -0
- package/test262/node_modules/@nodelib/fs.walk/out/readers/async.d.ts +30 -0
- package/test262/node_modules/@nodelib/fs.walk/out/readers/async.js +97 -0
- package/test262/node_modules/@nodelib/fs.walk/out/readers/common.d.ts +7 -0
- package/test262/node_modules/@nodelib/fs.walk/out/readers/common.js +31 -0
- package/test262/node_modules/@nodelib/fs.walk/out/readers/reader.d.ts +6 -0
- package/test262/node_modules/@nodelib/fs.walk/out/readers/reader.js +11 -0
- package/test262/node_modules/@nodelib/fs.walk/out/readers/sync.d.ts +15 -0
- package/test262/node_modules/@nodelib/fs.walk/out/readers/sync.js +59 -0
- package/test262/node_modules/@nodelib/fs.walk/out/settings.d.ts +30 -0
- package/test262/node_modules/@nodelib/fs.walk/out/settings.js +26 -0
- package/test262/node_modules/@nodelib/fs.walk/out/types/index.d.ts +8 -0
- package/test262/node_modules/@nodelib/fs.walk/out/types/index.js +2 -0
- package/test262/node_modules/@nodelib/fs.walk/package.json +44 -0
- package/test262/node_modules/argparse/CHANGELOG.md +185 -0
- package/test262/node_modules/argparse/LICENSE +21 -0
- package/test262/node_modules/argparse/README.md +257 -0
- package/test262/node_modules/argparse/index.js +3 -0
- package/test262/node_modules/argparse/lib/action/append/constant.js +47 -0
- package/test262/node_modules/argparse/lib/action/append.js +53 -0
- package/test262/node_modules/argparse/lib/action/count.js +40 -0
- package/test262/node_modules/argparse/lib/action/help.js +47 -0
- package/test262/node_modules/argparse/lib/action/store/constant.js +43 -0
- package/test262/node_modules/argparse/lib/action/store/false.js +27 -0
- package/test262/node_modules/argparse/lib/action/store/true.js +26 -0
- package/test262/node_modules/argparse/lib/action/store.js +50 -0
- package/test262/node_modules/argparse/lib/action/subparsers.js +149 -0
- package/test262/node_modules/argparse/lib/action/version.js +47 -0
- package/test262/node_modules/argparse/lib/action.js +146 -0
- package/test262/node_modules/argparse/lib/action_container.js +482 -0
- package/test262/node_modules/argparse/lib/argparse.js +14 -0
- package/test262/node_modules/argparse/lib/argument/error.js +50 -0
- package/test262/node_modules/argparse/lib/argument/exclusive.js +54 -0
- package/test262/node_modules/argparse/lib/argument/group.js +75 -0
- package/test262/node_modules/argparse/lib/argument_parser.js +1161 -0
- package/test262/node_modules/argparse/lib/const.js +21 -0
- package/test262/node_modules/argparse/lib/help/added_formatters.js +87 -0
- package/test262/node_modules/argparse/lib/help/formatter.js +795 -0
- package/test262/node_modules/argparse/lib/namespace.js +76 -0
- package/test262/node_modules/argparse/lib/utils.js +57 -0
- package/test262/node_modules/argparse/package.json +34 -0
- package/test262/node_modules/braces/CHANGELOG.md +184 -0
- package/test262/node_modules/braces/LICENSE +21 -0
- package/test262/node_modules/braces/README.md +593 -0
- package/test262/node_modules/braces/index.js +170 -0
- package/test262/node_modules/braces/lib/compile.js +57 -0
- package/test262/node_modules/braces/lib/constants.js +57 -0
- package/test262/node_modules/braces/lib/expand.js +113 -0
- package/test262/node_modules/braces/lib/parse.js +333 -0
- package/test262/node_modules/braces/lib/stringify.js +32 -0
- package/test262/node_modules/braces/lib/utils.js +112 -0
- package/test262/node_modules/braces/package.json +77 -0
- package/test262/node_modules/esprima/ChangeLog +235 -0
- package/test262/node_modules/esprima/LICENSE.BSD +21 -0
- package/test262/node_modules/esprima/README.md +46 -0
- package/test262/node_modules/esprima/bin/esparse.js +139 -0
- package/test262/node_modules/esprima/bin/esvalidate.js +236 -0
- package/test262/node_modules/esprima/dist/esprima.js +6709 -0
- package/test262/node_modules/esprima/package.json +112 -0
- package/test262/node_modules/fast-glob/LICENSE +21 -0
- package/test262/node_modules/fast-glob/README.md +859 -0
- package/test262/node_modules/fast-glob/out/index.d.ts +40 -0
- package/test262/node_modules/fast-glob/out/index.js +102 -0
- package/test262/node_modules/fast-glob/out/managers/tasks.d.ts +22 -0
- package/test262/node_modules/fast-glob/out/managers/tasks.js +110 -0
- package/test262/node_modules/fast-glob/out/providers/async.d.ts +9 -0
- package/test262/node_modules/fast-glob/out/providers/async.js +23 -0
- package/test262/node_modules/fast-glob/out/providers/filters/deep.d.ts +16 -0
- package/test262/node_modules/fast-glob/out/providers/filters/deep.js +62 -0
- package/test262/node_modules/fast-glob/out/providers/filters/entry.d.ts +16 -0
- package/test262/node_modules/fast-glob/out/providers/filters/entry.js +63 -0
- package/test262/node_modules/fast-glob/out/providers/filters/error.d.ts +8 -0
- package/test262/node_modules/fast-glob/out/providers/filters/error.js +15 -0
- package/test262/node_modules/fast-glob/out/providers/matchers/matcher.d.ts +33 -0
- package/test262/node_modules/fast-glob/out/providers/matchers/matcher.js +45 -0
- package/test262/node_modules/fast-glob/out/providers/matchers/partial.d.ts +4 -0
- package/test262/node_modules/fast-glob/out/providers/matchers/partial.js +38 -0
- package/test262/node_modules/fast-glob/out/providers/provider.d.ts +19 -0
- package/test262/node_modules/fast-glob/out/providers/provider.js +48 -0
- package/test262/node_modules/fast-glob/out/providers/stream.d.ts +11 -0
- package/test262/node_modules/fast-glob/out/providers/stream.js +31 -0
- package/test262/node_modules/fast-glob/out/providers/sync.d.ts +9 -0
- package/test262/node_modules/fast-glob/out/providers/sync.js +23 -0
- package/test262/node_modules/fast-glob/out/providers/transformers/entry.d.ts +8 -0
- package/test262/node_modules/fast-glob/out/providers/transformers/entry.js +26 -0
- package/test262/node_modules/fast-glob/out/readers/async.d.ts +10 -0
- package/test262/node_modules/fast-glob/out/readers/async.js +35 -0
- package/test262/node_modules/fast-glob/out/readers/reader.d.ts +15 -0
- package/test262/node_modules/fast-glob/out/readers/reader.js +33 -0
- package/test262/node_modules/fast-glob/out/readers/stream.d.ts +14 -0
- package/test262/node_modules/fast-glob/out/readers/stream.js +55 -0
- package/test262/node_modules/fast-glob/out/readers/sync.d.ts +12 -0
- package/test262/node_modules/fast-glob/out/readers/sync.js +43 -0
- package/test262/node_modules/fast-glob/out/settings.d.ts +164 -0
- package/test262/node_modules/fast-glob/out/settings.js +57 -0
- package/test262/node_modules/fast-glob/out/types/index.d.ts +31 -0
- package/test262/node_modules/fast-glob/out/types/index.js +2 -0
- package/test262/node_modules/fast-glob/out/utils/array.d.ts +2 -0
- package/test262/node_modules/fast-glob/out/utils/array.js +22 -0
- package/test262/node_modules/fast-glob/out/utils/errno.d.ts +2 -0
- package/test262/node_modules/fast-glob/out/utils/errno.js +7 -0
- package/test262/node_modules/fast-glob/out/utils/fs.d.ts +4 -0
- package/test262/node_modules/fast-glob/out/utils/fs.js +19 -0
- package/test262/node_modules/fast-glob/out/utils/index.d.ts +8 -0
- package/test262/node_modules/fast-glob/out/utils/index.js +17 -0
- package/test262/node_modules/fast-glob/out/utils/path.d.ts +13 -0
- package/test262/node_modules/fast-glob/out/utils/path.js +68 -0
- package/test262/node_modules/fast-glob/out/utils/pattern.d.ts +47 -0
- package/test262/node_modules/fast-glob/out/utils/pattern.js +188 -0
- package/test262/node_modules/fast-glob/out/utils/stream.d.ts +4 -0
- package/test262/node_modules/fast-glob/out/utils/stream.js +17 -0
- package/test262/node_modules/fast-glob/out/utils/string.d.ts +2 -0
- package/test262/node_modules/fast-glob/out/utils/string.js +11 -0
- package/test262/node_modules/fast-glob/package.json +81 -0
- package/test262/node_modules/fastq/.github/dependabot.yml +11 -0
- package/test262/node_modules/fastq/.github/workflows/ci.yml +50 -0
- package/test262/node_modules/fastq/LICENSE +13 -0
- package/test262/node_modules/fastq/README.md +309 -0
- package/test262/node_modules/fastq/bench.js +66 -0
- package/test262/node_modules/fastq/example.js +14 -0
- package/test262/node_modules/fastq/example.mjs +11 -0
- package/test262/node_modules/fastq/index.d.ts +37 -0
- package/test262/node_modules/fastq/package.json +52 -0
- package/test262/node_modules/fastq/queue.js +289 -0
- package/test262/node_modules/fastq/test/example.ts +81 -0
- package/test262/node_modules/fastq/test/promise.js +248 -0
- package/test262/node_modules/fastq/test/test.js +566 -0
- package/test262/node_modules/fastq/test/tsconfig.json +11 -0
- package/test262/node_modules/fill-range/LICENSE +21 -0
- package/test262/node_modules/fill-range/README.md +237 -0
- package/test262/node_modules/fill-range/index.js +249 -0
- package/test262/node_modules/fill-range/package.json +69 -0
- package/test262/node_modules/glob-parent/CHANGELOG.md +110 -0
- package/test262/node_modules/glob-parent/LICENSE +15 -0
- package/test262/node_modules/glob-parent/README.md +137 -0
- package/test262/node_modules/glob-parent/index.js +42 -0
- package/test262/node_modules/glob-parent/package.json +48 -0
- package/test262/node_modules/graceful-fs/LICENSE +15 -0
- package/test262/node_modules/graceful-fs/README.md +143 -0
- package/test262/node_modules/graceful-fs/clone.js +23 -0
- package/test262/node_modules/graceful-fs/graceful-fs.js +448 -0
- package/test262/node_modules/graceful-fs/legacy-streams.js +118 -0
- package/test262/node_modules/graceful-fs/package.json +53 -0
- package/test262/node_modules/graceful-fs/polyfills.js +355 -0
- package/test262/node_modules/is-extglob/LICENSE +21 -0
- package/test262/node_modules/is-extglob/README.md +107 -0
- package/test262/node_modules/is-extglob/index.js +20 -0
- package/test262/node_modules/is-extglob/package.json +69 -0
- package/test262/node_modules/is-glob/LICENSE +21 -0
- package/test262/node_modules/is-glob/README.md +206 -0
- package/test262/node_modules/is-glob/index.js +150 -0
- package/test262/node_modules/is-glob/package.json +81 -0
- package/test262/node_modules/is-number/LICENSE +21 -0
- package/test262/node_modules/is-number/README.md +187 -0
- package/test262/node_modules/is-number/index.js +18 -0
- package/test262/node_modules/is-number/package.json +82 -0
- package/test262/node_modules/js-yaml/CHANGELOG.md +557 -0
- package/test262/node_modules/js-yaml/LICENSE +21 -0
- package/test262/node_modules/js-yaml/README.md +299 -0
- package/test262/node_modules/js-yaml/bin/js-yaml.js +132 -0
- package/test262/node_modules/js-yaml/dist/js-yaml.js +3989 -0
- package/test262/node_modules/js-yaml/dist/js-yaml.min.js +1 -0
- package/test262/node_modules/js-yaml/index.js +7 -0
- package/test262/node_modules/js-yaml/lib/js-yaml/common.js +59 -0
- package/test262/node_modules/js-yaml/lib/js-yaml/dumper.js +850 -0
- package/test262/node_modules/js-yaml/lib/js-yaml/exception.js +43 -0
- package/test262/node_modules/js-yaml/lib/js-yaml/loader.js +1644 -0
- package/test262/node_modules/js-yaml/lib/js-yaml/mark.js +76 -0
- package/test262/node_modules/js-yaml/lib/js-yaml/schema/core.js +18 -0
- package/test262/node_modules/js-yaml/lib/js-yaml/schema/default_full.js +25 -0
- package/test262/node_modules/js-yaml/lib/js-yaml/schema/default_safe.js +28 -0
- package/test262/node_modules/js-yaml/lib/js-yaml/schema/failsafe.js +17 -0
- package/test262/node_modules/js-yaml/lib/js-yaml/schema/json.js +25 -0
- package/test262/node_modules/js-yaml/lib/js-yaml/schema.js +108 -0
- package/test262/node_modules/js-yaml/lib/js-yaml/type/binary.js +138 -0
- package/test262/node_modules/js-yaml/lib/js-yaml/type/bool.js +35 -0
- package/test262/node_modules/js-yaml/lib/js-yaml/type/float.js +116 -0
- package/test262/node_modules/js-yaml/lib/js-yaml/type/int.js +173 -0
- package/test262/node_modules/js-yaml/lib/js-yaml/type/js/function.js +93 -0
- package/test262/node_modules/js-yaml/lib/js-yaml/type/js/regexp.js +60 -0
- package/test262/node_modules/js-yaml/lib/js-yaml/type/js/undefined.js +28 -0
- package/test262/node_modules/js-yaml/lib/js-yaml/type/map.js +8 -0
- package/test262/node_modules/js-yaml/lib/js-yaml/type/merge.js +12 -0
- package/test262/node_modules/js-yaml/lib/js-yaml/type/null.js +34 -0
- package/test262/node_modules/js-yaml/lib/js-yaml/type/omap.js +44 -0
- package/test262/node_modules/js-yaml/lib/js-yaml/type/pairs.js +53 -0
- package/test262/node_modules/js-yaml/lib/js-yaml/type/seq.js +8 -0
- package/test262/node_modules/js-yaml/lib/js-yaml/type/set.js +29 -0
- package/test262/node_modules/js-yaml/lib/js-yaml/type/str.js +8 -0
- package/test262/node_modules/js-yaml/lib/js-yaml/type/timestamp.js +88 -0
- package/test262/node_modules/js-yaml/lib/js-yaml/type.js +61 -0
- package/test262/node_modules/js-yaml/lib/js-yaml.js +39 -0
- package/test262/node_modules/js-yaml/package.json +49 -0
- package/test262/node_modules/klaw/CHANGELOG.md +62 -0
- package/test262/node_modules/klaw/LICENSE +15 -0
- package/test262/node_modules/klaw/README.md +252 -0
- package/test262/node_modules/klaw/package.json +40 -0
- package/test262/node_modules/klaw/src/index.js +56 -0
- package/test262/node_modules/merge2/LICENSE +21 -0
- package/test262/node_modules/merge2/README.md +144 -0
- package/test262/node_modules/merge2/index.js +144 -0
- package/test262/node_modules/merge2/package.json +43 -0
- package/test262/node_modules/micromatch/LICENSE +21 -0
- package/test262/node_modules/micromatch/README.md +1011 -0
- package/test262/node_modules/micromatch/index.js +467 -0
- package/test262/node_modules/micromatch/package.json +119 -0
- package/test262/node_modules/picomatch/CHANGELOG.md +136 -0
- package/test262/node_modules/picomatch/LICENSE +21 -0
- package/test262/node_modules/picomatch/README.md +708 -0
- package/test262/node_modules/picomatch/index.js +3 -0
- package/test262/node_modules/picomatch/lib/constants.js +179 -0
- package/test262/node_modules/picomatch/lib/parse.js +1091 -0
- package/test262/node_modules/picomatch/lib/picomatch.js +342 -0
- package/test262/node_modules/picomatch/lib/scan.js +391 -0
- package/test262/node_modules/picomatch/lib/utils.js +64 -0
- package/test262/node_modules/picomatch/package.json +81 -0
- package/test262/node_modules/queue-microtask/LICENSE +20 -0
- package/test262/node_modules/queue-microtask/README.md +90 -0
- package/test262/node_modules/queue-microtask/index.d.ts +2 -0
- package/test262/node_modules/queue-microtask/index.js +9 -0
- package/test262/node_modules/queue-microtask/package.json +55 -0
- package/test262/node_modules/reusify/.coveralls.yml +1 -0
- package/test262/node_modules/reusify/.travis.yml +28 -0
- package/test262/node_modules/reusify/LICENSE +22 -0
- package/test262/node_modules/reusify/README.md +145 -0
- package/test262/node_modules/reusify/benchmarks/createNoCodeFunction.js +30 -0
- package/test262/node_modules/reusify/benchmarks/fib.js +13 -0
- package/test262/node_modules/reusify/benchmarks/reuseNoCodeFunction.js +38 -0
- package/test262/node_modules/reusify/package.json +45 -0
- package/test262/node_modules/reusify/reusify.js +33 -0
- package/test262/node_modules/reusify/test.js +66 -0
- package/test262/node_modules/run-parallel/LICENSE +20 -0
- package/test262/node_modules/run-parallel/README.md +85 -0
- package/test262/node_modules/run-parallel/index.js +51 -0
- package/test262/node_modules/run-parallel/package.json +58 -0
- package/test262/node_modules/sprintf-js/LICENSE +24 -0
- package/test262/node_modules/sprintf-js/README.md +88 -0
- package/test262/node_modules/sprintf-js/bower.json +14 -0
- package/test262/node_modules/sprintf-js/demo/angular.html +20 -0
- package/test262/node_modules/sprintf-js/dist/angular-sprintf.min.js +4 -0
- package/test262/node_modules/sprintf-js/dist/angular-sprintf.min.js.map +1 -0
- package/test262/node_modules/sprintf-js/dist/angular-sprintf.min.map +1 -0
- package/test262/node_modules/sprintf-js/dist/sprintf.min.js +4 -0
- package/test262/node_modules/sprintf-js/dist/sprintf.min.js.map +1 -0
- package/test262/node_modules/sprintf-js/dist/sprintf.min.map +1 -0
- package/test262/node_modules/sprintf-js/gruntfile.js +36 -0
- package/test262/node_modules/sprintf-js/package.json +22 -0
- package/test262/node_modules/sprintf-js/src/angular-sprintf.js +18 -0
- package/test262/node_modules/sprintf-js/src/sprintf.js +208 -0
- package/test262/node_modules/sprintf-js/test/test.js +82 -0
- package/test262/node_modules/test262-stream/.jshintignore +2 -0
- package/test262/node_modules/test262-stream/.jshintrc +6 -0
- package/test262/node_modules/test262-stream/.travis.yml +5 -0
- package/test262/node_modules/test262-stream/CONTRIBUTING.md +37 -0
- package/test262/node_modules/test262-stream/LICENSE-MICROSOFT.txt +27 -0
- package/test262/node_modules/test262-stream/LICENSE.txt +27 -0
- package/test262/node_modules/test262-stream/README.md +71 -0
- package/test262/node_modules/test262-stream/lib/builder.js +46 -0
- package/test262/node_modules/test262-stream/lib/compile.js +24 -0
- package/test262/node_modules/test262-stream/lib/create-scenarios.js +29 -0
- package/test262/node_modules/test262-stream/lib/index.js +187 -0
- package/test262/node_modules/test262-stream/lib/test-file.js +150 -0
- package/test262/node_modules/test262-stream/package.json +26 -0
- package/test262/node_modules/test262-stream/test/collateral/invalid-missing-harness/fake-test262/test/a-test-file.js +16 -0
- package/test262/node_modules/test262-stream/test/collateral/invalid-version-other-accepted/fake-test262/harness/assert.js +17 -0
- package/test262/node_modules/test262-stream/test/collateral/invalid-version-other-accepted/fake-test262/harness/doneprintHandle.js +6 -0
- package/test262/node_modules/test262-stream/test/collateral/invalid-version-other-accepted/fake-test262/harness/sta.js +12 -0
- package/test262/node_modules/test262-stream/test/collateral/invalid-version-other-accepted/fake-test262/package.json +3 -0
- package/test262/node_modules/test262-stream/test/collateral/invalid-version-other-accepted/fake-test262/test/strict.js +9 -0
- package/test262/node_modules/test262-stream/test/collateral/invalid-version-unsupported/fake-test262/harness/assert.js +17 -0
- package/test262/node_modules/test262-stream/test/collateral/invalid-version-unsupported/fake-test262/harness/doneprintHandle.js +6 -0
- package/test262/node_modules/test262-stream/test/collateral/invalid-version-unsupported/fake-test262/harness/sta.js +12 -0
- package/test262/node_modules/test262-stream/test/collateral/invalid-version-unsupported/fake-test262/package.json +3 -0
- package/test262/node_modules/test262-stream/test/collateral/invalid-version-unsupported/fake-test262/test/strict.js +9 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-default/expected-content/test/asyncNegative_default.js +49 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-default/expected-content/test/asyncNegative_strict_mode.js +50 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-default/expected-content/test/async_default.js +48 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-default/expected-content/test/async_strict_mode.js +49 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-default/expected-content/test/bothStrict_default.js +46 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-default/expected-content/test/bothStrict_strict_mode.js +47 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-default/expected-content/test/error_default.js +39 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-default/expected-content/test/error_strict_mode.js +40 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-default/expected-content/test/module_default.js +37 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-default/expected-content/test/module_strict_mode.js +38 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-default/expected-content/test/negative-empty_default.js +37 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-default/expected-content/test/negative-empty_strict_mode.js +38 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-default/expected-content/test/noStrict_default.js +36 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-default/expected-content/test/rawNoStrict_default.js +14 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-default/expected-content/test/rawStrict_default.js +15 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-default/expected-content/test/strict_strict_mode.js +41 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-default/expected-metadata/test/asyncNegative_default.json +22 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-default/expected-metadata/test/asyncNegative_strict_mode.json +22 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-default/expected-metadata/test/async_default.json +18 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-default/expected-metadata/test/async_strict_mode.json +18 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-default/expected-metadata/test/bothStrict_default.json +24 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-default/expected-metadata/test/bothStrict_strict_mode.json +24 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-default/expected-metadata/test/error_default.json +19 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-default/expected-metadata/test/error_strict_mode.json +19 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-default/expected-metadata/test/module_default.json +17 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-default/expected-metadata/test/module_strict_mode.json +17 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-default/expected-metadata/test/negative-empty_default.json +19 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-default/expected-metadata/test/negative-empty_strict_mode.json +19 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-default/expected-metadata/test/noStrict_default.json +17 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-default/expected-metadata/test/rawNoStrict_default.json +14 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-default/expected-metadata/test/rawStrict_default.json +14 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-default/expected-metadata/test/strict_strict_mode.json +21 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-default/fake-test262/harness/assert.js +17 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-default/fake-test262/harness/doneprintHandle.js +6 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-default/fake-test262/harness/sta.js +12 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-default/fake-test262/test/async.js +10 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-default/fake-test262/test/asyncNegative.js +11 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-default/fake-test262/test/bothStrict.js +15 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-default/fake-test262/test/error.js +8 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-default/fake-test262/test/module.js +6 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-default/fake-test262/test/module_FIXTURE.js +2 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-default/fake-test262/test/negative-empty.js +6 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-default/fake-test262/test/noStrict.js +5 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-default/fake-test262/test/rawNoStrict.js +14 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-default/fake-test262/test/rawStrict.js +15 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-default/fake-test262/test/strict.js +9 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-extra-files/expected-content/test/bothStrict_default.js +46 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-extra-files/expected-content/test/bothStrict_strict_mode.js +47 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-extra-files/expected-metadata/test/bothStrict_default.json +24 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-extra-files/expected-metadata/test/bothStrict_strict_mode.json +24 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-extra-files/fake-test262/harness/assert.js +17 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-extra-files/fake-test262/harness/doneprintHandle.js +6 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-extra-files/fake-test262/harness/sta.js +12 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-extra-files/fake-test262/test/bothStrict.js +15 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-extra-files/fake-test262/test/zzz-0_FIXTURE.js +2 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-extra-files/fake-test262/test/zzz-1_FIXTURE.js +2 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-extra-files/fake-test262/test/zzz-2_FIXTURE.js +2 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-extra-files/fake-test262/test/zzz-3_FIXTURE.js +2 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-extra-files/fake-test262/test/zzz-4_FIXTURE.js +2 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-extra-files/fake-test262/test/zzz-5_FIXTURE.js +2 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-extra-files/fake-test262/test/zzz-6_FIXTURE.js +2 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-extra-files/fake-test262/test/zzz-7_FIXTURE.js +2 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-extra-files/fake-test262/test/zzz-8_FIXTURE.js +2 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-extra-files/fake-test262/test/zzz-9_FIXTURE.txt +2 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-insertionindex-with-copyright/expected-content/test/raw_default.js +15 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-insertionindex-with-copyright/expected-content/test/runtime_default.js +38 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-insertionindex-with-copyright/expected-content/test/runtime_strict_mode.js +39 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-insertionindex-with-copyright/expected-metadata/test/raw_default.json +14 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-insertionindex-with-copyright/expected-metadata/test/runtime_default.json +15 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-insertionindex-with-copyright/expected-metadata/test/runtime_strict_mode.json +15 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-insertionindex-with-copyright/fake-test262/harness/assert.js +17 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-insertionindex-with-copyright/fake-test262/harness/sta.js +12 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-insertionindex-with-copyright/fake-test262/test/raw.js +15 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-insertionindex-with-copyright/fake-test262/test/runtime.js +7 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/expected-content/test/asyncNegative_default.js +11 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/expected-content/test/asyncNegative_strict_mode.js +12 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/expected-content/test/async_default.js +10 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/expected-content/test/async_strict_mode.js +11 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/expected-content/test/bothStrict_default.js +15 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/expected-content/test/bothStrict_strict_mode.js +16 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/expected-content/test/error_default.js +8 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/expected-content/test/error_strict_mode.js +9 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/expected-content/test/module_default.js +6 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/expected-content/test/module_strict_mode.js +7 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/expected-content/test/negative-empty_default.js +6 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/expected-content/test/negative-empty_strict_mode.js +7 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/expected-content/test/noStrict_default.js +5 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/expected-content/test/rawNoStrict_default.js +14 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/expected-content/test/rawStrict_default.js +15 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/expected-content/test/strict_strict_mode.js +10 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/expected-metadata/test/asyncNegative_default.json +18 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/expected-metadata/test/asyncNegative_strict_mode.json +18 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/expected-metadata/test/async_default.json +14 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/expected-metadata/test/async_strict_mode.json +14 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/expected-metadata/test/bothStrict_default.json +21 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/expected-metadata/test/bothStrict_strict_mode.json +21 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/expected-metadata/test/error_default.json +16 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/expected-metadata/test/error_strict_mode.json +16 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/expected-metadata/test/module_default.json +14 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/expected-metadata/test/module_strict_mode.json +14 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/expected-metadata/test/negative-empty_default.json +16 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/expected-metadata/test/negative-empty_strict_mode.json +16 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/expected-metadata/test/noStrict_default.json +14 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/expected-metadata/test/rawNoStrict_default.json +14 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/expected-metadata/test/rawStrict_default.json +14 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/expected-metadata/test/strict_strict_mode.json +18 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/fake-test262/harness/assert.js +17 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/fake-test262/harness/doneprintHandle.js +6 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/fake-test262/harness/sta.js +12 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/fake-test262/test/async.js +10 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/fake-test262/test/asyncNegative.js +11 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/fake-test262/test/bothStrict.js +15 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/fake-test262/test/error.js +8 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/fake-test262/test/module.js +6 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/fake-test262/test/module_FIXTURE.js +2 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/fake-test262/test/negative-empty.js +6 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/fake-test262/test/noStrict.js +5 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/fake-test262/test/rawNoStrict.js +14 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/fake-test262/test/rawStrict.js +15 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/fake-test262/test/strict.js +9 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-version-ignored/expected-content/test/strict_strict_mode.js +41 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-version-ignored/expected-metadata/test/strict_strict_mode.json +21 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-version-ignored/fake-test262/harness/assert.js +17 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-version-ignored/fake-test262/harness/doneprintHandle.js +6 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-version-ignored/fake-test262/harness/sta.js +12 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-version-ignored/fake-test262/package.json +3 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-version-ignored/fake-test262/test/strict.js +9 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-version-supported/expected-content/test/strict_strict_mode.js +41 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-version-supported/expected-metadata/test/strict_strict_mode.json +21 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-version-supported/fake-test262/harness/assert.js +17 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-version-supported/fake-test262/harness/doneprintHandle.js +6 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-version-supported/fake-test262/harness/sta.js +12 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-version-supported/fake-test262/package.json +3 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-version-supported/fake-test262/test/strict.js +9 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-with-hashbang/expected-content/test/missing-raw-flag_default.js +44 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-with-hashbang/expected-content/test/missing-raw-flag_strict_mode.js +45 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-with-hashbang/expected-content/test/raw-with-ls-and-license-on-same-line_default.js +20 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-with-hashbang/expected-content/test/raw-with-ls-multiline-block_default.js +18 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-with-hashbang/expected-content/test/raw-with-ls_default.js +17 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-with-hashbang/expected-content/test/raw-with-ps-and-license-on-same-line_default.js +20 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-with-hashbang/expected-content/test/raw-with-ps-multiline-block_default.js +18 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-with-hashbang/expected-content/test/raw-with-ps_default.js +17 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-with-hashbang/expected-content/test/rawWithLicense_default.js +21 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-with-hashbang/expected-content/test/raw_default.js +17 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-with-hashbang/expected-metadata/test/missing-raw-flag_default.json +22 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-with-hashbang/expected-metadata/test/missing-raw-flag_strict_mode.json +22 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-with-hashbang/expected-metadata/test/raw-with-ls-and-license-on-same-line_default.json +21 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-with-hashbang/expected-metadata/test/raw-with-ls-multiline-block_default.json +21 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-with-hashbang/expected-metadata/test/raw-with-ls_default.json +21 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-with-hashbang/expected-metadata/test/raw-with-ps-and-license-on-same-line_default.json +21 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-with-hashbang/expected-metadata/test/raw-with-ps-multiline-block_default.json +21 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-with-hashbang/expected-metadata/test/raw-with-ps_default.json +21 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-with-hashbang/expected-metadata/test/rawWithLicense_default.json +21 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-with-hashbang/expected-metadata/test/raw_default.json +21 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-with-hashbang/fake-test262/harness/assert.js +17 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-with-hashbang/fake-test262/harness/doneprintHandle.js +6 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-with-hashbang/fake-test262/harness/sta.js +12 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-with-hashbang/fake-test262/test/missing-raw-flag.js +13 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-with-hashbang/fake-test262/test/raw-with-ls-and-license-on-same-line.js +20 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-with-hashbang/fake-test262/test/raw-with-ls-multiline-block.js +18 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-with-hashbang/fake-test262/test/raw-with-ls.js +17 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-with-hashbang/fake-test262/test/raw-with-ps-and-license-on-same-line.js +20 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-with-hashbang/fake-test262/test/raw-with-ps-multiline-block.js +18 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-with-hashbang/fake-test262/test/raw-with-ps.js +17 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-with-hashbang/fake-test262/test/raw.js +17 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-with-hashbang/fake-test262/test/rawWithLicense.js +21 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-with-includes/custom-includes/assert.js +17 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-with-includes/custom-includes/doneprintHandle.js +9 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-with-includes/custom-includes/sta.js +13 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-with-includes/expected-content/test/async_default.js +52 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-with-includes/expected-content/test/async_strict_mode.js +53 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-with-includes/expected-content/test/bothStrict_default.js +47 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-with-includes/expected-content/test/bothStrict_strict_mode.js +48 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-with-includes/expected-metadata/test/async_default.json +18 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-with-includes/expected-metadata/test/async_strict_mode.json +18 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-with-includes/expected-metadata/test/bothStrict_default.json +24 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-with-includes/expected-metadata/test/bothStrict_strict_mode.json +24 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-with-includes/fake-test262/harness/assert.js +17 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-with-includes/fake-test262/harness/doneprintHandle.js +6 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-with-includes/fake-test262/test/async.js +10 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-with-includes/fake-test262/test/bothStrict.js +15 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-with-paths/expected-content/test/async/asyncNegative_default.js +49 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-with-paths/expected-content/test/async/asyncNegative_strict_mode.js +50 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-with-paths/expected-content/test/async/async_default.js +48 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-with-paths/expected-content/test/async/async_strict_mode.js +49 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-with-paths/expected-content/test/bothStrict_default.js +46 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-with-paths/expected-content/test/bothStrict_strict_mode.js +47 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-with-paths/expected-content/test/strict/no/noStrict_default.js +36 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-with-paths/expected-content/test/strict/no/rawNoStrict_default.js +14 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-with-paths/expected-metadata/test/async/asyncNegative_default.json +22 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-with-paths/expected-metadata/test/async/asyncNegative_strict_mode.json +22 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-with-paths/expected-metadata/test/async/async_default.json +18 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-with-paths/expected-metadata/test/async/async_strict_mode.json +18 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-with-paths/expected-metadata/test/bothStrict_default.json +24 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-with-paths/expected-metadata/test/bothStrict_strict_mode.json +24 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-with-paths/expected-metadata/test/strict/no/noStrict_default.json +17 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-with-paths/expected-metadata/test/strict/no/rawNoStrict_default.json +14 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-with-paths/fake-test262/harness/assert.js +17 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-with-paths/fake-test262/harness/doneprintHandle.js +6 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-with-paths/fake-test262/harness/sta.js +12 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-with-paths/fake-test262/test/async/async.js +10 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-with-paths/fake-test262/test/async/asyncNegative.js +11 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-with-paths/fake-test262/test/bothStrict.js +15 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-with-paths/fake-test262/test/error.js +8 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-with-paths/fake-test262/test/negative-empty.js +6 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-with-paths/fake-test262/test/strict/no/noStrict.js +5 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-with-paths/fake-test262/test/strict/no/rawNoStrict.js +14 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-with-paths/fake-test262/test/strict/rawStrict.js +15 -0
- package/test262/node_modules/test262-stream/test/collateral/valid-with-paths/fake-test262/test/strict/strict.js +9 -0
- package/test262/node_modules/test262-stream/test/test.js +319 -0
- package/test262/node_modules/to-regex-range/LICENSE +21 -0
- package/test262/node_modules/to-regex-range/README.md +305 -0
- package/test262/node_modules/to-regex-range/index.js +288 -0
- package/test262/node_modules/to-regex-range/package.json +88 -0
- package/test262/package-lock.json +279 -0
- package/test262/package.json +6 -0
- package/test262/prelude.js +75 -0
- package/test262/results.json +1 -0
- package/util/enum.js +20 -0
@@ -0,0 +1,770 @@
|
|
1
|
+
import { Blocktype, Opcodes, Valtype } from "./wasmSpec.js";
|
2
|
+
import { number, i32x4 } from "./embedding.js";
|
3
|
+
import { signedLEB128 } from "./encoding.js";
|
4
|
+
|
5
|
+
export const importedFuncs = [
|
6
|
+
{
|
7
|
+
name: 'print',
|
8
|
+
import: 'p',
|
9
|
+
params: 1,
|
10
|
+
returns: 0
|
11
|
+
},
|
12
|
+
{
|
13
|
+
name: 'printChar',
|
14
|
+
import: 'c',
|
15
|
+
params: 1,
|
16
|
+
returns: 0
|
17
|
+
},
|
18
|
+
{
|
19
|
+
name: 'assert',
|
20
|
+
import: 'a',
|
21
|
+
params: 1,
|
22
|
+
returns: 0
|
23
|
+
},
|
24
|
+
{
|
25
|
+
name: 'time',
|
26
|
+
import: 't',
|
27
|
+
params: 0,
|
28
|
+
returns: 1
|
29
|
+
}
|
30
|
+
];
|
31
|
+
|
32
|
+
for (let i = 0; i < importedFuncs.length; i++) {
|
33
|
+
const f = importedFuncs[i];
|
34
|
+
importedFuncs[f.name] = i;
|
35
|
+
}
|
36
|
+
|
37
|
+
const char = c => number(c.charCodeAt(0));
|
38
|
+
|
39
|
+
// todo: somehow diff between these (undefined != null) while remaining falsey in wasm as a number value
|
40
|
+
export const UNDEFINED = 0;
|
41
|
+
export const NULL = 0;
|
42
|
+
|
43
|
+
export const BuiltinVars = function() {
|
44
|
+
this.undefined = number(UNDEFINED);
|
45
|
+
this.undefined.type = 'undefined';
|
46
|
+
|
47
|
+
this.null = number(NULL);
|
48
|
+
this.null.type = 'object';
|
49
|
+
|
50
|
+
this.NaN = number(NaN);
|
51
|
+
this.NaN.floatOnly = true;
|
52
|
+
|
53
|
+
this.Infinity = number(Infinity);
|
54
|
+
this.Infinity.floatOnly = true;
|
55
|
+
|
56
|
+
this.__Number_NaN = number(NaN);
|
57
|
+
this.__Number_NaN.floatOnly = true;
|
58
|
+
|
59
|
+
this.__Number_POSITIVE_INFINITY = number(Infinity);
|
60
|
+
this.__Number_POSITIVE_INFINITY.floatOnly = true;
|
61
|
+
|
62
|
+
this.__Number_NEGATIVE_INFINITY = number(-Infinity);
|
63
|
+
this.__Number_NEGATIVE_INFINITY.floatOnly = true;
|
64
|
+
|
65
|
+
switch (valtype) {
|
66
|
+
case 'i32':
|
67
|
+
this.__Number_MAX_VALUE = number(2147483647);
|
68
|
+
this.__Number_MIN_VALUE = number(-2147483648);
|
69
|
+
|
70
|
+
this.__Number_MAX_SAFE_INTEGER = this.__Number_MAX_VALUE;
|
71
|
+
this.__Number_MIN_SAFE_INTEGER = this.__Number_MIN_VALUE;
|
72
|
+
|
73
|
+
break;
|
74
|
+
|
75
|
+
case 'i64':
|
76
|
+
// todo: we use 32 bit limits here as we cannot encode 64 bit integers yet
|
77
|
+
this.__Number_MAX_VALUE = number(2147483647);
|
78
|
+
this.__Number_MIN_VALUE = number(-2147483648);
|
79
|
+
|
80
|
+
this.__Number_MAX_SAFE_INTEGER = this.__Number_MAX_VALUE;
|
81
|
+
this.__Number_MIN_SAFE_INTEGER = this.__Number_MIN_VALUE;
|
82
|
+
|
83
|
+
break;
|
84
|
+
|
85
|
+
case 'f64':
|
86
|
+
this.__Number_MAX_VALUE = number(1.7976931348623157e+308);
|
87
|
+
this.__Number_MIN_VALUE = number(5e-324);
|
88
|
+
|
89
|
+
this.__Number_MAX_SAFE_INTEGER = number(9007199254740991);
|
90
|
+
this.__Number_MIN_SAFE_INTEGER = number(-9007199254740991);
|
91
|
+
|
92
|
+
this.__Number_EPSILON = number(2.220446049250313e-16);
|
93
|
+
|
94
|
+
this.__Math_E = number(Math.E);
|
95
|
+
this.__Math_LN10 = number(Math.LN10);
|
96
|
+
this.__Math_LN2 = number(Math.LN2);
|
97
|
+
this.__Math_LOG10E = number(Math.LOG10E);
|
98
|
+
this.__Math_LOG2E = number(Math.LOG2E);
|
99
|
+
this.__Math_PI = number(Math.PI);
|
100
|
+
this.__Math_SQRT1_2 = number(Math.SQRT1_2);
|
101
|
+
this.__Math_SQRT2 = number(Math.SQRT2);
|
102
|
+
|
103
|
+
// https://github.com/rwaldron/proposal-math-extensions/issues/10
|
104
|
+
this.__Math_RAD_PER_DEG = number(Math.PI / 180);
|
105
|
+
this.__Math_DEG_PER_RAD = number(180 / Math.PI);
|
106
|
+
|
107
|
+
break;
|
108
|
+
}
|
109
|
+
|
110
|
+
// stubs just so that parent objects exist
|
111
|
+
this.Math = number(1);
|
112
|
+
};
|
113
|
+
|
114
|
+
export const BuiltinFuncs = function() {
|
115
|
+
this['f64_%'] = {
|
116
|
+
params: [ valtypeBinary, valtypeBinary ],
|
117
|
+
locals: [],
|
118
|
+
returns: [ valtypeBinary ],
|
119
|
+
wasm: [ // x - truncf(x / y) * y
|
120
|
+
[ Opcodes.local_get, 0 ], // x
|
121
|
+
|
122
|
+
[ Opcodes.local_get, 0 ], // x
|
123
|
+
[ Opcodes.local_get, 1 ], // y
|
124
|
+
|
125
|
+
[ Opcodes.f64_div ],
|
126
|
+
[ Opcodes.f64_trunc ],
|
127
|
+
|
128
|
+
[ Opcodes.local_get, 1 ], // y
|
129
|
+
[ Opcodes.f64_mul ],
|
130
|
+
|
131
|
+
[ Opcodes.f64_sub ]
|
132
|
+
]
|
133
|
+
};
|
134
|
+
|
135
|
+
// add bitwise ops by converting operands to i32 first
|
136
|
+
for (const [ char, op ] of [ ['&', Opcodes.i32_and], ['|', Opcodes.i32_or], ['^', Opcodes.i32_xor], ['<<', Opcodes.i32_shl], ['>>', Opcodes.i32_shr_s], ['>>>', Opcodes.i32_shr_u] ]) {
|
137
|
+
this[`f64_${char}`] = {
|
138
|
+
params: [ valtypeBinary, valtypeBinary ],
|
139
|
+
locals: [],
|
140
|
+
returns: [ valtypeBinary ],
|
141
|
+
wasm: [
|
142
|
+
[ Opcodes.local_get, 0 ],
|
143
|
+
Opcodes.i32_to,
|
144
|
+
|
145
|
+
[ Opcodes.local_get, 1 ],
|
146
|
+
Opcodes.i32_to,
|
147
|
+
|
148
|
+
[ op ],
|
149
|
+
Opcodes.i32_from
|
150
|
+
]
|
151
|
+
};
|
152
|
+
}
|
153
|
+
|
154
|
+
|
155
|
+
// just echo given for now, for type constructors
|
156
|
+
this.Number = {
|
157
|
+
params: [ valtypeBinary ],
|
158
|
+
locals: [],
|
159
|
+
returns: [ valtypeBinary ],
|
160
|
+
wasm: [
|
161
|
+
[ Opcodes.local_get, 0 ]
|
162
|
+
]
|
163
|
+
};
|
164
|
+
|
165
|
+
// todo: return false for NaN
|
166
|
+
this.Boolean = {
|
167
|
+
params: [ valtypeBinary ],
|
168
|
+
locals: [],
|
169
|
+
returns: [ valtypeBinary ],
|
170
|
+
returnType: 'boolean',
|
171
|
+
wasm: [
|
172
|
+
[ Opcodes.local_get, 0 ],
|
173
|
+
...(valtype === 'f64' ? [
|
174
|
+
...number(0),
|
175
|
+
[ Opcodes.f64_ne ]
|
176
|
+
] : [
|
177
|
+
...Opcodes.eqz,
|
178
|
+
[ Opcodes.i32_eqz ]
|
179
|
+
]),
|
180
|
+
Opcodes.i32_from
|
181
|
+
]
|
182
|
+
};
|
183
|
+
|
184
|
+
// just return given (default 0) for (new) Object() as we somewhat supports object just not constructor
|
185
|
+
this.Object = {
|
186
|
+
params: [ valtypeBinary ],
|
187
|
+
locals: [],
|
188
|
+
returns: [ valtypeBinary ],
|
189
|
+
returnType: 'object',
|
190
|
+
wasm: [
|
191
|
+
[ Opcodes.local_get, 0 ]
|
192
|
+
]
|
193
|
+
};
|
194
|
+
|
195
|
+
|
196
|
+
this.__console_log = {
|
197
|
+
params: [ valtypeBinary ],
|
198
|
+
locals: [],
|
199
|
+
returns: [],
|
200
|
+
wasm: [
|
201
|
+
[ Opcodes.local_get, 0 ],
|
202
|
+
[ Opcodes.call, importedFuncs.print ],
|
203
|
+
...char('\n'),
|
204
|
+
[ Opcodes.call, importedFuncs.printChar ]
|
205
|
+
]
|
206
|
+
};
|
207
|
+
|
208
|
+
// todo: add more console funcs
|
209
|
+
|
210
|
+
|
211
|
+
this.isNaN = {
|
212
|
+
floatOnly: true,
|
213
|
+
params: [ valtypeBinary ],
|
214
|
+
locals: [],
|
215
|
+
returns: [ valtypeBinary ],
|
216
|
+
returnType: 'boolean',
|
217
|
+
wasm: [
|
218
|
+
[ Opcodes.local_get, 0 ],
|
219
|
+
[ Opcodes.local_get, 0 ],
|
220
|
+
[ Opcodes.f64_ne ],
|
221
|
+
Opcodes.i32_from
|
222
|
+
]
|
223
|
+
};
|
224
|
+
this.__Number_isNaN = this.isNaN;
|
225
|
+
|
226
|
+
this.isFinite = {
|
227
|
+
floatOnly: true,
|
228
|
+
params: [ valtypeBinary ],
|
229
|
+
locals: [ valtypeBinary ],
|
230
|
+
returns: [ valtypeBinary ],
|
231
|
+
returnType: 'boolean',
|
232
|
+
wasm: [
|
233
|
+
[ Opcodes.local_get, 0 ],
|
234
|
+
[ Opcodes.local_get, 0 ],
|
235
|
+
[ Opcodes.f64_sub ],
|
236
|
+
[ Opcodes.local_tee, 1 ],
|
237
|
+
[ Opcodes.local_get, 1 ],
|
238
|
+
[ Opcodes.f64_eq ],
|
239
|
+
Opcodes.i32_from
|
240
|
+
]
|
241
|
+
};
|
242
|
+
this.__Number_isFinite = this.isFinite;
|
243
|
+
|
244
|
+
// todo: should be false for +-Infinity
|
245
|
+
this.__Number_isInteger = {
|
246
|
+
floatOnly: true,
|
247
|
+
params: [ valtypeBinary ],
|
248
|
+
locals: [],
|
249
|
+
returns: [ valtypeBinary ],
|
250
|
+
returnType: 'boolean',
|
251
|
+
wasm: [
|
252
|
+
[ Opcodes.local_get, 0 ],
|
253
|
+
[ Opcodes.local_get, 0 ],
|
254
|
+
[ Opcodes.f64_trunc ],
|
255
|
+
[ Opcodes.f64_eq ],
|
256
|
+
Opcodes.i32_from
|
257
|
+
]
|
258
|
+
};
|
259
|
+
|
260
|
+
this.__Number_isSafeInteger = {
|
261
|
+
floatOnly: true,
|
262
|
+
params: [ valtypeBinary ],
|
263
|
+
locals: [],
|
264
|
+
returns: [ valtypeBinary ],
|
265
|
+
returnType: 'boolean',
|
266
|
+
wasm: [
|
267
|
+
[ Opcodes.local_get, 0 ],
|
268
|
+
[ Opcodes.local_get, 0 ],
|
269
|
+
[ Opcodes.f64_trunc ],
|
270
|
+
[ Opcodes.f64_ne ],
|
271
|
+
[ Opcodes.if, Blocktype.void ],
|
272
|
+
...number(0),
|
273
|
+
[ Opcodes.return ],
|
274
|
+
[ Opcodes.end ],
|
275
|
+
[ Opcodes.local_get, 0 ],
|
276
|
+
[ Opcodes.f64_abs ],
|
277
|
+
...number(9007199254740991),
|
278
|
+
[ Opcodes.f64_le ],
|
279
|
+
Opcodes.i32_from
|
280
|
+
]
|
281
|
+
};
|
282
|
+
|
283
|
+
|
284
|
+
this.__Math_sqrt = {
|
285
|
+
floatOnly: true,
|
286
|
+
params: [ valtypeBinary ],
|
287
|
+
locals: [],
|
288
|
+
returns: [ valtypeBinary ],
|
289
|
+
wasm: [
|
290
|
+
[ Opcodes.local_get, 0 ],
|
291
|
+
[ Opcodes.f64_sqrt ]
|
292
|
+
]
|
293
|
+
};
|
294
|
+
|
295
|
+
this.__Math_abs = {
|
296
|
+
floatOnly: true,
|
297
|
+
params: [ valtypeBinary ],
|
298
|
+
locals: [],
|
299
|
+
returns: [ valtypeBinary ],
|
300
|
+
wasm: [
|
301
|
+
[ Opcodes.local_get, 0 ],
|
302
|
+
[ Opcodes.f64_abs ]
|
303
|
+
]
|
304
|
+
};
|
305
|
+
|
306
|
+
this.__Math_sign = {
|
307
|
+
floatOnly: true,
|
308
|
+
params: [ valtypeBinary ],
|
309
|
+
locals: [],
|
310
|
+
returns: [ valtypeBinary ],
|
311
|
+
wasm: [
|
312
|
+
...number(1),
|
313
|
+
[ Opcodes.local_get, 0 ],
|
314
|
+
[ Opcodes.f64_copysign ]
|
315
|
+
]
|
316
|
+
};
|
317
|
+
|
318
|
+
this.__Math_floor = {
|
319
|
+
floatOnly: true,
|
320
|
+
params: [ valtypeBinary ],
|
321
|
+
locals: [],
|
322
|
+
returns: [ valtypeBinary ],
|
323
|
+
wasm: [
|
324
|
+
[ Opcodes.local_get, 0 ],
|
325
|
+
[ Opcodes.f64_floor ]
|
326
|
+
]
|
327
|
+
};
|
328
|
+
|
329
|
+
this.__Math_ceil = {
|
330
|
+
floatOnly: true,
|
331
|
+
params: [ valtypeBinary ],
|
332
|
+
locals: [],
|
333
|
+
returns: [ valtypeBinary ],
|
334
|
+
wasm: [
|
335
|
+
[ Opcodes.local_get, 0 ],
|
336
|
+
[ Opcodes.f64_ceil ]
|
337
|
+
]
|
338
|
+
};
|
339
|
+
|
340
|
+
this.__Math_round = {
|
341
|
+
floatOnly: true,
|
342
|
+
params: [ valtypeBinary ],
|
343
|
+
locals: [],
|
344
|
+
returns: [ valtypeBinary ],
|
345
|
+
wasm: [
|
346
|
+
[ Opcodes.local_get, 0 ],
|
347
|
+
[ Opcodes.f64_nearest ]
|
348
|
+
]
|
349
|
+
};
|
350
|
+
|
351
|
+
this.__Math_trunc = {
|
352
|
+
floatOnly: true,
|
353
|
+
params: [ valtypeBinary ],
|
354
|
+
locals: [],
|
355
|
+
returns: [ valtypeBinary ],
|
356
|
+
wasm: [
|
357
|
+
[ Opcodes.local_get, 0 ],
|
358
|
+
[ Opcodes.f64_trunc ]
|
359
|
+
]
|
360
|
+
};
|
361
|
+
|
362
|
+
// todo: does not follow spec with +-Infinity and values >2**32
|
363
|
+
this.__Math_clz32 = {
|
364
|
+
params: [ valtypeBinary ],
|
365
|
+
locals: [],
|
366
|
+
returns: [ valtypeBinary ],
|
367
|
+
wasm: [
|
368
|
+
[ Opcodes.local_get, 0 ],
|
369
|
+
Opcodes.i32_trunc_sat_f64_u,
|
370
|
+
[ Opcodes.i32_clz ],
|
371
|
+
Opcodes.i32_from
|
372
|
+
]
|
373
|
+
};
|
374
|
+
|
375
|
+
this.__Math_fround = {
|
376
|
+
floatOnly: true,
|
377
|
+
params: [ valtypeBinary ],
|
378
|
+
locals: [],
|
379
|
+
returns: [ valtypeBinary ],
|
380
|
+
wasm: [
|
381
|
+
[ Opcodes.local_get, 0 ],
|
382
|
+
[ Opcodes.f32_demote_f64 ],
|
383
|
+
[ Opcodes.f64_promote_f32 ]
|
384
|
+
]
|
385
|
+
};
|
386
|
+
|
387
|
+
// todo: this does not overflow correctly
|
388
|
+
this.__Math_imul = {
|
389
|
+
floatOnly: true,
|
390
|
+
params: [ valtypeBinary, valtypeBinary ],
|
391
|
+
locals: [],
|
392
|
+
returns: [ valtypeBinary ],
|
393
|
+
wasm: [
|
394
|
+
[ Opcodes.local_get, 0 ],
|
395
|
+
Opcodes.i32_trunc_sat_f64_s,
|
396
|
+
[ Opcodes.local_get, 1 ],
|
397
|
+
Opcodes.i32_trunc_sat_f64_s,
|
398
|
+
[ Opcodes.i32_mul ],
|
399
|
+
Opcodes.i32_from
|
400
|
+
]
|
401
|
+
};
|
402
|
+
|
403
|
+
// this is an implementation of xorshift128+ (in wasm bytecode)
|
404
|
+
// fun fact: v8, SM, JSC also use this (you will need this fun fact to maintain your sanity reading this code)
|
405
|
+
const prngSeed0 = Math.floor(Math.random() * (2 ** 30)), prngSeed1 = Math.floor(Math.random() * (2 ** 30));
|
406
|
+
|
407
|
+
this.__Math_random = {
|
408
|
+
floatOnly: true,
|
409
|
+
params: [],
|
410
|
+
locals: [ Valtype.i64, Valtype.i64 ],
|
411
|
+
localNames: [ 's1', 's0' ],
|
412
|
+
globals: [ Valtype.i64, Valtype.i64 ],
|
413
|
+
globalNames: [ 'state0', 'state1' ],
|
414
|
+
globalInits: [ prngSeed0, prngSeed1 ],
|
415
|
+
returns: [ Valtype.f64 ],
|
416
|
+
wasm: [
|
417
|
+
// setup: s1 = state0, s0 = state1, state0 = s0
|
418
|
+
[ Opcodes.global_get, 0 ], // state0
|
419
|
+
[ Opcodes.local_set, 0 ], // s1
|
420
|
+
[ Opcodes.global_get, 1 ], // state1
|
421
|
+
[ Opcodes.local_tee, 1, ], // s0
|
422
|
+
[ Opcodes.global_set, 0 ], // state0
|
423
|
+
|
424
|
+
// s1 ^= s1 << 23
|
425
|
+
[ Opcodes.local_get, 0 ], // s1
|
426
|
+
[ Opcodes.local_get, 0 ], // s1
|
427
|
+
[ Opcodes.i64_const, 23 ],
|
428
|
+
[ Opcodes.i64_shl ], // <<
|
429
|
+
[ Opcodes.i64_xor ], // ^
|
430
|
+
[ Opcodes.local_set, 0 ], // s1
|
431
|
+
|
432
|
+
// state1 = s1 ^ s0 ^ (s1 >> 17) ^ (s0 >> 26)
|
433
|
+
// s1 ^ s0
|
434
|
+
[ Opcodes.local_get, 0 ], // s1
|
435
|
+
[ Opcodes.local_get, 1 ], // s0
|
436
|
+
[ Opcodes.i64_xor ], // ^
|
437
|
+
|
438
|
+
// ^ (s1 >> 17)
|
439
|
+
[ Opcodes.local_get, 0 ], // s1
|
440
|
+
[ Opcodes.i64_const, 17 ],
|
441
|
+
[ Opcodes.i64_shr_u ], // >>
|
442
|
+
[ Opcodes.i64_xor ], // ^
|
443
|
+
|
444
|
+
// ^ (s0 >> 26)
|
445
|
+
[ Opcodes.local_get, 1 ], // s0
|
446
|
+
[ Opcodes.i64_const, 26 ],
|
447
|
+
[ Opcodes.i64_shr_u ], // >>
|
448
|
+
[ Opcodes.i64_xor ], // ^
|
449
|
+
|
450
|
+
// state1 =
|
451
|
+
[ Opcodes.global_set, 1 ],
|
452
|
+
|
453
|
+
// you thought it was over? now we need the result as a f64 between 0-1 :)
|
454
|
+
|
455
|
+
// mantissa = (state1 + s0) & ((1 << 53) - 1)
|
456
|
+
[ Opcodes.global_get, 1 ], // state1
|
457
|
+
[ Opcodes.local_get, 1 ], // s0
|
458
|
+
[ Opcodes.i64_add ],
|
459
|
+
|
460
|
+
[ Opcodes.i64_const, ...signedLEB128((1 << 53) - 1) ],
|
461
|
+
[ Opcodes.i64_and ],
|
462
|
+
|
463
|
+
// double(mantissa)
|
464
|
+
[ Opcodes.f64_convert_i64_u ],
|
465
|
+
|
466
|
+
// / (1 << 53)
|
467
|
+
...number(1 << 53),
|
468
|
+
[ Opcodes.f64_div ]
|
469
|
+
]
|
470
|
+
};
|
471
|
+
|
472
|
+
this.__Math_radians = {
|
473
|
+
floatOnly: true,
|
474
|
+
params: [ valtypeBinary ],
|
475
|
+
locals: [],
|
476
|
+
returns: [ valtypeBinary ],
|
477
|
+
wasm: [
|
478
|
+
[ Opcodes.local_get, 0 ],
|
479
|
+
...number(Math.PI / 180),
|
480
|
+
[ Opcodes.f64_mul ]
|
481
|
+
]
|
482
|
+
};
|
483
|
+
|
484
|
+
this.__Math_degrees = {
|
485
|
+
floatOnly: true,
|
486
|
+
params: [ valtypeBinary ],
|
487
|
+
locals: [],
|
488
|
+
returns: [ valtypeBinary ],
|
489
|
+
wasm: [
|
490
|
+
[ Opcodes.local_get, 0 ],
|
491
|
+
...number(180 / Math.PI),
|
492
|
+
[ Opcodes.f64_mul ]
|
493
|
+
]
|
494
|
+
};
|
495
|
+
|
496
|
+
this.__Math_clamp = {
|
497
|
+
floatOnly: true,
|
498
|
+
params: [ valtypeBinary, valtypeBinary, valtypeBinary ],
|
499
|
+
locals: [],
|
500
|
+
localNames: [ 'x', 'lower', 'upper' ],
|
501
|
+
returns: [ valtypeBinary ],
|
502
|
+
wasm: [
|
503
|
+
[ Opcodes.local_get, 0 ],
|
504
|
+
[ Opcodes.local_get, 1 ],
|
505
|
+
[ Opcodes.f64_max ],
|
506
|
+
[ Opcodes.local_get, 2 ],
|
507
|
+
[ Opcodes.f64_min ]
|
508
|
+
]
|
509
|
+
};
|
510
|
+
|
511
|
+
this.__Math_scale = {
|
512
|
+
floatOnly: true,
|
513
|
+
params: [ valtypeBinary, valtypeBinary, valtypeBinary, valtypeBinary, valtypeBinary ],
|
514
|
+
locals: [],
|
515
|
+
localNames: [ 'x', 'inLow', 'inHigh', 'outLow', 'outHigh' ],
|
516
|
+
returns: [ valtypeBinary ],
|
517
|
+
wasm: [
|
518
|
+
// (x − inLow) * (outHigh − outLow) / (inHigh - inLow) + outLow
|
519
|
+
|
520
|
+
[ Opcodes.local_get, 0 ],
|
521
|
+
[ Opcodes.local_get, 1 ],
|
522
|
+
[ Opcodes.f64_sub ],
|
523
|
+
|
524
|
+
[ Opcodes.local_get, 4 ],
|
525
|
+
[ Opcodes.local_get, 3 ],
|
526
|
+
[ Opcodes.f64_sub ],
|
527
|
+
|
528
|
+
[ Opcodes.f64_mul ],
|
529
|
+
|
530
|
+
[ Opcodes.local_get, 2 ],
|
531
|
+
[ Opcodes.local_get, 1 ],
|
532
|
+
[ Opcodes.f64_sub ],
|
533
|
+
|
534
|
+
[ Opcodes.f64_div ],
|
535
|
+
|
536
|
+
[ Opcodes.local_get, 3 ],
|
537
|
+
[ Opcodes.f64_add ]
|
538
|
+
]
|
539
|
+
};
|
540
|
+
|
541
|
+
// todo: fix for -0
|
542
|
+
this.__Math_signbit = {
|
543
|
+
floatOnly: true,
|
544
|
+
params: [ valtypeBinary ],
|
545
|
+
locals: [],
|
546
|
+
returns: [ valtypeBinary ],
|
547
|
+
returnType: 'boolean',
|
548
|
+
wasm: [
|
549
|
+
[ Opcodes.local_get, 0 ],
|
550
|
+
...number(0),
|
551
|
+
[ Opcodes.f64_le ],
|
552
|
+
Opcodes.i32_from
|
553
|
+
]
|
554
|
+
};
|
555
|
+
|
556
|
+
|
557
|
+
this.__performance_now = {
|
558
|
+
params: [],
|
559
|
+
locals: [],
|
560
|
+
returns: [ valtypeBinary ],
|
561
|
+
wasm: [
|
562
|
+
[ Opcodes.call, importedFuncs.time ]
|
563
|
+
]
|
564
|
+
};
|
565
|
+
|
566
|
+
|
567
|
+
this.__SIMD_i32x4_load = {
|
568
|
+
params: [ Valtype.i32 ],
|
569
|
+
locals: [],
|
570
|
+
returns: [ Valtype.v128 ],
|
571
|
+
memory: true,
|
572
|
+
wasm: [
|
573
|
+
[ Opcodes.local_get, 0 ],
|
574
|
+
[ ...Opcodes.v128_load, 0, 0 ]
|
575
|
+
]
|
576
|
+
};
|
577
|
+
|
578
|
+
this.__SIMD_i32x4_splat = {
|
579
|
+
params: [ Valtype.i32 ],
|
580
|
+
locals: [],
|
581
|
+
returns: [ Valtype.v128 ],
|
582
|
+
wasm: [
|
583
|
+
[ Opcodes.local_get, 0 ],
|
584
|
+
[ ...Opcodes.i32x4_splat ],
|
585
|
+
]
|
586
|
+
};
|
587
|
+
|
588
|
+
this.__SIMD_i16x8_create = {
|
589
|
+
params: [ Valtype.i32, Valtype.i32, Valtype.i32, Valtype.i32, Valtype.i32, Valtype.i32, Valtype.i32, Valtype.i32 ],
|
590
|
+
locals: [],
|
591
|
+
returns: [ Valtype.v128 ],
|
592
|
+
wasm: [
|
593
|
+
...i32x4(0, 0, 0, 0),
|
594
|
+
[ Opcodes.local_get, 0 ],
|
595
|
+
[ ...Opcodes.i16x8_replace_lane, 0 ],
|
596
|
+
[ Opcodes.local_get, 1 ],
|
597
|
+
[ ...Opcodes.i16x8_replace_lane, 1 ],
|
598
|
+
[ Opcodes.local_get, 2 ],
|
599
|
+
[ ...Opcodes.i16x8_replace_lane, 2 ],
|
600
|
+
[ Opcodes.local_get, 3 ],
|
601
|
+
[ ...Opcodes.i16x8_replace_lane, 3 ],
|
602
|
+
[ Opcodes.local_get, 4 ],
|
603
|
+
[ ...Opcodes.i16x8_replace_lane, 4 ],
|
604
|
+
[ Opcodes.local_get, 5 ],
|
605
|
+
[ ...Opcodes.i16x8_replace_lane, 5 ],
|
606
|
+
[ Opcodes.local_get, 6 ],
|
607
|
+
[ ...Opcodes.i16x8_replace_lane, 6 ],
|
608
|
+
[ Opcodes.local_get, 7 ],
|
609
|
+
[ ...Opcodes.i16x8_replace_lane, 7 ],
|
610
|
+
]
|
611
|
+
};
|
612
|
+
|
613
|
+
this.__SIMD_i32x4_dot_i16x8 = {
|
614
|
+
params: [ Valtype.v128, Valtype.v128 ],
|
615
|
+
locals: [],
|
616
|
+
returns: [ Valtype.v128 ],
|
617
|
+
wasm: [
|
618
|
+
[ Opcodes.local_get, 0 ],
|
619
|
+
[ Opcodes.local_get, 1 ],
|
620
|
+
[ ...Opcodes.i32x4_dot_i16x8_s ]
|
621
|
+
]
|
622
|
+
};
|
623
|
+
|
624
|
+
this.__SIMD_i32x4_create = {
|
625
|
+
params: [ Valtype.i32, Valtype.i32, Valtype.i32, Valtype.i32 ],
|
626
|
+
locals: [],
|
627
|
+
returns: [ Valtype.v128 ],
|
628
|
+
wasm: [
|
629
|
+
...i32x4(0, 0, 0, 0),
|
630
|
+
[ Opcodes.local_get, 0 ],
|
631
|
+
[ ...Opcodes.i32x4_replace_lane, 0 ],
|
632
|
+
[ Opcodes.local_get, 1 ],
|
633
|
+
[ ...Opcodes.i32x4_replace_lane, 1 ],
|
634
|
+
[ Opcodes.local_get, 2 ],
|
635
|
+
[ ...Opcodes.i32x4_replace_lane, 2 ],
|
636
|
+
[ Opcodes.local_get, 3 ],
|
637
|
+
[ ...Opcodes.i32x4_replace_lane, 3 ],
|
638
|
+
]
|
639
|
+
};
|
640
|
+
|
641
|
+
this.__SIMD_i32x4_add = {
|
642
|
+
params: [ Valtype.v128, Valtype.v128 ],
|
643
|
+
locals: [],
|
644
|
+
returns: [ Valtype.v128 ],
|
645
|
+
wasm: [
|
646
|
+
[ Opcodes.local_get, 0 ],
|
647
|
+
[ Opcodes.local_get, 1 ],
|
648
|
+
[ ...Opcodes.i32x4_add ]
|
649
|
+
]
|
650
|
+
};
|
651
|
+
|
652
|
+
this.__SIMD_i32x4_sub = {
|
653
|
+
params: [ Valtype.v128, Valtype.v128 ],
|
654
|
+
locals: [],
|
655
|
+
returns: [ Valtype.v128 ],
|
656
|
+
wasm: [
|
657
|
+
[ Opcodes.local_get, 0 ],
|
658
|
+
[ Opcodes.local_get, 1 ],
|
659
|
+
[ ...Opcodes.i32x4_sub ]
|
660
|
+
]
|
661
|
+
};
|
662
|
+
|
663
|
+
this.__SIMD_i32x4_mul = {
|
664
|
+
params: [ Valtype.v128, Valtype.v128 ],
|
665
|
+
locals: [],
|
666
|
+
returns: [ Valtype.v128 ],
|
667
|
+
wasm: [
|
668
|
+
[ Opcodes.local_get, 0 ],
|
669
|
+
[ Opcodes.local_get, 1 ],
|
670
|
+
[ ...Opcodes.i32x4_mul ]
|
671
|
+
]
|
672
|
+
};
|
673
|
+
|
674
|
+
this.__SIMD_i32x4_get0 = {
|
675
|
+
params: [ Valtype.v128 ],
|
676
|
+
locals: [],
|
677
|
+
returns: [ Valtype.i32 ],
|
678
|
+
wasm: [
|
679
|
+
[ Opcodes.local_get, 0 ],
|
680
|
+
[ ...Opcodes.i32x4_extract_lane, 0 ],
|
681
|
+
],
|
682
|
+
},
|
683
|
+
|
684
|
+
this.__SIMD_i32x4_get1 = {
|
685
|
+
params: [ Valtype.v128 ],
|
686
|
+
locals: [],
|
687
|
+
returns: [ Valtype.i32 ],
|
688
|
+
wasm: [
|
689
|
+
[ Opcodes.local_get, 0 ],
|
690
|
+
[ ...Opcodes.i32x4_extract_lane, 1 ],
|
691
|
+
],
|
692
|
+
};
|
693
|
+
|
694
|
+
this.__SIMD_i32x4_get2 = {
|
695
|
+
params: [ Valtype.v128 ],
|
696
|
+
locals: [],
|
697
|
+
returns: [ Valtype.i32 ],
|
698
|
+
wasm: [
|
699
|
+
[ Opcodes.local_get, 0 ],
|
700
|
+
[ ...Opcodes.i32x4_extract_lane, 2 ],
|
701
|
+
],
|
702
|
+
};
|
703
|
+
|
704
|
+
this.__SIMD_i32x4_get3 = {
|
705
|
+
params: [ Valtype.v128 ],
|
706
|
+
locals: [],
|
707
|
+
returns: [ Valtype.i32 ],
|
708
|
+
wasm: [
|
709
|
+
[ Opcodes.local_get, 0 ],
|
710
|
+
[ ...Opcodes.i32x4_extract_lane, 3 ],
|
711
|
+
],
|
712
|
+
};
|
713
|
+
|
714
|
+
this.__SIMD_i32x4_shuffle_000c = {
|
715
|
+
params: [ Valtype.v128 ],
|
716
|
+
locals: [],
|
717
|
+
returns: [ Valtype.v128 ],
|
718
|
+
wasm: [
|
719
|
+
[ Opcodes.local_get, 0 ],
|
720
|
+
...i32x4(0, 0, 0, 0),
|
721
|
+
[ ...Opcodes.i8x16_shuffle, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 8, 9, 10, 11 ], // i32x4 (a, b, c, d) -> i32x4 (0, 0, 0, c)
|
722
|
+
]
|
723
|
+
};
|
724
|
+
|
725
|
+
this.__SIMD_i32x4_shuffle_00ab = {
|
726
|
+
params: [ Valtype.v128 ],
|
727
|
+
locals: [],
|
728
|
+
returns: [ Valtype.v128 ],
|
729
|
+
wasm: [
|
730
|
+
[ Opcodes.local_get, 0 ],
|
731
|
+
...i32x4(0, 0, 0, 0),
|
732
|
+
[ ...Opcodes.i8x16_shuffle, 16, 16, 16, 16, 16, 16, 16, 16, 0, 1, 2, 3, 4, 5, 6, 7 ], // i32x4 (a, b, c, d) -> i32x4 (0, 0, a, b)
|
733
|
+
]
|
734
|
+
};
|
735
|
+
};
|
736
|
+
|
737
|
+
export const BuiltinPreludes = {
|
738
|
+
btoa: `var keyStr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
|
739
|
+
var btoa = function (input) {
|
740
|
+
// todo: throw invalid character for unicode
|
741
|
+
|
742
|
+
let output = "";
|
743
|
+
let chr1, chr2, chr3, enc1, enc2, enc3, enc4;
|
744
|
+
let i = 0;
|
745
|
+
|
746
|
+
while (i < input.length) {
|
747
|
+
chr1 = input.charCodeAt(i++);
|
748
|
+
chr2 = input.charCodeAt(i++);
|
749
|
+
chr3 = input.charCodeAt(i++);
|
750
|
+
|
751
|
+
enc1 = chr1 >> 2;
|
752
|
+
enc2 = ((chr1 & 3) << 4) | (chr2 >> 4);
|
753
|
+
enc3 = ((chr2 & 15) << 2) | (chr3 >> 6);
|
754
|
+
enc4 = chr3 & 63;
|
755
|
+
|
756
|
+
if (isNaN(chr2)) {
|
757
|
+
enc3 = enc4 = 64;
|
758
|
+
} else if (isNaN(chr3)) {
|
759
|
+
enc4 = 64;
|
760
|
+
}
|
761
|
+
|
762
|
+
output += keyStr.charAt(enc1);
|
763
|
+
output += keyStr.charAt(enc2);
|
764
|
+
output += keyStr.charAt(enc3);
|
765
|
+
output += keyStr.charAt(enc4);
|
766
|
+
}
|
767
|
+
|
768
|
+
return output;
|
769
|
+
};`
|
770
|
+
};
|