diff --git a/README.md b/README.md index 039980439eb17eb91727998c95f8bc5e512e6e54..b9da2af63e57a32e238c7b091a755c4713914053 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,7 @@ For more infomation, see: [ARK Runtime Subsystem](https://gitee.com/openharmony/ ts2abc uses the command line interaction mode and converts JS code into ARK bytecode files that can be run on an ARK runtime system. ts2abc supports Windows, Linux, and macOS. Front-end tools, converting JS source code into ARK bytecode, can be built by specifing the `--build-target` with `ark_ts2abc` on Linux. ``` -$ ./build.sh --product-name Hi3516DV300 --build-target ark_ts2abc +$ ./build.sh --product-name Hi3516DV300 --build-target ark_ts2abc_build ``` ### Usage Guidelines diff --git a/README_zh.md b/README_zh.md index aa611664131b3d5b5971f85cc2547c4df86b771c..b1cc5b1be2e0765130c128fe14197280446f13d5 100644 --- a/README_zh.md +++ b/README_zh.md @@ -34,7 +34,7 @@ ts2abc组件是方舟运行时子系统的前端工具,支持将JavaScript文 ts2abc组件采用命令行交互方式,支持将JavaScript代码转换为方舟字节码文件,使其能够在方舟运行时上运行。支持Windows/Linux/MacOS平台。方舟前端工具在linux平台上可通过全量编译或指定编译前端工具链获取。 ``` -$ ./build.sh --product-name Hi3516DV300 --build-target ark_ts2abc +$ ./build.sh --product-name Hi3516DV300 --build-target ark_ts2abc_build ``` ### 使用说明 diff --git a/test262/config.py b/test262/config.py index 3e4872c28aeb360754f10379699028e8ce9a60f6..d4903397a72a9f1cd813ee4f6b3e22ba10eb9f1e 100755 --- a/test262/config.py +++ b/test262/config.py @@ -34,11 +34,6 @@ ICUI_DIR = f"{CODE_ROOT}/out/hi3516dv300/clang_x64/global/i18n_standard" LLVM_DIR = f"{CODE_ROOT}/prebuilts/clang/ohos/linux-x86_64/llvm/lib/" ARK_JS_RUNTIME_DIR = f"{CODE_ROOT}/out/hi3516dv300/clang_x64/ark/ark_js_runtime" -# " mode_type": { -# "1": "only default", -# "2": "only strict mode", -# "3": "both default and strict mode" -# } DEFAULT_MODE = 2 TEST_ES5_DIR = os.path.join(DATA_DIR, "test_es51") @@ -60,6 +55,7 @@ DEFAULT_TIMEOUT = 60000 ES5_LIST_FILE = os.path.join("test262", "es5_tests.txt") ES2015_LIST_FILE = os.path.join("test262", "es2015_tests.txt") CI_LIST_FILE = os.path.join("test262", "CI_tests.txt") +MODULE_FILES_LIST = os.path.join("test262", "module_tests.txt") TEST262_GIT_HASH = "9ca13b12728b7e0089c7eb03fa2bd17f8abe297f" HARNESS_GIT_HASH = "9c499f028eb24e67781435c0bb442e00343eb39d" @@ -86,27 +82,3 @@ ARK_ARCH_LIST = [ ] DEFAULT_ARK_ARCH = ARK_ARCH_LIST[0] - -MODULE_FILES_LIST = [ - "early-dup-export-decl.js", - "early-dup-export-dflt-id.js", - "early-dup-export-dflt.js", - "early-dup-export-id-as.js", - "early-dup-export-id.js", - "early-dup-lables.js", - "early-dup-lex.js", - "early-export-global.js", - "early-lex-and-var.js", - "early-new-target.js", - "early-strict-mode.js", - "early-super.js", - "early-undef-break.js", - "early-undef-continue.js", - "parse-err-export-dflt-const.js", - "parse-err-export-dflt-let.js", - "parse-err-export-dflt-var.js", - "parse-err-return.js", - "parse-err-yield.js", - "dup-bound-names.js", - "await-module.js" -] diff --git a/test262/es2015_tests.txt b/test262/es2015_tests.txt index 92acde0ddc1283cd60ae04c96534fa89c89b5191..b23ac30a0da61b95dcae42d7b50f059c8a17a753 100755 --- a/test262/es2015_tests.txt +++ b/test262/es2015_tests.txt @@ -5227,4 +5227,414 @@ intl402/Date/prototype/toLocaleString/builtin.js intl402/Date/prototype/toLocaleString/length.js intl402/Date/prototype/toLocaleString/default-options-object-prototype.js intl402/language-tags-valid.js -intl402/language-tags-canonicalized.js \ No newline at end of file +intl402/language-tags-canonicalized.js +language/module-code/comment-multi-line-html-close.js +language/module-code/comment-single-line-html-close.js +language/module-code/comment-single-line-html-open.js +language/module-code/early-dup-export-as-star-as.js +language/module-code/early-dup-export-decl.js +language/module-code/early-dup-export-dflt-id.js +language/module-code/early-dup-export-dflt.js +language/module-code/early-dup-export-id-as.js +language/module-code/early-dup-export-id.js +language/module-code/early-dup-language/module-code/export-star-as-dflt.js +language/module-code/early-dup-lables.js +language/module-code/early-dup-lex.js +language/module-code/early-export-global.js +language/module-code/early-export-ill-formed-string.js +language/module-code/early-export-unresolvable.js +language/module-code/early-import-arguments.js +language/module-code/early-import-as-arguments.js +language/module-code/early-import-as-eval.js +language/module-code/early-import-eval.js +language/module-code/early-lex-and-var.js +language/module-code/early-new-target.js +language/module-code/early-strict-mode.js +language/module-code/early-super.js +language/module-code/early-undef-break.js +language/module-code/early-undef-continue.js +language/module-code/eval-export-cls-semi.js +language/module-code/eval-export-dflt-cls-anon.js +language/module-code/eval-export-dflt-cls-anon-semi.js +language/module-code/eval-export-dflt-cls-named.js +language/module-code/eval-export-dflt-cls-named-semi.js +language/module-code/eval-export-dflt-cls-name-meth.js +language/module-code/eval-export-dflt-expr-cls-anon.js +language/module-code/eval-export-dflt-expr-cls-named.js +language/module-code/eval-export-dflt-expr-cls-name-meth.js +language/module-code/eval-export-dflt-expr-err-eval.js +language/module-code/eval-export-dflt-expr-err-get-value.js +language/module-code/eval-export-dflt-expr-fn-anon.js +language/module-code/eval-export-dflt-expr-fn-named.js +language/module-code/eval-export-dflt-expr-gen-anon.js +language/module-code/eval-export-dflt-expr-gen-named.js +language/module-code/eval-export-dflt-expr-in.js +language/module-code/eval-export-dflt-fun-anon-semi.js +language/module-code/eval-export-dflt-fun-named-semi.js +language/module-code/eval-export-dflt-gen-anon-semi.js +language/module-code/eval-export-dflt-gen-named-semi.js +language/module-code/eval-export-fun-semi.js +language/module-code/eval-export-gen-semi.js +language/module-code/eval-gtbndng-indirect-trlng-comma_FIXTURE.js +language/module-code/eval-gtbndng-indirect-trlng-comma.js +language/module-code/eval-gtbndng-indirect-update-as_FIXTURE.js +language/module-code/eval-gtbndng-indirect-update-as.js +language/module-code/eval-gtbndng-indirect-update-dflt_FIXTURE.js +language/module-code/eval-gtbndng-indirect-update-dflt.js +language/module-code/eval-gtbndng-indirect-update_FIXTURE.js +language/module-code/eval-gtbndng-indirect-update.js +language/module-code/eval-gtbndng-local-bndng-cls.js +language/module-code/eval-gtbndng-local-bndng-const.js +language/module-code/eval-gtbndng-local-bndng-let.js +language/module-code/eval-gtbndng-local-bndng-var.js +language/module-code/eval-rqstd-abrupt-err-type_FIXTURE.js +language/module-code/eval-rqstd-abrupt-err-uri_FIXTURE.js +language/module-code/eval-rqstd-abrupt.js +language/module-code/eval-rqstd-once_FIXTURE.js +language/module-code/eval-rqstd-once.js +language/module-code/eval-rqstd-order-1_FIXTURE.js +language/module-code/eval-rqstd-order-2_FIXTURE.js +language/module-code/eval-rqstd-order-3_FIXTURE.js +language/module-code/eval-rqstd-order-4_FIXTURE.js +language/module-code/eval-rqstd-order-5_FIXTURE.js +language/module-code/eval-rqstd-order-6_FIXTURE.js +language/module-code/eval-rqstd-order-7_FIXTURE.js +language/module-code/eval-rqstd-order-8_FIXTURE.js +language/module-code/eval-rqstd-order-9_FIXTURE.js +language/module-code/eval-rqstd-order.js +language/module-code/eval-self-abrupt.js +language/module-code/eval-self-once.js +language/module-code/eval-this.js +language/module-code/export-default-asyncfunction-declaration-binding-exists.js +language/module-code/export-default-asyncfunction-declaration-binding.js +language/module-code/export-default-asyncgenerator-declaration-binding-exists.js +language/module-code/export-default-asyncgenerator-declaration-binding.js +language/module-code/export-default-function-declaration-binding-exists.js +language/module-code/export-default-function-declaration-binding.js +language/module-code/export-default-generator-declaration-binding-exists.js +language/module-code/export-default-generator-declaration-binding.js +language/module-code/export-expname-binding-string.js +language/module-code/export-expname_FIXTURE.js +language/module-code/export-expname-from-as-unpaired-surrogate.js +language/module-code/export-expname-from-binding-string.js +language/module-code/export-expname-from-star.js +language/module-code/export-expname-from-star-string.js +language/module-code/export-expname-from-star-unpaired-surrogate.js +language/module-code/export-expname-from-string-binding.js +language/module-code/export-expname-from-string.js +language/module-code/export-expname-from-string-string.js +language/module-code/export-expname-from-unpaired-surrogate.js +language/module-code/export-expname-import-string-binding.js +language/module-code/export-expname-import-unpaired-surrogate.js +language/module-code/export-expname-string-binding.js +language/module-code/export-expname-unpaired-surrogate.js +language/module-code/export-star-as-dflt_FIXTURE.js +language/module-code/export-star-as-dflt.js +language/module-code/instn-iee-bndng-cls_FIXTURE.js +language/module-code/instn-iee-bndng-cls.js +language/module-code/instn-iee-bndng-const_FIXTURE.js +language/module-code/instn-iee-bndng-const.js +language/module-code/instn-iee-bndng-fun_FIXTURE.js +language/module-code/instn-iee-bndng-fun.js +language/module-code/instn-iee-bndng-gen_FIXTURE.js +language/module-code/instn-iee-bndng-gen.js +language/module-code/instn-iee-bndng-let_FIXTURE.js +language/module-code/instn-iee-bndng-let.js +language/module-code/instn-iee-bndng-var_FIXTURE.js +language/module-code/instn-iee-bndng-var.js +language/module-code/instn-iee-err-ambiguous-1_FIXTURE.js +language/module-code/instn-iee-err-ambiguous-2_FIXTURE.js +language/module-code/instn-iee-err-ambiguous-as.js +language/module-code/instn-iee-err-ambiguous_FIXTURE.js +language/module-code/instn-iee-err-ambiguous.js +language/module-code/instn-iee-err-circular-as.js +language/module-code/instn-iee-err-circular_FIXTURE.js +language/module-code/instn-iee-err-circular.js +language/module-code/instn-iee-err-dflt-thru-star-as.js +language/module-code/instn-iee-err-dflt-thru-star-dflt_FIXTURE.js +language/module-code/instn-iee-err-dflt-thru-star-int_FIXTURE.js +language/module-code/instn-iee-err-dflt-thru-star.js +language/module-code/instn-iee-err-not-found-as.js +language/module-code/instn-iee-err-not-found-empty_FIXTURE.js +language/module-code/instn-iee-err-not-found.js +language/module-code/instn-iee-iee-cycle-2_FIXTURE.js +language/module-code/instn-iee-iee-cycle.js +language/module-code/instn-iee-star-cycle-2_FIXTURE.js +language/module-code/instn-iee-star-cycle-indirect-x_FIXTURE.js +language/module-code/instn-iee-star-cycle.js +language/module-code/instn-iee-trlng-comma_FIXTURE.js +language/module-code/instn-iee-trlng-comma.js +language/module-code/instn-local-bndng-cls.js +language/module-code/instn-local-bndng-const.js +language/module-code/instn-local-bndng-export-cls.js +language/module-code/instn-local-bndng-export-const.js +language/module-code/instn-local-bndng-export-fun.js +language/module-code/instn-local-bndng-export-gen.js +language/module-code/instn-local-bndng-export-let.js +language/module-code/instn-local-bndng-export-var.js +language/module-code/instn-local-bndng-for-dup.js +language/module-code/instn-local-bndng-for.js +language/module-code/instn-local-bndng-fun.js +language/module-code/instn-local-bndng-gen.js +language/module-code/instn-local-bndng-let.js +language/module-code/instn-local-bndng-var-dup.js +language/module-code/instn-local-bndng-var.js +language/module-code/instn-named-bndng-cls.js +language/module-code/instn-named-bndng-const.js +language/module-code/instn-named-bndng-dflt-cls.js +language/module-code/instn-named-bndng-dflt-expr.js +language/module-code/instn-named-bndng-dflt-fun-anon.js +language/module-code/instn-named-bndng-dflt-fun-named.js +language/module-code/instn-named-bndng-dflt-gen-anon.js +language/module-code/instn-named-bndng-dflt-gen-named.js +language/module-code/instn-named-bndng-dflt-named.js +language/module-code/instn-named-bndng-dflt-star.js +language/module-code/instn-named-bndng-fun.js +language/module-code/instn-named-bndng-gen.js +language/module-code/instn-named-bndng-let.js +language/module-code/instn-named-bndng-trlng-comma.js +language/module-code/instn-named-bndng-var.js +language/module-code/instn-named-err-ambiguous-1_FIXTURE.js +language/module-code/instn-named-err-ambiguous-2_FIXTURE.js +language/module-code/instn-named-err-ambiguous-as.js +language/module-code/instn-named-err-ambiguous_FIXTURE.js +language/module-code/instn-named-err-ambiguous.js +language/module-code/instn-named-err-dflt-thru-star-as.js +language/module-code/instn-named-err-dflt-thru-star-dflt_FIXTURE.js +language/module-code/instn-named-err-dflt-thru-star-dflt.js +language/module-code/instn-named-err-dflt-thru-star-int_FIXTURE.js +language/module-code/instn-named-err-not-found-as.js +language/module-code/instn-named-err-not-found-dflt.js +language/module-code/instn-named-err-not-found-empty_FIXTURE.js +language/module-code/instn-named-err-not-found.js +language/module-code/instn-named-id-name.js +language/module-code/instn-named-iee-cycle-2_FIXTURE.js +language/module-code/instn-named-iee-cycle.js +language/module-code/instn-named-star-cycle-2_FIXTURE.js +language/module-code/instn-named-star-cycle-indirect-x_FIXTURE.js +language/module-code/instn-named-star-cycle.js +language/module-code/instn-once.js +language/module-code/instn-resolve-empty-export_FIXTURE.js +language/module-code/instn-resolve-empty-export.js +language/module-code/instn-resolve-empty-import_FIXTURE.js +language/module-code/instn-resolve-empty-import.js +language/module-code/instn-resolve-err-syntax-1_FIXTURE.js +language/module-code/instn-resolve-err-syntax-1.js +language/module-code/instn-resolve-err-syntax-2_FIXTURE.js +language/module-code/instn-resolve-err-syntax-2.js +language/module-code/instn-resolve-order-depth-child_FIXTURE.js +language/module-code/instn-resolve-order-depth.js +language/module-code/instn-resolve-order-depth-reference_FIXTURE.js +language/module-code/instn-resolve-order-depth-syntax_FIXTURE.js +language/module-code/instn-resolve-order-src.js +language/module-code/instn-resolve-order-src-reference_FIXTURE.js +language/module-code/instn-resolve-order-src-syntax_FIXTURE.js +language/module-code/instn-resolve-order-src-valid_FIXTURE.js +language/module-code/instn-same-global.js +language/module-code/instn-same-global-set_FIXTURE.js +language/module-code/instn-star-ambiguous-1_FIXTURE.js +language/module-code/instn-star-ambiguous-2_FIXTURE.js +language/module-code/instn-star-ambiguous_FIXTURE.js +language/module-code/instn-star-ambiguous.js +language/module-code/instn-star-as-props-dflt-skip.js +language/module-code/instn-star-binding.js +language/module-code/instn-star-equality.js +language/module-code/instn-star-equality-other_FIXTURE.js +language/module-code/instn-star-err-not-found-empty_FIXTURE.js +language/module-code/instn-star-err-not-found-faulty_FIXTURE.js +language/module-code/instn-star-err-not-found.js +language/module-code/instn-star-id-name.js +language/module-code/instn-star-iee-cycle-2_FIXTURE.js +language/module-code/instn-star-iee-cycle.js +language/module-code/instn-star-props-circular-a_FIXTURE.js +language/module-code/instn-star-props-circular-b_FIXTURE.js +language/module-code/instn-star-props-circular.js +language/module-code/instn-star-props-dflt-keep-indirect-def_FIXTURE.js +language/module-code/instn-star-props-dflt-keep-indirect.js +language/module-code/instn-star-props-dflt-keep-indirect-reexport_FIXTURE.js +language/module-code/instn-star-props-dflt-keep-local.js +language/module-code/instn-star-props-dflt-keep-local-named_FIXTURE.js +language/module-code/instn-star-props-dflt-keep-local-prod_FIXTURE.js +language/module-code/instn-star-props-dflt-skip.js +language/module-code/instn-star-props-dflt-skip-named_FIXTURE.js +language/module-code/instn-star-props-dflt-skip-prod_FIXTURE.js +language/module-code/instn-star-props-dflt-skip-star-as-named-end_FIXTURE.js +language/module-code/instn-star-props-dflt-skip-star-as-named_FIXTURE.js +language/module-code/instn-star-props-dflt-skip-star-as-prod-end_FIXTURE.js +language/module-code/instn-star-props-dflt-skip-star-as-prod_FIXTURE.js +language/module-code/instn-star-props-dflt-skip-star-named_FIXTURE.js +language/module-code/instn-star-props-dflt-skip-star-prod_FIXTURE.js +language/module-code/instn-star-props-nrml-1_FIXTURE.js +language/module-code/instn-star-props-nrml-indirect_FIXTURE.js +language/module-code/instn-star-props-nrml.js +language/module-code/instn-star-props-nrml-star_FIXTURE.js +language/module-code/instn-star-star-cycle-2_FIXTURE.js +language/module-code/instn-star-star-cycle-indirect-x_FIXTURE.js +language/module-code/instn-star-star-cycle.js +language/module-code/instn-uniq-env-rec.js +language/module-code/instn-uniq-env-rec-other_FIXTURE.js +language/module-code/invalid-private-names-call-expression-bad-reference.js +language/module-code/invalid-private-names-call-expression-this.js +language/module-code/invalid-private-names-member-expression-bad-reference.js +language/module-code/invalid-private-names-member-expression-this.js +language/module-code/parse-err-decl-pos-export-arrow-function.js +language/module-code/parse-err-decl-pos-export-block-stmt.js +language/module-code/parse-err-decl-pos-export-block-stmt-list.js +language/module-code/parse-err-decl-pos-export-class-decl-meth.js +language/module-code/parse-err-decl-pos-export-class-decl-method-gen.js +language/module-code/parse-err-decl-pos-export-class-decl-method-gen-static.js +language/module-code/parse-err-decl-pos-export-class-decl-meth-static.js +language/module-code/parse-err-decl-pos-export-class-expr-meth-gen.js +language/module-code/parse-err-decl-pos-export-class-expr-meth-gen-static.js +language/module-code/parse-err-decl-pos-export-class-expr-meth.js +language/module-code/parse-err-decl-pos-export-class-expr-meth-static.js +language/module-code/parse-err-decl-pos-export-do-while.js +language/module-code/parse-err-decl-pos-export-for-const.js +language/module-code/parse-err-decl-pos-export-for-in-const.js +language/module-code/parse-err-decl-pos-export-for-in-let.js +language/module-code/parse-err-decl-pos-export-for-in-lhs.js +language/module-code/parse-err-decl-pos-export-for-in-var.js +language/module-code/parse-err-decl-pos-export-for-let.js +language/module-code/parse-err-decl-pos-export-for-lhs.js +language/module-code/parse-err-decl-pos-export-for-of-const.js +language/module-code/parse-err-decl-pos-export-for-of-let.js +language/module-code/parse-err-decl-pos-export-for-of-lhs.js +language/module-code/parse-err-decl-pos-export-for-of-var.js +language/module-code/parse-err-decl-pos-export-for-var.js +language/module-code/parse-err-decl-pos-export-function-decl.js +language/module-code/parse-err-decl-pos-export-function-expr.js +language/module-code/parse-err-decl-pos-export-generator-decl.js +language/module-code/parse-err-decl-pos-export-generator-expr.js +language/module-code/parse-err-decl-pos-export-if-else.js +language/module-code/parse-err-decl-pos-export-if-if.js +language/module-code/parse-err-decl-pos-export-labeled.js +language/module-code/parse-err-decl-pos-export-object-gen-method.js +language/module-code/parse-err-decl-pos-export-object-getter.js +language/module-code/parse-err-decl-pos-export-object-method.js +language/module-code/parse-err-decl-pos-export-object-setter.js +language/module-code/parse-err-decl-pos-export-switch-case-dflt.js +language/module-code/parse-err-decl-pos-export-switch-case.js +language/module-code/parse-err-decl-pos-export-switch-dftl.js +language/module-code/parse-err-decl-pos-export-try-catch-finally.js +language/module-code/parse-err-decl-pos-export-try-catch.js +language/module-code/parse-err-decl-pos-export-try-finally.js +language/module-code/parse-err-decl-pos-export-try-try.js +language/module-code/parse-err-decl-pos-export-while.js +language/module-code/parse-err-decl-pos-import-arrow-function.js +language/module-code/parse-err-decl-pos-import-block-stmt.js +language/module-code/parse-err-decl-pos-import-block-stmt-list.js +language/module-code/parse-err-decl-pos-import-class-decl-meth.js +language/module-code/parse-err-decl-pos-import-class-decl-method-gen.js +language/module-code/parse-err-decl-pos-import-class-decl-method-gen-static.js +language/module-code/parse-err-decl-pos-import-class-decl-meth-static.js +language/module-code/parse-err-decl-pos-import-class-expr-meth-gen.js +language/module-code/parse-err-decl-pos-import-class-expr-meth-gen-static.js +language/module-code/parse-err-decl-pos-import-class-expr-meth.js +language/module-code/parse-err-decl-pos-import-class-expr-meth-static.js +language/module-code/parse-err-decl-pos-import-do-while.js +language/module-code/parse-err-decl-pos-import-for-const.js +language/module-code/parse-err-decl-pos-import-for-in-const.js +language/module-code/parse-err-decl-pos-import-for-in-let.js +language/module-code/parse-err-decl-pos-import-for-in-lhs.js +language/module-code/parse-err-decl-pos-import-for-in-var.js +language/module-code/parse-err-decl-pos-import-for-let.js +language/module-code/parse-err-decl-pos-import-for-lhs.js +language/module-code/parse-err-decl-pos-import-for-of-const.js +language/module-code/parse-err-decl-pos-import-for-of-let.js +language/module-code/parse-err-decl-pos-import-for-of-lhs.js +language/module-code/parse-err-decl-pos-import-for-of-var.js +language/module-code/parse-err-decl-pos-import-for-var.js +language/module-code/parse-err-decl-pos-import-function-decl.js +language/module-code/parse-err-decl-pos-import-function-expr.js +language/module-code/parse-err-decl-pos-import-generator-decl.js +language/module-code/parse-err-decl-pos-import-generator-expr.js +language/module-code/parse-err-decl-pos-import-if-else.js +language/module-code/parse-err-decl-pos-import-if-if.js +language/module-code/parse-err-decl-pos-import-labeled.js +language/module-code/parse-err-decl-pos-import-object-gen-method.js +language/module-code/parse-err-decl-pos-import-object-getter.js +language/module-code/parse-err-decl-pos-import-object-method.js +language/module-code/parse-err-decl-pos-import-object-setter.js +language/module-code/parse-err-decl-pos-import-switch-case-dflt.js +language/module-code/parse-err-decl-pos-import-switch-case.js +language/module-code/parse-err-decl-pos-import-switch-dftl.js +language/module-code/parse-err-decl-pos-import-try-catch-finally.js +language/module-code/parse-err-decl-pos-import-try-catch.js +language/module-code/parse-err-decl-pos-import-try-finally.js +language/module-code/parse-err-decl-pos-import-try-try.js +language/module-code/parse-err-decl-pos-import-while.js +language/module-code/parse-err-export-dflt-const.js +language/module-code/parse-err-export-dflt-expr.js +language/module-code/parse-err-export-dflt-let.js +language/module-code/parse-err-export-dflt-var.js +language/module-code/parse-err-hoist-lex-fun.js +language/module-code/parse-err-hoist-lex-gen.js +language/module-code/parse-err-invoke-anon-fun-decl.js +language/module-code/parse-err-invoke-anon-gen-decl.js +language/module-code/parse-err-return.js +language/module-code/parse-err-semi-dflt-expr.js +language/module-code/parse-err-semi-export-star.js +language/module-code/parse-err-semi-named-export-from.js +language/module-code/parse-err-semi-named-export.js +language/module-code/parse-err-semi-name-space-export.js +language/module-code/parse-err-syntax-1.js +language/module-code/parse-err-syntax-2.js +language/module-code/parse-err-yield.js +language/module-code/parse-export-empty.js +language/module-code/private-identifiers-not-empty.js +language/module-code/privatename-not-valid-earlyerr-module-1.js +language/module-code/privatename-not-valid-earlyerr-module-2.js +language/module-code/privatename-not-valid-earlyerr-module-3.js +language/module-code/privatename-not-valid-earlyerr-module-4.js +language/module-code/privatename-not-valid-earlyerr-module-5.js +language/module-code/privatename-not-valid-earlyerr-module-6.js +language/module-code/privatename-not-valid-earlyerr-module-7.js +language/module-code/privatename-not-valid-earlyerr-module-8.js +language/module-code/privatename-valid-no-earlyerr.js +language/module-code/verify-dfs-a_FIXTURE.js +language/module-code/verify-dfs-b_FIXTURE.js +language/module-code/verify-dfs.js +language/module-code/namespace/Symbol.iterator.js +language/module-code/namespace/Symbol.toStringTag.js +language/module-code/namespace/internals/define-own-property.js +language/module-code/namespace/internals/delete-exported-init.js +language/module-code/namespace/internals/delete-exported-uninit.js +language/module-code/namespace/internals/delete-non-exported.js +language/module-code/namespace/internals/enumerate-binding-uninit.js +language/module-code/namespace/internals/get-nested-namespace-dflt-skip.js +language/module-code/namespace/internals/get-nested-namespace-dflt-skip-named-end_FIXTURE.js +language/module-code/namespace/internals/get-nested-namespace-dflt-skip-named_FIXTURE.js +language/module-code/namespace/internals/get-nested-namespace-dflt-skip-prod-end_FIXTURE.js +language/module-code/namespace/internals/get-nested-namespace-dflt-skip-prod_FIXTURE.js +language/module-code/namespace/internals/get-nested-namespace-props-nrml-1_FIXTURE.js +language/module-code/namespace/internals/get-nested-namespace-props-nrml-2_FIXTURE.js +language/module-code/namespace/internals/get-nested-namespace-props-nrml-3_FIXTURE.js +language/module-code/namespace/internals/get-nested-namespace-props-nrml.js +language/module-code/namespace/internals/get-own-property-str-found-init.js +language/module-code/namespace/internals/get-own-property-str-found-uninit.js +language/module-code/namespace/internals/get-own-property-str-not-found.js +language/module-code/namespace/internals/get-own-property-sym.js +language/module-code/namespace/internals/get-prototype-of.js +language/module-code/namespace/internals/get-str-found-init.js +language/module-code/namespace/internals/get-str-found-uninit.js +language/module-code/namespace/internals/get-str-initialize.js +language/module-code/namespace/internals/get-str-not-found.js +language/module-code/namespace/internals/get-str-update.js +language/module-code/namespace/internals/get-sym-found.js +language/module-code/namespace/internals/get-sym-not-found.js +language/module-code/namespace/internals/has-property-str-found-init.js +language/module-code/namespace/internals/has-property-str-found-uninit.js +language/module-code/namespace/internals/has-property-str-not-found.js +language/module-code/namespace/internals/has-property-sym-found.js +language/module-code/namespace/internals/has-property-sym-not-found.js +language/module-code/namespace/internals/is-extensible.js +language/module-code/namespace/internals/object-hasOwnProperty-binding-uninit.js +language/module-code/namespace/internals/object-keys-binding-uninit.js +language/module-code/namespace/internals/object-propertyIsEnumerable-binding-uninit.js +language/module-code/namespace/internals/own-property-keys-binding-types_FIXTURE.js +language/module-code/namespace/internals/own-property-keys-binding-types.js +language/module-code/namespace/internals/own-property-keys-sort.js +language/module-code/namespace/internals/prevent-extensions.js +language/module-code/namespace/internals/set.js +language/module-code/namespace/internals/set-prototype-of.js +language/module-code/namespace/internals/set-prototype-of-null.js diff --git a/test262/module_tests.txt b/test262/module_tests.txt new file mode 100644 index 0000000000000000000000000000000000000000..fc9cd67a5140f6450281e53d6af1bbc745fe5700 --- /dev/null +++ b/test262/module_tests.txt @@ -0,0 +1,431 @@ +early-dup-export-decl.js +early-dup-export-dflt-id.js +early-dup-export-dflt.js +early-dup-export-id-as.js +early-dup-export-id.js +early-dup-lables.js +early-dup-lex.js +early-export-global.js +early-lex-and-var.js +early-new-target.js +early-strict-mode.js +early-super.js +early-undef-break.js +early-undef-continue.js +parse-err-export-dflt-const.js +parse-err-export-dflt-let.js +parse-err-export-dflt-var.js +parse-err-return.js +parse-err-yield.js +dup-bound-names.js +await-module.js +comment-multi-line-html-close.js +comment-single-line-html-close.js +comment-single-line-html-open.js +early-dup-export-as-star-as.js +early-dup-export-decl.js +early-dup-export-dflt-id.js +early-dup-export-dflt.js +early-dup-export-id-as.js +early-dup-export-id.js +export-star-as-dflt.js +early-dup-lables.js +early-dup-lex.js +early-export-global.js +early-export-ill-formed-string.js +early-export-unresolvable.js +early-import-arguments.js +early-import-as-arguments.js +early-import-as-eval.js +early-import-eval.js +early-lex-and-var.js +early-new-target.js +early-strict-mode.js +early-super.js +early-undef-break.js +early-undef-continue.js +eval-export-cls-semi.js +eval-export-dflt-cls-anon.js +eval-export-dflt-cls-anon-semi.js +eval-export-dflt-cls-named.js +eval-export-dflt-cls-named-semi.js +eval-export-dflt-cls-name-meth.js +eval-export-dflt-expr-cls-anon.js +eval-export-dflt-expr-cls-named.js +eval-export-dflt-expr-cls-name-meth.js +eval-export-dflt-expr-err-eval.js +eval-export-dflt-expr-err-get-value.js +eval-export-dflt-expr-fn-anon.js +eval-export-dflt-expr-fn-named.js +eval-export-dflt-expr-gen-anon.js +eval-export-dflt-expr-gen-named.js +eval-export-dflt-expr-in.js +eval-export-dflt-fun-anon-semi.js +eval-export-dflt-fun-named-semi.js +eval-export-dflt-gen-anon-semi.js +eval-export-dflt-gen-named-semi.js +eval-export-fun-semi.js +eval-export-gen-semi.js +eval-gtbndng-indirect-trlng-comma_FIXTURE.js +eval-gtbndng-indirect-trlng-comma.js +eval-gtbndng-indirect-update-as_FIXTURE.js +eval-gtbndng-indirect-update-as.js +eval-gtbndng-indirect-update-dflt_FIXTURE.js +eval-gtbndng-indirect-update-dflt.js +eval-gtbndng-indirect-update_FIXTURE.js +eval-gtbndng-indirect-update.js +eval-gtbndng-local-bndng-cls.js +eval-gtbndng-local-bndng-const.js +eval-gtbndng-local-bndng-let.js +eval-gtbndng-local-bndng-var.js +eval-rqstd-abrupt-err-type_FIXTURE.js +eval-rqstd-abrupt-err-uri_FIXTURE.js +eval-rqstd-abrupt.js +eval-rqstd-once_FIXTURE.js +eval-rqstd-once.js +eval-rqstd-order-1_FIXTURE.js +eval-rqstd-order-2_FIXTURE.js +eval-rqstd-order-3_FIXTURE.js +eval-rqstd-order-4_FIXTURE.js +eval-rqstd-order-5_FIXTURE.js +eval-rqstd-order-6_FIXTURE.js +eval-rqstd-order-7_FIXTURE.js +eval-rqstd-order-8_FIXTURE.js +eval-rqstd-order-9_FIXTURE.js +eval-rqstd-order.js +eval-self-abrupt.js +eval-self-once.js +eval-this.js +export-default-asyncfunction-declaration-binding-exists.js +export-default-asyncfunction-declaration-binding.js +export-default-asyncgenerator-declaration-binding-exists.js +export-default-asyncgenerator-declaration-binding.js +export-default-function-declaration-binding-exists.js +export-default-function-declaration-binding.js +export-default-generator-declaration-binding-exists.js +export-default-generator-declaration-binding.js +export-expname-binding-string.js +export-expname_FIXTURE.js +export-expname-from-as-unpaired-surrogate.js +export-expname-from-binding-string.js +export-expname-from-star.js +export-expname-from-star-string.js +export-expname-from-star-unpaired-surrogate.js +export-expname-from-string-binding.js +export-expname-from-string.js +export-expname-from-string-string.js +export-expname-from-unpaired-surrogate.js +export-expname-import-string-binding.js +export-expname-import-unpaired-surrogate.js +export-expname-string-binding.js +export-expname-unpaired-surrogate.js +export-star-as-dflt_FIXTURE.js +export-star-as-dflt.js +instn-iee-bndng-cls_FIXTURE.js +instn-iee-bndng-cls.js +instn-iee-bndng-const_FIXTURE.js +instn-iee-bndng-const.js +instn-iee-bndng-fun_FIXTURE.js +instn-iee-bndng-fun.js +instn-iee-bndng-gen_FIXTURE.js +instn-iee-bndng-gen.js +instn-iee-bndng-let_FIXTURE.js +instn-iee-bndng-let.js +instn-iee-bndng-var_FIXTURE.js +instn-iee-bndng-var.js +instn-iee-err-ambiguous-1_FIXTURE.js +instn-iee-err-ambiguous-2_FIXTURE.js +instn-iee-err-ambiguous-as.js +instn-iee-err-ambiguous_FIXTURE.js +instn-iee-err-ambiguous.js +instn-iee-err-circular-as.js +instn-iee-err-circular_FIXTURE.js +instn-iee-err-circular.js +instn-iee-err-dflt-thru-star-as.js +instn-iee-err-dflt-thru-star-dflt_FIXTURE.js +instn-iee-err-dflt-thru-star-int_FIXTURE.js +instn-iee-err-dflt-thru-star.js +instn-iee-err-not-found-as.js +instn-iee-err-not-found-empty_FIXTURE.js +instn-iee-err-not-found.js +instn-iee-iee-cycle-2_FIXTURE.js +instn-iee-iee-cycle.js +instn-iee-star-cycle-2_FIXTURE.js +instn-iee-star-cycle-indirect-x_FIXTURE.js +instn-iee-star-cycle.js +instn-iee-trlng-comma_FIXTURE.js +instn-iee-trlng-comma.js +instn-local-bndng-cls.js +instn-local-bndng-const.js +instn-local-bndng-export-cls.js +instn-local-bndng-export-const.js +instn-local-bndng-export-fun.js +instn-local-bndng-export-gen.js +instn-local-bndng-export-let.js +instn-local-bndng-export-var.js +instn-local-bndng-for-dup.js +instn-local-bndng-for.js +instn-local-bndng-fun.js +instn-local-bndng-gen.js +instn-local-bndng-let.js +instn-local-bndng-var-dup.js +instn-local-bndng-var.js +instn-named-bndng-cls.js +instn-named-bndng-const.js +instn-named-bndng-dflt-cls.js +instn-named-bndng-dflt-expr.js +instn-named-bndng-dflt-fun-anon.js +instn-named-bndng-dflt-fun-named.js +instn-named-bndng-dflt-gen-anon.js +instn-named-bndng-dflt-gen-named.js +instn-named-bndng-dflt-named.js +instn-named-bndng-dflt-star.js +instn-named-bndng-fun.js +instn-named-bndng-gen.js +instn-named-bndng-let.js +instn-named-bndng-trlng-comma.js +instn-named-bndng-var.js +instn-named-err-ambiguous-1_FIXTURE.js +instn-named-err-ambiguous-2_FIXTURE.js +instn-named-err-ambiguous-as.js +instn-named-err-ambiguous_FIXTURE.js +instn-named-err-ambiguous.js +instn-named-err-dflt-thru-star-as.js +instn-named-err-dflt-thru-star-dflt_FIXTURE.js +instn-named-err-dflt-thru-star-dflt.js +instn-named-err-dflt-thru-star-int_FIXTURE.js +instn-named-err-not-found-as.js +instn-named-err-not-found-dflt.js +instn-named-err-not-found-empty_FIXTURE.js +instn-named-err-not-found.js +instn-named-id-name.js +instn-named-iee-cycle-2_FIXTURE.js +instn-named-iee-cycle.js +instn-named-star-cycle-2_FIXTURE.js +instn-named-star-cycle-indirect-x_FIXTURE.js +instn-named-star-cycle.js +instn-once.js +instn-resolve-empty-export_FIXTURE.js +instn-resolve-empty-export.js +instn-resolve-empty-import_FIXTURE.js +instn-resolve-empty-import.js +instn-resolve-err-syntax-1_FIXTURE.js +instn-resolve-err-syntax-1.js +instn-resolve-err-syntax-2_FIXTURE.js +instn-resolve-err-syntax-2.js +instn-resolve-order-depth-child_FIXTURE.js +instn-resolve-order-depth.js +instn-resolve-order-depth-reference_FIXTURE.js +instn-resolve-order-depth-syntax_FIXTURE.js +instn-resolve-order-src.js +instn-resolve-order-src-reference_FIXTURE.js +instn-resolve-order-src-syntax_FIXTURE.js +instn-resolve-order-src-valid_FIXTURE.js +instn-same-global.js +instn-same-global-set_FIXTURE.js +instn-star-ambiguous-1_FIXTURE.js +instn-star-ambiguous-2_FIXTURE.js +instn-star-ambiguous_FIXTURE.js +instn-star-ambiguous.js +instn-star-as-props-dflt-skip.js +instn-star-binding.js +instn-star-equality.js +instn-star-equality-other_FIXTURE.js +instn-star-err-not-found-empty_FIXTURE.js +instn-star-err-not-found-faulty_FIXTURE.js +instn-star-err-not-found.js +instn-star-id-name.js +instn-star-iee-cycle-2_FIXTURE.js +instn-star-iee-cycle.js +instn-star-props-circular-a_FIXTURE.js +instn-star-props-circular-b_FIXTURE.js +instn-star-props-circular.js +instn-star-props-dflt-keep-indirect-def_FIXTURE.js +instn-star-props-dflt-keep-indirect.js +instn-star-props-dflt-keep-indirect-reexport_FIXTURE.js +instn-star-props-dflt-keep-local.js +instn-star-props-dflt-keep-local-named_FIXTURE.js +instn-star-props-dflt-keep-local-prod_FIXTURE.js +instn-star-props-dflt-skip.js +instn-star-props-dflt-skip-named_FIXTURE.js +instn-star-props-dflt-skip-prod_FIXTURE.js +instn-star-props-dflt-skip-star-as-named-end_FIXTURE.js +instn-star-props-dflt-skip-star-as-named_FIXTURE.js +instn-star-props-dflt-skip-star-as-prod-end_FIXTURE.js +instn-star-props-dflt-skip-star-as-prod_FIXTURE.js +instn-star-props-dflt-skip-star-named_FIXTURE.js +instn-star-props-dflt-skip-star-prod_FIXTURE.js +instn-star-props-nrml-1_FIXTURE.js +instn-star-props-nrml-indirect_FIXTURE.js +instn-star-props-nrml.js +instn-star-props-nrml-star_FIXTURE.js +instn-star-star-cycle-2_FIXTURE.js +instn-star-star-cycle-indirect-x_FIXTURE.js +instn-star-star-cycle.js +instn-uniq-env-rec.js +instn-uniq-env-rec-other_FIXTURE.js +invalid-private-names-call-expression-bad-reference.js +invalid-private-names-call-expression-this.js +invalid-private-names-member-expression-bad-reference.js +invalid-private-names-member-expression-this.js +parse-err-decl-pos-export-arrow-function.js +parse-err-decl-pos-export-block-stmt.js +parse-err-decl-pos-export-block-stmt-list.js +parse-err-decl-pos-export-class-decl-meth.js +parse-err-decl-pos-export-class-decl-method-gen.js +parse-err-decl-pos-export-class-decl-method-gen-static.js +parse-err-decl-pos-export-class-decl-meth-static.js +parse-err-decl-pos-export-class-expr-meth-gen.js +parse-err-decl-pos-export-class-expr-meth-gen-static.js +parse-err-decl-pos-export-class-expr-meth.js +parse-err-decl-pos-export-class-expr-meth-static.js +parse-err-decl-pos-export-do-while.js +parse-err-decl-pos-export-for-const.js +parse-err-decl-pos-export-for-in-const.js +parse-err-decl-pos-export-for-in-let.js +parse-err-decl-pos-export-for-in-lhs.js +parse-err-decl-pos-export-for-in-var.js +parse-err-decl-pos-export-for-let.js +parse-err-decl-pos-export-for-lhs.js +parse-err-decl-pos-export-for-of-const.js +parse-err-decl-pos-export-for-of-let.js +parse-err-decl-pos-export-for-of-lhs.js +parse-err-decl-pos-export-for-of-var.js +parse-err-decl-pos-export-for-var.js +parse-err-decl-pos-export-function-decl.js +parse-err-decl-pos-export-function-expr.js +parse-err-decl-pos-export-generator-decl.js +parse-err-decl-pos-export-generator-expr.js +parse-err-decl-pos-export-if-else.js +parse-err-decl-pos-export-if-if.js +parse-err-decl-pos-export-labeled.js +parse-err-decl-pos-export-object-gen-method.js +parse-err-decl-pos-export-object-getter.js +parse-err-decl-pos-export-object-method.js +parse-err-decl-pos-export-object-setter.js +parse-err-decl-pos-export-switch-case-dflt.js +parse-err-decl-pos-export-switch-case.js +parse-err-decl-pos-export-switch-dftl.js +parse-err-decl-pos-export-try-catch-finally.js +parse-err-decl-pos-export-try-catch.js +parse-err-decl-pos-export-try-finally.js +parse-err-decl-pos-export-try-try.js +parse-err-decl-pos-export-while.js +parse-err-decl-pos-import-arrow-function.js +parse-err-decl-pos-import-block-stmt.js +parse-err-decl-pos-import-block-stmt-list.js +parse-err-decl-pos-import-class-decl-meth.js +parse-err-decl-pos-import-class-decl-method-gen.js +parse-err-decl-pos-import-class-decl-method-gen-static.js +parse-err-decl-pos-import-class-decl-meth-static.js +parse-err-decl-pos-import-class-expr-meth-gen.js +parse-err-decl-pos-import-class-expr-meth-gen-static.js +parse-err-decl-pos-import-class-expr-meth.js +parse-err-decl-pos-import-class-expr-meth-static.js +parse-err-decl-pos-import-do-while.js +parse-err-decl-pos-import-for-const.js +parse-err-decl-pos-import-for-in-const.js +parse-err-decl-pos-import-for-in-let.js +parse-err-decl-pos-import-for-in-lhs.js +parse-err-decl-pos-import-for-in-var.js +parse-err-decl-pos-import-for-let.js +parse-err-decl-pos-import-for-lhs.js +parse-err-decl-pos-import-for-of-const.js +parse-err-decl-pos-import-for-of-let.js +parse-err-decl-pos-import-for-of-lhs.js +parse-err-decl-pos-import-for-of-var.js +parse-err-decl-pos-import-for-var.js +parse-err-decl-pos-import-function-decl.js +parse-err-decl-pos-import-function-expr.js +parse-err-decl-pos-import-generator-decl.js +parse-err-decl-pos-import-generator-expr.js +parse-err-decl-pos-import-if-else.js +parse-err-decl-pos-import-if-if.js +parse-err-decl-pos-import-labeled.js +parse-err-decl-pos-import-object-gen-method.js +parse-err-decl-pos-import-object-getter.js +parse-err-decl-pos-import-object-method.js +parse-err-decl-pos-import-object-setter.js +parse-err-decl-pos-import-switch-case-dflt.js +parse-err-decl-pos-import-switch-case.js +parse-err-decl-pos-import-switch-dftl.js +parse-err-decl-pos-import-try-catch-finally.js +parse-err-decl-pos-import-try-catch.js +parse-err-decl-pos-import-try-finally.js +parse-err-decl-pos-import-try-try.js +parse-err-decl-pos-import-while.js +parse-err-export-dflt-const.js +parse-err-export-dflt-expr.js +parse-err-export-dflt-let.js +parse-err-export-dflt-var.js +parse-err-hoist-lex-fun.js +parse-err-hoist-lex-gen.js +parse-err-invoke-anon-fun-decl.js +parse-err-invoke-anon-gen-decl.js +parse-err-return.js +parse-err-semi-dflt-expr.js +parse-err-semi-export-star.js +parse-err-semi-named-export-from.js +parse-err-semi-named-export.js +parse-err-semi-name-space-export.js +parse-err-syntax-1.js +parse-err-syntax-2.js +parse-err-yield.js +parse-export-empty.js +private-identifiers-not-empty.js +privatename-not-valid-earlyerr-module-1.js +privatename-not-valid-earlyerr-module-2.js +privatename-not-valid-earlyerr-module-3.js +privatename-not-valid-earlyerr-module-4.js +privatename-not-valid-earlyerr-module-5.js +privatename-not-valid-earlyerr-module-6.js +privatename-not-valid-earlyerr-module-7.js +privatename-not-valid-earlyerr-module-8.js +privatename-valid-no-earlyerr.js +verify-dfs-a_FIXTURE.js +verify-dfs-b_FIXTURE.js +verify-dfs.js +Symbol.iterator.js +Symbol.toStringTag.js +define-own-property.js +delete-exported-init.js +delete-exported-uninit.js +delete-non-exported.js +enumerate-binding-uninit.js +get-nested-namespace-dflt-skip.js +get-nested-namespace-dflt-skip-named-end_FIXTURE.js +get-nested-namespace-dflt-skip-named_FIXTURE.js +get-nested-namespace-dflt-skip-prod-end_FIXTURE.js +get-nested-namespace-dflt-skip-prod_FIXTURE.js +get-nested-namespace-props-nrml-1_FIXTURE.js +get-nested-namespace-props-nrml-2_FIXTURE.js +get-nested-namespace-props-nrml-3_FIXTURE.js +get-nested-namespace-props-nrml.js +get-own-property-str-found-init.js +get-own-property-str-found-uninit.js +get-own-property-str-not-found.js +get-own-property-sym.js +get-prototype-of.js +get-str-found-init.js +get-str-found-uninit.js +get-str-initialize.js +get-str-not-found.js +get-str-update.js +get-sym-found.js +get-sym-not-found.js +has-property-str-found-init.js +has-property-str-found-uninit.js +has-property-str-not-found.js +has-property-sym-found.js +has-property-sym-not-found.js +is-extensible.js +object-hasOwnProperty-binding-uninit.js +object-keys-binding-uninit.js +object-propertyIsEnumerable-binding-uninit.js +own-property-keys-binding-types_FIXTURE.js +own-property-keys-binding-types.js +own-property-keys-sort.js +prevent-extensions.js +set.js +set-prototype-of.js +set-prototype-of-null.js \ No newline at end of file diff --git a/test262/run_sunspider.py b/test262/run_sunspider.py index 3186621dc8e11a9a112fc031b19375eb17bc5ba1..1e8c42ad2432a8912e47f50f392805d8118de817 100755 --- a/test262/run_sunspider.py +++ b/test262/run_sunspider.py @@ -50,6 +50,9 @@ def parse_args(): required=False, nargs='?', choices=ARK_FRONTEND_LIST, type=str, help="Choose one of them") + parser.add_argument('--module-list', + required=True, + help="module file list") parser.add_argument('--ark-arch', default=DEFAULT_ARK_ARCH, required=False, @@ -135,6 +138,7 @@ class ArkProgram(): self.ark_frontend_tool = ARK_FRONTEND_TOOL self.libs_dir = LIBS_DIR self.ark_frontend = ARK_FRONTEND + self.module_list = [] self.js_file = "" self.arch = ARK_ARCH self.arch_root = "" @@ -152,6 +156,8 @@ class ArkProgram(): if self.args.ark_frontend: self.ark_frontend = self.args.ark_frontend + self.module_list = self.args.module_list.splitlines() + self.js_file = self.args.js_file self.arch = self.args.ark_arch @@ -175,7 +181,7 @@ class ArkProgram(): cmd_args = [frontend_tool, '-c', '-e', 'js', '-o', out_file, '-i', js_file] - if file_name in MODULE_FILES_LIST: + if file_name in self.module_list: cmd_args.insert(mod_opt_index, "-m") retcode = exec_command(cmd_args) diff --git a/test262/run_test262.py b/test262/run_test262.py index baa936b005de6c65aa4250df18e7460f5c527140..1ab65ab0918bc9fea6acb124a0e45590c651cadd 100755 --- a/test262/run_test262.py +++ b/test262/run_test262.py @@ -395,6 +395,9 @@ def get_host_args(args, host_type): libs_dir = DEFAULT_LIBS_DIR ark_frontend = DEFAULT_ARK_FRONTEND ark_arch = DEFAULT_ARK_ARCH + module_list = '' + with open(MODULE_FILES_LIST) as fopen: + module_list = fopen.read() if args.hostArgs: host_args = args.hostArgs @@ -417,6 +420,7 @@ def get_host_args(args, host_type): host_args += f"--ark-frontend-tool={ark_frontend_tool} " host_args += f"--libs-dir={libs_dir} " host_args += f"--ark-frontend={ark_frontend} " + host_args += f"--module-list={module_list}" if args.ark_arch != ark_arch: host_args += f"--ark-arch={args.ark_arch} " diff --git a/test262/skip_tests.json b/test262/skip_tests.json index c99bd2a5a19ee921ab000c78609e59ef170c825e..f5c6b7d2c24398a6cb50a8d49977960dc90c4de5 100755 --- a/test262/skip_tests.json +++ b/test262/skip_tests.json @@ -421,6 +421,7 @@ "language/literals/regexp/S7.8.5_A2.1_T2.js", "language/literals/regexp/S7.8.5_A2.4_T2.js", "language/literals/string/legacy-non-octal-escape-sequence-strict.js", + "language/module-code/export-default-asyncgenerator-declaration-binding.js", "language/statements/break/S12.8_A7.js", "language/statements/const/cptn-value.js", "language/statements/continue/S12.7_A7.js", @@ -970,6 +971,7 @@ "language/expressions/unary-minus/S11.4.7_A3_T5.js", "language/expressions/unary-plus/S11.4.6_A3_T5.js", "language/expressions/unsigned-right-shift/S11.7.3_A3_T1.5.js", + "language/module-code/eval-gtbndng-indirect-update-dflt.js", "language/statements/switch/S12.11_A1_T4.js", "language/statements/switch/S12.11_A1_T4.js", "built-ins/ArrayBuffer/isView/arg-is-typedarray-subclass-instance.js", @@ -1265,7 +1267,7 @@ ] }, { - "reason": "Not support TypedArrayConstructors ecma2021 features", + "reason": "Not support TypedArrayConstructors ecma2020 features", "files": [ "built-ins/TypedArrayConstructors/internals/Set/key-is-minus-zero.js", "built-ins/TypedArrayConstructors/internals/Set/key-is-not-integer.js", @@ -1323,5 +1325,63 @@ "intl402/Intl/getCanonicalLocales/canonicalized-tags.js", "intl402/Intl/getCanonicalLocales/transformed-ext-invalid.js" ] + }, + { + "reason": "Not support with Class's Privatename(#)", + "files": [ + "language/module-code/invalid-private-names-member-expression-bad-reference.js", + "language/module-code/invalid-private-names-member-expression-this.js", + "language/module-code/invalid-private-names-call-expression-bad-reference.js", + "language/module-code/invalid-private-names-call-expression-this.js", + "language/module-code/privatename-valid-no-earlyerr.js", + "language/module-code/privatename-not-valid-earlyerr-module-1.js", + "language/module-code/privatename-not-valid-earlyerr-module-2.js", + "language/module-code/privatename-not-valid-earlyerr-module-3.js", + "language/module-code/privatename-not-valid-earlyerr-module-4.js", + "language/module-code/privatename-not-valid-earlyerr-module-5.js", + "language/module-code/privatename-not-valid-earlyerr-module-6.js", + "language/module-code/privatename-not-valid-earlyerr-module-7.js", + "language/module-code/privatename-not-valid-earlyerr-module-8.js", + "language/module-code/private-identifiers-not-empty.js" + ] + }, + { + "reason": "Special unicode character that tsc can not recognize", + "files" : [ + "language/module-code/export-expname-binding-string.js", + "language/module-code/export-expname-from-binding-string.js", + "language/module-code/export-expname-from-star-string.js", + "language/module-code/export-expname-from-string-binding.js", + "language/module-code/export-expname-from-star.js", + "language/module-code/export-expname-from-string-string.js", + "language/module-code/export-expname-from-string.js", + "language/module-code/export-expname-import-string-binding.js" + ] + }, + { + "reason": "Not support Dynamic Import", + "files": [ + "language/module-code/verify-dfs.js" + ] + }, + { + "reason": "Unused node will be eliminated when tsc emiting in [after], So module won't get correct entries", + "files": [ + "language/module-code/instn-named-err-ambiguous.js", + "language/module-code/instn-named-err-ambiguous-as.js", + "language/module-code/instn-named-err-not-found.js", + "language/module-code/instn-named-err-not-found-as.js", + "language/module-code/instn-named-err-not-found-dflt.js", + "language/module-code/instn-named-err-dflt-thru-star-as.js", + "language/module-code/instn-named-err-dflt-thru-star-dflt.js", + "language/module-code/eval-rqstd-order.js" + ] + }, + { + "reason": "Not support further ecma-2015's feature in module code", + "files": [ + "language/module-code/namespace/internals/define-own-property.js", + "language/module-code/early-dup-export-as-star-as.js" + ] } ] diff --git a/testTs/config.py b/testTs/config.py index d15970083919289f444abb126e201c35900178fe..7a29a4b70f2b76cc2c3cf2b7b268018c3970809a 100644 --- a/testTs/config.py +++ b/testTs/config.py @@ -1,3 +1,23 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- + +""" +Copyright (c) 2022 Huawei Device Co., Ltd. +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + +Description: Use ark to execute test 262 test suite +""" + import os import json TS_GIT_PATH = 'https://gitee.com/zhangrengao1/TypeScript.git' @@ -14,11 +34,9 @@ IMPORT_FILE_PATH = os.path.join("testTs", "import_tests.json") CUR_FILE_DIR = os.path.dirname(__file__) CODE_ROOT = os.path.abspath(os.path.join(CUR_FILE_DIR, "../../..")) ARK_DIR = f"{CODE_ROOT}/out/hi3516dv300/clang_x64/ark/ark" -# ARK_DIR = f"{CODE_ROOT}/out/ohos-arm-release/clang_x64/obj/ark" WORK_PATH = f'{CODE_ROOT}/ark/ts2abc' DEFAULT_ARK_FRONTEND_TOOL = os.path.join(ARK_DIR, "build", "src", "index.js") -# DEFAULT_ARK_FRONTEND_TOOL = os.path.join(ARK_DIR, "ts2abc", "ts2panda", "build", "src", "index.js") TEST_PATH = os.sep.join([".", "testTs", "test"]) OUT_PATH = os.sep.join([".", "out", "testTs"]) @@ -26,7 +44,7 @@ EXPECT_PATH = os.sep.join([".", "testTs", "expect"]) TS_EXT = ".ts" TXT_EXT = ".txt" ABC_EXT = ".abc" -f = open(IMPORT_FILE_PATH,'r') -content = f.read() -f.close() -IMPORT_TEST = json.loads(content) \ No newline at end of file +IMPORT_TEST = "" +with open(IMPORT_FILE_PATH,'r') as f: + content = f.read() + IMPORT_TEST = json.loads(content) diff --git a/testTs/expect/ambient/ambientDeclarationsPatterns/ambientDeclarationsPatterns.txt b/testTs/expect/ambient/ambientDeclarationsPatterns/ambientDeclarationsPatterns.txt index c784a0c9ffcd99ef6fed5eca7b753007a16087ca..e157803d31ee90e49441c99e9de83aa28d4f243c 100644 --- a/testTs/expect/ambient/ambientDeclarationsPatterns/ambientDeclarationsPatterns.txt +++ b/testTs/expect/ambient/ambientDeclarationsPatterns/ambientDeclarationsPatterns.txt @@ -1,4 +1,4 @@ -{'literalBuffer': [{'tag': 2, 'value': 7}, {'tag': 5, 'value': '#foo#foobarbaz'}]} -{'literalBuffer': [{'tag': 2, 'value': 7}, {'tag': 5, 'value': '#baz#foobarbaz'}]} -{'literalBuffer': [{'tag': 2, 'value': 7}, {'tag': 5, 'value': '#foos#foosball'}]} -{'literalBuffer': [{'tag': 2, 'value': 7}, {'tag': 5, 'value': '#fileText#./file!text'}]} +{'lb': [{'t': 2, 'v': 7}, {'t': 5, 'v': '#foo#foobarbaz'}]} +{'lb': [{'t': 2, 'v': 7}, {'t': 5, 'v': '#baz#foobarbaz'}]} +{'lb': [{'t': 2, 'v': 7}, {'t': 5, 'v': '#foos#foosball'}]} +{'lb': [{'t': 2, 'v': 7}, {'t': 5, 'v': '#fileText#./file!text'}]} diff --git a/testTs/expect/ambient/ambientShorthand_merging/ambientShorthand_merging.txt b/testTs/expect/ambient/ambientShorthand_merging/ambientShorthand_merging.txt index b4113561706fb4d9f998db765671f6f5d1a4fb56..8a2d51b8a9b5c76f1a53c562cdb26745049e3c29 100644 --- a/testTs/expect/ambient/ambientShorthand_merging/ambientShorthand_merging.txt +++ b/testTs/expect/ambient/ambientShorthand_merging/ambientShorthand_merging.txt @@ -1,2 +1,2 @@ -{'literalBuffer': [{'tag': 2, 'value': 7}, {'tag': 5, 'value': '#foo#foo'}]} -{'literalBuffer': [{'tag': 2, 'value': 7}, {'tag': 5, 'value': '#bar#foo'}]} +{'lb': [{'t': 2, 'v': 7}, {'t': 5, 'v': '#foo#foo'}]} +{'lb': [{'t': 2, 'v': 7}, {'t': 5, 'v': '#bar#foo'}]} diff --git a/testTs/expect/ambient/ambientShorthand_reExport/ambientShorthand_reExport.txt b/testTs/expect/ambient/ambientShorthand_reExport/ambientShorthand_reExport.txt index 89bf62f5f8d85e2afe0c7a3fd8b62c7345041a32..12aa6b24d9e2b7980bac1b82f716e133ccdad410 100644 --- a/testTs/expect/ambient/ambientShorthand_reExport/ambientShorthand_reExport.txt +++ b/testTs/expect/ambient/ambientShorthand_reExport/ambientShorthand_reExport.txt @@ -1,3 +1,3 @@ -{'literalBuffer': [{'tag': 2,'value': 7},{'tag': 5,'value': '#x#./reExportX'}]} -{'literalBuffer': [{'tag': 2,'value':7},{'tag': 5,'value': '#*#$'}]} -{'literalBuffer': [{'tag': 2,'value': 7},{'tag': 5, 'value': '#x#jquery'}]} \ No newline at end of file +{'lb': [{'t': 2, 'v': 7}, {'t': 5, 'v': '#x#./reExportX'}]} +{'lb': [{'t': 2, 'v': 7}, {'t': 5, 'v': '#*#$'}]} +{'lb': [{'t': 2, 'v': 7}, {'t': 5, 'v': '#x#jquery'}]} diff --git a/testTs/expect/classes/classDeclarations/classAbstractKeyword/classAbstractAsIdentifier.txt b/testTs/expect/classes/classDeclarations/classAbstractKeyword/classAbstractAsIdentifier.txt index 9faa2aa127759e0c1184d78b7104b8d49f1932e4..a9ebf92a0cf75c287f5a4d56c8ee08390d869f41 100644 --- a/testTs/expect/classes/classDeclarations/classAbstractKeyword/classAbstractAsIdentifier.txt +++ b/testTs/expect/classes/classDeclarations/classAbstractKeyword/classAbstractAsIdentifier.txt @@ -1,3 +1,3 @@ -{'literalBuffer': [{'tag': 2, 'value': 1}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 1}, {'tag': 5, 'value': 'foo'}, {'tag': 2, 'value': 52}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} -{'literalBuffer': [{'tag': 2, 'value': 3}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 5, 'value': 'foo'}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} -{'literalBuffer': [{'tag': 2, 'value': 2}, {'tag': 2, 'value': 51}]} +{'lb': [{'t': 2, 'v': 1}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 1}, {'t': 5, 'v': 'foo'}, {'t': 2, 'v': 52}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 3}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 5, 'v': 'foo'}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 2}, {'t': 2, 'v': 51}]} diff --git a/testTs/expect/classes/classDeclarations/classInsideBlock.txt b/testTs/expect/classes/classDeclarations/classInsideBlock.txt index fafcbe003708a10aaec2e1ac676db173c80f6136..4f0366bf97d54adc70ada0c3ba8ccc70e3adb022 100644 --- a/testTs/expect/classes/classDeclarations/classInsideBlock.txt +++ b/testTs/expect/classes/classDeclarations/classInsideBlock.txt @@ -1,3 +1,3 @@ -{'literalBuffer': [{'tag': 2, 'value': 3}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 5, 'value': 'foo'}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} -{'literalBuffer': [{'tag': 2, 'value': 1}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} -{'literalBuffer': [{'tag': 2, 'value': 2}, {'tag': 2, 'value': 52}]} +{'lb': [{'t': 2, 'v': 3}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 5, 'v': 'foo'}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 1}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 2}, {'t': 2, 'v': 52}]} diff --git a/testTs/expect/classes/classDeclarations/classWithSemicolonClassElement1.txt b/testTs/expect/classes/classDeclarations/classWithSemicolonClassElement1.txt index 3db8749b2d4b8b9f5ed263e86f7204630fb89716..a43cb0169d9de518017817ec599068021c993b93 100644 --- a/testTs/expect/classes/classDeclarations/classWithSemicolonClassElement1.txt +++ b/testTs/expect/classes/classDeclarations/classWithSemicolonClassElement1.txt @@ -1,2 +1,2 @@ -{'literalBuffer': [{'tag': 2, 'value': 1}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} -{'literalBuffer': [{'tag': 2, 'value': 2}, {'tag': 2, 'value': 51}]} +{'lb': [{'t': 2, 'v': 1}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 2}, {'t': 2, 'v': 51}]} diff --git a/testTs/expect/classes/classDeclarations/classWithSemicolonClassElement2.txt b/testTs/expect/classes/classDeclarations/classWithSemicolonClassElement2.txt index 3db8749b2d4b8b9f5ed263e86f7204630fb89716..a43cb0169d9de518017817ec599068021c993b93 100644 --- a/testTs/expect/classes/classDeclarations/classWithSemicolonClassElement2.txt +++ b/testTs/expect/classes/classDeclarations/classWithSemicolonClassElement2.txt @@ -1,2 +1,2 @@ -{'literalBuffer': [{'tag': 2, 'value': 1}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} -{'literalBuffer': [{'tag': 2, 'value': 2}, {'tag': 2, 'value': 51}]} +{'lb': [{'t': 2, 'v': 1}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 2}, {'t': 2, 'v': 51}]} diff --git a/testTs/expect/classes/classExpressions/classExpression1.txt b/testTs/expect/classes/classExpressions/classExpression1.txt index 0fc2cd081a08afdc58bb1d256f6ce3f4b5a834c6..9be0d3dd74eb3a517f485255e1c259f139ae2bb7 100644 --- a/testTs/expect/classes/classExpressions/classExpression1.txt +++ b/testTs/expect/classes/classExpressions/classExpression1.txt @@ -1 +1 @@ -{'literalBuffer': [{'tag': 2, 'value': 1}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} +{'lb': [{'t': 2, 'v': 1}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} diff --git a/testTs/expect/classes/classExpressions/classExpression2.txt b/testTs/expect/classes/classExpressions/classExpression2.txt index 59482918997a4570e7e733acfb779eb48837e566..1920376340de88a8cbd265c735ac2c1ad80f4334 100644 --- a/testTs/expect/classes/classExpressions/classExpression2.txt +++ b/testTs/expect/classes/classExpressions/classExpression2.txt @@ -1,3 +1,3 @@ -{'literalBuffer': [{'tag': 2, 'value': 1}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 52}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} -{'literalBuffer': [{'tag': 2, 'value': 1}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} -{'literalBuffer': [{'tag': 2, 'value': 2}, {'tag': 2, 'value': 52}]} \ No newline at end of file +{'lb': [{'t': 2, 'v': 1}, {'t': 2, 'v': 0}, {'t': 2, 'v': 52}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 1}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 2}, {'t': 2, 'v': 52}]} diff --git a/testTs/expect/classes/classExpressions/classExpression3.txt b/testTs/expect/classes/classExpressions/classExpression3.txt index d47d3211d09dd30adc80d1d9e82bcacf4ca6c96b..abba7b484c93118cba5a680164a2f8746f2cc7e6 100644 --- a/testTs/expect/classes/classExpressions/classExpression3.txt +++ b/testTs/expect/classes/classExpressions/classExpression3.txt @@ -1,3 +1,3 @@ -{'literalBuffer': [{'tag': 2, 'value': 1}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 52}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 1}, {'tag': 5, 'value': 'c'}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} -{'literalBuffer': [{'tag': 2, 'value': 1}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 53}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 1}, {'tag': 5, 'value': 'b'}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} -{'literalBuffer': [{'tag': 2, 'value': 1}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 1}, {'tag': 5, 'value': 'a'}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} +{'lb': [{'t': 2, 'v': 1}, {'t': 2, 'v': 0}, {'t': 2, 'v': 52}, {'t': 2, 'v': 0}, {'t': 2, 'v': 1}, {'t': 5, 'v': 'c'}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 1}, {'t': 2, 'v': 0}, {'t': 2, 'v': 53}, {'t': 2, 'v': 0}, {'t': 2, 'v': 1}, {'t': 5, 'v': 'b'}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 1}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 1}, {'t': 5, 'v': 'a'}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} diff --git a/testTs/expect/classes/classExpressions/classExpression4.txt b/testTs/expect/classes/classExpressions/classExpression4.txt index cb484ef9c3477f4378aa0b55de36582b986a9c3c..28f95e02a9fe42e1fa6a04d97b5b075b3a0541f9 100644 --- a/testTs/expect/classes/classExpressions/classExpression4.txt +++ b/testTs/expect/classes/classExpressions/classExpression4.txt @@ -1,2 +1,2 @@ -{'literalBuffer': [{'tag': 2, 'value': 1}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 1}, {'tag': 5, 'value': 'foo'}, {'tag': 2, 'value': 52}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} -{'literalBuffer': [{'tag': 2, 'value': 3}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 5, 'value': 'foo'}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} +{'lb': [{'t': 2, 'v': 1}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 1}, {'t': 5, 'v': 'foo'}, {'t': 2, 'v': 52}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 3}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 5, 'v': 'foo'}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} diff --git a/testTs/expect/classes/classExpressions/modifierOnClassExpressionMemberInFunction.txt b/testTs/expect/classes/classExpressions/modifierOnClassExpressionMemberInFunction.txt index 453db53f71dba8a1767a633a46f4da13b478a8a0..0f365d51d897184f350de8ce6f1007fdb94bd923 100644 --- a/testTs/expect/classes/classExpressions/modifierOnClassExpressionMemberInFunction.txt +++ b/testTs/expect/classes/classExpressions/modifierOnClassExpressionMemberInFunction.txt @@ -1,3 +1,3 @@ -{'literalBuffer': [{'tag': 2, 'value': 3}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 5, 'value': 'g'}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} -{'literalBuffer': [{'tag': 2, 'value': 1}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 1}, {'tag': 5, 'value': 'prop1'}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 1}, {'tag': 5, 'value': 'foo'}, {'tag': 2, 'value': 53}, {'tag': 2, 'value': 1}, {'tag': 5, 'value': 'prop2'}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} -{'literalBuffer': [{'tag': 2, 'value': 3}, {'tag': 2, 'value': 1}, {'tag': 2, 'value': 0}, {'tag': 5, 'value': 'foo'}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} +{'lb': [{'t': 2, 'v': 3}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 5, 'v': 'g'}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 1}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 1}, {'t': 5, 'v': 'prop1'}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 1}, {'t': 5, 'v': 'foo'}, {'t': 2, 'v': 53}, {'t': 2, 'v': 1}, {'t': 5, 'v': 'prop2'}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 3}, {'t': 2, 'v': 1}, {'t': 2, 'v': 0}, {'t': 5, 'v': 'foo'}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} diff --git a/testTs/expect/classes/classStaticBlock/classStaticBlock1.txt b/testTs/expect/classes/classStaticBlock/classStaticBlock1.txt index 3db8749b2d4b8b9f5ed263e86f7204630fb89716..a43cb0169d9de518017817ec599068021c993b93 100644 --- a/testTs/expect/classes/classStaticBlock/classStaticBlock1.txt +++ b/testTs/expect/classes/classStaticBlock/classStaticBlock1.txt @@ -1,2 +1,2 @@ -{'literalBuffer': [{'tag': 2, 'value': 1}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} -{'literalBuffer': [{'tag': 2, 'value': 2}, {'tag': 2, 'value': 51}]} +{'lb': [{'t': 2, 'v': 1}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 2}, {'t': 2, 'v': 51}]} diff --git a/testTs/expect/classes/classStaticBlock/classStaticBlock10.txt b/testTs/expect/classes/classStaticBlock/classStaticBlock10.txt index 40a222fb6b8b3cb47d717a2b8bea2c08cf0bb1fa..dde1a8f6c40278db2245eddddcb1b9bbf4feec11 100644 --- a/testTs/expect/classes/classStaticBlock/classStaticBlock10.txt +++ b/testTs/expect/classes/classStaticBlock/classStaticBlock10.txt @@ -1,5 +1,5 @@ -{'literalBuffer': [{'tag': 2, 'value': 3}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 5, 'value': 'f'}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} -{'literalBuffer': [{'tag': 2, 'value': 1}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} -{'literalBuffer': [{'tag': 2, 'value': 2}, {'tag': 2, 'value': 52}]} -{'literalBuffer': [{'tag': 2, 'value': 1}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} -{'literalBuffer': [{'tag': 2, 'value': 2}, {'tag': 2, 'value': 54}]} +{'lb': [{'t': 2, 'v': 3}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 5, 'v': 'f'}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 1}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 2}, {'t': 2, 'v': 52}]} +{'lb': [{'t': 2, 'v': 1}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 2}, {'t': 2, 'v': 54}]} diff --git a/testTs/expect/classes/classStaticBlock/classStaticBlock21.txt b/testTs/expect/classes/classStaticBlock/classStaticBlock21.txt index 3db8749b2d4b8b9f5ed263e86f7204630fb89716..a43cb0169d9de518017817ec599068021c993b93 100644 --- a/testTs/expect/classes/classStaticBlock/classStaticBlock21.txt +++ b/testTs/expect/classes/classStaticBlock/classStaticBlock21.txt @@ -1,2 +1,2 @@ -{'literalBuffer': [{'tag': 2, 'value': 1}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} -{'literalBuffer': [{'tag': 2, 'value': 2}, {'tag': 2, 'value': 51}]} +{'lb': [{'t': 2, 'v': 1}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 2}, {'t': 2, 'v': 51}]} diff --git a/testTs/expect/classes/constructorDeclarations/constructorParameters/declarationEmitReadonly.txt b/testTs/expect/classes/constructorDeclarations/constructorParameters/declarationEmitReadonly.txt index 032708fb1b037dc5d3566523516b96c053236af7..3513db469e18eddc31a6d7fbef6db51f312251c5 100644 --- a/testTs/expect/classes/constructorDeclarations/constructorParameters/declarationEmitReadonly.txt +++ b/testTs/expect/classes/constructorDeclarations/constructorParameters/declarationEmitReadonly.txt @@ -1,3 +1,3 @@ -{'literalBuffer': [{'tag': 2, 'value': 1}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 1}, {'tag': 5, 'value': 'constructor'}, {'tag': 2, 'value': 52}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} -{'literalBuffer': [{'tag': 2, 'value': 3}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 5, 'value': 'constructor'}, {'tag': 2, 'value': 1}, {'tag': 2, 'value': 1}, {'tag': 2, 'value': 0}]} -{'literalBuffer': [{'tag': 2, 'value': 2}, {'tag': 2, 'value': 51}]} +{'lb': [{'t': 2, 'v': 1}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 1}, {'t': 5, 'v': 'constructor'}, {'t': 2, 'v': 52}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 3}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 5, 'v': 'constructor'}, {'t': 2, 'v': 1}, {'t': 2, 'v': 1}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 2}, {'t': 2, 'v': 51}]} diff --git a/testTs/expect/classes/constructorDeclarations/quotedConstructors.txt b/testTs/expect/classes/constructorDeclarations/quotedConstructors.txt index 482f3a8fcd0ba929b6bfde522c81fc3445e03f57..670696de7a030751760e64547c59be35576471cc 100644 --- a/testTs/expect/classes/constructorDeclarations/quotedConstructors.txt +++ b/testTs/expect/classes/constructorDeclarations/quotedConstructors.txt @@ -1,12 +1,12 @@ -{'literalBuffer': [{'tag': 2, 'value': 1}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 1}, {'tag': 5, 'value': 'constructor'}, {'tag': 2, 'value': 52}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} -{'literalBuffer': [{'tag': 2, 'value': 3}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 5, 'value': 'constructor'}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} -{'literalBuffer': [{'tag': 2, 'value': 2}, {'tag': 2, 'value': 51}]} -{'literalBuffer': [{'tag': 2, 'value': 1}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 1}, {'tag': 5, 'value': 'constructor'}, {'tag': 2, 'value': 55}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} -{'literalBuffer': [{'tag': 2, 'value': 3}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 5, 'value': 'constructor'}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} -{'literalBuffer': [{'tag': 2, 'value': 2}, {'tag': 2, 'value': 54}]} -{'literalBuffer': [{'tag': 2, 'value': 1}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 1}, {'tag': 5}, {'tag': 2, 'value': 58}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} -{'literalBuffer': [{'tag': 2, 'value': 3}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 5}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} -{'literalBuffer': [{'tag': 2, 'value': 2}, {'tag': 2, 'value': 57}]} -{'literalBuffer': [{'tag': 2, 'value': 1}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 1}, {'tag': 5, 'value': 'constructor'}, {'tag': 2, 'value': 61}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} -{'literalBuffer': [{'tag': 2, 'value': 3}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 5, 'value': 'constructor'}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} -{'literalBuffer': [{'tag': 2, 'value': 2}, {'tag': 2, 'value': 60}]} +{'lb': [{'t': 2, 'v': 1}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 1}, {'t': 5, 'v': 'constructor'}, {'t': 2, 'v': 52}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 3}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 5, 'v': 'constructor'}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 2}, {'t': 2, 'v': 51}]} +{'lb': [{'t': 2, 'v': 1}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 1}, {'t': 5, 'v': 'constructor'}, {'t': 2, 'v': 55}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 3}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 5, 'v': 'constructor'}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 2}, {'t': 2, 'v': 54}]} +{'lb': [{'t': 2, 'v': 1}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 1}, {'t': 5}, {'t': 2, 'v': 58}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 3}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 5}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 2}, {'t': 2, 'v': 57}]} +{'lb': [{'t': 2, 'v': 1}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 1}, {'t': 5, 'v': 'constructor'}, {'t': 2, 'v': 61}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 3}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 5, 'v': 'constructor'}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 2}, {'t': 2, 'v': 60}]} diff --git a/testTs/expect/classes/members/inheritanceAndOverriding/derivedClassOverridesIndexersWithAssignmentCompatibility.txt b/testTs/expect/classes/members/inheritanceAndOverriding/derivedClassOverridesIndexersWithAssignmentCompatibility.txt index 1de15e6e53e05c0aa9c78c5f48c0608df34fb49b..b76bdc801115b09f87ab6d7ea5258019b105e559 100644 --- a/testTs/expect/classes/members/inheritanceAndOverriding/derivedClassOverridesIndexersWithAssignmentCompatibility.txt +++ b/testTs/expect/classes/members/inheritanceAndOverriding/derivedClassOverridesIndexersWithAssignmentCompatibility.txt @@ -1,6 +1,6 @@ -{'literalBuffer': [{'tag': 2, 'value': 1}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 52}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} -{'literalBuffer': [{'tag': 2, 'value': 1}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} -{'literalBuffer': [{'tag': 2, 'value': 2}, {'tag': 2, 'value': 51}]} -{'literalBuffer': [{'tag': 2, 'value': 1}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 55}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} -{'literalBuffer': [{'tag': 2, 'value': 1}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} -{'literalBuffer': [{'tag': 2, 'value': 2}, {'tag': 2, 'value': 54}]} +{'lb': [{'t': 2, 'v': 1}, {'t': 2, 'v': 0}, {'t': 2, 'v': 52}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 1}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 2}, {'t': 2, 'v': 51}]} +{'lb': [{'t': 2, 'v': 1}, {'t': 2, 'v': 0}, {'t': 2, 'v': 55}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 1}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 2}, {'t': 2, 'v': 54}]} diff --git a/testTs/expect/classes/members/instanceAndStaticMembers/typeOfThisInStaticMembers.txt b/testTs/expect/classes/members/instanceAndStaticMembers/typeOfThisInStaticMembers.txt index 648bcad70c48b96a5b8feb3e8d83d97bf81be98b..5f5f31626516b7c634eb4f4989b92b681354495b 100644 --- a/testTs/expect/classes/members/instanceAndStaticMembers/typeOfThisInStaticMembers.txt +++ b/testTs/expect/classes/members/instanceAndStaticMembers/typeOfThisInStaticMembers.txt @@ -1,8 +1,8 @@ -{'literalBuffer': [{'tag': 2, 'value': 1}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 1}, {'tag': 5, 'value': 'constructor'}, {'tag': 2, 'value': 52}, {'tag': 2, 'value': 1}, {'tag': 5, 'value': 'foo'}, {'tag': 2, 'value': 1}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 1}, {'tag': 5, 'value': 'bar'}, {'tag': 2, 'value': 53}]} -{'literalBuffer': [{'tag': 2, 'value': 3}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 5, 'value': 'constructor'}, {'tag': 2, 'value': 1}, {'tag': 2, 'value': 1}, {'tag': 2, 'value': 0}]} -{'literalBuffer': [{'tag': 2, 'value': 3}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 1}, {'tag': 5, 'value': 'bar'}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} -{'literalBuffer': [{'tag': 2, 'value': 2}, {'tag': 2, 'value': 51}]} -{'literalBuffer': [{'tag': 2, 'value': 1}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 1}, {'tag': 5, 'value': 'constructor'}, {'tag': 2, 'value': 56}, {'tag': 2, 'value': 2}, {'tag': 5, 'value': 'test'}, {'tag': 2, 'value': 1}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 5, 'value': 'foo'}, {'tag': 2, 'value': 4}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 1}, {'tag': 5, 'value': 'bar'}, {'tag': 2, 'value': 57}]} -{'literalBuffer': [{'tag': 2, 'value': 3}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 5, 'value': 'constructor'}, {'tag': 2, 'value': 1}, {'tag': 2, 'value': 4}, {'tag': 2, 'value': 0}]} -{'literalBuffer': [{'tag': 2, 'value': 3}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 1}, {'tag': 5, 'value': 'bar'}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} -{'literalBuffer': [{'tag': 2, 'value': 2}, {'tag': 2, 'value': 55}]} +{'lb': [{'t': 2, 'v': 1}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 1}, {'t': 5, 'v': 'constructor'}, {'t': 2, 'v': 52}, {'t': 2, 'v': 1}, {'t': 5, 'v': 'foo'}, {'t': 2, 'v': 1}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 1}, {'t': 5, 'v': 'bar'}, {'t': 2, 'v': 53}]} +{'lb': [{'t': 2, 'v': 3}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 5, 'v': 'constructor'}, {'t': 2, 'v': 1}, {'t': 2, 'v': 1}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 3}, {'t': 2, 'v': 0}, {'t': 2, 'v': 1}, {'t': 5, 'v': 'bar'}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 2}, {'t': 2, 'v': 51}]} +{'lb': [{'t': 2, 'v': 1}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 1}, {'t': 5, 'v': 'constructor'}, {'t': 2, 'v': 56}, {'t': 2, 'v': 2}, {'t': 5, 'v': 'test'}, {'t': 2, 'v': 1}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 5, 'v': 'foo'}, {'t': 2, 'v': 4}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 1}, {'t': 5, 'v': 'bar'}, {'t': 2, 'v': 57}]} +{'lb': [{'t': 2, 'v': 3}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 5, 'v': 'constructor'}, {'t': 2, 'v': 1}, {'t': 2, 'v': 4}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 3}, {'t': 2, 'v': 0}, {'t': 2, 'v': 1}, {'t': 5, 'v': 'bar'}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 2}, {'t': 2, 'v': 55}]} diff --git a/testTs/expect/classes/propertyMemberDeclarations/memberFunctionDeclarations/staticFactory1.txt b/testTs/expect/classes/propertyMemberDeclarations/memberFunctionDeclarations/staticFactory1.txt index fe26f60751ee1b0f3953aa7638c77b951b2928d9..b76b4069c5520d783ac0601022bccf29ef6563d9 100644 --- a/testTs/expect/classes/propertyMemberDeclarations/memberFunctionDeclarations/staticFactory1.txt +++ b/testTs/expect/classes/propertyMemberDeclarations/memberFunctionDeclarations/staticFactory1.txt @@ -1,6 +1,6 @@ -{'literalBuffer': [{'tag': 2, 'value': 1}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 52}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 1}, {'tag': 5, 'value': 'foo'}, {'tag': 2, 'value': 55}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} -{'literalBuffer': [{'tag': 2, 'value': 1}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 1}, {'tag': 5, 'value': 'foo'}, {'tag': 2, 'value': 53}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 1}, {'tag': 5, 'value': 'create'}, {'tag': 2, 'value': 54}]} -{'literalBuffer': [{'tag': 2, 'value': 3}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 5, 'value': 'foo'}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} -{'literalBuffer': [{'tag': 2, 'value': 3}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 1}, {'tag': 5, 'value': 'create'}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} -{'literalBuffer': [{'tag': 2, 'value': 3}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 5, 'value': 'foo'}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} -{'literalBuffer': [{'tag': 2, 'value': 2}, {'tag': 2, 'value': 51}]} +{'lb': [{'t': 2, 'v': 1}, {'t': 2, 'v': 0}, {'t': 2, 'v': 52}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 1}, {'t': 5, 'v': 'foo'}, {'t': 2, 'v': 55}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 1}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 1}, {'t': 5, 'v': 'foo'}, {'t': 2, 'v': 53}, {'t': 2, 'v': 0}, {'t': 2, 'v': 1}, {'t': 5, 'v': 'create'}, {'t': 2, 'v': 54}]} +{'lb': [{'t': 2, 'v': 3}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 5, 'v': 'foo'}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 3}, {'t': 2, 'v': 0}, {'t': 2, 'v': 1}, {'t': 5, 'v': 'create'}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 3}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 5, 'v': 'foo'}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 2}, {'t': 2, 'v': 51}]} diff --git a/testTs/expect/classes/propertyMemberDeclarations/staticAndNonStaticPropertiesSameName.txt b/testTs/expect/classes/propertyMemberDeclarations/staticAndNonStaticPropertiesSameName.txt index 2ae6b94b622d562a50f04f1ffa49565545d22243..7c3d58e72e26a69a823d60a6a95ce829bdf616c9 100644 --- a/testTs/expect/classes/propertyMemberDeclarations/staticAndNonStaticPropertiesSameName.txt +++ b/testTs/expect/classes/propertyMemberDeclarations/staticAndNonStaticPropertiesSameName.txt @@ -1,4 +1,4 @@ -{'literalBuffer': [{'tag': 2, 'value': 1}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 1}, {'tag': 5, 'value': 'x'}, {'tag': 2, 'value': 1}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 1}, {'tag': 5, 'value': 'f'}, {'tag': 2, 'value': 52}, {'tag': 2, 'value': 1}, {'tag': 5, 'value': 'x'}, {'tag': 2, 'value': 1}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 1}, {'tag': 5, 'value': 'f'}, {'tag': 2, 'value': 53}]} -{'literalBuffer': [{'tag': 2, 'value': 3}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 5, 'value': 'f'}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} -{'literalBuffer': [{'tag': 2, 'value': 3}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 1}, {'tag': 5, 'value': 'f'}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} -{'literalBuffer': [{'tag': 2, 'value': 2}, {'tag': 2, 'value': 51}]} +{'lb': [{'t': 2, 'v': 1}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 1}, {'t': 5, 'v': 'x'}, {'t': 2, 'v': 1}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 1}, {'t': 5, 'v': 'f'}, {'t': 2, 'v': 52}, {'t': 2, 'v': 1}, {'t': 5, 'v': 'x'}, {'t': 2, 'v': 1}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 1}, {'t': 5, 'v': 'f'}, {'t': 2, 'v': 53}]} +{'lb': [{'t': 2, 'v': 3}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 5, 'v': 'f'}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 3}, {'t': 2, 'v': 0}, {'t': 2, 'v': 1}, {'t': 5, 'v': 'f'}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 2}, {'t': 2, 'v': 51}]} diff --git a/testTs/expect/classes/propertyMemberDeclarations/staticPropertyAndFunctionWithSameName.txt b/testTs/expect/classes/propertyMemberDeclarations/staticPropertyAndFunctionWithSameName.txt index d76df635851311e3316e157054c8da550612c127..225715254e6ab2f3c7a7c119293235942d53a819 100644 --- a/testTs/expect/classes/propertyMemberDeclarations/staticPropertyAndFunctionWithSameName.txt +++ b/testTs/expect/classes/propertyMemberDeclarations/staticPropertyAndFunctionWithSameName.txt @@ -1,5 +1,5 @@ -{'literalBuffer': [{'tag': 2, 'value': 1}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 1}, {'tag': 5, 'value': 'f'}, {'tag': 2, 'value': 1}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 1}, {'tag': 5, 'value': 'f'}, {'tag': 2, 'value': 1}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} -{'literalBuffer': [{'tag': 2, 'value': 2}, {'tag': 2, 'value': 51}]} -{'literalBuffer': [{'tag': 2, 'value': 1}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 1}, {'tag': 5, 'value': 'f'}, {'tag': 2, 'value': 54}, {'tag': 2, 'value': 1}, {'tag': 5, 'value': 'f'}, {'tag': 2, 'value': 1}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} -{'literalBuffer': [{'tag': 2, 'value': 3}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 5, 'value': 'f'}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} -{'literalBuffer': [{'tag': 2, 'value': 2}, {'tag': 2, 'value': 53}]} +{'lb': [{'t': 2, 'v': 1}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 1}, {'t': 5, 'v': 'f'}, {'t': 2, 'v': 1}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 1}, {'t': 5, 'v': 'f'}, {'t': 2, 'v': 1}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 2}, {'t': 2, 'v': 51}]} +{'lb': [{'t': 2, 'v': 1}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 1}, {'t': 5, 'v': 'f'}, {'t': 2, 'v': 54}, {'t': 2, 'v': 1}, {'t': 5, 'v': 'f'}, {'t': 2, 'v': 1}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 3}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 5, 'v': 'f'}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 2}, {'t': 2, 'v': 53}]} diff --git a/testTs/expect/classes/propertyMemberDeclarations/staticPropertyNameConflictsInAmbientContext.txt b/testTs/expect/classes/propertyMemberDeclarations/staticPropertyNameConflictsInAmbientContext.txt index 95234de5dd423537cd97110546b59174bbec5ba9..2a24622c4fa9456c21df10742f79b2a36bf032a0 100644 --- a/testTs/expect/classes/propertyMemberDeclarations/staticPropertyNameConflictsInAmbientContext.txt +++ b/testTs/expect/classes/propertyMemberDeclarations/staticPropertyNameConflictsInAmbientContext.txt @@ -1,29 +1,29 @@ -{'literalBuffer': [{'tag': 2, 'value': 1}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 1}, {'tag': 5, 'value': 'name'}, {'tag': 2, 'value': 4}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 1}, {'tag': 5, 'value': 'name'}, {'tag': 2, 'value': 1}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} -{'literalBuffer': [{'tag': 2, 'value': 2}, {'tag': 2, 'value': 51}]} -{'literalBuffer': [{'tag': 2, 'value': 1}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 1}, {'tag': 5, 'value': 'name'}, {'tag': 2, 'value': 55}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 1}, {'tag': 5, 'value': 'name'}, {'tag': 2, 'value': 54}]} -{'literalBuffer': [{'tag': 2, 'value': 3}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 1}, {'tag': 5, 'value': 'name'}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 4}]} -{'literalBuffer': [{'tag': 2, 'value': 3}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 5, 'value': 'name'}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 4}]} -{'literalBuffer': [{'tag': 2, 'value': 2}, {'tag': 2, 'value': 53}]} -{'literalBuffer': [{'tag': 2, 'value': 1}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 1}, {'tag': 5, 'value': 'length'}, {'tag': 2, 'value': 4}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 1}, {'tag': 5, 'value': 'length'}, {'tag': 2, 'value': 1}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} -{'literalBuffer': [{'tag': 2, 'value': 2}, {'tag': 2, 'value': 57}]} -{'literalBuffer': [{'tag': 2, 'value': 1}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 1}, {'tag': 5, 'value': 'length'}, {'tag': 2, 'value': 61}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 1}, {'tag': 5, 'value': 'length'}, {'tag': 2, 'value': 60}]} -{'literalBuffer': [{'tag': 2, 'value': 3}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 1}, {'tag': 5, 'value': 'length'}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 1}]} -{'literalBuffer': [{'tag': 2, 'value': 3}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 5, 'value': 'length'}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 1}]} -{'literalBuffer': [{'tag': 2, 'value': 2}, {'tag': 2, 'value': 59}]} -{'literalBuffer': [{'tag': 2, 'value': 1}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 1}, {'tag': 5, 'value': 'prototype'}, {'tag': 2, 'value': 4}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 1}, {'tag': 5, 'value': 'prototype'}, {'tag': 2, 'value': 1}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} -{'literalBuffer': [{'tag': 2, 'value': 2}, {'tag': 2, 'value': 63}]} -{'literalBuffer': [{'tag': 2, 'value': 1}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 1}, {'tag': 5, 'value': 'prototype'}, {'tag': 2, 'value': 66}, {'tag': 2, 'value': 1}, {'tag': 5, 'value': 'prototype'}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} -{'literalBuffer': [{'tag': 2, 'value': 3}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 5, 'value': 'prototype'}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} -{'literalBuffer': [{'tag': 2, 'value': 2}, {'tag': 2, 'value': 65}]} -{'literalBuffer': [{'tag': 2, 'value': 1}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 1}, {'tag': 5, 'value': 'caller'}, {'tag': 2, 'value': 4}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 1}, {'tag': 5, 'value': 'caller'}, {'tag': 2, 'value': 1}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} -{'literalBuffer': [{'tag': 2, 'value': 2}, {'tag': 2, 'value': 68}]} -{'literalBuffer': [{'tag': 2, 'value': 1}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 1}, {'tag': 5, 'value': 'caller'}, {'tag': 2, 'value': 72}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 1}, {'tag': 5, 'value': 'caller'}, {'tag': 2, 'value': 71}]} -{'literalBuffer': [{'tag': 2, 'value': 3}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 1}, {'tag': 5, 'value': 'caller'}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} -{'literalBuffer': [{'tag': 2, 'value': 3}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 5, 'value': 'caller'}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} -{'literalBuffer': [{'tag': 2, 'value': 2}, {'tag': 2, 'value': 70}]} -{'literalBuffer': [{'tag': 2, 'value': 1}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 1}, {'tag': 5, 'value': 'arguments'}, {'tag': 2, 'value': 4}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 1}, {'tag': 5, 'value': 'arguments'}, {'tag': 2, 'value': 1}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} -{'literalBuffer': [{'tag': 2, 'value': 2}, {'tag': 2, 'value': 74}]} -{'literalBuffer': [{'tag': 2, 'value': 1}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 1}, {'tag': 5, 'value': 'arguments'}, {'tag': 2, 'value': 78}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 1}, {'tag': 5, 'value': 'arguments'}, {'tag': 2, 'value': 77}]} -{'literalBuffer': [{'tag': 2, 'value': 3}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 1}, {'tag': 5, 'value': 'arguments'}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} -{'literalBuffer': [{'tag': 2, 'value': 3}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 5, 'value': 'arguments'}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} -{'literalBuffer': [{'tag': 2, 'value': 2}, {'tag': 2, 'value': 76}]} +{'lb': [{'t': 2, 'v': 1}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 1}, {'t': 5, 'v': 'name'}, {'t': 2, 'v': 4}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 1}, {'t': 5, 'v': 'name'}, {'t': 2, 'v': 1}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 2}, {'t': 2, 'v': 51}]} +{'lb': [{'t': 2, 'v': 1}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 1}, {'t': 5, 'v': 'name'}, {'t': 2, 'v': 55}, {'t': 2, 'v': 0}, {'t': 2, 'v': 1}, {'t': 5, 'v': 'name'}, {'t': 2, 'v': 54}]} +{'lb': [{'t': 2, 'v': 3}, {'t': 2, 'v': 0}, {'t': 2, 'v': 1}, {'t': 5, 'v': 'name'}, {'t': 2, 'v': 0}, {'t': 2, 'v': 4}]} +{'lb': [{'t': 2, 'v': 3}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 5, 'v': 'name'}, {'t': 2, 'v': 0}, {'t': 2, 'v': 4}]} +{'lb': [{'t': 2, 'v': 2}, {'t': 2, 'v': 53}]} +{'lb': [{'t': 2, 'v': 1}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 1}, {'t': 5, 'v': 'length'}, {'t': 2, 'v': 4}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 1}, {'t': 5, 'v': 'length'}, {'t': 2, 'v': 1}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 2}, {'t': 2, 'v': 57}]} +{'lb': [{'t': 2, 'v': 1}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 1}, {'t': 5, 'v': 'length'}, {'t': 2, 'v': 61}, {'t': 2, 'v': 0}, {'t': 2, 'v': 1}, {'t': 5, 'v': 'length'}, {'t': 2, 'v': 60}]} +{'lb': [{'t': 2, 'v': 3}, {'t': 2, 'v': 0}, {'t': 2, 'v': 1}, {'t': 5, 'v': 'length'}, {'t': 2, 'v': 0}, {'t': 2, 'v': 1}]} +{'lb': [{'t': 2, 'v': 3}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 5, 'v': 'length'}, {'t': 2, 'v': 0}, {'t': 2, 'v': 1}]} +{'lb': [{'t': 2, 'v': 2}, {'t': 2, 'v': 59}]} +{'lb': [{'t': 2, 'v': 1}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 1}, {'t': 5, 'v': 'prototype'}, {'t': 2, 'v': 4}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 1}, {'t': 5, 'v': 'prototype'}, {'t': 2, 'v': 1}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 2}, {'t': 2, 'v': 63}]} +{'lb': [{'t': 2, 'v': 1}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 1}, {'t': 5, 'v': 'prototype'}, {'t': 2, 'v': 66}, {'t': 2, 'v': 1}, {'t': 5, 'v': 'prototype'}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 3}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 5, 'v': 'prototype'}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 2}, {'t': 2, 'v': 65}]} +{'lb': [{'t': 2, 'v': 1}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 1}, {'t': 5, 'v': 'caller'}, {'t': 2, 'v': 4}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 1}, {'t': 5, 'v': 'caller'}, {'t': 2, 'v': 1}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 2}, {'t': 2, 'v': 68}]} +{'lb': [{'t': 2, 'v': 1}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 1}, {'t': 5, 'v': 'caller'}, {'t': 2, 'v': 72}, {'t': 2, 'v': 0}, {'t': 2, 'v': 1}, {'t': 5, 'v': 'caller'}, {'t': 2, 'v': 71}]} +{'lb': [{'t': 2, 'v': 3}, {'t': 2, 'v': 0}, {'t': 2, 'v': 1}, {'t': 5, 'v': 'caller'}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 3}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 5, 'v': 'caller'}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 2}, {'t': 2, 'v': 70}]} +{'lb': [{'t': 2, 'v': 1}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 1}, {'t': 5, 'v': 'arguments'}, {'t': 2, 'v': 4}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 1}, {'t': 5, 'v': 'arguments'}, {'t': 2, 'v': 1}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 2}, {'t': 2, 'v': 74}]} +{'lb': [{'t': 2, 'v': 1}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 1}, {'t': 5, 'v': 'arguments'}, {'t': 2, 'v': 78}, {'t': 2, 'v': 0}, {'t': 2, 'v': 1}, {'t': 5, 'v': 'arguments'}, {'t': 2, 'v': 77}]} +{'lb': [{'t': 2, 'v': 3}, {'t': 2, 'v': 0}, {'t': 2, 'v': 1}, {'t': 5, 'v': 'arguments'}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 3}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 5, 'v': 'arguments'}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 2}, {'t': 2, 'v': 76}]} diff --git a/testTs/expect/constEnums/constEnum3.txt b/testTs/expect/constEnums/constEnum3.txt index aa89f04ef4694331272d340b1c46329af8ee54cb..a478b5b814a13f0810744d7ae58b4c79f170af43 100644 --- a/testTs/expect/constEnums/constEnum3.txt +++ b/testTs/expect/constEnums/constEnum3.txt @@ -1,2 +1,2 @@ -{'literalBuffer': [{'tag': 2, 'value': 3}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 5, 'value': 'f1'}, {'tag': 2, 'value': 1}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} -{'literalBuffer': [{'tag': 2, 'value': 3}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 5, 'value': 'f2'}, {'tag': 2, 'value': 1}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} +{'lb': [{'t': 2, 'v': 3}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 5, 'v': 'f1'}, {'t': 2, 'v': 1}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 3}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 5, 'v': 'f2'}, {'t': 2, 'v': 1}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} diff --git a/testTs/expect/controlFlow/controlFlowSuperPropertyAccess.txt b/testTs/expect/controlFlow/controlFlowSuperPropertyAccess.txt index b51351d0bf71f40dbf1174c236ce7af6c923dc08..b4445c8d09ef6148e6a160eb739e544bcff86955 100644 --- a/testTs/expect/controlFlow/controlFlowSuperPropertyAccess.txt +++ b/testTs/expect/controlFlow/controlFlowSuperPropertyAccess.txt @@ -1,5 +1,5 @@ -{'literalBuffer': [{'tag': 2, 'value': 1}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 52}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 1}, {'tag': 5, 'value': 'body'}, {'tag': 2, 'value': 54}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} -{'literalBuffer': [{'tag': 2, 'value': 1}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 1}, {'tag': 5, 'value': 'm'}, {'tag': 2, 'value': 53}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} -{'literalBuffer': [{'tag': 2, 'value': 3}, {'tag': 2, 'value': 2}, {'tag': 2, 'value': 0}, {'tag': 5, 'value': 'm'}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 3}]} -{'literalBuffer': [{'tag': 2, 'value': 3}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 5, 'value': 'body'}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} -{'literalBuffer': [{'tag': 2, 'value': 2}, {'tag': 2, 'value': 51}]} +{'lb': [{'t': 2, 'v': 1}, {'t': 2, 'v': 0}, {'t': 2, 'v': 52}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 1}, {'t': 5, 'v': 'body'}, {'t': 2, 'v': 54}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 1}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 1}, {'t': 5, 'v': 'm'}, {'t': 2, 'v': 53}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 3}, {'t': 2, 'v': 2}, {'t': 2, 'v': 0}, {'t': 5, 'v': 'm'}, {'t': 2, 'v': 0}, {'t': 2, 'v': 3}]} +{'lb': [{'t': 2, 'v': 3}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 5, 'v': 'body'}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 2}, {'t': 2, 'v': 51}]} diff --git a/testTs/expect/controlFlow/switchWithConstrainedTypeVariable.txt b/testTs/expect/controlFlow/switchWithConstrainedTypeVariable.txt index 895aabdd2bddbdc1ad5dbfdae3d2adf0fee7f695..56d2980426437c9b40ba43c306998c20f65fa0ec 100644 --- a/testTs/expect/controlFlow/switchWithConstrainedTypeVariable.txt +++ b/testTs/expect/controlFlow/switchWithConstrainedTypeVariable.txt @@ -1 +1 @@ -{'literalBuffer': [{'tag': 2, 'value': 3}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 5, 'value': 'function1'}, {'tag': 2, 'value': 1}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} +{'lb': [{'t': 2, 'v': 3}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 5, 'v': 'function1'}, {'t': 2, 'v': 1}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} diff --git a/testTs/expect/controlFlow/typeGuardsTypeParameters.txt b/testTs/expect/controlFlow/typeGuardsTypeParameters.txt index 09cd677883a40af403b06810606dc29afc1812d2..f4d1b3a08d521b909d9a943088815a843a41546b 100644 --- a/testTs/expect/controlFlow/typeGuardsTypeParameters.txt +++ b/testTs/expect/controlFlow/typeGuardsTypeParameters.txt @@ -1,6 +1,6 @@ -{'literalBuffer': [{'tag': 2, 'value': 3}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 5, 'value': 'f1'}, {'tag': 2, 'value': 1}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} -{'literalBuffer': [{'tag': 2, 'value': 1}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 1}, {'tag': 5, 'value': 'prop'}, {'tag': 2, 'value': 4}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} -{'literalBuffer': [{'tag': 2, 'value': 2}, {'tag': 2, 'value': 52}]} -{'literalBuffer': [{'tag': 2, 'value': 3}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 5, 'value': 'f2'}, {'tag': 2, 'value': 1}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} -{'literalBuffer': [{'tag': 2, 'value': 3}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 5, 'value': 'fun'}, {'tag': 2, 'value': 1}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} -{'literalBuffer': [{'tag': 2, 'value': 5}, {'tag': 2, 'value': 4}]} +{'lb': [{'t': 2, 'v': 3}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 5, 'v': 'f1'}, {'t': 2, 'v': 1}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 1}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 1}, {'t': 5, 'v': 'prop'}, {'t': 2, 'v': 4}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 2}, {'t': 2, 'v': 52}]} +{'lb': [{'t': 2, 'v': 3}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 5, 'v': 'f2'}, {'t': 2, 'v': 1}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 3}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 5, 'v': 'fun'}, {'t': 2, 'v': 1}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 5}, {'t': 2, 'v': 4}]} diff --git a/testTs/expect/declarationEmit/declarationEmitWorkWithInlineComments.txt b/testTs/expect/declarationEmit/declarationEmitWorkWithInlineComments.txt index 8687a5ec63bab31a8de4571d05da3e71a08b1abb..75e6ef3e689172471e1d15795c27e1963985b185 100644 --- a/testTs/expect/declarationEmit/declarationEmitWorkWithInlineComments.txt +++ b/testTs/expect/declarationEmit/declarationEmitWorkWithInlineComments.txt @@ -1,6 +1,6 @@ -{'literalBuffer': [{'tag': 2, 'value': 1}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 1}, {'tag': 5, 'value': 'constructor'}, {'tag': 2, 'value': 52}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} -{'literalBuffer': [{'tag': 2, 'value': 3}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 5, 'value': 'constructor'}, {'tag': 2, 'value': 10}, {'tag': 2, 'value': 4}, {'tag': 2, 'value': 4}, {'tag': 2, 'value': 4}, {'tag': 2, 'value': 4}, {'tag': 2, 'value': 4}, {'tag': 2, 'value': 4}, {'tag': 2, 'value': 4}, {'tag': 2, 'value': 4}, {'tag': 2, 'value': 4}, {'tag': 2, 'value': 4}, {'tag': 2, 'value': 0}]} -{'literalBuffer': [{'tag': 2, 'value': 1}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 1}, {'tag': 5, 'value': 'constructor'}, {'tag': 2, 'value': 54}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} -{'literalBuffer': [{'tag': 2, 'value': 3}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 5, 'value': 'constructor'}, {'tag': 2, 'value': 1}, {'tag': 2, 'value': 4}, {'tag': 2, 'value': 0}]} -{'literalBuffer': [{'tag': 2, 'value': 1}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 1}, {'tag': 5, 'value': 'constructor'}, {'tag': 2, 'value': 56}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} -{'literalBuffer': [{'tag': 2, 'value': 3}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 5, 'value': 'constructor'}, {'tag': 2, 'value': 1}, {'tag': 2, 'value': 4}, {'tag': 2, 'value': 0}]} +{'lb': [{'t': 2, 'v': 1}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 1}, {'t': 5, 'v': 'constructor'}, {'t': 2, 'v': 52}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 3}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 5, 'v': 'constructor'}, {'t': 2, 'v': 10}, {'t': 2, 'v': 4}, {'t': 2, 'v': 4}, {'t': 2, 'v': 4}, {'t': 2, 'v': 4}, {'t': 2, 'v': 4}, {'t': 2, 'v': 4}, {'t': 2, 'v': 4}, {'t': 2, 'v': 4}, {'t': 2, 'v': 4}, {'t': 2, 'v': 4}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 1}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 1}, {'t': 5, 'v': 'constructor'}, {'t': 2, 'v': 54}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 3}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 5, 'v': 'constructor'}, {'t': 2, 'v': 1}, {'t': 2, 'v': 4}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 1}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 1}, {'t': 5, 'v': 'constructor'}, {'t': 2, 'v': 56}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 3}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 5, 'v': 'constructor'}, {'t': 2, 'v': 1}, {'t': 2, 'v': 4}, {'t': 2, 'v': 0}]} diff --git a/testTs/expect/declarationEmit/exportDefaultNamespace.txt b/testTs/expect/declarationEmit/exportDefaultNamespace.txt index 0d6ce24e7c8eaf1e205c7f03fb78fd60117e3ea0..c7affdbfdcc39f20dbd100aca0de60099bd9ed6a 100644 --- a/testTs/expect/declarationEmit/exportDefaultNamespace.txt +++ b/testTs/expect/declarationEmit/exportDefaultNamespace.txt @@ -1 +1 @@ -{'literalBuffer': [{'tag': 2, 'value': 3}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 5, 'value': 'someFunc'}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} +{'lb': [{'t': 2, 'v': 3}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 5, 'v': 'someFunc'}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} diff --git a/testTs/expect/declarationEmit/typeReferenceRelatedFiles/typeReferenceRelatedFiles.txt b/testTs/expect/declarationEmit/typeReferenceRelatedFiles/typeReferenceRelatedFiles.txt index 807c6f85f6f3abc01e0171a6b7be229032a9d362..c1d849899a464b687101fa0499abf423277019d5 100644 --- a/testTs/expect/declarationEmit/typeReferenceRelatedFiles/typeReferenceRelatedFiles.txt +++ b/testTs/expect/declarationEmit/typeReferenceRelatedFiles/typeReferenceRelatedFiles.txt @@ -1,2 +1,2 @@ -{'literalBuffer': [{'tag': 2,'value': 7},{'tag': 5,'value': '#FSWatcher#fs'}]} -{'literalBuffer': [{ 'tag': 2, 'value': 3},{ 'tag': 2, 'value': 0},{ 'tag': 2, 'value': 0},{ 'tag': 5, 'value': 'f'},{ 'tag': 2, 'value': 0},{ 'tag': 2, 'value': 0}]} \ No newline at end of file +{'lb': [{'t': 2, 'v': 7}, {'t': 5, 'v': '#FSWatcher#fs'}]} +{'lb': [{'t': 2, 'v': 3}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 5, 'v': 'f'}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} diff --git a/testTs/expect/es6/destructuring/destructuringObjectBindingPatternAndAssignment5.txt b/testTs/expect/es6/destructuring/destructuringObjectBindingPatternAndAssignment5.txt index 939ce3772045d863becb1923ff3b6a9aa60ca82d..b423883092017e8dc46cd76a7cce6139ebb1c590 100644 --- a/testTs/expect/es6/destructuring/destructuringObjectBindingPatternAndAssignment5.txt +++ b/testTs/expect/es6/destructuring/destructuringObjectBindingPatternAndAssignment5.txt @@ -1 +1 @@ -{'literalBuffer': [{'tag': 2, 'value': 3}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 5, 'value': 'a'}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} +{'lb': [{'t': 2, 'v': 3}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 5, 'v': 'a'}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} diff --git a/testTs/expect/es6/destructuring/emptyArrayBindingPatternParameter01.txt b/testTs/expect/es6/destructuring/emptyArrayBindingPatternParameter01.txt index a2d3e42bcd86e8c80cb026c24af89690059c4101..f5bc8f4990993bc35de2f03d2638923e887a11e2 100644 --- a/testTs/expect/es6/destructuring/emptyArrayBindingPatternParameter01.txt +++ b/testTs/expect/es6/destructuring/emptyArrayBindingPatternParameter01.txt @@ -1 +1 @@ -{'literalBuffer': [{'tag': 2, 'value': 3}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 5, 'value': 'f'}, {'tag': 2, 'value': 1}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} +{'lb': [{'t': 2, 'v': 3}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 5, 'v': 'f'}, {'t': 2, 'v': 1}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} diff --git a/testTs/expect/es6/destructuring/emptyObjectBindingPatternParameter01.txt b/testTs/expect/es6/destructuring/emptyObjectBindingPatternParameter01.txt index a2d3e42bcd86e8c80cb026c24af89690059c4101..f5bc8f4990993bc35de2f03d2638923e887a11e2 100644 --- a/testTs/expect/es6/destructuring/emptyObjectBindingPatternParameter01.txt +++ b/testTs/expect/es6/destructuring/emptyObjectBindingPatternParameter01.txt @@ -1 +1 @@ -{'literalBuffer': [{'tag': 2, 'value': 3}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 5, 'value': 'f'}, {'tag': 2, 'value': 1}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} +{'lb': [{'t': 2, 'v': 3}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 5, 'v': 'f'}, {'t': 2, 'v': 1}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} diff --git a/testTs/expect/es6/templates/taggedTemplateStringsPlainCharactersThatArePartsOfEscapes01.txt b/testTs/expect/es6/templates/taggedTemplateStringsPlainCharactersThatArePartsOfEscapes01.txt index ceb3fd98eb1b721a94d1d5e1868f544667be2c6a..7d1faa4eb4cdbd92b807a2c3f09d68984d95d1fd 100644 --- a/testTs/expect/es6/templates/taggedTemplateStringsPlainCharactersThatArePartsOfEscapes01.txt +++ b/testTs/expect/es6/templates/taggedTemplateStringsPlainCharactersThatArePartsOfEscapes01.txt @@ -1,2 +1,2 @@ -{'literalBuffer': [{'tag': 2, 'value': 3}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 5, 'value': 'f'}, {'tag': 2, 'value': 1}, {'tag': 2, 'value': 52}, {'tag': 2, 'value': 0}]} -{'literalBuffer': [{'tag': 2, 'value': 5}, {'tag': 2, 'value': 0}]} +{'lb': [{'t': 2, 'v': 3}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 5, 'v': 'f'}, {'t': 2, 'v': 1}, {'t': 2, 'v': 52}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 5}, {'t': 2, 'v': 0}]} diff --git a/testTs/expect/es6/templates/taggedTemplateStringsWithTagNamedDeclare.txt b/testTs/expect/es6/templates/taggedTemplateStringsWithTagNamedDeclare.txt index f3777fd396a36f53e5abcc3ba036264287bc7c14..ce68ab2ace4857ef763d7a2eed2b6e4771ce4c3b 100644 --- a/testTs/expect/es6/templates/taggedTemplateStringsWithTagNamedDeclare.txt +++ b/testTs/expect/es6/templates/taggedTemplateStringsWithTagNamedDeclare.txt @@ -1,2 +1,2 @@ -{'literalBuffer': [{'tag': 2, 'value': 3}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 5, 'value': 'declare'}, {'tag': 2, 'value': 2}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 52}, {'tag': 2, 'value': 0}]} -{'literalBuffer': [{'tag': 2, 'value': 5}, {'tag': 2, 'value': 0}]} +{'lb': [{'t': 2, 'v': 3}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 5, 'v': 'declare'}, {'t': 2, 'v': 2}, {'t': 2, 'v': 0}, {'t': 2, 'v': 52}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 5}, {'t': 2, 'v': 0}]} diff --git a/testTs/expect/expressions/binaryOperators/additionOperator/additionOperatorWithConstrainedTypeParameter.txt b/testTs/expect/expressions/binaryOperators/additionOperator/additionOperatorWithConstrainedTypeParameter.txt index f890c2663ae53eab60d71869c88ab25ae437a2c5..3c94c69c40db7d158cea59cac6b7fbeb28bcf3a5 100644 --- a/testTs/expect/expressions/binaryOperators/additionOperator/additionOperatorWithConstrainedTypeParameter.txt +++ b/testTs/expect/expressions/binaryOperators/additionOperator/additionOperatorWithConstrainedTypeParameter.txt @@ -1,3 +1,3 @@ -{'literalBuffer': [{'tag': 2, 'value': 3}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 5, 'value': 'sum'}, {'tag': 2, 'value': 3}, {'tag': 2, 'value': 1}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} -{'literalBuffer': [{'tag': 2, 'value': 3}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 5, 'value': 'realSum'}, {'tag': 2, 'value': 3}, {'tag': 2, 'value': 1}, {'tag': 2, 'value': 53}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} -{'literalBuffer': [{'tag': 2, 'value': 5}, {'tag': 2, 'value': 0}]} +{'lb': [{'t': 2, 'v': 3}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 5, 'v': 'sum'}, {'t': 2, 'v': 3}, {'t': 2, 'v': 1}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 3}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 5, 'v': 'realSum'}, {'t': 2, 'v': 3}, {'t': 2, 'v': 1}, {'t': 2, 'v': 53}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 5}, {'t': 2, 'v': 0}]} diff --git a/testTs/expect/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithIdenticalTypeParameter.txt b/testTs/expect/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithIdenticalTypeParameter.txt index cf1009fe89b7093393199fffc8a622af3b5af2ad..32b6fbe74ebe915a22cce7827eb4dac7c61849f8 100644 --- a/testTs/expect/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithIdenticalTypeParameter.txt +++ b/testTs/expect/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithIdenticalTypeParameter.txt @@ -1 +1 @@ -{'literalBuffer': [{'tag': 2, 'value': 3}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 5, 'value': 'foo'}, {'tag': 2, 'value': 1}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} +{'lb': [{'t': 2, 'v': 3}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 5, 'v': 'foo'}, {'t': 2, 'v': 1}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} diff --git a/testTs/expect/expressions/binaryOperators/instanceofOperator/instanceofOperatorWithInvalidStaticToString.txt b/testTs/expect/expressions/binaryOperators/instanceofOperator/instanceofOperatorWithInvalidStaticToString.txt index e6d97f2a0b95b03c4c4f7faaecd81313d7136184..23b90f4230ffe73aa233b0207b72a13e812cdad9 100644 --- a/testTs/expect/expressions/binaryOperators/instanceofOperator/instanceofOperatorWithInvalidStaticToString.txt +++ b/testTs/expect/expressions/binaryOperators/instanceofOperator/instanceofOperatorWithInvalidStaticToString.txt @@ -1,12 +1,12 @@ -{'literalBuffer': [{'tag': 2, 'value': 3}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 5, 'value': 'foo'}, {'tag': 2, 'value': 1}, {'tag': 2, 'value': 54}, {'tag': 2, 'value': 0}]} -{'literalBuffer': [{'tag': 2, 'value': 1}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 1}, {'tag': 5, 'value': 'toString'}, {'tag': 2, 'value': 53}]} -{'literalBuffer': [{'tag': 2, 'value': 3}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 1}, {'tag': 5, 'value': 'toString'}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 3}]} -{'literalBuffer': [{'tag': 2, 'value': 2}, {'tag': 2, 'value': 52}]} -{'literalBuffer': [{'tag': 2, 'value': 3}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 5, 'value': 'bar'}, {'tag': 2, 'value': 1}, {'tag': 2, 'value': 58}, {'tag': 2, 'value': 0}]} -{'literalBuffer': [{'tag': 2, 'value': 1}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 1}, {'tag': 5, 'value': 'toNumber'}, {'tag': 2, 'value': 57}]} -{'literalBuffer': [{'tag': 2, 'value': 3}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 1}, {'tag': 5, 'value': 'toNumber'}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 3}]} -{'literalBuffer': [{'tag': 2, 'value': 2}, {'tag': 2, 'value': 56}]} -{'literalBuffer': [{'tag': 2, 'value': 3}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 5, 'value': 'baz'}, {'tag': 2, 'value': 1}, {'tag': 2, 'value': 62}, {'tag': 2, 'value': 0}]} -{'literalBuffer': [{'tag': 2, 'value': 1}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 1}, {'tag': 5, 'value': 'toString'}, {'tag': 2, 'value': 61}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} -{'literalBuffer': [{'tag': 2, 'value': 3}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 5, 'value': 'toString'}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 3}]} -{'literalBuffer': [{'tag': 2, 'value': 2}, {'tag': 2, 'value': 60}]} +{'lb': [{'t': 2, 'v': 3}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 5, 'v': 'foo'}, {'t': 2, 'v': 1}, {'t': 2, 'v': 54}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 1}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 1}, {'t': 5, 'v': 'toString'}, {'t': 2, 'v': 53}]} +{'lb': [{'t': 2, 'v': 3}, {'t': 2, 'v': 0}, {'t': 2, 'v': 1}, {'t': 5, 'v': 'toString'}, {'t': 2, 'v': 0}, {'t': 2, 'v': 3}]} +{'lb': [{'t': 2, 'v': 2}, {'t': 2, 'v': 52}]} +{'lb': [{'t': 2, 'v': 3}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 5, 'v': 'bar'}, {'t': 2, 'v': 1}, {'t': 2, 'v': 58}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 1}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 1}, {'t': 5, 'v': 'toNumber'}, {'t': 2, 'v': 57}]} +{'lb': [{'t': 2, 'v': 3}, {'t': 2, 'v': 0}, {'t': 2, 'v': 1}, {'t': 5, 'v': 'toNumber'}, {'t': 2, 'v': 0}, {'t': 2, 'v': 3}]} +{'lb': [{'t': 2, 'v': 2}, {'t': 2, 'v': 56}]} +{'lb': [{'t': 2, 'v': 3}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 5, 'v': 'baz'}, {'t': 2, 'v': 1}, {'t': 2, 'v': 62}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 1}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 1}, {'t': 5, 'v': 'toString'}, {'t': 2, 'v': 61}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 3}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 5, 'v': 'toString'}, {'t': 2, 'v': 0}, {'t': 2, 'v': 3}]} +{'lb': [{'t': 2, 'v': 2}, {'t': 2, 'v': 60}]} diff --git a/testTs/expect/expressions/nullishCoalescingOperator/nullishCoalescingOperator6.txt b/testTs/expect/expressions/nullishCoalescingOperator/nullishCoalescingOperator6.txt index 0efabd81df2b7e4a410b3b2e446f205707377f22..3a6b1e6720b1b9217a0f41f1ff1f57952e321a38 100644 --- a/testTs/expect/expressions/nullishCoalescingOperator/nullishCoalescingOperator6.txt +++ b/testTs/expect/expressions/nullishCoalescingOperator/nullishCoalescingOperator6.txt @@ -1 +1 @@ -{'literalBuffer': [{'tag': 2, 'value': 3}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 5, 'value': 'foo'}, {'tag': 2, 'value': 2}, {'tag': 2, 'value': 4}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} +{'lb': [{'t': 2, 'v': 3}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 5, 'v': 'foo'}, {'t': 2, 'v': 2}, {'t': 2, 'v': 4}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} diff --git a/testTs/expect/expressions/typeGuards/TypeGuardWithArrayUnion.txt b/testTs/expect/expressions/typeGuards/TypeGuardWithArrayUnion.txt index 55d20944c0b456c77653284c8ae5f5fa6180e1d6..e505f34c13fa83e98fc6259b23a27324644b3b38 100644 --- a/testTs/expect/expressions/typeGuards/TypeGuardWithArrayUnion.txt +++ b/testTs/expect/expressions/typeGuards/TypeGuardWithArrayUnion.txt @@ -1,5 +1,5 @@ -{'literalBuffer': [{'tag': 2, 'value': 3}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 5, 'value': 'saySize'}, {'tag': 2, 'value': 1}, {'tag': 2, 'value': 52}, {'tag': 2, 'value': 0}]} -{'literalBuffer': [{'tag': 2, 'value': 4}, {'tag': 2, 'value': 2}, {'tag': 2, 'value': 54}, {'tag': 2, 'value': 55}]} -{'literalBuffer': [{'tag': 2, 'value': 1}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 1}, {'tag': 5, 'value': 'value'}, {'tag': 2, 'value': 4}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} -{'literalBuffer': [{'tag': 2, 'value': 2}, {'tag': 2, 'value': 53}]} -{'literalBuffer': [{'tag': 2, 'value': 5}, {'tag': 2, 'value': 54}]} +{'lb': [{'t': 2, 'v': 3}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 5, 'v': 'saySize'}, {'t': 2, 'v': 1}, {'t': 2, 'v': 52}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 4}, {'t': 2, 'v': 2}, {'t': 2, 'v': 54}, {'t': 2, 'v': 55}]} +{'lb': [{'t': 2, 'v': 1}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 1}, {'t': 5, 'v': 'value'}, {'t': 2, 'v': 4}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 2}, {'t': 2, 'v': 53}]} +{'lb': [{'t': 2, 'v': 5}, {'t': 2, 'v': 54}]} diff --git a/testTs/expect/externalModules/typeOnly/importDefaultNamedType/importDefaultNamedType.txt b/testTs/expect/externalModules/typeOnly/importDefaultNamedType/importDefaultNamedType.txt index ea8caa4f25dc2e3fd5149e4e1842cea5866ddafd..1b5d0e2b989037f977ba3a50580bc12f7f7434b1 100644 --- a/testTs/expect/externalModules/typeOnly/importDefaultNamedType/importDefaultNamedType.txt +++ b/testTs/expect/externalModules/typeOnly/importDefaultNamedType/importDefaultNamedType.txt @@ -1,2 +1,2 @@ -{'literalBuffer': [{'tag': 2,'value': 7 }, {'tag': 5,'value': '#type#./a'}]} -{'literalBuffer': [{'tag': 2,'value': 1 }, {'tag': 2, 'value': 0 }, {'tag': 2, 'value': 0 }, {'tag': 2, 'value': 0 }, { 'tag': 2, 'value': 0 }, { 'tag': 2, 'value': 0 }, { 'tag': 2, 'value': 0 }, { 'tag': 2, 'value': 0 }]} +{'lb': [{'t': 2, 'v': 7}, {'t': 5, 'v': '#type#./a'}]} +{'lb': [{'t': 2, 'v': 1}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} diff --git a/testTs/expect/functions/functionOverloadCompatibilityWithVoid02.txt b/testTs/expect/functions/functionOverloadCompatibilityWithVoid02.txt index 548e7af9bb61c6094b774b17ea0e60799d3cf917..b42c9fc8453668f8fdc44a8b68b685aa041d2fde 100644 --- a/testTs/expect/functions/functionOverloadCompatibilityWithVoid02.txt +++ b/testTs/expect/functions/functionOverloadCompatibilityWithVoid02.txt @@ -1 +1 @@ -{'literalBuffer': [{'tag': 2, 'value': 3}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 5, 'value': 'f'}, {'tag': 2, 'value': 1}, {'tag': 2, 'value': 4}, {'tag': 2, 'value': 1}]} +{'lb': [{'t': 2, 'v': 3}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 5, 'v': 'f'}, {'t': 2, 'v': 1}, {'t': 2, 'v': 4}, {'t': 2, 'v': 1}]} diff --git a/testTs/expect/functions/functionOverloadCompatibilityWithVoid03.txt b/testTs/expect/functions/functionOverloadCompatibilityWithVoid03.txt index e4524ba21d2fdf3d6d211bded3d2dcfb2a38bf46..c2247b875225c66ccc738bf4fcb6533a64645190 100644 --- a/testTs/expect/functions/functionOverloadCompatibilityWithVoid03.txt +++ b/testTs/expect/functions/functionOverloadCompatibilityWithVoid03.txt @@ -1 +1 @@ -{'literalBuffer': [{'tag': 2, 'value': 3}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 5, 'value': 'f'}, {'tag': 2, 'value': 1}, {'tag': 2, 'value': 4}, {'tag': 2, 'value': 3}]} +{'lb': [{'t': 2, 'v': 3}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 5, 'v': 'f'}, {'t': 2, 'v': 1}, {'t': 2, 'v': 4}, {'t': 2, 'v': 3}]} diff --git a/testTs/expect/internalModules/DeclarationMerging/AmbientModuleAndNonAmbientFunctionWithTheSameNameAndCommonRoot.txt b/testTs/expect/internalModules/DeclarationMerging/AmbientModuleAndNonAmbientFunctionWithTheSameNameAndCommonRoot.txt index 1cbc2142ae9c033c5eac97b67ce6922b9bc142c1..962f7adf8fd5d8d49ed9a022cad66ab2f05df5a5 100644 --- a/testTs/expect/internalModules/DeclarationMerging/AmbientModuleAndNonAmbientFunctionWithTheSameNameAndCommonRoot.txt +++ b/testTs/expect/internalModules/DeclarationMerging/AmbientModuleAndNonAmbientFunctionWithTheSameNameAndCommonRoot.txt @@ -1,2 +1,2 @@ -{'literalBuffer': [{'tag': 2, 'value': 3}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 5, 'value': 'Point'}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} -{'literalBuffer': [{'tag': 2, 'value': 6}, {'tag': 2, 'value': 2}, {'tag': 5, 'value': 'x'}, {'tag': 2, 'value': 1}, {'tag': 5, 'value': 'y'}, {'tag': 2, 'value': 1}]} \ No newline at end of file +{'lb': [{'t': 2, 'v': 3}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 5, 'v': 'Point'}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 6}, {'t': 2, 'v': 2}, {'t': 5, 'v': 'x'}, {'t': 2, 'v': 1}, {'t': 5, 'v': 'y'}, {'t': 2, 'v': 1}]} diff --git a/testTs/expect/jsdoc/checkJsdocReturnTag1.txt b/testTs/expect/jsdoc/checkJsdocReturnTag1.txt index e348ff1102d19dfd317b76f3ec5364315738889a..a99b5a15ce812c4a3e8accf64d4086f1a6281f8c 100644 --- a/testTs/expect/jsdoc/checkJsdocReturnTag1.txt +++ b/testTs/expect/jsdoc/checkJsdocReturnTag1.txt @@ -1,3 +1,3 @@ -{'literalBuffer': [{'tag': 2, 'value': 3}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 5, 'value': 'f'}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} -{'literalBuffer': [{'tag': 2, 'value': 3}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 5, 'value': 'f1'}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} -{'literalBuffer': [{'tag': 2, 'value': 3}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 5, 'value': 'f2'}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} +{'lb': [{'t': 2, 'v': 3}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 5, 'v': 'f'}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 3}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 5, 'v': 'f1'}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 3}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 5, 'v': 'f2'}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} diff --git a/testTs/expect/jsdoc/constructorTagOnClassConstructor.txt b/testTs/expect/jsdoc/constructorTagOnClassConstructor.txt index 583abfc71b10124cf742180fcece8bcf6ff58d93..8dc54bdbe0bde4fbe3c2e434a714cbc5a0661824 100644 --- a/testTs/expect/jsdoc/constructorTagOnClassConstructor.txt +++ b/testTs/expect/jsdoc/constructorTagOnClassConstructor.txt @@ -1,5 +1,5 @@ -{'literalBuffer': [{'tag': 2, 'value': 1}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} -{'literalBuffer': [{'tag': 2, 'value': 1}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 1}, {'tag': 5, 'value': 'constructor'}, {'tag': 2, 'value': 53}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} -{'literalBuffer': [{'tag': 2, 'value': 3}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 5, 'value': 'constructor'}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} -{'literalBuffer': [{'tag': 2, 'value': 2}, {'tag': 2, 'value': 51}]} -{'literalBuffer': [{'tag': 2, 'value': 2}, {'tag': 2, 'value': 52}]} +{'lb': [{'t': 2, 'v': 1}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 1}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 1}, {'t': 5, 'v': 'constructor'}, {'t': 2, 'v': 53}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 3}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 5, 'v': 'constructor'}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 2}, {'t': 2, 'v': 51}]} +{'lb': [{'t': 2, 'v': 2}, {'t': 2, 'v': 52}]} diff --git a/testTs/expect/jsdoc/constructorTagWithThisTag.txt b/testTs/expect/jsdoc/constructorTagWithThisTag.txt index 22d639cec33be1f9065f3b27138287c937f9214a..2bd93ce8e9660e8fb6c93362d17a087c427b8554 100644 --- a/testTs/expect/jsdoc/constructorTagWithThisTag.txt +++ b/testTs/expect/jsdoc/constructorTagWithThisTag.txt @@ -1 +1 @@ -{'literalBuffer': [{'tag': 2, 'value': 3}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 5, 'value': 'C'}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} +{'lb': [{'t': 2, 'v': 3}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 5, 'v': 'C'}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} diff --git a/testTs/expect/jsdoc/declarations/jsDeclarationsThisTypes.txt b/testTs/expect/jsdoc/declarations/jsDeclarationsThisTypes.txt index d047bc662abf77264f60d185507e14ab8cb6e705..5708e0674a3540578662364e623ddc86dde34ac7 100644 --- a/testTs/expect/jsdoc/declarations/jsDeclarationsThisTypes.txt +++ b/testTs/expect/jsdoc/declarations/jsDeclarationsThisTypes.txt @@ -1,5 +1,5 @@ -{'literalBuffer': [{'tag': 2, 'value': 1}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 1}, {'tag': 5, 'value': 'method'}, {'tag': 2, 'value': 52}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} -{'literalBuffer': [{'tag': 2, 'value': 3}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 5, 'value': 'method'}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} -{'literalBuffer': [{'tag': 2, 'value': 1}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 51}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 1}, {'tag': 5, 'value': 'verify'}, {'tag': 2, 'value': 54}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} -{'literalBuffer': [{'tag': 2, 'value': 3}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 5, 'value': 'verify'}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} -{'literalBuffer': [{'tag': 2, 'value': 2}, {'tag': 2, 'value': 53}]} +{'lb': [{'t': 2, 'v': 1}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 1}, {'t': 5, 'v': 'method'}, {'t': 2, 'v': 52}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 3}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 5, 'v': 'method'}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 1}, {'t': 2, 'v': 0}, {'t': 2, 'v': 51}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 1}, {'t': 5, 'v': 'verify'}, {'t': 2, 'v': 54}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 3}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 5, 'v': 'verify'}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 2}, {'t': 2, 'v': 53}]} diff --git a/testTs/expect/jsdoc/jsdocImplements_namespacedInterface.txt b/testTs/expect/jsdoc/jsdocImplements_namespacedInterface.txt index 1d0bab72517b8989b47de4b24195dc9e15bcbb33..14dbd707efc57299f43e139b1439c5342a474c83 100644 --- a/testTs/expect/jsdoc/jsdocImplements_namespacedInterface.txt +++ b/testTs/expect/jsdoc/jsdocImplements_namespacedInterface.txt @@ -1,6 +1,6 @@ -{'literalBuffer': [{'tag': 2, 'value': 1}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 1}, {'tag': 5, 'value': 'mNumber'}, {'tag': 2, 'value': 52}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} -{'literalBuffer': [{'tag': 2, 'value': 3}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 5, 'value': 'mNumber'}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} -{'literalBuffer': [{'tag': 2, 'value': 2}, {'tag': 2, 'value': 51}]} -{'literalBuffer': [{'tag': 2, 'value': 1}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 1}, {'tag': 5, 'value': 'gen'}, {'tag': 2, 'value': 55}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} -{'literalBuffer': [{'tag': 2, 'value': 3}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 5, 'value': 'gen'}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} -{'literalBuffer': [{'tag': 2, 'value': 2}, {'tag': 2, 'value': 54}]} +{'lb': [{'t': 2, 'v': 1}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 1}, {'t': 5, 'v': 'mNumber'}, {'t': 2, 'v': 52}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 3}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 5, 'v': 'mNumber'}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 2}, {'t': 2, 'v': 51}]} +{'lb': [{'t': 2, 'v': 1}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 1}, {'t': 5, 'v': 'gen'}, {'t': 2, 'v': 55}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 3}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 5, 'v': 'gen'}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 2}, {'t': 2, 'v': 54}]} diff --git a/testTs/expect/jsdoc/jsdocReturnTag1.txt b/testTs/expect/jsdoc/jsdocReturnTag1.txt index e348ff1102d19dfd317b76f3ec5364315738889a..a99b5a15ce812c4a3e8accf64d4086f1a6281f8c 100644 --- a/testTs/expect/jsdoc/jsdocReturnTag1.txt +++ b/testTs/expect/jsdoc/jsdocReturnTag1.txt @@ -1,3 +1,3 @@ -{'literalBuffer': [{'tag': 2, 'value': 3}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 5, 'value': 'f'}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} -{'literalBuffer': [{'tag': 2, 'value': 3}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 5, 'value': 'f1'}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} -{'literalBuffer': [{'tag': 2, 'value': 3}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 5, 'value': 'f2'}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} +{'lb': [{'t': 2, 'v': 3}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 5, 'v': 'f'}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 3}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 5, 'v': 'f1'}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 3}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 5, 'v': 'f2'}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} diff --git a/testTs/expect/jsdoc/jsdocTypeReferenceUseBeforeDef.txt b/testTs/expect/jsdoc/jsdocTypeReferenceUseBeforeDef.txt index 3db8749b2d4b8b9f5ed263e86f7204630fb89716..a43cb0169d9de518017817ec599068021c993b93 100644 --- a/testTs/expect/jsdoc/jsdocTypeReferenceUseBeforeDef.txt +++ b/testTs/expect/jsdoc/jsdocTypeReferenceUseBeforeDef.txt @@ -1,2 +1,2 @@ -{'literalBuffer': [{'tag': 2, 'value': 1}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} -{'literalBuffer': [{'tag': 2, 'value': 2}, {'tag': 2, 'value': 51}]} +{'lb': [{'t': 2, 'v': 1}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 2}, {'t': 2, 'v': 51}]} diff --git a/testTs/expect/jsdoc/seeTag3.txt b/testTs/expect/jsdoc/seeTag3.txt index 1f5808deeaa62eaa43e9d03ec14a167f145b26bb..ec99a1f5b2ec97032e3ea2fcfb9c8d9493e43a7a 100644 --- a/testTs/expect/jsdoc/seeTag3.txt +++ b/testTs/expect/jsdoc/seeTag3.txt @@ -1 +1 @@ -{'literalBuffer': [{'tag': 2, 'value': 3}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 5, 'value': 'theWholeThing'}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} +{'lb': [{'t': 2, 'v': 3}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 5, 'v': 'theWholeThing'}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} diff --git a/testTs/expect/jsdoc/typeParameterExtendsUnionConstraintDistributed.txt b/testTs/expect/jsdoc/typeParameterExtendsUnionConstraintDistributed.txt index b6133c101e8699f65b6ced5bd23b2d3d92514060..f97609d0cb297de3bc3e6d5d7148950407b5c7f9 100644 --- a/testTs/expect/jsdoc/typeParameterExtendsUnionConstraintDistributed.txt +++ b/testTs/expect/jsdoc/typeParameterExtendsUnionConstraintDistributed.txt @@ -1,2 +1,2 @@ -{'literalBuffer': [{'tag': 2, 'value': 3}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 5, 'value': 'f'}, {'tag': 2, 'value': 1}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} -{'literalBuffer': [{'tag': 2, 'value': 3}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 5, 'value': 'f2'}, {'tag': 2, 'value': 1}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} +{'lb': [{'t': 2, 'v': 3}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 5, 'v': 'f'}, {'t': 2, 'v': 1}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 3}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 5, 'v': 'f2'}, {'t': 2, 'v': 1}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} diff --git a/testTs/expect/moduleResolution/scopedPackages/scopedPackages.txt b/testTs/expect/moduleResolution/scopedPackages/scopedPackages.txt index 99606d62c141b852a027e36db244a949e36e5df9..a699b2a7c9d056316e76e493cf68bc0061c91393 100644 --- a/testTs/expect/moduleResolution/scopedPackages/scopedPackages.txt +++ b/testTs/expect/moduleResolution/scopedPackages/scopedPackages.txt @@ -1,3 +1,3 @@ -{"literalBuffer": [ { "tag": 2, "value": 7 }, { "tag": 5, "value": "#x#./index" }]} -{"literalBuffer": [ { "tag": 2, "value": 7 }, { "tag": 5, "value": "#y#./index" }]} -{"literalBuffer": [ { "tag": 2, "value": 7 }, { "tag": 5, "value": "#z#./z" }]} +{'lb': [{'t': 2, 'v': 7}, {'t': 5, 'v': '#x#./index'}]} +{'lb': [{'t': 2, 'v': 7}, {'t': 5, 'v': '#y#./index'}]} +{'lb': [{'t': 2, 'v': 7}, {'t': 5, 'v': '#z#./z'}]} diff --git a/testTs/expect/moduleResolution/scopedPackagesClassic/scopedPackagesClassic.txt b/testTs/expect/moduleResolution/scopedPackagesClassic/scopedPackagesClassic.txt index 386ef2c9f74244fe87845b1d37dd13344660229a..3a18cf8b696ae3a5218b965b17a5f41a12fe4ff3 100644 --- a/testTs/expect/moduleResolution/scopedPackagesClassic/scopedPackagesClassic.txt +++ b/testTs/expect/moduleResolution/scopedPackagesClassic/scopedPackagesClassic.txt @@ -1 +1 @@ -{"literalBuffer": [ { "tag": 2, "value": 7 }, { "tag": 5, "value": "#x#./index" }]} +{'lb': [{'t': 2, 'v': 7}, {'t': 5, 'v': '#x#./index'}]} diff --git a/testTs/expect/override/override12.txt b/testTs/expect/override/override12.txt index d3791fb6120bc828f291b9e7b1e3c52386f00266..4db98111a54e8e448b1d6bd5364c35d76eed36c4 100644 --- a/testTs/expect/override/override12.txt +++ b/testTs/expect/override/override12.txt @@ -1,9 +1,9 @@ -{'literalBuffer': [{'tag': 2, 'value': 1}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 52}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 3}, {'tag': 5, 'value': 'm1'}, {'tag': 2, 'value': 56}, {'tag': 5, 'value': 'm2'}, {'tag': 2, 'value': 57}, {'tag': 5, 'value': 'm3'}, {'tag': 2, 'value': 58}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} -{'literalBuffer': [{'tag': 2, 'value': 1}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 3}, {'tag': 5, 'value': 'm1'}, {'tag': 2, 'value': 53}, {'tag': 5, 'value': 'm2'}, {'tag': 2, 'value': 54}, {'tag': 5, 'value': 'm3'}, {'tag': 2, 'value': 55}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} -{'literalBuffer': [{'tag': 2, 'value': 3}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 5, 'value': 'm1'}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 1}]} -{'literalBuffer': [{'tag': 2, 'value': 3}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 5, 'value': 'm2'}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 1}]} -{'literalBuffer': [{'tag': 2, 'value': 3}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 5, 'value': 'm3'}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 3}]} -{'literalBuffer': [{'tag': 2, 'value': 3}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 5, 'value': 'm1'}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} -{'literalBuffer': [{'tag': 2, 'value': 3}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 5, 'value': 'm2'}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 1}]} -{'literalBuffer': [{'tag': 2, 'value': 3}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 5, 'value': 'm3'}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 3}]} -{'literalBuffer': [{'tag': 2, 'value': 2}, {'tag': 2, 'value': 51}]} +{'lb': [{'t': 2, 'v': 1}, {'t': 2, 'v': 0}, {'t': 2, 'v': 52}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 3}, {'t': 5, 'v': 'm1'}, {'t': 2, 'v': 56}, {'t': 5, 'v': 'm2'}, {'t': 2, 'v': 57}, {'t': 5, 'v': 'm3'}, {'t': 2, 'v': 58}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 1}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 3}, {'t': 5, 'v': 'm1'}, {'t': 2, 'v': 53}, {'t': 5, 'v': 'm2'}, {'t': 2, 'v': 54}, {'t': 5, 'v': 'm3'}, {'t': 2, 'v': 55}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 3}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 5, 'v': 'm1'}, {'t': 2, 'v': 0}, {'t': 2, 'v': 1}]} +{'lb': [{'t': 2, 'v': 3}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 5, 'v': 'm2'}, {'t': 2, 'v': 0}, {'t': 2, 'v': 1}]} +{'lb': [{'t': 2, 'v': 3}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 5, 'v': 'm3'}, {'t': 2, 'v': 0}, {'t': 2, 'v': 3}]} +{'lb': [{'t': 2, 'v': 3}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 5, 'v': 'm1'}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 3}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 5, 'v': 'm2'}, {'t': 2, 'v': 0}, {'t': 2, 'v': 1}]} +{'lb': [{'t': 2, 'v': 3}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 5, 'v': 'm3'}, {'t': 2, 'v': 0}, {'t': 2, 'v': 3}]} +{'lb': [{'t': 2, 'v': 2}, {'t': 2, 'v': 51}]} diff --git a/testTs/expect/override/override17.txt b/testTs/expect/override/override17.txt index d3791fb6120bc828f291b9e7b1e3c52386f00266..4db98111a54e8e448b1d6bd5364c35d76eed36c4 100644 --- a/testTs/expect/override/override17.txt +++ b/testTs/expect/override/override17.txt @@ -1,9 +1,9 @@ -{'literalBuffer': [{'tag': 2, 'value': 1}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 52}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 3}, {'tag': 5, 'value': 'm1'}, {'tag': 2, 'value': 56}, {'tag': 5, 'value': 'm2'}, {'tag': 2, 'value': 57}, {'tag': 5, 'value': 'm3'}, {'tag': 2, 'value': 58}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} -{'literalBuffer': [{'tag': 2, 'value': 1}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 3}, {'tag': 5, 'value': 'm1'}, {'tag': 2, 'value': 53}, {'tag': 5, 'value': 'm2'}, {'tag': 2, 'value': 54}, {'tag': 5, 'value': 'm3'}, {'tag': 2, 'value': 55}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} -{'literalBuffer': [{'tag': 2, 'value': 3}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 5, 'value': 'm1'}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 1}]} -{'literalBuffer': [{'tag': 2, 'value': 3}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 5, 'value': 'm2'}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 1}]} -{'literalBuffer': [{'tag': 2, 'value': 3}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 5, 'value': 'm3'}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 3}]} -{'literalBuffer': [{'tag': 2, 'value': 3}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 5, 'value': 'm1'}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} -{'literalBuffer': [{'tag': 2, 'value': 3}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 5, 'value': 'm2'}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 1}]} -{'literalBuffer': [{'tag': 2, 'value': 3}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 5, 'value': 'm3'}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 3}]} -{'literalBuffer': [{'tag': 2, 'value': 2}, {'tag': 2, 'value': 51}]} +{'lb': [{'t': 2, 'v': 1}, {'t': 2, 'v': 0}, {'t': 2, 'v': 52}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 3}, {'t': 5, 'v': 'm1'}, {'t': 2, 'v': 56}, {'t': 5, 'v': 'm2'}, {'t': 2, 'v': 57}, {'t': 5, 'v': 'm3'}, {'t': 2, 'v': 58}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 1}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 3}, {'t': 5, 'v': 'm1'}, {'t': 2, 'v': 53}, {'t': 5, 'v': 'm2'}, {'t': 2, 'v': 54}, {'t': 5, 'v': 'm3'}, {'t': 2, 'v': 55}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 3}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 5, 'v': 'm1'}, {'t': 2, 'v': 0}, {'t': 2, 'v': 1}]} +{'lb': [{'t': 2, 'v': 3}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 5, 'v': 'm2'}, {'t': 2, 'v': 0}, {'t': 2, 'v': 1}]} +{'lb': [{'t': 2, 'v': 3}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 5, 'v': 'm3'}, {'t': 2, 'v': 0}, {'t': 2, 'v': 3}]} +{'lb': [{'t': 2, 'v': 3}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 5, 'v': 'm1'}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 3}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 5, 'v': 'm2'}, {'t': 2, 'v': 0}, {'t': 2, 'v': 1}]} +{'lb': [{'t': 2, 'v': 3}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 5, 'v': 'm3'}, {'t': 2, 'v': 0}, {'t': 2, 'v': 3}]} +{'lb': [{'t': 2, 'v': 2}, {'t': 2, 'v': 51}]} diff --git a/testTs/expect/parser/ecmascript5/ArrowFunctionExpressions/parserArrowFunctionExpression6.txt b/testTs/expect/parser/ecmascript5/ArrowFunctionExpressions/parserArrowFunctionExpression6.txt index b22a5cc5bf302f444eb390d7eb05c94a98bfc24a..3ff20fafaa2d4aa0bd2f14d149054db00d160585 100644 --- a/testTs/expect/parser/ecmascript5/ArrowFunctionExpressions/parserArrowFunctionExpression6.txt +++ b/testTs/expect/parser/ecmascript5/ArrowFunctionExpressions/parserArrowFunctionExpression6.txt @@ -1 +1 @@ -{'literalBuffer': [{'tag': 2, 'value': 3}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 5, 'value': 'foo'}, {'tag': 2, 'value': 2}, {'tag': 2, 'value': 4}, {'tag': 2, 'value': 1}, {'tag': 2, 'value': 0}]} +{'lb': [{'t': 2, 'v': 3}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 5, 'v': 'foo'}, {'t': 2, 'v': 2}, {'t': 2, 'v': 4}, {'t': 2, 'v': 1}, {'t': 2, 'v': 0}]} diff --git a/testTs/expect/parser/ecmascript5/ClassDeclarations/parserClassDeclaration23.txt b/testTs/expect/parser/ecmascript5/ClassDeclarations/parserClassDeclaration23.txt index 3db8749b2d4b8b9f5ed263e86f7204630fb89716..a43cb0169d9de518017817ec599068021c993b93 100644 --- a/testTs/expect/parser/ecmascript5/ClassDeclarations/parserClassDeclaration23.txt +++ b/testTs/expect/parser/ecmascript5/ClassDeclarations/parserClassDeclaration23.txt @@ -1,2 +1,2 @@ -{'literalBuffer': [{'tag': 2, 'value': 1}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} -{'literalBuffer': [{'tag': 2, 'value': 2}, {'tag': 2, 'value': 51}]} +{'lb': [{'t': 2, 'v': 1}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 2}, {'t': 2, 'v': 51}]} diff --git a/testTs/expect/parser/ecmascript5/ClassDeclarations/parserClassDeclarationIndexSignature1.txt b/testTs/expect/parser/ecmascript5/ClassDeclarations/parserClassDeclarationIndexSignature1.txt index f0f27bd5a223a6ba2dd804b535a549242e63bbdd..a43cb0169d9de518017817ec599068021c993b93 100644 --- a/testTs/expect/parser/ecmascript5/ClassDeclarations/parserClassDeclarationIndexSignature1.txt +++ b/testTs/expect/parser/ecmascript5/ClassDeclarations/parserClassDeclarationIndexSignature1.txt @@ -1,2 +1,2 @@ -{'literalBuffer': [{'tag': 2, 'value': 1}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0},{'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} -{'literalBuffer': [{'tag': 2, 'value': 2}, {'tag': 2, 'value': 51}]} +{'lb': [{'t': 2, 'v': 1}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 2}, {'t': 2, 'v': 51}]} diff --git a/testTs/expect/parser/ecmascript5/ConstructorDeclarations/parserConstructorDeclaration1.txt b/testTs/expect/parser/ecmascript5/ConstructorDeclarations/parserConstructorDeclaration1.txt index 6a8f188392b96bd61b635660697a009b84e7a4c5..7fe08cc45c2fb95a9d361922ced8241e8e17678d 100644 --- a/testTs/expect/parser/ecmascript5/ConstructorDeclarations/parserConstructorDeclaration1.txt +++ b/testTs/expect/parser/ecmascript5/ConstructorDeclarations/parserConstructorDeclaration1.txt @@ -1,3 +1,3 @@ -{'literalBuffer': [{'tag': 2, 'value': 1}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 1}, {'tag': 5, 'value': 'constructor'}, {'tag': 2, 'value': 52}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} -{'literalBuffer': [{'tag': 2, 'value': 3}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 5, 'value': 'constructor'}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} -{'literalBuffer': [{'tag': 2, 'value': 2}, {'tag': 2, 'value': 51}]} \ No newline at end of file +{'lb': [{'t': 2, 'v': 1}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 1}, {'t': 5, 'v': 'constructor'}, {'t': 2, 'v': 52}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 3}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 5, 'v': 'constructor'}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 2}, {'t': 2, 'v': 51}]} diff --git a/testTs/expect/parser/ecmascript5/ErrorRecovery/AccessibilityAfterStatic/parserAccessibilityAfterStatic11.txt b/testTs/expect/parser/ecmascript5/ErrorRecovery/AccessibilityAfterStatic/parserAccessibilityAfterStatic11.txt index fb6167bb45dae372a86b36941919af36c22166d4..514da255fcc1872706535af934081d4f2e0fac4c 100644 --- a/testTs/expect/parser/ecmascript5/ErrorRecovery/AccessibilityAfterStatic/parserAccessibilityAfterStatic11.txt +++ b/testTs/expect/parser/ecmascript5/ErrorRecovery/AccessibilityAfterStatic/parserAccessibilityAfterStatic11.txt @@ -1,3 +1,3 @@ -{'literalBuffer': [{'tag': 2, 'value': 1}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 1}, {'tag': 5, 'value': 'public'}, {'tag': 2, 'value': 52}]} -{'literalBuffer': [{'tag': 2, 'value': 3}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 1}, {'tag': 5, 'value': 'public'}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} -{'literalBuffer': [{'tag': 2, 'value': 2}, {'tag': 2, 'value': 51}]} +{'lb': [{'t': 2, 'v': 1}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 1}, {'t': 5, 'v': 'public'}, {'t': 2, 'v': 52}]} +{'lb': [{'t': 2, 'v': 3}, {'t': 2, 'v': 0}, {'t': 2, 'v': 1}, {'t': 5, 'v': 'public'}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 2}, {'t': 2, 'v': 51}]} diff --git a/testTs/expect/parser/ecmascript5/ErrorRecovery/AccessibilityAfterStatic/parserAccessibilityAfterStatic14.txt b/testTs/expect/parser/ecmascript5/ErrorRecovery/AccessibilityAfterStatic/parserAccessibilityAfterStatic14.txt index fb6167bb45dae372a86b36941919af36c22166d4..514da255fcc1872706535af934081d4f2e0fac4c 100644 --- a/testTs/expect/parser/ecmascript5/ErrorRecovery/AccessibilityAfterStatic/parserAccessibilityAfterStatic14.txt +++ b/testTs/expect/parser/ecmascript5/ErrorRecovery/AccessibilityAfterStatic/parserAccessibilityAfterStatic14.txt @@ -1,3 +1,3 @@ -{'literalBuffer': [{'tag': 2, 'value': 1}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 1}, {'tag': 5, 'value': 'public'}, {'tag': 2, 'value': 52}]} -{'literalBuffer': [{'tag': 2, 'value': 3}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 1}, {'tag': 5, 'value': 'public'}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} -{'literalBuffer': [{'tag': 2, 'value': 2}, {'tag': 2, 'value': 51}]} +{'lb': [{'t': 2, 'v': 1}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 1}, {'t': 5, 'v': 'public'}, {'t': 2, 'v': 52}]} +{'lb': [{'t': 2, 'v': 3}, {'t': 2, 'v': 0}, {'t': 2, 'v': 1}, {'t': 5, 'v': 'public'}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 2}, {'t': 2, 'v': 51}]} diff --git a/testTs/expect/parser/ecmascript5/ErrorRecovery/AccessibilityAfterStatic/parserAccessibilityAfterStatic4.txt b/testTs/expect/parser/ecmascript5/ErrorRecovery/AccessibilityAfterStatic/parserAccessibilityAfterStatic4.txt index d1405aae79658470b1b89f7efcd0c2160af61222..3238ec7b63b8fbfb93513248e44149cf49354eb6 100644 --- a/testTs/expect/parser/ecmascript5/ErrorRecovery/AccessibilityAfterStatic/parserAccessibilityAfterStatic4.txt +++ b/testTs/expect/parser/ecmascript5/ErrorRecovery/AccessibilityAfterStatic/parserAccessibilityAfterStatic4.txt @@ -1,2 +1,2 @@ -{'literalBuffer': [{'tag': 2, 'value': 1}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 1}, {'tag': 5, 'value': 'public'}, {'tag': 2, 'value': 1}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} -{'literalBuffer': [{'tag': 2, 'value': 2}, {'tag': 2, 'value': 51}]} +{'lb': [{'t': 2, 'v': 1}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 1}, {'t': 5, 'v': 'public'}, {'t': 2, 'v': 1}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 2}, {'t': 2, 'v': 51}]} diff --git a/testTs/expect/parser/ecmascript5/ErrorRecovery/parserCommaInTypeMemberList1.txt b/testTs/expect/parser/ecmascript5/ErrorRecovery/parserCommaInTypeMemberList1.txt index 8c07bd597b3b76290b62b1cd02e0b8c8b2766dfb..6ed1d61fc45f9d0934f366e7f703748a1df6d74a 100644 --- a/testTs/expect/parser/ecmascript5/ErrorRecovery/parserCommaInTypeMemberList1.txt +++ b/testTs/expect/parser/ecmascript5/ErrorRecovery/parserCommaInTypeMemberList1.txt @@ -1 +1 @@ -{'literalBuffer': [{'tag': 2, 'value': 6}, {'tag': 2, 'value': 2},{'tag': 5, 'value': 'workItem'},{'tag': 2, 'value': 0},{'tag': 5, 'value': 'width'},{'tag': 2, 'value': 4}]} \ No newline at end of file +{'lb': [{'t': 2, 'v': 6}, {'t': 2, 'v': 2}, {'t': 5, 'v': 'workItem'}, {'t': 2, 'v': 0}, {'t': 5, 'v': 'width'}, {'t': 2, 'v': 4}]} diff --git a/testTs/expect/parser/ecmascript5/Generics/parserGenericClass1.txt b/testTs/expect/parser/ecmascript5/Generics/parserGenericClass1.txt index 627922bace416495def1e012e1b88ce35668e719..a43cb0169d9de518017817ec599068021c993b93 100644 --- a/testTs/expect/parser/ecmascript5/Generics/parserGenericClass1.txt +++ b/testTs/expect/parser/ecmascript5/Generics/parserGenericClass1.txt @@ -1,2 +1,2 @@ -{'literalBuffer': [{'tag': 2, 'value': 1}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} -{'literalBuffer': [{'tag': 2, 'value': 2}, {'tag': 2, 'value': 51}]} \ No newline at end of file +{'lb': [{'t': 2, 'v': 1}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 2}, {'t': 2, 'v': 51}]} diff --git a/testTs/expect/parser/ecmascript5/Generics/parserGenericClass2.txt b/testTs/expect/parser/ecmascript5/Generics/parserGenericClass2.txt index 627922bace416495def1e012e1b88ce35668e719..a43cb0169d9de518017817ec599068021c993b93 100644 --- a/testTs/expect/parser/ecmascript5/Generics/parserGenericClass2.txt +++ b/testTs/expect/parser/ecmascript5/Generics/parserGenericClass2.txt @@ -1,2 +1,2 @@ -{'literalBuffer': [{'tag': 2, 'value': 1}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} -{'literalBuffer': [{'tag': 2, 'value': 2}, {'tag': 2, 'value': 51}]} \ No newline at end of file +{'lb': [{'t': 2, 'v': 1}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 2}, {'t': 2, 'v': 51}]} diff --git a/testTs/expect/parser/ecmascript5/Generics/parserGenericConstraint1.txt b/testTs/expect/parser/ecmascript5/Generics/parserGenericConstraint1.txt index 627922bace416495def1e012e1b88ce35668e719..a43cb0169d9de518017817ec599068021c993b93 100644 --- a/testTs/expect/parser/ecmascript5/Generics/parserGenericConstraint1.txt +++ b/testTs/expect/parser/ecmascript5/Generics/parserGenericConstraint1.txt @@ -1,2 +1,2 @@ -{'literalBuffer': [{'tag': 2, 'value': 1}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} -{'literalBuffer': [{'tag': 2, 'value': 2}, {'tag': 2, 'value': 51}]} \ No newline at end of file +{'lb': [{'t': 2, 'v': 1}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 2}, {'t': 2, 'v': 51}]} diff --git a/testTs/expect/parser/ecmascript5/IndexMemberDeclarations/parserIndexMemberDeclaration1.txt b/testTs/expect/parser/ecmascript5/IndexMemberDeclarations/parserIndexMemberDeclaration1.txt index cfccd20a29c9e6e6bbd0f0fe59954d9609f95f6a..a43cb0169d9de518017817ec599068021c993b93 100644 --- a/testTs/expect/parser/ecmascript5/IndexMemberDeclarations/parserIndexMemberDeclaration1.txt +++ b/testTs/expect/parser/ecmascript5/IndexMemberDeclarations/parserIndexMemberDeclaration1.txt @@ -1,2 +1,2 @@ -{'literalBuffer': [{'tag': 2, 'value': 1}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0},{'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} -{'literalBuffer': [{'tag': 2, 'value': 2}, {'tag': 2, 'value': 51}]} \ No newline at end of file +{'lb': [{'t': 2, 'v': 1}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 2}, {'t': 2, 'v': 51}]} diff --git a/testTs/expect/parser/ecmascript5/IndexMemberDeclarations/parserIndexMemberDeclaration2.txt b/testTs/expect/parser/ecmascript5/IndexMemberDeclarations/parserIndexMemberDeclaration2.txt index 4ec3c7636521390e4764a808022e580f44a3f418..c0a34859ca456fb2abdfbaf57f70e992887dfa34 100644 --- a/testTs/expect/parser/ecmascript5/IndexMemberDeclarations/parserIndexMemberDeclaration2.txt +++ b/testTs/expect/parser/ecmascript5/IndexMemberDeclarations/parserIndexMemberDeclaration2.txt @@ -1,2 +1,2 @@ -{'literalBuffer': [{'tag': 2, 'value': 1}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 1}, {'tag': 5, 'value': 'v'},{'tag': 2, 'value': 1}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} -{'literalBuffer': [{'tag': 2, 'value': 2}, {'tag': 2, 'value': 51}]} \ No newline at end of file +{'lb': [{'t': 2, 'v': 1}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 1}, {'t': 5, 'v': 'v'}, {'t': 2, 'v': 1}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 2}, {'t': 2, 'v': 51}]} diff --git a/testTs/expect/parser/ecmascript5/IndexMemberDeclarations/parserIndexMemberDeclaration3.txt b/testTs/expect/parser/ecmascript5/IndexMemberDeclarations/parserIndexMemberDeclaration3.txt index 4ec3c7636521390e4764a808022e580f44a3f418..c0a34859ca456fb2abdfbaf57f70e992887dfa34 100644 --- a/testTs/expect/parser/ecmascript5/IndexMemberDeclarations/parserIndexMemberDeclaration3.txt +++ b/testTs/expect/parser/ecmascript5/IndexMemberDeclarations/parserIndexMemberDeclaration3.txt @@ -1,2 +1,2 @@ -{'literalBuffer': [{'tag': 2, 'value': 1}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 1}, {'tag': 5, 'value': 'v'},{'tag': 2, 'value': 1}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} -{'literalBuffer': [{'tag': 2, 'value': 2}, {'tag': 2, 'value': 51}]} \ No newline at end of file +{'lb': [{'t': 2, 'v': 1}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 1}, {'t': 5, 'v': 'v'}, {'t': 2, 'v': 1}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 2}, {'t': 2, 'v': 51}]} diff --git a/testTs/expect/parser/ecmascript5/IndexMemberDeclarations/parserIndexMemberDeclaration4.txt b/testTs/expect/parser/ecmascript5/IndexMemberDeclarations/parserIndexMemberDeclaration4.txt index 4ec3c7636521390e4764a808022e580f44a3f418..c0a34859ca456fb2abdfbaf57f70e992887dfa34 100644 --- a/testTs/expect/parser/ecmascript5/IndexMemberDeclarations/parserIndexMemberDeclaration4.txt +++ b/testTs/expect/parser/ecmascript5/IndexMemberDeclarations/parserIndexMemberDeclaration4.txt @@ -1,2 +1,2 @@ -{'literalBuffer': [{'tag': 2, 'value': 1}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 1}, {'tag': 5, 'value': 'v'},{'tag': 2, 'value': 1}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} -{'literalBuffer': [{'tag': 2, 'value': 2}, {'tag': 2, 'value': 51}]} \ No newline at end of file +{'lb': [{'t': 2, 'v': 1}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 1}, {'t': 5, 'v': 'v'}, {'t': 2, 'v': 1}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 2}, {'t': 2, 'v': 51}]} diff --git a/testTs/expect/parser/ecmascript5/IndexMemberDeclarations/parserIndexMemberDeclaration6.txt b/testTs/expect/parser/ecmascript5/IndexMemberDeclarations/parserIndexMemberDeclaration6.txt index cfccd20a29c9e6e6bbd0f0fe59954d9609f95f6a..a43cb0169d9de518017817ec599068021c993b93 100644 --- a/testTs/expect/parser/ecmascript5/IndexMemberDeclarations/parserIndexMemberDeclaration6.txt +++ b/testTs/expect/parser/ecmascript5/IndexMemberDeclarations/parserIndexMemberDeclaration6.txt @@ -1,2 +1,2 @@ -{'literalBuffer': [{'tag': 2, 'value': 1}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0},{'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} -{'literalBuffer': [{'tag': 2, 'value': 2}, {'tag': 2, 'value': 51}]} \ No newline at end of file +{'lb': [{'t': 2, 'v': 1}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 2}, {'t': 2, 'v': 51}]} diff --git a/testTs/expect/parser/ecmascript5/ObjectTypes/parserObjectType2.txt b/testTs/expect/parser/ecmascript5/ObjectTypes/parserObjectType2.txt index dcd242a6a640e7b7b741b804e627532b5de76c7f..b17b8eba703cd7782fe2aba5a1ace7a8cde69ace 100644 --- a/testTs/expect/parser/ecmascript5/ObjectTypes/parserObjectType2.txt +++ b/testTs/expect/parser/ecmascript5/ObjectTypes/parserObjectType2.txt @@ -1 +1 @@ -{'literalBuffer': [{'tag': 2, 'value': 6}, {'tag': 2, 'value': 1}, {'tag': 5, 'value': 'x'}, {'tag': 2, 'value': 1}]} \ No newline at end of file +{'lb': [{'t': 2, 'v': 6}, {'t': 2, 'v': 1}, {'t': 5, 'v': 'x'}, {'t': 2, 'v': 1}]} diff --git a/testTs/expect/parser/ecmascript5/Protected/Protected5.txt b/testTs/expect/parser/ecmascript5/Protected/Protected5.txt index 9981f69d332ccf32141d50aaa0d805d1b0eeecb5..d762352364bf906e8ea819ac6cac9cc51a35b19b 100644 --- a/testTs/expect/parser/ecmascript5/Protected/Protected5.txt +++ b/testTs/expect/parser/ecmascript5/Protected/Protected5.txt @@ -1,3 +1,3 @@ -{'literalBuffer': [{'tag': 2, 'value': 1}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 1}, {'tag': 5, 'value': 'm'}, {'tag': 2, 'value': 52}]} -{'literalBuffer': [{'tag': 2, 'value': 3}, {'tag': 2, 'value': 2}, {'tag': 2, 'value': 1}, {'tag': 5, 'value': 'm'}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} -{'literalBuffer': [{'tag': 2, 'value': 2}, {'tag': 2, 'value': 51}]} \ No newline at end of file +{'lb': [{'t': 2, 'v': 1}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 1}, {'t': 5, 'v': 'm'}, {'t': 2, 'v': 52}]} +{'lb': [{'t': 2, 'v': 3}, {'t': 2, 'v': 2}, {'t': 2, 'v': 1}, {'t': 5, 'v': 'm'}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 2}, {'t': 2, 'v': 51}]} diff --git a/testTs/expect/parser/ecmascript5/RegressionTests/parser509677.txt b/testTs/expect/parser/ecmascript5/RegressionTests/parser509677.txt index 7dbd91bec53ba5ff9b8a6daa428778d9b3e2a416..9c1284333216c384c795a01d1e7e729af10d86ab 100644 --- a/testTs/expect/parser/ecmascript5/RegressionTests/parser509677.txt +++ b/testTs/expect/parser/ecmascript5/RegressionTests/parser509677.txt @@ -1 +1 @@ -{'literalBuffer': [{'tag': 2, 'value': 6}, {'tag': 2, 'value': 1}, {'tag': 5, 'value': 'y'}, {'tag': 2, 'value': 4}]} \ No newline at end of file +{'lb': [{'t': 2, 'v': 6}, {'t': 2, 'v': 1}, {'t': 5, 'v': 'y'}, {'t': 2, 'v': 4}]} diff --git a/testTs/expect/parser/ecmascript5/RegressionTests/parser645484.txt b/testTs/expect/parser/ecmascript5/RegressionTests/parser645484.txt index bf80007f2e82bfe93c21f2ef726e38db3d62ab56..21c5b9cc84a751b7de1829084c70b94c3d573b3b 100644 --- a/testTs/expect/parser/ecmascript5/RegressionTests/parser645484.txt +++ b/testTs/expect/parser/ecmascript5/RegressionTests/parser645484.txt @@ -1 +1 @@ -{'literalBuffer': [{'tag': 2, 'value': 6}, {'tag': 2, 'value': 1}, {'tag': 5, 'value': 'new'}, {'tag': 2, 'value': 0}]} \ No newline at end of file +{'lb': [{'t': 2, 'v': 6}, {'t': 2, 'v': 1}, {'t': 5, 'v': 'new'}, {'t': 2, 'v': 0}]} diff --git a/testTs/expect/parser/ecmascript5/Statements/LabeledStatements/parser_duplicateLabel3.txt b/testTs/expect/parser/ecmascript5/Statements/LabeledStatements/parser_duplicateLabel3.txt index 969b0924735d877d8d9979d0fb87b39b06f37b55..c9c235bd74e839c9c7cd11d41ccf4bdde0b6466a 100644 --- a/testTs/expect/parser/ecmascript5/Statements/LabeledStatements/parser_duplicateLabel3.txt +++ b/testTs/expect/parser/ecmascript5/Statements/LabeledStatements/parser_duplicateLabel3.txt @@ -1 +1 @@ -{'literalBuffer': [{'tag': 2, 'value': 3}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 5, 'value': 'f'}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} \ No newline at end of file +{'lb': [{'t': 2, 'v': 3}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 5, 'v': 'f'}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} diff --git a/testTs/expect/parser/ecmascript5/Statements/ReturnStatements/parserReturnStatement3.txt b/testTs/expect/parser/ecmascript5/Statements/ReturnStatements/parserReturnStatement3.txt index b807a4aa58170a3588767dbd69ef0364a09f0393..c9c235bd74e839c9c7cd11d41ccf4bdde0b6466a 100644 --- a/testTs/expect/parser/ecmascript5/Statements/ReturnStatements/parserReturnStatement3.txt +++ b/testTs/expect/parser/ecmascript5/Statements/ReturnStatements/parserReturnStatement3.txt @@ -1 +1 @@ -{'literalBuffer': [{'tag': 2, 'value': 3}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 5, 'value': 'f'}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} +{'lb': [{'t': 2, 'v': 3}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 5, 'v': 'f'}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} diff --git a/testTs/expect/parser/ecmascript5/parserUnicode3.txt b/testTs/expect/parser/ecmascript5/parserUnicode3.txt index 3db8749b2d4b8b9f5ed263e86f7204630fb89716..a43cb0169d9de518017817ec599068021c993b93 100644 --- a/testTs/expect/parser/ecmascript5/parserUnicode3.txt +++ b/testTs/expect/parser/ecmascript5/parserUnicode3.txt @@ -1,2 +1,2 @@ -{'literalBuffer': [{'tag': 2, 'value': 1}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} -{'literalBuffer': [{'tag': 2, 'value': 2}, {'tag': 2, 'value': 51}]} +{'lb': [{'t': 2, 'v': 1}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 2}, {'t': 2, 'v': 51}]} diff --git a/testTs/expect/parser/ecmascript5/parserUnicodeWhitespaceCharacter1.txt b/testTs/expect/parser/ecmascript5/parserUnicodeWhitespaceCharacter1.txt index 4409a504b116f4de6e8a72a48aa57ac89a1f4bf9..0501ffeaa2a32fadb87108923e1d7ffcce0f533f 100644 --- a/testTs/expect/parser/ecmascript5/parserUnicodeWhitespaceCharacter1.txt +++ b/testTs/expect/parser/ecmascript5/parserUnicodeWhitespaceCharacter1.txt @@ -1 +1 @@ -{'literalBuffer': [{'tag': 2, 'value': 3}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 5, 'value': 'foo'}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} +{'lb': [{'t': 2, 'v': 3}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 5, 'v': 'foo'}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} diff --git a/testTs/expect/salsa/inferringClassMembersFromAssignments2.txt b/testTs/expect/salsa/inferringClassMembersFromAssignments2.txt index a1e19545d0a97521af044e5ebe14f27b4c8c8f50..e450e4f887530d67410745a8d949c10b14e9d93a 100644 --- a/testTs/expect/salsa/inferringClassMembersFromAssignments2.txt +++ b/testTs/expect/salsa/inferringClassMembersFromAssignments2.txt @@ -1 +1 @@ -{'literalBuffer': [{'tag': 2, 'value': 3}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 5, 'value': 'OOOrder'}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} +{'lb': [{'t': 2, 'v': 3}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 5, 'v': 'OOOrder'}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} diff --git a/testTs/expect/salsa/propertyAssignmentUseParentType3.txt b/testTs/expect/salsa/propertyAssignmentUseParentType3.txt index 40f16443b47ee2c41c7ce9d067a36ec5f64d5413..a8aaaad357cb1819c0a00886423aa7b2399a1ede 100644 --- a/testTs/expect/salsa/propertyAssignmentUseParentType3.txt +++ b/testTs/expect/salsa/propertyAssignmentUseParentType3.txt @@ -1,5 +1,5 @@ -{'literalBuffer': [{'tag': 2, 'value': 3}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 5, 'value': 'foo1'}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 1}]} -{'literalBuffer': [{'tag': 2, 'value': 3}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 5, 'value': 'foo2'}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 53}]} -{'literalBuffer': [{'tag': 2, 'value': 5}, {'tag': 2, 'value': 0}]} -{'literalBuffer': [{'tag': 2, 'value': 3}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 5, 'value': 'foo3'}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 4}]} -{'literalBuffer': [{'tag': 2, 'value': 3}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 5, 'value': 'foo4'}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} +{'lb': [{'t': 2, 'v': 3}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 5, 'v': 'foo1'}, {'t': 2, 'v': 0}, {'t': 2, 'v': 1}]} +{'lb': [{'t': 2, 'v': 3}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 5, 'v': 'foo2'}, {'t': 2, 'v': 0}, {'t': 2, 'v': 53}]} +{'lb': [{'t': 2, 'v': 5}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 3}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 5, 'v': 'foo3'}, {'t': 2, 'v': 0}, {'t': 2, 'v': 4}]} +{'lb': [{'t': 2, 'v': 3}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 5, 'v': 'foo4'}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} diff --git a/testTs/expect/salsa/prototypePropertyAssignmentMergeAcrossFiles.txt b/testTs/expect/salsa/prototypePropertyAssignmentMergeAcrossFiles.txt index 22d639cec33be1f9065f3b27138287c937f9214a..2bd93ce8e9660e8fb6c93362d17a087c427b8554 100644 --- a/testTs/expect/salsa/prototypePropertyAssignmentMergeAcrossFiles.txt +++ b/testTs/expect/salsa/prototypePropertyAssignmentMergeAcrossFiles.txt @@ -1 +1 @@ -{'literalBuffer': [{'tag': 2, 'value': 3}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 5, 'value': 'C'}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} +{'lb': [{'t': 2, 'v': 3}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 5, 'v': 'C'}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} diff --git a/testTs/expect/salsa/typeFromJSInitializer2.txt b/testTs/expect/salsa/typeFromJSInitializer2.txt index 79f6a87b2ad3d69b54ccb8a2ecac631b993d94e0..007bd738a294f91359eddf4ef975366731b1bd2e 100644 --- a/testTs/expect/salsa/typeFromJSInitializer2.txt +++ b/testTs/expect/salsa/typeFromJSInitializer2.txt @@ -1,2 +1,2 @@ -{'literalBuffer': [{'tag': 2, 'value': 3}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 5, 'value': 'f1'}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} -{'literalBuffer': [{'tag': 2, 'value': 3}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 5, 'value': 'f2'}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} +{'lb': [{'t': 2, 'v': 3}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 5, 'v': 'f1'}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 3}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 5, 'v': 'f2'}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} diff --git a/testTs/expect/salsa/typeFromJSInitializer3.txt b/testTs/expect/salsa/typeFromJSInitializer3.txt index 79f6a87b2ad3d69b54ccb8a2ecac631b993d94e0..007bd738a294f91359eddf4ef975366731b1bd2e 100644 --- a/testTs/expect/salsa/typeFromJSInitializer3.txt +++ b/testTs/expect/salsa/typeFromJSInitializer3.txt @@ -1,2 +1,2 @@ -{'literalBuffer': [{'tag': 2, 'value': 3}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 5, 'value': 'f1'}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} -{'literalBuffer': [{'tag': 2, 'value': 3}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 5, 'value': 'f2'}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} +{'lb': [{'t': 2, 'v': 3}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 5, 'v': 'f1'}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 3}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 5, 'v': 'f2'}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} diff --git a/testTs/expect/statements/for-ofStatements/ES5For-of10.txt b/testTs/expect/statements/for-ofStatements/ES5For-of10.txt index 4409a504b116f4de6e8a72a48aa57ac89a1f4bf9..0501ffeaa2a32fadb87108923e1d7ffcce0f533f 100644 --- a/testTs/expect/statements/for-ofStatements/ES5For-of10.txt +++ b/testTs/expect/statements/for-ofStatements/ES5For-of10.txt @@ -1 +1 @@ -{'literalBuffer': [{'tag': 2, 'value': 3}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 5, 'value': 'foo'}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} +{'lb': [{'t': 2, 'v': 3}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 5, 'v': 'foo'}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} diff --git a/testTs/expect/statements/for-ofStatements/ES5For-of19.txt b/testTs/expect/statements/for-ofStatements/ES5For-of19.txt index 2f6928971d510b543333aad7121d0dbe8bf4ade0..0501ffeaa2a32fadb87108923e1d7ffcce0f533f 100644 --- a/testTs/expect/statements/for-ofStatements/ES5For-of19.txt +++ b/testTs/expect/statements/for-ofStatements/ES5For-of19.txt @@ -1 +1 @@ -{'literalBuffer': [{ 'tag': 2, 'value': 3 },{ 'tag': 2, 'value': 0 },{ 'tag': 2, 'value': 0 },{ 'tag': 5, 'value': 'foo' },{ 'tag': 2, 'value': 0 },{ 'tag': 2, 'value': 0 }]} \ No newline at end of file +{'lb': [{'t': 2, 'v': 3}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 5, 'v': 'foo'}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} diff --git a/testTs/expect/statements/for-ofStatements/ES5For-of9.txt b/testTs/expect/statements/for-ofStatements/ES5For-of9.txt index 4409a504b116f4de6e8a72a48aa57ac89a1f4bf9..0501ffeaa2a32fadb87108923e1d7ffcce0f533f 100644 --- a/testTs/expect/statements/for-ofStatements/ES5For-of9.txt +++ b/testTs/expect/statements/for-ofStatements/ES5For-of9.txt @@ -1 +1 @@ -{'literalBuffer': [{'tag': 2, 'value': 3}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 5, 'value': 'foo'}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} +{'lb': [{'t': 2, 'v': 3}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 5, 'v': 'foo'}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} diff --git a/testTs/expect/statements/tryStatements/tryStatements.txt b/testTs/expect/statements/tryStatements/tryStatements.txt index e88826bced336b1800e9d2a561cd7ea8875984ff..95839ecd72714257cbeab61e59c94cb54fe4bc4e 100644 --- a/testTs/expect/statements/tryStatements/tryStatements.txt +++ b/testTs/expect/statements/tryStatements/tryStatements.txt @@ -1 +1 @@ -{'literalBuffer': [{'tag': 2, 'value': 3}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 5, 'value': 'fn'}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} +{'lb': [{'t': 2, 'v': 3}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 5, 'v': 'fn'}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} diff --git a/testTs/expect/types/keyof/keyofAndForIn.txt b/testTs/expect/types/keyof/keyofAndForIn.txt index 551422f4b849b4cccfc14d3a0780cfffea7e460a..10b62aa5ea11f927fb063e5a2f6441ae79fe2abd 100644 --- a/testTs/expect/types/keyof/keyofAndForIn.txt +++ b/testTs/expect/types/keyof/keyofAndForIn.txt @@ -1,3 +1,3 @@ -{'literalBuffer': [{'tag': 2, 'value': 3}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 5, 'value': 'f1'}, {'tag': 2, 'value': 2}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} -{'literalBuffer': [{'tag': 2, 'value': 3}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 5, 'value': 'f2'}, {'tag': 2, 'value': 2}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} -{'literalBuffer': [{'tag': 2, 'value': 3}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 5, 'value': 'f3'}, {'tag': 2, 'value': 2}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} +{'lb': [{'t': 2, 'v': 3}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 5, 'v': 'f1'}, {'t': 2, 'v': 2}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 3}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 5, 'v': 'f2'}, {'t': 2, 'v': 2}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 3}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 5, 'v': 'f3'}, {'t': 2, 'v': 2}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} diff --git a/testTs/expect/types/localTypes/localTypes5.txt b/testTs/expect/types/localTypes/localTypes5.txt index 4817c9004bdeecb28ba75ae442eb36803abb3abc..6f49e6736d263530632bef85ee9c445539a1899a 100644 --- a/testTs/expect/types/localTypes/localTypes5.txt +++ b/testTs/expect/types/localTypes/localTypes5.txt @@ -1,4 +1,4 @@ -{'literalBuffer': [{'tag': 2, 'value': 3}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 5, 'value': 'foo'}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} -{'literalBuffer': [{'tag': 2, 'value': 1}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 1}, {'tag': 5, 'value': 'm'}, {'tag': 2, 'value': 53}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} -{'literalBuffer': [{'tag': 2, 'value': 3}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 5, 'value': 'm'}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} -{'literalBuffer': [{'tag': 2, 'value': 2}, {'tag': 2, 'value': 52}]} +{'lb': [{'t': 2, 'v': 3}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 5, 'v': 'foo'}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 1}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 1}, {'t': 5, 'v': 'm'}, {'t': 2, 'v': 53}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 3}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 5, 'v': 'm'}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 2}, {'t': 2, 'v': 52}]} diff --git a/testTs/expect/types/mapped/mappedTypeConstraints.txt b/testTs/expect/types/mapped/mappedTypeConstraints.txt index 09c61537dbf1fce16ecb13d5ab7a1ea18c9765aa..73f2152660ade949f5fe275ad81b1b939f91520b 100644 --- a/testTs/expect/types/mapped/mappedTypeConstraints.txt +++ b/testTs/expect/types/mapped/mappedTypeConstraints.txt @@ -1,5 +1,5 @@ -{'literalBuffer': [{'tag': 2, 'value': 3}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 5, 'value': 'f0'}, {'tag': 2, 'value': 1}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} -{'literalBuffer': [{'tag': 2, 'value': 3}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 5, 'value': 'f1'}, {'tag': 2, 'value': 1}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} -{'literalBuffer': [{'tag': 2, 'value': 3}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 5, 'value': 'f2'}, {'tag': 2, 'value': 1}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} -{'literalBuffer': [{'tag': 2, 'value': 3}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 5, 'value': 'f3'}, {'tag': 2, 'value': 1}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} -{'literalBuffer': [{'tag': 2, 'value': 3}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 5, 'value': 'f4'}, {'tag': 2, 'value': 1}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} +{'lb': [{'t': 2, 'v': 3}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 5, 'v': 'f0'}, {'t': 2, 'v': 1}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 3}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 5, 'v': 'f1'}, {'t': 2, 'v': 1}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 3}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 5, 'v': 'f2'}, {'t': 2, 'v': 1}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 3}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 5, 'v': 'f3'}, {'t': 2, 'v': 1}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 3}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 5, 'v': 'f4'}, {'t': 2, 'v': 1}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} diff --git a/testTs/expect/types/mapped/mappedTypes4.txt b/testTs/expect/types/mapped/mappedTypes4.txt index b42373995eef5fe6743e7ef3c6f1a6714c9bcc1f..ffccc055853d1d1e772aa2e94d04853728e35874 100644 --- a/testTs/expect/types/mapped/mappedTypes4.txt +++ b/testTs/expect/types/mapped/mappedTypes4.txt @@ -1,3 +1,3 @@ -{'literalBuffer': [{'tag': 2, 'value': 3}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 5, 'value': 'boxify'}, {'tag': 2, 'value': 1}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} -{'literalBuffer': [{'tag': 2, 'value': 3}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 5, 'value': 'f1'}, {'tag': 2, 'value': 1}, {'tag': 2, 'value': 53}, {'tag': 2, 'value': 0}]} -{'literalBuffer': [{'tag': 2, 'value': 4}, {'tag': 2, 'value': 4}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 7}]} \ No newline at end of file +{'lb': [{'t': 2, 'v': 3}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 5, 'v': 'boxify'}, {'t': 2, 'v': 1}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 3}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 5, 'v': 'f1'}, {'t': 2, 'v': 1}, {'t': 2, 'v': 53}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 4}, {'t': 2, 'v': 4}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 7}]} diff --git a/testTs/expect/types/nonPrimitive/nonPrimitiveRhsSideOfInExpression.txt b/testTs/expect/types/nonPrimitive/nonPrimitiveRhsSideOfInExpression.txt index b807a4aa58170a3588767dbd69ef0364a09f0393..c9c235bd74e839c9c7cd11d41ccf4bdde0b6466a 100644 --- a/testTs/expect/types/nonPrimitive/nonPrimitiveRhsSideOfInExpression.txt +++ b/testTs/expect/types/nonPrimitive/nonPrimitiveRhsSideOfInExpression.txt @@ -1 +1 @@ -{'literalBuffer': [{'tag': 2, 'value': 3}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 5, 'value': 'f'}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} +{'lb': [{'t': 2, 'v': 3}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 5, 'v': 'f'}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} diff --git a/testTs/expect/types/rest/genericObjectRest.txt b/testTs/expect/types/rest/genericObjectRest.txt index 84313d7105bd8a67db05b437ffb51a4084f88280..0a6617f37997cbd57c14dbb99eb64475450aff9c 100644 --- a/testTs/expect/types/rest/genericObjectRest.txt +++ b/testTs/expect/types/rest/genericObjectRest.txt @@ -1,4 +1,4 @@ -{'literalBuffer': [{'tag': 2, 'value': 3}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 5, 'value': 'f1'}, {'tag': 2, 'value': 1}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} -{'literalBuffer': [{'tag': 2, 'value': 3}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 5, 'value': 'f2'}, {'tag': 2, 'value': 1}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} -{'literalBuffer': [{'tag': 2, 'value': 3}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 5, 'value': 'f3'}, {'tag': 2, 'value': 3}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} -{'literalBuffer': [{'tag': 2, 'value': 3}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 5, 'value': 'f4'}, {'tag': 2, 'value': 3}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} +{'lb': [{'t': 2, 'v': 3}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 5, 'v': 'f1'}, {'t': 2, 'v': 1}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 3}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 5, 'v': 'f2'}, {'t': 2, 'v': 1}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 3}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 5, 'v': 'f3'}, {'t': 2, 'v': 3}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 3}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 5, 'v': 'f4'}, {'t': 2, 'v': 3}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} diff --git a/testTs/expect/types/specifyingTypes/typeQueries/typeofThisWithImplicitThis.txt b/testTs/expect/types/specifyingTypes/typeQueries/typeofThisWithImplicitThis.txt index 8788895ea28abd412edfc870971f2a10c5cc8095..62f438d5a4693c7842f7eb5d9b18ab2edcb85bd4 100644 --- a/testTs/expect/types/specifyingTypes/typeQueries/typeofThisWithImplicitThis.txt +++ b/testTs/expect/types/specifyingTypes/typeQueries/typeofThisWithImplicitThis.txt @@ -1 +1 @@ -{'literalBuffer': [{'tag': 2, 'value': 3}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 5, 'value': 'Test1'}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} +{'lb': [{'t': 2, 'v': 3}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 5, 'v': 'Test1'}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} diff --git a/testTs/expect/types/spread/objectSpreadComputedProperty.txt b/testTs/expect/types/spread/objectSpreadComputedProperty.txt index b807a4aa58170a3588767dbd69ef0364a09f0393..c9c235bd74e839c9c7cd11d41ccf4bdde0b6466a 100644 --- a/testTs/expect/types/spread/objectSpreadComputedProperty.txt +++ b/testTs/expect/types/spread/objectSpreadComputedProperty.txt @@ -1 +1 @@ -{'literalBuffer': [{'tag': 2, 'value': 3}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 5, 'value': 'f'}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} +{'lb': [{'t': 2, 'v': 3}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 5, 'v': 'f'}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} diff --git a/testTs/expect/types/spread/objectSpreadRepeatedComplexity.txt b/testTs/expect/types/spread/objectSpreadRepeatedComplexity.txt index a2d3e42bcd86e8c80cb026c24af89690059c4101..f5bc8f4990993bc35de2f03d2638923e887a11e2 100644 --- a/testTs/expect/types/spread/objectSpreadRepeatedComplexity.txt +++ b/testTs/expect/types/spread/objectSpreadRepeatedComplexity.txt @@ -1 +1 @@ -{'literalBuffer': [{'tag': 2, 'value': 3}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 5, 'value': 'f'}, {'tag': 2, 'value': 1}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} +{'lb': [{'t': 2, 'v': 3}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 5, 'v': 'f'}, {'t': 2, 'v': 1}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} diff --git a/testTs/expect/types/spread/spreadNonPrimitive.txt b/testTs/expect/types/spread/spreadNonPrimitive.txt index 21298678383a2f47b7d5e623f0e2ce33c2788888..9c839a127b10f9f3b663783635565f960a5aca4c 100644 --- a/testTs/expect/types/spread/spreadNonPrimitive.txt +++ b/testTs/expect/types/spread/spreadNonPrimitive.txt @@ -1 +1 @@ -{'literalBuffer': [{ 'tag': 2, 'value': 6 },{ 'tag': 2, 'value': 2 },{ 'tag': 5, 'value': 'a' },{ 'tag': 2, 'value': 1 },{ 'tag': 5, 'value': 'b' },{ 'tag': 2, 'value': 1 }]} \ No newline at end of file +{'lb': [{'t': 2, 'v': 6}, {'t': 2, 'v': 2}, {'t': 5, 'v': 'a'}, {'t': 2, 'v': 1}, {'t': 5, 'v': 'b'}, {'t': 2, 'v': 1}]} diff --git a/testTs/expect/types/stringLiteral/stringLiteralCheckedInIf01.txt b/testTs/expect/types/stringLiteral/stringLiteralCheckedInIf01.txt index a2d3e42bcd86e8c80cb026c24af89690059c4101..f5bc8f4990993bc35de2f03d2638923e887a11e2 100644 --- a/testTs/expect/types/stringLiteral/stringLiteralCheckedInIf01.txt +++ b/testTs/expect/types/stringLiteral/stringLiteralCheckedInIf01.txt @@ -1 +1 @@ -{'literalBuffer': [{'tag': 2, 'value': 3}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 5, 'value': 'f'}, {'tag': 2, 'value': 1}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} +{'lb': [{'t': 2, 'v': 3}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 5, 'v': 'f'}, {'t': 2, 'v': 1}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} diff --git a/testTs/expect/types/stringLiteral/stringLiteralCheckedInIf02.txt b/testTs/expect/types/stringLiteral/stringLiteralCheckedInIf02.txt index 4b0702c276814e301b9ab8acc35648dc09343175..1f6a6e781446a6a715c9c2985150b2c87f37493b 100644 --- a/testTs/expect/types/stringLiteral/stringLiteralCheckedInIf02.txt +++ b/testTs/expect/types/stringLiteral/stringLiteralCheckedInIf02.txt @@ -1,2 +1,2 @@ -{'literalBuffer': [{'tag': 2, 'value': 3}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 5, 'value': 'isS'}, {'tag': 2, 'value': 1}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} -{'literalBuffer': [{'tag': 2, 'value': 3}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 5, 'value': 'f'}, {'tag': 2, 'value': 1}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} +{'lb': [{'t': 2, 'v': 3}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 5, 'v': 'isS'}, {'t': 2, 'v': 1}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 3}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 5, 'v': 'f'}, {'t': 2, 'v': 1}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} diff --git a/testTs/expect/types/stringLiteral/stringLiteralTypesAsTypeParameterConstraint01.txt b/testTs/expect/types/stringLiteral/stringLiteralTypesAsTypeParameterConstraint01.txt index a06e5bf318624bc2352306e8e31c06815bbee0c7..01d793b20063846b573802da232c3bc450d3ab42 100644 --- a/testTs/expect/types/stringLiteral/stringLiteralTypesAsTypeParameterConstraint01.txt +++ b/testTs/expect/types/stringLiteral/stringLiteralTypesAsTypeParameterConstraint01.txt @@ -1,2 +1,2 @@ -{'literalBuffer': [{'tag': 2, 'value': 3}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 5, 'value': 'foo'}, {'tag': 2, 'value': 1}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} -{'literalBuffer': [{'tag': 2, 'value': 3}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 5, 'value': 'bar'}, {'tag': 2, 'value': 1}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} +{'lb': [{'t': 2, 'v': 3}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 5, 'v': 'foo'}, {'t': 2, 'v': 1}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 3}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 5, 'v': 'bar'}, {'t': 2, 'v': 1}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} diff --git a/testTs/expect/types/stringLiteral/stringLiteralTypesAsTypeParameterConstraint02.txt b/testTs/expect/types/stringLiteral/stringLiteralTypesAsTypeParameterConstraint02.txt index cf1009fe89b7093393199fffc8a622af3b5af2ad..32b6fbe74ebe915a22cce7827eb4dac7c61849f8 100644 --- a/testTs/expect/types/stringLiteral/stringLiteralTypesAsTypeParameterConstraint02.txt +++ b/testTs/expect/types/stringLiteral/stringLiteralTypesAsTypeParameterConstraint02.txt @@ -1 +1 @@ -{'literalBuffer': [{'tag': 2, 'value': 3}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 5, 'value': 'foo'}, {'tag': 2, 'value': 1}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} +{'lb': [{'t': 2, 'v': 3}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 5, 'v': 'foo'}, {'t': 2, 'v': 1}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} diff --git a/testTs/expect/types/stringLiteral/stringLiteralTypesOverloadAssignability04.txt b/testTs/expect/types/stringLiteral/stringLiteralTypesOverloadAssignability04.txt index 342a10de84544da742c8507c3de7722180a4a6f3..62ea456144dd7a3ccc1b9b07a5ee223ea56215f1 100644 --- a/testTs/expect/types/stringLiteral/stringLiteralTypesOverloadAssignability04.txt +++ b/testTs/expect/types/stringLiteral/stringLiteralTypesOverloadAssignability04.txt @@ -1,2 +1,2 @@ -{'literalBuffer': [{'tag': 2, 'value': 3}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 5, 'value': 'f'}, {'tag': 2, 'value': 1}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 1}]} -{'literalBuffer': [{'tag': 2, 'value': 3}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 5, 'value': 'g'}, {'tag': 2, 'value': 1}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 1}]} +{'lb': [{'t': 2, 'v': 3}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 5, 'v': 'f'}, {'t': 2, 'v': 1}, {'t': 2, 'v': 0}, {'t': 2, 'v': 1}]} +{'lb': [{'t': 2, 'v': 3}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 5, 'v': 'g'}, {'t': 2, 'v': 1}, {'t': 2, 'v': 0}, {'t': 2, 'v': 1}]} diff --git a/testTs/expect/types/stringLiteral/stringLiteralTypesOverloadAssignability05.txt b/testTs/expect/types/stringLiteral/stringLiteralTypesOverloadAssignability05.txt index 730d815aae378af6f72afe1d4be46e4647aed633..dcb0a099c8fad86bdbd05b4b0788b0e1c585fbe1 100644 --- a/testTs/expect/types/stringLiteral/stringLiteralTypesOverloadAssignability05.txt +++ b/testTs/expect/types/stringLiteral/stringLiteralTypesOverloadAssignability05.txt @@ -1,2 +1,2 @@ -{'literalBuffer': [{'tag': 2, 'value': 3}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 5, 'value': 'f'}, {'tag': 2, 'value': 1}, {'tag': 2, 'value': 4}, {'tag': 2, 'value': 1}]} -{'literalBuffer': [{'tag': 2, 'value': 3}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 5, 'value': 'g'}, {'tag': 2, 'value': 1}, {'tag': 2, 'value': 4}, {'tag': 2, 'value': 1}]} +{'lb': [{'t': 2, 'v': 3}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 5, 'v': 'f'}, {'t': 2, 'v': 1}, {'t': 2, 'v': 4}, {'t': 2, 'v': 1}]} +{'lb': [{'t': 2, 'v': 3}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 5, 'v': 'g'}, {'t': 2, 'v': 1}, {'t': 2, 'v': 4}, {'t': 2, 'v': 1}]} diff --git a/testTs/expect/types/stringLiteral/stringLiteralTypesWithVariousOperators01.txt b/testTs/expect/types/stringLiteral/stringLiteralTypesWithVariousOperators01.txt index ab2de2cae23b0b16871b5c701a08056183de804a..a9b36377ef3e84d5935a7745ec177afd6e935401 100644 --- a/testTs/expect/types/stringLiteral/stringLiteralTypesWithVariousOperators01.txt +++ b/testTs/expect/types/stringLiteral/stringLiteralTypesWithVariousOperators01.txt @@ -1,2 +1,2 @@ -{'literalBuffer': [{'tag': 2, 'value': 4}, {'tag': 2, 'value': 2}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} -{'literalBuffer': [{'tag': 2, 'value': 4}, {'tag': 2, 'value': 3}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 1}]} +{'lb': [{'t': 2, 'v': 4}, {'t': 2, 'v': 2}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 4}, {'t': 2, 'v': 3}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 1}]} diff --git a/testTs/expect/types/thisType/thisTypeOptionalCall.txt b/testTs/expect/types/thisType/thisTypeOptionalCall.txt index 660612c42a72fc3799d848b4bbd7cedec974de3e..7578cac223747309ee4d92026e99c3f459579655 100644 --- a/testTs/expect/types/thisType/thisTypeOptionalCall.txt +++ b/testTs/expect/types/thisType/thisTypeOptionalCall.txt @@ -1,3 +1,3 @@ -{'literalBuffer': [{'tag': 2, 'value': 3}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 5, 'value': 'maybeBind'}, {'tag': 2, 'value': 2}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 52}, {'tag': 2, 'value': 53}]} -{'literalBuffer': [{'tag': 2, 'value': 4}, {'tag': 2, 'value': 2},{'tag': 2, 'value': 0},{'tag': 2, 'value': 7}]} -{'literalBuffer': [{'tag': 2, 'value': 4}, {'tag': 2, 'value': 2},{'tag': 2, 'value': 0},{'tag': 2, 'value': 7}]} \ No newline at end of file +{'lb': [{'t': 2, 'v': 3}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 5, 'v': 'maybeBind'}, {'t': 2, 'v': 2}, {'t': 2, 'v': 0}, {'t': 2, 'v': 52}, {'t': 2, 'v': 53}]} +{'lb': [{'t': 2, 'v': 4}, {'t': 2, 'v': 2}, {'t': 2, 'v': 0}, {'t': 2, 'v': 7}]} +{'lb': [{'t': 2, 'v': 4}, {'t': 2, 'v': 2}, {'t': 2, 'v': 0}, {'t': 2, 'v': 7}]} diff --git a/testTs/expect/types/thisType/thisTypeSyntacticContext.txt b/testTs/expect/types/thisType/thisTypeSyntacticContext.txt index f8b0aa6dc2139f55deb4dea0c7035a5dd76d243c..c8ebf5a257b9e3f545b78551e977ade23467d9fe 100644 --- a/testTs/expect/types/thisType/thisTypeSyntacticContext.txt +++ b/testTs/expect/types/thisType/thisTypeSyntacticContext.txt @@ -1,3 +1,3 @@ -{'literalBuffer': [{'tag': 2, 'value': 3}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 5, 'value': 'f'}, {'tag': 2, 'value': 1}, {'tag': 2, 'value': 52}, {'tag': 2, 'value': 0}]} -{'literalBuffer': [{'tag': 2, 'value': 6}, {'tag': 2, 'value': 1},{'tag': 5, 'value': 'n'},{'tag': 2, 'value': 1}]} -{'literalBuffer': [{'tag': 2, 'value': 6}, {'tag': 2, 'value': 2},{'tag': 5, 'value': 'n'},{'tag': 2, 'value': 1},{'tag': 5, 'value': 'test'},{'tag': 2, 'value': 0}]} \ No newline at end of file +{'lb': [{'t': 2, 'v': 3}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 5, 'v': 'f'}, {'t': 2, 'v': 1}, {'t': 2, 'v': 52}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 6}, {'t': 2, 'v': 1}, {'t': 5, 'v': 'n'}, {'t': 2, 'v': 1}]} +{'lb': [{'t': 2, 'v': 6}, {'t': 2, 'v': 2}, {'t': 5, 'v': 'n'}, {'t': 2, 'v': 1}, {'t': 5, 'v': 'test'}, {'t': 2, 'v': 0}]} diff --git a/testTs/expect/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance2.txt b/testTs/expect/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance2.txt index 657ce94970ca9194be83e23b9f6541732879db36..c1b38c53bfa65bc219b33e0b225ab2a4af678f79 100644 --- a/testTs/expect/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance2.txt +++ b/testTs/expect/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance2.txt @@ -1,7 +1,7 @@ -{'literalBuffer': [{'tag': 2, 'value': 1}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 52}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 1}, {'tag': 5, 'value': 'bar'}, {'tag': 2, 'value': 4}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} -{'literalBuffer': [{'tag': 2, 'value': 1}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 1}, {'tag': 5, 'value': 'foo'}, {'tag': 2, 'value': 4}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} -{'literalBuffer': [{'tag': 2, 'value': 2}, {'tag': 2, 'value': 51}]} -{'literalBuffer': [{'tag': 2, 'value': 1}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 51}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 1}, {'tag': 5, 'value': 'baz'}, {'tag': 2, 'value': 4}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} -{'literalBuffer': [{'tag': 2, 'value': 2}, {'tag': 2, 'value': 54}]} -{'literalBuffer': [{'tag': 2, 'value': 1}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 52}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 1}, {'tag': 5, 'value': 'bing'}, {'tag': 2, 'value': 4}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} -{'literalBuffer': [{'tag': 2, 'value': 2}, {'tag': 2, 'value': 56}]} \ No newline at end of file +{'lb': [{'t': 2, 'v': 1}, {'t': 2, 'v': 0}, {'t': 2, 'v': 52}, {'t': 2, 'v': 0}, {'t': 2, 'v': 1}, {'t': 5, 'v': 'bar'}, {'t': 2, 'v': 4}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 1}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 1}, {'t': 5, 'v': 'foo'}, {'t': 2, 'v': 4}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 2}, {'t': 2, 'v': 51}]} +{'lb': [{'t': 2, 'v': 1}, {'t': 2, 'v': 0}, {'t': 2, 'v': 51}, {'t': 2, 'v': 0}, {'t': 2, 'v': 1}, {'t': 5, 'v': 'baz'}, {'t': 2, 'v': 4}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 2}, {'t': 2, 'v': 54}]} +{'lb': [{'t': 2, 'v': 1}, {'t': 2, 'v': 0}, {'t': 2, 'v': 52}, {'t': 2, 'v': 0}, {'t': 2, 'v': 1}, {'t': 5, 'v': 'bing'}, {'t': 2, 'v': 4}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 2}, {'t': 2, 'v': 56}]} diff --git a/testTs/expect/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance4.txt b/testTs/expect/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance4.txt index 657ce94970ca9194be83e23b9f6541732879db36..c1b38c53bfa65bc219b33e0b225ab2a4af678f79 100644 --- a/testTs/expect/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance4.txt +++ b/testTs/expect/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance4.txt @@ -1,7 +1,7 @@ -{'literalBuffer': [{'tag': 2, 'value': 1}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 52}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 1}, {'tag': 5, 'value': 'bar'}, {'tag': 2, 'value': 4}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} -{'literalBuffer': [{'tag': 2, 'value': 1}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 1}, {'tag': 5, 'value': 'foo'}, {'tag': 2, 'value': 4}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} -{'literalBuffer': [{'tag': 2, 'value': 2}, {'tag': 2, 'value': 51}]} -{'literalBuffer': [{'tag': 2, 'value': 1}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 51}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 1}, {'tag': 5, 'value': 'baz'}, {'tag': 2, 'value': 4}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} -{'literalBuffer': [{'tag': 2, 'value': 2}, {'tag': 2, 'value': 54}]} -{'literalBuffer': [{'tag': 2, 'value': 1}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 52}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 1}, {'tag': 5, 'value': 'bing'}, {'tag': 2, 'value': 4}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} -{'literalBuffer': [{'tag': 2, 'value': 2}, {'tag': 2, 'value': 56}]} \ No newline at end of file +{'lb': [{'t': 2, 'v': 1}, {'t': 2, 'v': 0}, {'t': 2, 'v': 52}, {'t': 2, 'v': 0}, {'t': 2, 'v': 1}, {'t': 5, 'v': 'bar'}, {'t': 2, 'v': 4}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 1}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 1}, {'t': 5, 'v': 'foo'}, {'t': 2, 'v': 4}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 2}, {'t': 2, 'v': 51}]} +{'lb': [{'t': 2, 'v': 1}, {'t': 2, 'v': 0}, {'t': 2, 'v': 51}, {'t': 2, 'v': 0}, {'t': 2, 'v': 1}, {'t': 5, 'v': 'baz'}, {'t': 2, 'v': 4}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 2}, {'t': 2, 'v': 54}]} +{'lb': [{'t': 2, 'v': 1}, {'t': 2, 'v': 0}, {'t': 2, 'v': 52}, {'t': 2, 'v': 0}, {'t': 2, 'v': 1}, {'t': 5, 'v': 'bing'}, {'t': 2, 'v': 4}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 2}, {'t': 2, 'v': 56}]} diff --git a/testTs/expect/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance5.txt b/testTs/expect/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance5.txt index 657ce94970ca9194be83e23b9f6541732879db36..c1b38c53bfa65bc219b33e0b225ab2a4af678f79 100644 --- a/testTs/expect/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance5.txt +++ b/testTs/expect/types/typeRelationships/assignmentCompatibility/callSignatureAssignabilityInInheritance5.txt @@ -1,7 +1,7 @@ -{'literalBuffer': [{'tag': 2, 'value': 1}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 52}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 1}, {'tag': 5, 'value': 'bar'}, {'tag': 2, 'value': 4}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} -{'literalBuffer': [{'tag': 2, 'value': 1}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 1}, {'tag': 5, 'value': 'foo'}, {'tag': 2, 'value': 4}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} -{'literalBuffer': [{'tag': 2, 'value': 2}, {'tag': 2, 'value': 51}]} -{'literalBuffer': [{'tag': 2, 'value': 1}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 51}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 1}, {'tag': 5, 'value': 'baz'}, {'tag': 2, 'value': 4}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} -{'literalBuffer': [{'tag': 2, 'value': 2}, {'tag': 2, 'value': 54}]} -{'literalBuffer': [{'tag': 2, 'value': 1}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 52}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 1}, {'tag': 5, 'value': 'bing'}, {'tag': 2, 'value': 4}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} -{'literalBuffer': [{'tag': 2, 'value': 2}, {'tag': 2, 'value': 56}]} \ No newline at end of file +{'lb': [{'t': 2, 'v': 1}, {'t': 2, 'v': 0}, {'t': 2, 'v': 52}, {'t': 2, 'v': 0}, {'t': 2, 'v': 1}, {'t': 5, 'v': 'bar'}, {'t': 2, 'v': 4}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 1}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 1}, {'t': 5, 'v': 'foo'}, {'t': 2, 'v': 4}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 2}, {'t': 2, 'v': 51}]} +{'lb': [{'t': 2, 'v': 1}, {'t': 2, 'v': 0}, {'t': 2, 'v': 51}, {'t': 2, 'v': 0}, {'t': 2, 'v': 1}, {'t': 5, 'v': 'baz'}, {'t': 2, 'v': 4}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 2}, {'t': 2, 'v': 54}]} +{'lb': [{'t': 2, 'v': 1}, {'t': 2, 'v': 0}, {'t': 2, 'v': 52}, {'t': 2, 'v': 0}, {'t': 2, 'v': 1}, {'t': 5, 'v': 'bing'}, {'t': 2, 'v': 4}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 2}, {'t': 2, 'v': 56}]} diff --git a/testTs/expect/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance2.txt b/testTs/expect/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance2.txt index 657ce94970ca9194be83e23b9f6541732879db36..c1b38c53bfa65bc219b33e0b225ab2a4af678f79 100644 --- a/testTs/expect/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance2.txt +++ b/testTs/expect/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance2.txt @@ -1,7 +1,7 @@ -{'literalBuffer': [{'tag': 2, 'value': 1}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 52}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 1}, {'tag': 5, 'value': 'bar'}, {'tag': 2, 'value': 4}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} -{'literalBuffer': [{'tag': 2, 'value': 1}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 1}, {'tag': 5, 'value': 'foo'}, {'tag': 2, 'value': 4}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} -{'literalBuffer': [{'tag': 2, 'value': 2}, {'tag': 2, 'value': 51}]} -{'literalBuffer': [{'tag': 2, 'value': 1}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 51}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 1}, {'tag': 5, 'value': 'baz'}, {'tag': 2, 'value': 4}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} -{'literalBuffer': [{'tag': 2, 'value': 2}, {'tag': 2, 'value': 54}]} -{'literalBuffer': [{'tag': 2, 'value': 1}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 52}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 1}, {'tag': 5, 'value': 'bing'}, {'tag': 2, 'value': 4}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} -{'literalBuffer': [{'tag': 2, 'value': 2}, {'tag': 2, 'value': 56}]} \ No newline at end of file +{'lb': [{'t': 2, 'v': 1}, {'t': 2, 'v': 0}, {'t': 2, 'v': 52}, {'t': 2, 'v': 0}, {'t': 2, 'v': 1}, {'t': 5, 'v': 'bar'}, {'t': 2, 'v': 4}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 1}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 1}, {'t': 5, 'v': 'foo'}, {'t': 2, 'v': 4}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 2}, {'t': 2, 'v': 51}]} +{'lb': [{'t': 2, 'v': 1}, {'t': 2, 'v': 0}, {'t': 2, 'v': 51}, {'t': 2, 'v': 0}, {'t': 2, 'v': 1}, {'t': 5, 'v': 'baz'}, {'t': 2, 'v': 4}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 2}, {'t': 2, 'v': 54}]} +{'lb': [{'t': 2, 'v': 1}, {'t': 2, 'v': 0}, {'t': 2, 'v': 52}, {'t': 2, 'v': 0}, {'t': 2, 'v': 1}, {'t': 5, 'v': 'bing'}, {'t': 2, 'v': 4}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 2}, {'t': 2, 'v': 56}]} diff --git a/testTs/expect/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance5.txt b/testTs/expect/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance5.txt index 657ce94970ca9194be83e23b9f6541732879db36..c1b38c53bfa65bc219b33e0b225ab2a4af678f79 100644 --- a/testTs/expect/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance5.txt +++ b/testTs/expect/types/typeRelationships/assignmentCompatibility/constructSignatureAssignabilityInInheritance5.txt @@ -1,7 +1,7 @@ -{'literalBuffer': [{'tag': 2, 'value': 1}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 52}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 1}, {'tag': 5, 'value': 'bar'}, {'tag': 2, 'value': 4}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} -{'literalBuffer': [{'tag': 2, 'value': 1}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 1}, {'tag': 5, 'value': 'foo'}, {'tag': 2, 'value': 4}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} -{'literalBuffer': [{'tag': 2, 'value': 2}, {'tag': 2, 'value': 51}]} -{'literalBuffer': [{'tag': 2, 'value': 1}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 51}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 1}, {'tag': 5, 'value': 'baz'}, {'tag': 2, 'value': 4}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} -{'literalBuffer': [{'tag': 2, 'value': 2}, {'tag': 2, 'value': 54}]} -{'literalBuffer': [{'tag': 2, 'value': 1}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 52}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 1}, {'tag': 5, 'value': 'bing'}, {'tag': 2, 'value': 4}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} -{'literalBuffer': [{'tag': 2, 'value': 2}, {'tag': 2, 'value': 56}]} \ No newline at end of file +{'lb': [{'t': 2, 'v': 1}, {'t': 2, 'v': 0}, {'t': 2, 'v': 52}, {'t': 2, 'v': 0}, {'t': 2, 'v': 1}, {'t': 5, 'v': 'bar'}, {'t': 2, 'v': 4}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 1}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 1}, {'t': 5, 'v': 'foo'}, {'t': 2, 'v': 4}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 2}, {'t': 2, 'v': 51}]} +{'lb': [{'t': 2, 'v': 1}, {'t': 2, 'v': 0}, {'t': 2, 'v': 51}, {'t': 2, 'v': 0}, {'t': 2, 'v': 1}, {'t': 5, 'v': 'baz'}, {'t': 2, 'v': 4}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 2}, {'t': 2, 'v': 54}]} +{'lb': [{'t': 2, 'v': 1}, {'t': 2, 'v': 0}, {'t': 2, 'v': 52}, {'t': 2, 'v': 0}, {'t': 2, 'v': 1}, {'t': 5, 'v': 'bing'}, {'t': 2, 'v': 4}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 2}, {'t': 2, 'v': 56}]} diff --git a/testTs/expect/types/typeRelationships/bestCommonType/functionWithMultipleReturnStatements.txt b/testTs/expect/types/typeRelationships/bestCommonType/functionWithMultipleReturnStatements.txt index c26b040444d71a25471ea039afb814531a1bf229..7f9d5c8bf15b6b3089571dcb5b4906c59de4e047 100644 --- a/testTs/expect/types/typeRelationships/bestCommonType/functionWithMultipleReturnStatements.txt +++ b/testTs/expect/types/typeRelationships/bestCommonType/functionWithMultipleReturnStatements.txt @@ -1,7 +1,7 @@ -{'literalBuffer': [{'tag': 2, 'value': 3}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 5, 'value': 'f1'}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} -{'literalBuffer': [{'tag': 2, 'value': 3}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 5, 'value': 'f2'}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} -{'literalBuffer': [{'tag': 2, 'value': 3}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 5, 'value': 'f3'}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} -{'literalBuffer': [{'tag': 2, 'value': 3}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 5, 'value': 'f4'}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} -{'literalBuffer': [{'tag': 2, 'value': 3}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 5, 'value': 'f5'}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} -{'literalBuffer': [{'tag': 2, 'value': 3}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 5, 'value': 'f6'}, {'tag': 2, 'value': 2}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} -{'literalBuffer': [{'tag': 2, 'value': 3}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 5, 'value': 'f8'}, {'tag': 2, 'value': 2}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} +{'lb': [{'t': 2, 'v': 3}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 5, 'v': 'f1'}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 3}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 5, 'v': 'f2'}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 3}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 5, 'v': 'f3'}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 3}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 5, 'v': 'f4'}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 3}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 5, 'v': 'f5'}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 3}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 5, 'v': 'f6'}, {'t': 2, 'v': 2}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 3}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 5, 'v': 'f8'}, {'t': 2, 'v': 2}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} diff --git a/testTs/expect/types/typeRelationships/bestCommonType/functionWithMultipleReturnStatements2.txt b/testTs/expect/types/typeRelationships/bestCommonType/functionWithMultipleReturnStatements2.txt index a0443461b49ba40e14adb9596ea2b805a7a82434..10dfdeaa77fb115c7a0ba385093c36878b78b540 100644 --- a/testTs/expect/types/typeRelationships/bestCommonType/functionWithMultipleReturnStatements2.txt +++ b/testTs/expect/types/typeRelationships/bestCommonType/functionWithMultipleReturnStatements2.txt @@ -1,11 +1,11 @@ -{'literalBuffer': [{'tag': 2, 'value': 3}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 5, 'value': 'f1'}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} -{'literalBuffer': [{'tag': 2, 'value': 3}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 5, 'value': 'f2'}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} -{'literalBuffer': [{'tag': 2, 'value': 3}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 5, 'value': 'f4'}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} -{'literalBuffer': [{'tag': 2, 'value': 3}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 5, 'value': 'f5'}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} -{'literalBuffer': [{'tag': 2, 'value': 3}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 5, 'value': 'f6'}, {'tag': 2, 'value': 1}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} -{'literalBuffer': [{'tag': 2, 'value': 6}, {'tag': 2, 'value': 2}, {'tag': 5, 'value': 'x'}, {'tag': 2, 'value': 1}, {'tag': 5, 'value': 'y'}, {'tag': 2, 'value': 1}]} -{'literalBuffer': [{'tag': 2, 'value': 6}, {'tag': 2, 'value': 2}, {'tag': 5, 'value': 'x'}, {'tag': 2, 'value': 1}, {'tag': 5, 'value': 'z'}, {'tag': 2, 'value': 1}]} -{'literalBuffer': [{'tag': 2, 'value': 3}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 5, 'value': 'f9'}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} -{'literalBuffer': [{'tag': 2, 'value': 3}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 5, 'value': 'f10'}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} -{'literalBuffer': [{'tag': 2, 'value': 3}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 5, 'value': 'f11'}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} -{'literalBuffer': [{'tag': 2, 'value': 3}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 5, 'value': 'f12'}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} +{'lb': [{'t': 2, 'v': 3}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 5, 'v': 'f1'}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 3}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 5, 'v': 'f2'}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 3}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 5, 'v': 'f4'}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 3}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 5, 'v': 'f5'}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 3}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 5, 'v': 'f6'}, {'t': 2, 'v': 1}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 6}, {'t': 2, 'v': 2}, {'t': 5, 'v': 'x'}, {'t': 2, 'v': 1}, {'t': 5, 'v': 'y'}, {'t': 2, 'v': 1}]} +{'lb': [{'t': 2, 'v': 6}, {'t': 2, 'v': 2}, {'t': 5, 'v': 'x'}, {'t': 2, 'v': 1}, {'t': 5, 'v': 'z'}, {'t': 2, 'v': 1}]} +{'lb': [{'t': 2, 'v': 3}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 5, 'v': 'f9'}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 3}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 5, 'v': 'f10'}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 3}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 5, 'v': 'f11'}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 3}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 5, 'v': 'f12'}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} diff --git a/testTs/expect/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints3.txt b/testTs/expect/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints3.txt index 632276b69a0381442c38d374fd8c51c0a1d26820..df60d742e936cd52836dda8256285f579e1bc6a8 100644 --- a/testTs/expect/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints3.txt +++ b/testTs/expect/types/typeRelationships/subtypesAndSuperTypes/subtypesOfTypeParameterWithConstraints3.txt @@ -1 +1 @@ -{'literalBuffer': [{'tag': 2, 'value': 3}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 5, 'value': 'f'}, {'tag': 2, 'value': 3}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} +{'lb': [{'t': 2, 'v': 3}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 5, 'v': 'f'}, {'t': 2, 'v': 3}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} diff --git a/testTs/expect/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembers4.txt b/testTs/expect/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembers4.txt index eaf990f35e0b78923cb338480962b5f9237e43ad..5bd26c2ca7e75576bd590eb198ec55fe4eb6aeb4 100644 --- a/testTs/expect/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembers4.txt +++ b/testTs/expect/types/typeRelationships/subtypesAndSuperTypes/subtypingWithObjectMembers4.txt @@ -1,13 +1,13 @@ -{'literalBuffer': [{ 'tag': 2, 'value': 1 },{ 'tag': 2, 'value': 0 },{ 'tag': 2, 'value': 52 },{ 'tag': 2, 'value': 0 },{ 'tag': 2, 'value': 1 },{ 'tag': 5, 'value': 'bar' },{ 'tag': 2, 'value': 4 },{ 'tag': 2, 'value': 0 },{ 'tag': 2, 'value': 0 },{ 'tag': 2, 'value': 0 },{ 'tag': 2, 'value': 0 },{ 'tag': 2, 'value': 0 }]} -{'literalBuffer': [{ 'tag': 2, 'value': 1 },{ 'tag': 2, 'value': 0 },{ 'tag': 2, 'value': 0 },{ 'tag': 2, 'value': 0 },{ 'tag': 2, 'value': 1 },{ 'tag': 5, 'value': 'foo' },{ 'tag': 2, 'value': 4 },{ 'tag': 2, 'value': 0 },{ 'tag': 2, 'value': 0 },{ 'tag': 2, 'value': 0 },{ 'tag': 2, 'value': 0 },{ 'tag': 2, 'value': 0 }]} -{'literalBuffer': [{ 'tag': 2, 'value': 2 },{ 'tag': 2, 'value': 51 }]} -{'literalBuffer': [{ 'tag': 2, 'value': 1 },{ 'tag': 2, 'value': 0 },{ 'tag': 2, 'value': 55 },{ 'tag': 2, 'value': 0 },{ 'tag': 2, 'value': 1 },{ 'tag': 5, 'value': 'fooo' },{ 'tag': 2, 'value': 53 },{ 'tag': 2, 'value': 0 },{ 'tag': 2, 'value': 0 },{ 'tag': 2, 'value': 0 },{ 'tag': 2, 'value': 0 },{ 'tag': 2, 'value': 0 }]} -{'literalBuffer': [{ 'tag': 2, 'value': 1 },{ 'tag': 2, 'value': 0 },{ 'tag': 2, 'value': 0 },{ 'tag': 2, 'value': 0 },{ 'tag': 2, 'value': 1 },{ 'tag': 5, 'value': 'foo' },{ 'tag': 2, 'value': 56 },{ 'tag': 2, 'value': 0 },{ 'tag': 2, 'value': 0 },{ 'tag': 2, 'value': 0 },{ 'tag': 2, 'value': 0 },{ 'tag': 2, 'value': 0 }]} -{ 'literalBuffer': [ { 'tag': 2, 'value': 2 }, { 'tag': 2, 'value': 52 } ] } -{ 'literalBuffer': [ { 'tag': 2, 'value': 2 }, { 'tag': 2, 'value': 54 } ] } -{'literalBuffer': [{ 'tag': 2, 'value': 1 },{ 'tag': 2, 'value': 0 },{ 'tag': 2, 'value': 59 },{ 'tag': 2, 'value': 0 },{ 'tag': 2, 'value': 1 },{ 'tag': 5, 'value': '1.1' },{ 'tag': 2, 'value': 53 },{ 'tag': 2, 'value': 0 },{ 'tag': 2, 'value': 0 },{ 'tag': 2, 'value': 0 },{ 'tag': 2, 'value': 0 },{ 'tag': 2, 'value': 0 }]} -{'literalBuffer': [{ 'tag': 2, 'value': 1 },{ 'tag': 2, 'value': 0 },{ 'tag': 2, 'value': 0 },{ 'tag': 2, 'value': 0 },{ 'tag': 2, 'value': 1 },{ 'tag': 5, 'value': '1' },{ 'tag': 2, 'value': 56 },{ 'tag': 2, 'value': 0 },{ 'tag': 2, 'value': 0 },{ 'tag': 2, 'value': 0 },{ 'tag': 2, 'value': 0 },{ 'tag': 2, 'value': 0 }]} -{ 'literalBuffer': [ { 'tag': 2, 'value': 2 }, { 'tag': 2, 'value': 58 } ] } -{'literalBuffer': [{ 'tag': 2, 'value': 1 },{ 'tag': 2, 'value': 0 },{ 'tag': 2, 'value': 62 },{ 'tag': 2, 'value': 0 },{ 'tag': 2, 'value': 1 },{ 'tag': 5, 'value': '1.1' },{ 'tag': 2, 'value': 53 },{ 'tag': 2, 'value': 0 },{ 'tag': 2, 'value': 0 },{ 'tag': 2, 'value': 0 },{ 'tag': 2, 'value': 0 },{ 'tag': 2, 'value': 0 }]} -{'literalBuffer': [{ 'tag': 2, 'value': 1 },{ 'tag': 2, 'value': 0 },{ 'tag': 2, 'value': 0 },{ 'tag': 2, 'value': 0 },{ 'tag': 2, 'value': 1 },{ 'tag': 5, 'value': '1' },{ 'tag': 2, 'value': 56 },{ 'tag': 2, 'value': 0 },{ 'tag': 2, 'value': 0 },{ 'tag': 2, 'value': 0 },{ 'tag': 2, 'value': 0 },{ 'tag': 2, 'value': 0 }]} -{ 'literalBuffer': [ { 'tag': 2, 'value': 2 }, { 'tag': 2, 'value': 61 } ] } \ No newline at end of file +{'lb': [{'t': 2, 'v': 1}, {'t': 2, 'v': 0}, {'t': 2, 'v': 52}, {'t': 2, 'v': 0}, {'t': 2, 'v': 1}, {'t': 5, 'v': 'bar'}, {'t': 2, 'v': 4}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 1}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 1}, {'t': 5, 'v': 'foo'}, {'t': 2, 'v': 4}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 2}, {'t': 2, 'v': 51}]} +{'lb': [{'t': 2, 'v': 1}, {'t': 2, 'v': 0}, {'t': 2, 'v': 55}, {'t': 2, 'v': 0}, {'t': 2, 'v': 1}, {'t': 5, 'v': 'fooo'}, {'t': 2, 'v': 53}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 1}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 1}, {'t': 5, 'v': 'foo'}, {'t': 2, 'v': 56}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 2}, {'t': 2, 'v': 52}]} +{'lb': [{'t': 2, 'v': 2}, {'t': 2, 'v': 54}]} +{'lb': [{'t': 2, 'v': 1}, {'t': 2, 'v': 0}, {'t': 2, 'v': 59}, {'t': 2, 'v': 0}, {'t': 2, 'v': 1}, {'t': 5, 'v': '1.1'}, {'t': 2, 'v': 53}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 1}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 1}, {'t': 5, 'v': '1'}, {'t': 2, 'v': 56}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 2}, {'t': 2, 'v': 58}]} +{'lb': [{'t': 2, 'v': 1}, {'t': 2, 'v': 0}, {'t': 2, 'v': 62}, {'t': 2, 'v': 0}, {'t': 2, 'v': 1}, {'t': 5, 'v': '1.1'}, {'t': 2, 'v': 53}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 1}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 1}, {'t': 5, 'v': '1'}, {'t': 2, 'v': 56}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 2}, {'t': 2, 'v': 61}]} diff --git a/testTs/expect/types/typeRelationships/subtypesAndSuperTypes/subtypingWithOptionalProperties.txt b/testTs/expect/types/typeRelationships/subtypesAndSuperTypes/subtypingWithOptionalProperties.txt index 36290151ea3dbaf29986f0711f9aea294655708e..b5d457b2c361bd8487bdab779f68a3f269f15be9 100644 --- a/testTs/expect/types/typeRelationships/subtypesAndSuperTypes/subtypingWithOptionalProperties.txt +++ b/testTs/expect/types/typeRelationships/subtypesAndSuperTypes/subtypingWithOptionalProperties.txt @@ -1,2 +1,2 @@ -{'literalBuffer': [{'tag': 2, 'value': 3}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}, {'tag': 5, 'value': 'f'}, {'tag': 2, 'value': 1}, {'tag': 2, 'value': 0}, {'tag': 2, 'value': 0}]} -{'literalBuffer': [{'tag': 2, 'value': 6}, {'tag': 2, 'value': 1}, {'tag': 5, 'value': 's'}, {'tag': 2, 'value': 1}]} \ No newline at end of file +{'lb': [{'t': 2, 'v': 3}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}, {'t': 5, 'v': 'f'}, {'t': 2, 'v': 1}, {'t': 2, 'v': 0}, {'t': 2, 'v': 0}]} +{'lb': [{'t': 2, 'v': 6}, {'t': 2, 'v': 1}, {'t': 5, 'v': 's'}, {'t': 2, 'v': 1}]} diff --git a/testTs/run_testTs.py b/testTs/run_testTs.py index 1e21b9ed5bbaad255a119757f7d45a479e1aabf9..1c96ee9d0801a46fa83c557612dc0d27154b0c7d 100644 --- a/testTs/run_testTs.py +++ b/testTs/run_testTs.py @@ -1,3 +1,23 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- + +""" +Copyright (c) 2022 Huawei Device Co., Ltd. +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + +Description: Use ark to execute test 262 test suite +""" + import os import subprocess import argparse @@ -22,21 +42,20 @@ def parse_args(): def skip(filepath,flag = False): - f = open(SKIP_FILE_PATH,'r') - content = f.read() - f.close() - test_list = [] - import_list =[] - skip_test = json.loads(content) - skip_test_list = skip_test['error.txt'] + skip_test['no2015'] + skip_test['tsc_error'] + skip_test['import_skip'] + skip_test['code_rule'] + skip_test['no_case'] - if os.path.isfile(filepath): - if '.ts' in filepath: - if filepath not in skip_test_list: - return True - else: - if flag: - print(f'This file is outside the scope of validation : {filepath}\n') - return False + with open(SKIP_FILE_PATH,'r') as f: + content = f.read() + test_list = [] + import_list =[] + skip_test = json.loads(content) + skip_test_list = skip_test['error.txt'] + skip_test['no2015'] + skip_test['tsc_error'] + skip_test['import_skip'] + skip_test['code_rule'] + skip_test['no_case'] + if os.path.isfile(filepath): + if '.ts' in filepath: + if filepath not in skip_test_list: + return True + else: + if flag: + print(f'This file is outside the scope of validation : {filepath}\n') + return False def abc_judge(filepath): if not os.path.getsize(filepath): @@ -59,7 +78,7 @@ def run_test(file, tool,flag = False): if not os.path.exists(out_dir_path): os.makedirs(out_dir_path) try: - command_os(f'node --expose-gc {tool} -m {file} --output-type') + command_os(f'node --expose-gc {tool} -m {file} --output-type') except: e = str(e) if flag: @@ -124,14 +143,12 @@ def run_test_machine(args): run_test(test_path, ark_frontend_tool) result = compare(test_path) result_path.append(result) - f = open(OUT_RESULT_FILE,'w') - f.writelines(result_path) - f.close() + with open(OUT_RESULT_FILE,'w') as f: + f.writelines(result_path) def read_out_file(file_path): - f = open(file_path,'r') - content = f.read() - f.close() + with open(file_path, 'r') as f: + content = f.read() if content: if '}\n{' in content: out_list = content.split('}\n{') @@ -172,11 +189,10 @@ def compare(file,flag = False): for fi in files: fi = f'{root}/{fi}' if fi != out_path: - f = open(fi,'r') - el_file_txt = f.read() - f.close() - write_append(out_path,el_file_txt) - remove_file(fi) + with open(fi,'r') as f: + el_file_txt = f.read() + write_append(out_path,el_file_txt) + remove_file(fi) if (not os.path.exists(out_path) or not os.path.exists(expect_path)): print("There are no expected files or validation file generation: %s", file) result = f'FAIL {file}\n' @@ -200,10 +216,11 @@ def summary(): return count = -1 fail_count = 0 - for count, line in enumerate(open(OUT_RESULT_FILE, 'r')): - if line.startswith("FAIL"): - fail_count += 1 - pass + with open(OUT_RESULT_FILE, 'r') as f: + for count, line in enumerate(f): + if line.startswith("FAIL"): + fail_count += 1 + pass count += 1 print("\n Regression summary") @@ -235,7 +252,7 @@ def prepare_ts_code(): remove_dir(TS_CASES_DIR) raise MyException("Pull TypeScript Code Fail, Please Check The Network Request") command_os(f'git apply ../test-case.patch') - command_os(f'cp -r tests/cases/conformance/* ./') + command_os(f'cp -r tests/cases/conformance/* ./') command_os(f'rm -rf ./tests') command_os('rm -rf .git') os.chdir('../../') diff --git a/testTs/utils.py b/testTs/utils.py index 41d066c776332cecd0d1ea06feb5a83e2aa56599..dcf42e7aea83ec774271b65ce687d9c9aa497ce8 100644 --- a/testTs/utils.py +++ b/testTs/utils.py @@ -1,3 +1,23 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- + +""" +Copyright (c) 2022 Huawei Device Co., Ltd. +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + +Description: Use ark to execute test 262 test suite +""" + import os import datetime import shutil @@ -9,8 +29,7 @@ import json #执行终端命令 def command_os(order): - cmd = order - os.system(cmd) + subprocess.run(order,shell=True) #创建文件夹 def mk_dir(path): @@ -33,32 +52,26 @@ def remove_file(path): #清空文件内容(path:文件路径) def clean_file(path): - f = open(path,'w') - f.write('') - f.close() + with open(path,'w') as f: + f.write('') #读取文件内容(全部) def read_file(path): - try: - f =open(path,'r') + content = [] + with open(path,'r') as f: content = f.readlines() - f.close() - except: - content = [] return content #写入文件,覆盖之前内容 def write_file(path,content): - f = open(path,'w') - f.write(content) - f.close() + with open(path,'w') as f: + f.write(content) #追加写入文件(path:文件路径,content:写入内容) def write_append(path,content): - f = open(path,'a+') - f.write(content) - f.close() + with open(path,'a+') as f: + f.write(content) def move_file(srcfile, dstfile): subprocess.getstatusoutput("mv %s %s" % (srcfile, dstfile)) @@ -120,4 +133,9 @@ def npm_install(cwd): command_os('npm install') os.chdir(WORK_PATH) except Exception as e: - print(e) \ No newline at end of file + print(e) + + + + + \ No newline at end of file diff --git a/test_ecma_bcopt/test_bytecode_optimizer_for_js.js b/test_ecma_bcopt/test_bytecode_optimizer_for_js.js new file mode 100755 index 0000000000000000000000000000000000000000..b09c563761b94973ecf90dd5f5f68f1f2b0ce734 --- /dev/null +++ b/test_ecma_bcopt/test_bytecode_optimizer_for_js.js @@ -0,0 +1,3 @@ +let a = [1]; +a[0] = 2; + diff --git a/test_ecma_bcopt/test_bytecode_optimizer_for_js.txt b/test_ecma_bcopt/test_bytecode_optimizer_for_js.txt new file mode 100755 index 0000000000000000000000000000000000000000..68a79ec1e82b065356e2b799fd26d928e9a1b3be --- /dev/null +++ b/test_ecma_bcopt/test_bytecode_optimizer_for_js.txt @@ -0,0 +1,35 @@ +# +# source binary: test_bytecode_optimizer_for_js.abc +# + +.language ECMAScript + +# ==================== +# LITERALS + + +# ==================== +# RECORDS + +.record _ESTypeAnnotation + +.record _ESModuleMode { + u8 isModule +} + +.record _ESCallTypeAnnotation + +# ==================== +# METHODS + +.function any func_main_0_any_any_any_any_(any a0, any a1, any a2) { + ecma.ldlexenvdyn + ecma.createarraywithbuffer 0x0 + ecma.stlettoglobalrecord "a" + ecma.tryldglobalbyname "a" + sta.dyn v0 + ldai.dyn 0x2 + ecma.stobjbyindex v0, 0x0 + ecma.returnundefined +} + diff --git a/ts2panda/BUILD.gn b/ts2panda/BUILD.gn index 58901e4fd4bc5f5b7d4bae8704deeef5a8f1781b..954e903051ed94a4d473a3781dd9bc6c8916e339 100755 --- a/ts2panda/BUILD.gn +++ b/ts2panda/BUILD.gn @@ -31,8 +31,13 @@ ohos_copy("node_modules") { module_install_name = "" } -ohos_copy("tsconfig_json") { - sources = [ "${ts2abc_root}/tsconfig.json" ] +ohos_copy("config_files") { + sources = [ + "${ts2abc_root}/package-lock.json", + "${ts2abc_root}/package.json", + "${ts2abc_root}/tsconfig.json", + "${ts2abc_root}/webpack.config.js", + ] outputs = [ target_out_dir + "/{{source_file_part}}" ] module_install_name = "" @@ -71,13 +76,17 @@ ark_gen_file("ts2abc_irnodes_ts") { action("npm_run_build") { visibility = [ ":*" ] deps = [ + "$ts2abc_root:config_files", "$ts2abc_root:node_modules", "$ts2abc_root:ts2abc_diagnostic_ts", "$ts2abc_root:ts2abc_irnodes_ts", "$ts2abc_root:ts2abc_src", - "$ts2abc_root:tsconfig_json", ] + if (is_linux || is_mingw || is_mac) { + deps += [ "$ts2abc_root/ts2abc:ts2abc" ] + } + script = "${ts2abc_root}/scripts/run.py" args = [ "--src-dir", @@ -94,79 +103,58 @@ action("npm_run_build") { args += [ "--platform", "linux", + "--js2abc", + rebase_path("${root_out_dir}/ark/ark/js2abc"), ] } else if (is_mingw) { args += [ "--platform", "win", + "--js2abc", + rebase_path("${root_out_dir}/ark/ark/js2abc.exe"), ] } else if (is_mac) { args += [ "--platform", "mac", + "--js2abc", + rebase_path("${root_out_dir}/ark/ark/js2abc"), + ] + } + + if (is_debug) { + args += [ + "--buildMode", + "debug", + ] + } else { + args += [ + "--buildMode", + "release", ] } + outputs = [] if (is_mingw) { - outputs += [ "${target_out_dir}/build-win" ] + outputs += [ "${root_out_dir}/ark/ark/build-win" ] } else if (is_mac) { - outputs += [ "${target_out_dir}/build-mac" ] + outputs += [ "${root_out_dir}/ark/ark/build-mac" ] } else { - outputs += [ "${target_out_dir}/build" ] + outputs += [ "${root_out_dir}/ark/ark/build" ] } } if (is_linux) { - ohos_copy("src_linux") { - deps = [ "$ts2abc_root:npm_run_build" ] - sources = [ "${target_out_dir}/build" ] - outputs = [ "${root_out_dir}/ark/ark/build" ] - module_source_dir = target_out_dir + "/build/src" - module_install_name = "" - } - - ohos_copy("ts2abc_tool") { - sources = [ "${root_out_dir}/ark/ark/js2abc" ] - outputs = [ "${root_out_dir}/ark/ark/build/bin/{{source_file_part}}" ] - module_install_name = "" - - deps = [ - ":src_linux", - "$ts2abc_root/ts2abc:ts2abc", - ] - } - - ohos_copy("ts2abc_linux") { - deps = [ - ":ts2abc_tool", - "$ts2abc_root/ts2abc:ts2abc", - ] - sources = [ "${root_out_dir}/ark/ark/js2abc" ] - outputs = [ "${target_out_dir}/build/bin/{{source_file_part}}" ] - module_source_dir = "${root_out_dir}/ark/ark/build/bin" - module_install_name = "" - } - ohos_copy("ts2abc_build") { - deps = [ - ":panda_ts2abc", - ":ts2abc_linux", - ] - sources = [ - "${ts2abc_root}/package-lock.json", - "${ts2abc_root}/package.json", - ] - - outputs = [ "${root_out_dir}/ark/ark/build/{{source_file_part}}" ] + deps = [ "$ts2abc_root:npm_run_build" ] + sources = [ "${root_out_dir}/ark/ark/build" ] + outputs = [ "${target_out_dir}/build-tmp" ] module_source_dir = "${root_out_dir}/ark/ark/build" module_install_name = "" } ohos_copy("ts2abc_build_ets") { - deps = [ - ":src_linux", - ":ts2abc_build", - ] + deps = [ "$ts2abc_root:npm_run_build" ] sources = [ "${root_out_dir}/ark/ark/build" ] outputs = [ "${root_out_dir}/ark/ark/build-ets" ] @@ -176,55 +164,16 @@ if (is_linux) { } if (is_mingw) { - ohos_copy("src_win") { - deps = [ "$ts2abc_root:npm_run_build" ] - sources = [ "${target_out_dir}/build-win" ] - outputs = [ "${root_out_dir}/ark/ark/build-win" ] - module_source_dir = target_out_dir + "/build-win/src" - module_install_name = "" - } - - ohos_copy("ts2abc_tool_win") { - sources = [ "${root_out_dir}/ark/ark/js2abc.exe" ] - outputs = [ "${root_out_dir}/ark/ark/build-win/bin/{{source_file_part}}" ] - module_install_name = "" - - deps = [ - ":src_win", - "$ts2abc_root/ts2abc:ts2abc", - ] - } - - ohos_copy("ts2abc_win") { - deps = [ - ":ts2abc_tool_win", - "$ts2abc_root/ts2abc:ts2abc", - ] - sources = [ "${root_out_dir}/ark/ark/js2abc.exe" ] - outputs = [ "${target_out_dir}/build-win/bin/{{source_file_part}}" ] - module_source_dir = "${root_out_dir}/ark/ark/build-win/bin" - module_install_name = "" - } - ohos_copy("ts2abc_build_win") { - deps = [ - ":panda_ts2abc", - ":ts2abc_win", - ] - sources = [ - "${ts2abc_root}/package-lock.json", - "${ts2abc_root}/package.json", - ] - outputs = [ "${root_out_dir}/ark/ark/build-win/{{source_file_part}}" ] + deps = [ "$ts2abc_root:npm_run_build" ] + sources = [ "${root_out_dir}/ark/ark/build-win" ] + outputs = [ "${target_out_dir}/build-tmp" ] module_source_dir = "${root_out_dir}/ark/ark/build-win" module_install_name = "" } ohos_copy("ts2abc_build_win_ets") { - deps = [ - ":src_win", - ":ts2abc_build_win", - ] + deps = [ "$ts2abc_root:npm_run_build" ] sources = [ "${root_out_dir}/ark/ark/build-win" ] outputs = [ "${root_out_dir}/ark/ark/build-win-ets" ] module_source_dir = "${root_out_dir}/ark/ark/build-win-ets" @@ -233,55 +182,16 @@ if (is_mingw) { } if (is_mac) { - ohos_copy("src_mac") { - deps = [ "$ts2abc_root:npm_run_build" ] - sources = [ "${target_out_dir}/build-mac" ] - outputs = [ "${root_out_dir}/ark/ark/build-mac" ] - module_source_dir = target_out_dir + "/build-mac/src" - module_install_name = "" - } - - ohos_copy("ts2abc_tool_mac") { - sources = [ "${root_out_dir}/ark/ark/js2abc" ] - outputs = [ "${root_out_dir}/ark/ark/build-mac/bin/{{source_file_part}}" ] - module_install_name = "" - - deps = [ - ":src_mac", - "$ts2abc_root/ts2abc:ts2abc", - ] - } - - ohos_copy("ts2abc_mac") { - deps = [ - ":ts2abc_tool_mac", - "$ts2abc_root/ts2abc:ts2abc", - ] - sources = [ "${root_out_dir}/ark/ark/js2abc" ] - outputs = [ "${target_out_dir}/build-mac/bin/{{source_file_part}}" ] - module_source_dir = "${root_out_dir}/ark/ark/build-mac/bin" - module_install_name = "" - } - ohos_copy("ts2abc_build_mac") { - deps = [ - ":panda_ts2abc", - ":ts2abc_mac", - ] - sources = [ - "${ts2abc_root}/package-lock.json", - "${ts2abc_root}/package.json", - ] - outputs = [ "${root_out_dir}/ark/ark/build-mac/{{source_file_part}}" ] + deps = [ "$ts2abc_root:npm_run_build" ] + sources = [ "${root_out_dir}/ark/ark/build-mac" ] + outputs = [ "${target_out_dir}/build-tmp" ] module_source_dir = "${root_out_dir}/ark/ark/build-mac" module_install_name = "" } ohos_copy("ts2abc_build_mac_ets") { - deps = [ - ":src_mac", - ":ts2abc_build_mac", - ] + deps = [ "$ts2abc_root:npm_run_build" ] sources = [ "${root_out_dir}/ark/ark/build-mac" ] outputs = [ "${root_out_dir}/ark/ark/build-mac-ets" ] module_source_dir = "${root_out_dir}/ark/ark/build-mac-ets" diff --git a/ts2panda/package-lock.json b/ts2panda/package-lock.json index 646821ba8881cb3f9add02ae06249b613d902356..74fc58965509dec3cc76c239b1a5b4a7558d9729 100644 --- a/ts2panda/package-lock.json +++ b/ts2panda/package-lock.json @@ -963,6 +963,12 @@ "to-fast-properties": "^2.0.0" } }, + "@discoveryjs/json-ext": { + "version": "0.5.6", + "resolved": "https://registry.npmmirror.com/@discoveryjs/json-ext/-/json-ext-0.5.6.tgz", + "integrity": "sha512-ws57AidsDvREKrZKYffXddNkyaF14iHNHm8VQnZH6t99E8gczjNN0GpvcGny0imC80yQ0tHz1xVUKk/KFQSUyA==", + "dev": true + }, "@sinonjs/commons": { "version": "1.8.3", "resolved": "https://repo.huaweicloud.com/repository/npm/@sinonjs/commons/-/commons-1.8.3.tgz", @@ -1021,9 +1027,9 @@ "dev": true }, "@types/node": { - "version": "14.17.21", - "resolved": "https://repo.huaweicloud.com/repository/npm/@types/node/-/node-14.17.21.tgz", - "integrity": "sha512-zv8ukKci1mrILYiQOwGSV4FpkZhyxQtuFWGya2GujWg+zVAeRQ4qbaMmWp9vb9889CFA8JECH7lkwCL6Ygg8kA==", + "version": "10.5.5", + "resolved": "https://registry.npmmirror.com/@types/node/-/node-10.5.5.tgz", + "integrity": "sha512-6Qnb1gXbp3g1JX9QVJj3A6ORzc9XCyhokxUKaoonHgNXcQhmk8adhotxfkeK8El9TnFeUuH72yI6jQ5nDJKS6w==", "dev": true }, "@types/sinon": { @@ -1057,6 +1063,244 @@ "integrity": "sha512-sL/cEvJWAnClXw0wHk85/2L0G6Sj8UB0Ctc1TEMbKSsmpRosqhwj9gWgFRZSrBr2f9tiXISwNhCPmlfqUqyb9Q==", "dev": true }, + "@webassemblyjs/ast": { + "version": "1.9.0", + "resolved": "https://registry.npmmirror.com/@webassemblyjs/ast/-/ast-1.9.0.tgz", + "integrity": "sha512-C6wW5L+b7ogSDVqymbkkvuW9kruN//YisMED04xzeBBqjHa2FYnmvOlS6Xj68xWQRgWvI9cIglsjFowH/RJyEA==", + "dev": true, + "requires": { + "@webassemblyjs/helper-module-context": "1.9.0", + "@webassemblyjs/helper-wasm-bytecode": "1.9.0", + "@webassemblyjs/wast-parser": "1.9.0" + } + }, + "@webassemblyjs/floating-point-hex-parser": { + "version": "1.9.0", + "resolved": "https://registry.npmmirror.com/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.9.0.tgz", + "integrity": "sha512-TG5qcFsS8QB4g4MhrxK5TqfdNe7Ey/7YL/xN+36rRjl/BlGE/NcBvJcqsRgCP6Z92mRE+7N50pRIi8SmKUbcQA==", + "dev": true + }, + "@webassemblyjs/helper-api-error": { + "version": "1.9.0", + "resolved": "https://registry.npmmirror.com/@webassemblyjs/helper-api-error/-/helper-api-error-1.9.0.tgz", + "integrity": "sha512-NcMLjoFMXpsASZFxJ5h2HZRcEhDkvnNFOAKneP5RbKRzaWJN36NC4jqQHKwStIhGXu5mUWlUUk7ygdtrO8lbmw==", + "dev": true + }, + "@webassemblyjs/helper-buffer": { + "version": "1.9.0", + "resolved": "https://registry.npmmirror.com/@webassemblyjs/helper-buffer/-/helper-buffer-1.9.0.tgz", + "integrity": "sha512-qZol43oqhq6yBPx7YM3m9Bv7WMV9Eevj6kMi6InKOuZxhw+q9hOkvq5e/PpKSiLfyetpaBnogSbNCfBwyB00CA==", + "dev": true + }, + "@webassemblyjs/helper-code-frame": { + "version": "1.9.0", + "resolved": "https://registry.npmmirror.com/@webassemblyjs/helper-code-frame/-/helper-code-frame-1.9.0.tgz", + "integrity": "sha512-ERCYdJBkD9Vu4vtjUYe8LZruWuNIToYq/ME22igL+2vj2dQ2OOujIZr3MEFvfEaqKoVqpsFKAGsRdBSBjrIvZA==", + "dev": true, + "requires": { + "@webassemblyjs/wast-printer": "1.9.0" + } + }, + "@webassemblyjs/helper-fsm": { + "version": "1.9.0", + "resolved": "https://registry.npmmirror.com/@webassemblyjs/helper-fsm/-/helper-fsm-1.9.0.tgz", + "integrity": "sha512-OPRowhGbshCb5PxJ8LocpdX9Kl0uB4XsAjl6jH/dWKlk/mzsANvhwbiULsaiqT5GZGT9qinTICdj6PLuM5gslw==", + "dev": true + }, + "@webassemblyjs/helper-module-context": { + "version": "1.9.0", + "resolved": "https://registry.npmmirror.com/@webassemblyjs/helper-module-context/-/helper-module-context-1.9.0.tgz", + "integrity": "sha512-MJCW8iGC08tMk2enck1aPW+BE5Cw8/7ph/VGZxwyvGbJwjktKkDK7vy7gAmMDx88D7mhDTCNKAW5tED+gZ0W8g==", + "dev": true, + "requires": { + "@webassemblyjs/ast": "1.9.0" + } + }, + "@webassemblyjs/helper-wasm-bytecode": { + "version": "1.9.0", + "resolved": "https://registry.npmmirror.com/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.9.0.tgz", + "integrity": "sha512-R7FStIzyNcd7xKxCZH5lE0Bqy+hGTwS3LJjuv1ZVxd9O7eHCedSdrId/hMOd20I+v8wDXEn+bjfKDLzTepoaUw==", + "dev": true + }, + "@webassemblyjs/helper-wasm-section": { + "version": "1.9.0", + "resolved": "https://registry.npmmirror.com/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.9.0.tgz", + "integrity": "sha512-XnMB8l3ek4tvrKUUku+IVaXNHz2YsJyOOmz+MMkZvh8h1uSJpSen6vYnw3IoQ7WwEuAhL8Efjms1ZWjqh2agvw==", + "dev": true, + "requires": { + "@webassemblyjs/ast": "1.9.0", + "@webassemblyjs/helper-buffer": "1.9.0", + "@webassemblyjs/helper-wasm-bytecode": "1.9.0", + "@webassemblyjs/wasm-gen": "1.9.0" + } + }, + "@webassemblyjs/ieee754": { + "version": "1.9.0", + "resolved": "https://registry.npmmirror.com/@webassemblyjs/ieee754/-/ieee754-1.9.0.tgz", + "integrity": "sha512-dcX8JuYU/gvymzIHc9DgxTzUUTLexWwt8uCTWP3otys596io0L5aW02Gb1RjYpx2+0Jus1h4ZFqjla7umFniTg==", + "dev": true, + "requires": { + "@xtuc/ieee754": "^1.2.0" + } + }, + "@webassemblyjs/leb128": { + "version": "1.9.0", + "resolved": "https://registry.npmmirror.com/@webassemblyjs/leb128/-/leb128-1.9.0.tgz", + "integrity": "sha512-ENVzM5VwV1ojs9jam6vPys97B/S65YQtv/aanqnU7D8aSoHFX8GyhGg0CMfyKNIHBuAVjy3tlzd5QMMINa7wpw==", + "dev": true, + "requires": { + "@xtuc/long": "4.2.2" + } + }, + "@webassemblyjs/utf8": { + "version": "1.9.0", + "resolved": "https://registry.npmmirror.com/@webassemblyjs/utf8/-/utf8-1.9.0.tgz", + "integrity": "sha512-GZbQlWtopBTP0u7cHrEx+73yZKrQoBMpwkGEIqlacljhXCkVM1kMQge/Mf+csMJAjEdSwhOyLAS0AoR3AG5P8w==", + "dev": true + }, + "@webassemblyjs/wasm-edit": { + "version": "1.9.0", + "resolved": "https://registry.npmmirror.com/@webassemblyjs/wasm-edit/-/wasm-edit-1.9.0.tgz", + "integrity": "sha512-FgHzBm80uwz5M8WKnMTn6j/sVbqilPdQXTWraSjBwFXSYGirpkSWE2R9Qvz9tNiTKQvoKILpCuTjBKzOIm0nxw==", + "dev": true, + "requires": { + "@webassemblyjs/ast": "1.9.0", + "@webassemblyjs/helper-buffer": "1.9.0", + "@webassemblyjs/helper-wasm-bytecode": "1.9.0", + "@webassemblyjs/helper-wasm-section": "1.9.0", + "@webassemblyjs/wasm-gen": "1.9.0", + "@webassemblyjs/wasm-opt": "1.9.0", + "@webassemblyjs/wasm-parser": "1.9.0", + "@webassemblyjs/wast-printer": "1.9.0" + } + }, + "@webassemblyjs/wasm-gen": { + "version": "1.9.0", + "resolved": "https://registry.npmmirror.com/@webassemblyjs/wasm-gen/-/wasm-gen-1.9.0.tgz", + "integrity": "sha512-cPE3o44YzOOHvlsb4+E9qSqjc9Qf9Na1OO/BHFy4OI91XDE14MjFN4lTMezzaIWdPqHnsTodGGNP+iRSYfGkjA==", + "dev": true, + "requires": { + "@webassemblyjs/ast": "1.9.0", + "@webassemblyjs/helper-wasm-bytecode": "1.9.0", + "@webassemblyjs/ieee754": "1.9.0", + "@webassemblyjs/leb128": "1.9.0", + "@webassemblyjs/utf8": "1.9.0" + } + }, + "@webassemblyjs/wasm-opt": { + "version": "1.9.0", + "resolved": "https://registry.npmmirror.com/@webassemblyjs/wasm-opt/-/wasm-opt-1.9.0.tgz", + "integrity": "sha512-Qkjgm6Anhm+OMbIL0iokO7meajkzQD71ioelnfPEj6r4eOFuqm4YC3VBPqXjFyyNwowzbMD+hizmprP/Fwkl2A==", + "dev": true, + "requires": { + "@webassemblyjs/ast": "1.9.0", + "@webassemblyjs/helper-buffer": "1.9.0", + "@webassemblyjs/wasm-gen": "1.9.0", + "@webassemblyjs/wasm-parser": "1.9.0" + } + }, + "@webassemblyjs/wasm-parser": { + "version": "1.9.0", + "resolved": "https://registry.npmmirror.com/@webassemblyjs/wasm-parser/-/wasm-parser-1.9.0.tgz", + "integrity": "sha512-9+wkMowR2AmdSWQzsPEjFU7njh8HTO5MqO8vjwEHuM+AMHioNqSBONRdr0NQQ3dVQrzp0s8lTcYqzUdb7YgELA==", + "dev": true, + "requires": { + "@webassemblyjs/ast": "1.9.0", + "@webassemblyjs/helper-api-error": "1.9.0", + "@webassemblyjs/helper-wasm-bytecode": "1.9.0", + "@webassemblyjs/ieee754": "1.9.0", + "@webassemblyjs/leb128": "1.9.0", + "@webassemblyjs/utf8": "1.9.0" + } + }, + "@webassemblyjs/wast-parser": { + "version": "1.9.0", + "resolved": "https://registry.npmmirror.com/@webassemblyjs/wast-parser/-/wast-parser-1.9.0.tgz", + "integrity": "sha512-qsqSAP3QQ3LyZjNC/0jBJ/ToSxfYJ8kYyuiGvtn/8MK89VrNEfwj7BPQzJVHi0jGTRK2dGdJ5PRqhtjzoww+bw==", + "dev": true, + "requires": { + "@webassemblyjs/ast": "1.9.0", + "@webassemblyjs/floating-point-hex-parser": "1.9.0", + "@webassemblyjs/helper-api-error": "1.9.0", + "@webassemblyjs/helper-code-frame": "1.9.0", + "@webassemblyjs/helper-fsm": "1.9.0", + "@xtuc/long": "4.2.2" + } + }, + "@webassemblyjs/wast-printer": { + "version": "1.9.0", + "resolved": "https://registry.npmmirror.com/@webassemblyjs/wast-printer/-/wast-printer-1.9.0.tgz", + "integrity": "sha512-2J0nE95rHXHyQ24cWjMKJ1tqB/ds8z/cyeOZxJhcb+rW+SQASVjuznUSmdz5GpVJTzU8JkhYut0D3siFDD6wsA==", + "dev": true, + "requires": { + "@webassemblyjs/ast": "1.9.0", + "@webassemblyjs/wast-parser": "1.9.0", + "@xtuc/long": "4.2.2" + } + }, + "@webpack-cli/configtest": { + "version": "1.1.1", + "resolved": "https://registry.npmmirror.com/@webpack-cli/configtest/-/configtest-1.1.1.tgz", + "integrity": "sha512-1FBc1f9G4P/AxMqIgfZgeOTuRnwZMten8E7zap5zgpPInnCrP8D4Q81+4CWIch8i/Nf7nXjP0v6CjjbHOrXhKg==", + "dev": true + }, + "@webpack-cli/info": { + "version": "1.4.1", + "resolved": "https://registry.npmmirror.com/@webpack-cli/info/-/info-1.4.1.tgz", + "integrity": "sha512-PKVGmazEq3oAo46Q63tpMr4HipI3OPfP7LiNOEJg963RMgT0rqheag28NCML0o3GIzA3DmxP1ZIAv9oTX1CUIA==", + "dev": true, + "requires": { + "envinfo": "^7.7.3" + } + }, + "@webpack-cli/serve": { + "version": "1.6.1", + "resolved": "https://registry.npmmirror.com/@webpack-cli/serve/-/serve-1.6.1.tgz", + "integrity": "sha512-gNGTiTrjEVQ0OcVnzsRSqTxaBSr+dmTfm+qJsCDluky8uhdLWep7Gcr62QsAKHTMxjCS/8nEITsmFAhfIx+QSw==", + "dev": true + }, + "@xtuc/ieee754": { + "version": "1.2.0", + "resolved": "https://registry.npmmirror.com/@xtuc/ieee754/-/ieee754-1.2.0.tgz", + "integrity": "sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA==", + "dev": true + }, + "@xtuc/long": { + "version": "4.2.2", + "resolved": "https://registry.npmmirror.com/@xtuc/long/-/long-4.2.2.tgz", + "integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==", + "dev": true + }, + "acorn": { + "version": "6.4.2", + "resolved": "https://registry.npmmirror.com/acorn/-/acorn-6.4.2.tgz", + "integrity": "sha512-XtGIhXwF8YM8bJhGxG5kXgjkEuNGLTkoYqVE+KMR+aspr4KGYmKYg7yUe3KghyQ9yheNwLnjmzh/7+gfDBmHCQ==", + "dev": true + }, + "ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmmirror.com/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "requires": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + } + }, + "ajv-errors": { + "version": "1.0.1", + "resolved": "https://registry.npmmirror.com/ajv-errors/-/ajv-errors-1.0.1.tgz", + "integrity": "sha512-DCRfO/4nQ+89p/RK43i8Ezd41EqdGIU4ld7nGF8OQ14oc/we5rEntLCUa7+jrn3nn83BosfwZA0wb4pon2o8iQ==", + "dev": true + }, + "ajv-keywords": { + "version": "3.5.2", + "resolved": "https://registry.npmmirror.com/ajv-keywords/-/ajv-keywords-3.5.2.tgz", + "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", + "dev": true + }, "ansi-colors": { "version": "4.1.1", "resolved": "https://repo.huaweicloud.com/repository/npm/ansi-colors/-/ansi-colors-4.1.1.tgz", @@ -1086,6 +1330,12 @@ "picomatch": "^2.0.4" } }, + "aproba": { + "version": "1.2.0", + "resolved": "https://registry.npmmirror.com/aproba/-/aproba-1.2.0.tgz", + "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==", + "dev": true + }, "argparse": { "version": "1.0.10", "resolved": "https://repo.huaweicloud.com/repository/npm/argparse/-/argparse-1.0.10.tgz", @@ -1094,17 +1344,94 @@ "sprintf-js": "~1.0.2" } }, + "arr-diff": { + "version": "4.0.0", + "resolved": "https://registry.npmmirror.com/arr-diff/-/arr-diff-4.0.0.tgz", + "integrity": "sha512-YVIQ82gZPGBebQV/a8dar4AitzCQs0jjXwMPZllpXMaGjXPYVUawSxQrRsjhjupyVxEvbHgUmIhKVlND+j02kA==", + "dev": true + }, + "arr-flatten": { + "version": "1.1.0", + "resolved": "https://registry.npmmirror.com/arr-flatten/-/arr-flatten-1.1.0.tgz", + "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==", + "dev": true + }, + "arr-union": { + "version": "3.1.0", + "resolved": "https://registry.npmmirror.com/arr-union/-/arr-union-3.1.0.tgz", + "integrity": "sha512-sKpyeERZ02v1FeCZT8lrfJq5u6goHCtpTAzPwJYe7c8SPFOboNjNg1vz2L4VTn9T4PQxEx13TbXLmYUcS6Ug7Q==", + "dev": true + }, "array-back": { "version": "3.1.0", "resolved": "https://repo.huaweicloud.com/repository/npm/array-back/-/array-back-3.1.0.tgz", "integrity": "sha512-TkuxA4UCOvxuDK6NZYXCalszEzj+TLszyASooky+i742l9TqsOdYCMJJupxRic61hwquNtppB3hgcuq9SVSH1Q==" }, + "array-unique": { + "version": "0.3.2", + "resolved": "https://registry.npmmirror.com/array-unique/-/array-unique-0.3.2.tgz", + "integrity": "sha512-SleRWjh9JUud2wH1hPs9rZBZ33H6T9HOiL0uwGnGx9FpE6wKGyfWugmbkEOIs6qWrZhg0LWeLziLrEwQJhs5mQ==", + "dev": true + }, + "asn1.js": { + "version": "5.4.1", + "resolved": "https://registry.npmmirror.com/asn1.js/-/asn1.js-5.4.1.tgz", + "integrity": "sha512-+I//4cYPccV8LdmBLiX8CYvf9Sp3vQsrqu2QNXRcrbiWvcx/UdlFiqUJJzxRQxgsZmvhXhn4cSKeSmoFjVdupA==", + "dev": true, + "requires": { + "bn.js": "^4.0.0", + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0", + "safer-buffer": "^2.1.0" + }, + "dependencies": { + "bn.js": { + "version": "4.12.0", + "resolved": "https://registry.npmmirror.com/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==", + "dev": true + } + } + }, + "assert": { + "version": "1.5.0", + "resolved": "https://registry.npmmirror.com/assert/-/assert-1.5.0.tgz", + "integrity": "sha512-EDsgawzwoun2CZkCgtxJbv392v4nbk9XDD06zI+kQYoBM/3RBWLlEyJARDOmhAAosBjWACEkKL6S+lIZtcAubA==", + "dev": true, + "requires": { + "object-assign": "^4.1.1", + "util": "0.10.3" + }, + "dependencies": { + "inherits": { + "version": "2.0.1", + "resolved": "https://registry.npmmirror.com/inherits/-/inherits-2.0.1.tgz", + "integrity": "sha512-8nWq2nLTAwd02jTqJExUYFSD/fKq6VH9Y/oG2accc/kdI0V98Bag8d5a4gi3XHz73rDWa2PvTtvcWYquKqSENA==", + "dev": true + }, + "util": { + "version": "0.10.3", + "resolved": "https://registry.npmmirror.com/util/-/util-0.10.3.tgz", + "integrity": "sha512-5KiHfsmkqacuKjkRkdV7SsfDJ2EGiPsK92s2MhNSY0craxjTdKTtqKsJaCWp4LW33ZZ0OPUv1WO/TFvNQRiQxQ==", + "dev": true, + "requires": { + "inherits": "2.0.1" + } + } + } + }, "assertion-error": { "version": "1.1.0", "resolved": "https://repo.huaweicloud.com/repository/npm/assertion-error/-/assertion-error-1.1.0.tgz", "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==", "dev": true }, + "assign-symbols": { + "version": "1.0.0", + "resolved": "https://registry.npmmirror.com/assign-symbols/-/assign-symbols-1.0.0.tgz", + "integrity": "sha512-Q+JC7Whu8HhmTdBph/Tq59IoRtoy6KAm5zzPv00WdujX82lbAL8K7WVjne7vdCsAmbF4AYaDOPyO3k0kl8qIrw==", + "dev": true + }, "ast-types": { "version": "0.14.2", "resolved": "https://repo.huaweicloud.com/repository/npm/ast-types/-/ast-types-0.14.2.tgz", @@ -1113,6 +1440,78 @@ "tslib": "^2.0.1" } }, + "async-each": { + "version": "1.0.3", + "resolved": "https://registry.npmmirror.com/async-each/-/async-each-1.0.3.tgz", + "integrity": "sha512-z/WhQ5FPySLdvREByI2vZiTWwCnF0moMJ1hK9YQwDTHKh6I7/uSckMetoRGb5UBZPC1z0jlw+n/XCgjeH7y1AQ==", + "dev": true, + "optional": true + }, + "atob": { + "version": "2.1.2", + "resolved": "https://registry.npmmirror.com/atob/-/atob-2.1.2.tgz", + "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==", + "dev": true + }, + "babel-code-frame": { + "version": "6.26.0", + "resolved": "https://registry.npmmirror.com/babel-code-frame/-/babel-code-frame-6.26.0.tgz", + "integrity": "sha512-XqYMR2dfdGMW+hd0IUZ2PwK+fGeFkOxZJ0wY+JaQAHzt1Zx8LcvpiZD2NiGkEG8qx0CfkAOr5xt76d1e8vG90g==", + "dev": true, + "requires": { + "chalk": "^1.1.3", + "esutils": "^2.0.2", + "js-tokens": "^3.0.2" + }, + "dependencies": { + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmmirror.com/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA==", + "dev": true + }, + "ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmmirror.com/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha512-kmCevFghRiWM7HB5zTPULl4r9bVFSWjz62MhqizDGUrq2NWuNMQyuv4tHHoKJHs69M/MF64lEcHdYIocrdWQYA==", + "dev": true + }, + "chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmmirror.com/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha512-U3lRVLMSlsCfjqYPbLyVv11M9CPW4I728d6TCKMAOJueEeB9/8o+eSsMnxPJD+Q+K909sdESg7C+tIkoH6on1A==", + "dev": true, + "requires": { + "ansi-styles": "^2.2.1", + "escape-string-regexp": "^1.0.2", + "has-ansi": "^2.0.0", + "strip-ansi": "^3.0.0", + "supports-color": "^2.0.0" + } + }, + "js-tokens": { + "version": "3.0.2", + "resolved": "https://registry.npmmirror.com/js-tokens/-/js-tokens-3.0.2.tgz", + "integrity": "sha512-RjTcuD4xjtthQkaWH7dFlH85L+QaVtSoOyGdZ3g6HFhS9dFNDfLyqgm2NFe2X6cQpeFmt0452FJjFG5UameExg==", + "dev": true + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmmirror.com/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha512-VhumSSbBqDTP8p2ZLKj40UjBCV4+v8bUSEpUb4KjRgWk9pbqGF4REFj6KEagidb2f/M6AzC0EmFyDNGaw9OCzg==", + "dev": true, + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmmirror.com/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha512-KKNVtd6pCYgPIKU4cp2733HWYCpplQhddZLBUryaAHou723x+FRzQ5Df824Fj+IyyuiQTRoub4SnIFfIcrp70g==", + "dev": true + } + } + }, "babel-plugin-dynamic-import-node": { "version": "2.3.3", "resolved": "https://repo.huaweicloud.com/repository/npm/babel-plugin-dynamic-import-node/-/babel-plugin-dynamic-import-node-2.3.3.tgz", @@ -1153,12 +1552,91 @@ "resolved": "https://repo.huaweicloud.com/repository/npm/balanced-match/-/balanced-match-1.0.2.tgz", "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" }, + "base": { + "version": "0.11.2", + "resolved": "https://registry.npmmirror.com/base/-/base-0.11.2.tgz", + "integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==", + "dev": true, + "requires": { + "cache-base": "^1.0.1", + "class-utils": "^0.3.5", + "component-emitter": "^1.2.1", + "define-property": "^1.0.0", + "isobject": "^3.0.1", + "mixin-deep": "^1.2.0", + "pascalcase": "^0.1.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmmirror.com/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha512-cZTYKFWspt9jZsMscWo8sc/5lbPC9Q0N5nBLgb+Yd915iL3udB1uFgS3B8YCx66UVHq018DAVFoee7x+gxggeA==", + "dev": true, + "requires": { + "is-descriptor": "^1.0.0" + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmmirror.com/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmmirror.com/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmmirror.com/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + } + } + }, + "base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmmirror.com/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", + "dev": true + }, + "big.js": { + "version": "5.2.2", + "resolved": "https://registry.npmmirror.com/big.js/-/big.js-5.2.2.tgz", + "integrity": "sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==", + "dev": true + }, "binary-extensions": { "version": "2.2.0", "resolved": "https://repo.huaweicloud.com/repository/npm/binary-extensions/-/binary-extensions-2.2.0.tgz", "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", "dev": true }, + "bluebird": { + "version": "3.7.2", + "resolved": "https://registry.npmmirror.com/bluebird/-/bluebird-3.7.2.tgz", + "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==", + "dev": true + }, + "bn.js": { + "version": "5.2.0", + "resolved": "https://registry.npmmirror.com/bn.js/-/bn.js-5.2.0.tgz", + "integrity": "sha512-D7iWRBvnZE8ecXiLj/9wbxH7Tk79fAh8IHaTNq1RWRixsS02W+5qS+iE9yq6RYl0asXx5tw0bLhmT5pIfbSquw==", + "dev": true + }, "brace-expansion": { "version": "1.1.11", "resolved": "https://repo.huaweicloud.com/repository/npm/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -1177,12 +1655,110 @@ "fill-range": "^7.0.1" } }, + "brorand": { + "version": "1.1.0", + "resolved": "https://registry.npmmirror.com/brorand/-/brorand-1.1.0.tgz", + "integrity": "sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w==", + "dev": true + }, "browser-stdout": { "version": "1.3.1", "resolved": "https://repo.huaweicloud.com/repository/npm/browser-stdout/-/browser-stdout-1.3.1.tgz", "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", "dev": true }, + "browserify-aes": { + "version": "1.2.0", + "resolved": "https://registry.npmmirror.com/browserify-aes/-/browserify-aes-1.2.0.tgz", + "integrity": "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==", + "dev": true, + "requires": { + "buffer-xor": "^1.0.3", + "cipher-base": "^1.0.0", + "create-hash": "^1.1.0", + "evp_bytestokey": "^1.0.3", + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, + "browserify-cipher": { + "version": "1.0.1", + "resolved": "https://registry.npmmirror.com/browserify-cipher/-/browserify-cipher-1.0.1.tgz", + "integrity": "sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w==", + "dev": true, + "requires": { + "browserify-aes": "^1.0.4", + "browserify-des": "^1.0.0", + "evp_bytestokey": "^1.0.0" + } + }, + "browserify-des": { + "version": "1.0.2", + "resolved": "https://registry.npmmirror.com/browserify-des/-/browserify-des-1.0.2.tgz", + "integrity": "sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A==", + "dev": true, + "requires": { + "cipher-base": "^1.0.1", + "des.js": "^1.0.0", + "inherits": "^2.0.1", + "safe-buffer": "^5.1.2" + } + }, + "browserify-rsa": { + "version": "4.1.0", + "resolved": "https://registry.npmmirror.com/browserify-rsa/-/browserify-rsa-4.1.0.tgz", + "integrity": "sha512-AdEER0Hkspgno2aR97SAf6vi0y0k8NuOpGnVH3O99rcA5Q6sh8QxcngtHuJ6uXwnfAXNM4Gn1Gb7/MV1+Ymbog==", + "dev": true, + "requires": { + "bn.js": "^5.0.0", + "randombytes": "^2.0.1" + } + }, + "browserify-sign": { + "version": "4.2.1", + "resolved": "https://registry.npmmirror.com/browserify-sign/-/browserify-sign-4.2.1.tgz", + "integrity": "sha512-/vrA5fguVAKKAVTNJjgSm1tRQDHUU6DbwO9IROu/0WAzC8PKhucDSh18J0RMvVeHAn5puMd+QHC2erPRNf8lmg==", + "dev": true, + "requires": { + "bn.js": "^5.1.1", + "browserify-rsa": "^4.0.1", + "create-hash": "^1.2.0", + "create-hmac": "^1.1.7", + "elliptic": "^6.5.3", + "inherits": "^2.0.4", + "parse-asn1": "^5.1.5", + "readable-stream": "^3.6.0", + "safe-buffer": "^5.2.0" + }, + "dependencies": { + "readable-stream": { + "version": "3.6.0", + "resolved": "https://registry.npmmirror.com/readable-stream/-/readable-stream-3.6.0.tgz", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "dev": true, + "requires": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + } + }, + "safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmmirror.com/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "dev": true + } + } + }, + "browserify-zlib": { + "version": "0.2.0", + "resolved": "https://registry.npmmirror.com/browserify-zlib/-/browserify-zlib-0.2.0.tgz", + "integrity": "sha512-Z942RysHXmJrhqk88FmKBVq/v5tqmSkDz7p54G/MGyjMnCFFnC79XWNbg+Vta8W6Wb2qtSZTSxIGkJrRpCFEiA==", + "dev": true, + "requires": { + "pako": "~1.0.5" + } + }, "browserslist": { "version": "4.17.3", "resolved": "https://repo.huaweicloud.com/repository/npm/browserslist/-/browserslist-4.17.3.tgz", @@ -1195,34 +1771,134 @@ "picocolors": "^0.2.1" } }, - "call-bind": { - "version": "1.0.2", - "resolved": "https://repo.huaweicloud.com/repository/npm/call-bind/-/call-bind-1.0.2.tgz", - "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "bs-logger": { + "version": "0.2.6", + "resolved": "https://registry.npmmirror.com/bs-logger/-/bs-logger-0.2.6.tgz", + "integrity": "sha512-pd8DCoxmbgc7hyPKOvxtqNcjYoOsABPQdcCUjGp3d42VR2CX1ORhk2A87oqqu5R1kk+76nsxZupkmyd+MVtCog==", + "dev": true, "requires": { - "function-bind": "^1.1.1", - "get-intrinsic": "^1.0.2" + "fast-json-stable-stringify": "2.x" } }, - "camelcase": { - "version": "6.2.0", - "resolved": "https://repo.huaweicloud.com/repository/npm/camelcase/-/camelcase-6.2.0.tgz", - "integrity": "sha512-c7wVvbw3f37nuobQNtgsgG9POC9qMbNuMQmTCqZv23b6MIz0fcYpBiOlv9gEN/hdLdnZTDQhg6e9Dq5M1vKvfg==", - "dev": true - }, - "caniuse-lite": { - "version": "1.0.30001265", - "resolved": "https://repo.huaweicloud.com/repository/npm/caniuse-lite/-/caniuse-lite-1.0.30001265.tgz", - "integrity": "sha512-YzBnspggWV5hep1m9Z6sZVLOt7vrju8xWooFAgN6BA5qvy98qPAPb7vNUzypFaoh2pb3vlfzbDO8tB57UPGbtw==" - }, - "chai": { - "version": "4.3.4", - "resolved": "https://repo.huaweicloud.com/repository/npm/chai/-/chai-4.3.4.tgz", - "integrity": "sha512-yS5H68VYOCtN1cjfwumDSuzn/9c+yza4f3reKXlE5rUg7SFcCEy90gJvydNgOYtblyf4Zi6jIWRnXOgErta0KA==", + "buffer": { + "version": "4.9.2", + "resolved": "https://registry.npmmirror.com/buffer/-/buffer-4.9.2.tgz", + "integrity": "sha512-xq+q3SRMOxGivLhBNaUdC64hDTQwejJ+H0T/NB1XMtTVEwNTrfFF3gAxiyW0Bu/xWEGhjVKgUcMhCrUy2+uCWg==", "dev": true, "requires": { - "assertion-error": "^1.1.0", - "check-error": "^1.0.2", + "base64-js": "^1.0.2", + "ieee754": "^1.1.4", + "isarray": "^1.0.0" + }, + "dependencies": { + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmmirror.com/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==", + "dev": true + } + } + }, + "buffer-from": { + "version": "1.1.2", + "resolved": "https://registry.npmmirror.com/buffer-from/-/buffer-from-1.1.2.tgz", + "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", + "dev": true + }, + "buffer-xor": { + "version": "1.0.3", + "resolved": "https://registry.npmmirror.com/buffer-xor/-/buffer-xor-1.0.3.tgz", + "integrity": "sha512-571s0T7nZWK6vB67HI5dyUF7wXiNcfaPPPTl6zYCNApANjIvYJTg7hlud/+cJpdAhS7dVzqMLmfhfHR3rAcOjQ==", + "dev": true + }, + "builtin-modules": { + "version": "1.1.1", + "resolved": "https://registry.npmmirror.com/builtin-modules/-/builtin-modules-1.1.1.tgz", + "integrity": "sha512-wxXCdllwGhI2kCC0MnvTGYTMvnVZTvqgypkiTI8Pa5tcz2i6VqsqwYGgqwXji+4RgCzms6EajE4IxiUH6HH8nQ==", + "dev": true + }, + "builtin-status-codes": { + "version": "3.0.0", + "resolved": "https://registry.npmmirror.com/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz", + "integrity": "sha512-HpGFw18DgFWlncDfjTa2rcQ4W88O1mC8e8yZ2AvQY5KDaktSTwo+KRf6nHK6FRI5FyRyb/5T6+TSxfP7QyGsmQ==", + "dev": true + }, + "cacache": { + "version": "12.0.4", + "resolved": "https://registry.npmmirror.com/cacache/-/cacache-12.0.4.tgz", + "integrity": "sha512-a0tMB40oefvuInr4Cwb3GerbL9xTj1D5yg0T5xrjGCGyfvbxseIXX7BAO/u/hIXdafzOI5JC3wDwHyf24buOAQ==", + "dev": true, + "requires": { + "bluebird": "^3.5.5", + "chownr": "^1.1.1", + "figgy-pudding": "^3.5.1", + "glob": "^7.1.4", + "graceful-fs": "^4.1.15", + "infer-owner": "^1.0.3", + "lru-cache": "^5.1.1", + "mississippi": "^3.0.0", + "mkdirp": "^0.5.1", + "move-concurrently": "^1.0.1", + "promise-inflight": "^1.0.1", + "rimraf": "^2.6.3", + "ssri": "^6.0.1", + "unique-filename": "^1.1.1", + "y18n": "^4.0.0" + }, + "dependencies": { + "y18n": { + "version": "4.0.3", + "resolved": "https://registry.npmmirror.com/y18n/-/y18n-4.0.3.tgz", + "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==", + "dev": true + } + } + }, + "cache-base": { + "version": "1.0.1", + "resolved": "https://registry.npmmirror.com/cache-base/-/cache-base-1.0.1.tgz", + "integrity": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==", + "dev": true, + "requires": { + "collection-visit": "^1.0.0", + "component-emitter": "^1.2.1", + "get-value": "^2.0.6", + "has-value": "^1.0.0", + "isobject": "^3.0.1", + "set-value": "^2.0.0", + "to-object-path": "^0.3.0", + "union-value": "^1.0.0", + "unset-value": "^1.0.0" + } + }, + "call-bind": { + "version": "1.0.2", + "resolved": "https://repo.huaweicloud.com/repository/npm/call-bind/-/call-bind-1.0.2.tgz", + "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "requires": { + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2" + } + }, + "camelcase": { + "version": "6.2.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/camelcase/-/camelcase-6.2.0.tgz", + "integrity": "sha512-c7wVvbw3f37nuobQNtgsgG9POC9qMbNuMQmTCqZv23b6MIz0fcYpBiOlv9gEN/hdLdnZTDQhg6e9Dq5M1vKvfg==", + "dev": true + }, + "caniuse-lite": { + "version": "1.0.30001265", + "resolved": "https://repo.huaweicloud.com/repository/npm/caniuse-lite/-/caniuse-lite-1.0.30001265.tgz", + "integrity": "sha512-YzBnspggWV5hep1m9Z6sZVLOt7vrju8xWooFAgN6BA5qvy98qPAPb7vNUzypFaoh2pb3vlfzbDO8tB57UPGbtw==" + }, + "chai": { + "version": "4.3.4", + "resolved": "https://repo.huaweicloud.com/repository/npm/chai/-/chai-4.3.4.tgz", + "integrity": "sha512-yS5H68VYOCtN1cjfwumDSuzn/9c+yza4f3reKXlE5rUg7SFcCEy90gJvydNgOYtblyf4Zi6jIWRnXOgErta0KA==", + "dev": true, + "requires": { + "assertion-error": "^1.1.0", + "check-error": "^1.0.2", "deep-eql": "^3.0.1", "get-func-name": "^2.0.0", "pathval": "^1.1.1", @@ -1261,6 +1937,60 @@ "readdirp": "~3.5.0" } }, + "chownr": { + "version": "1.1.4", + "resolved": "https://registry.npmmirror.com/chownr/-/chownr-1.1.4.tgz", + "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==", + "dev": true + }, + "chrome-trace-event": { + "version": "1.0.3", + "resolved": "https://registry.npmmirror.com/chrome-trace-event/-/chrome-trace-event-1.0.3.tgz", + "integrity": "sha512-p3KULyQg4S7NIHixdwbGX+nFHkoBiA4YQmyWtjb8XngSKV124nJmRysgAeujbUVb15vh+RvFUfCPqU7rXk+hZg==", + "dev": true + }, + "cipher-base": { + "version": "1.0.4", + "resolved": "https://registry.npmmirror.com/cipher-base/-/cipher-base-1.0.4.tgz", + "integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==", + "dev": true, + "requires": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, + "class-utils": { + "version": "0.3.6", + "resolved": "https://registry.npmmirror.com/class-utils/-/class-utils-0.3.6.tgz", + "integrity": "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==", + "dev": true, + "requires": { + "arr-union": "^3.1.0", + "define-property": "^0.2.5", + "isobject": "^3.0.0", + "static-extend": "^0.1.1" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmmirror.com/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha512-Rr7ADjQZenceVOAKop6ALkkRAmH1A4Gx9hV/7ZujPUN2rkATqFO0JZLZInbAjpZYoJ1gUx8MRMQVkYemcbMSTA==", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + } + } + }, + "clean-webpack-plugin": { + "version": "1.0.1", + "resolved": "https://registry.npmmirror.com/clean-webpack-plugin/-/clean-webpack-plugin-1.0.1.tgz", + "integrity": "sha512-gvwfMsqu3HBgTVvaBa1H3AZKO03CHpr5uP92SPIktP3827EovAitwW+1xoqXyTxCuXnLYpMHG5ytS4AoukHDWA==", + "dev": true, + "requires": { + "rimraf": "^2.6.1" + } + }, "cliui": { "version": "7.0.4", "resolved": "https://repo.huaweicloud.com/repository/npm/cliui/-/cliui-7.0.4.tgz", @@ -1271,6 +2001,27 @@ "wrap-ansi": "^7.0.0" } }, + "clone-deep": { + "version": "4.0.1", + "resolved": "https://registry.npmmirror.com/clone-deep/-/clone-deep-4.0.1.tgz", + "integrity": "sha512-neHB9xuzh/wk0dIHweyAXv2aPGZIVk3pLMe+/RNzINf17fe0OG96QroktYAUm7SM1PBnzTabaLboqqxDyMU+SQ==", + "dev": true, + "requires": { + "is-plain-object": "^2.0.4", + "kind-of": "^6.0.2", + "shallow-clone": "^3.0.0" + } + }, + "collection-visit": { + "version": "1.0.0", + "resolved": "https://registry.npmmirror.com/collection-visit/-/collection-visit-1.0.0.tgz", + "integrity": "sha512-lNkKvzEeMBBjUGHZ+q6z9pSJla0KWAQPvtzhEV9+iGyQYG+pBpl7xKDhxoNSOZH2hhv0v5k0y2yAM4o4SjoSkw==", + "dev": true, + "requires": { + "map-visit": "^1.0.0", + "object-visit": "^1.0.0" + } + }, "color-convert": { "version": "1.9.3", "resolved": "https://repo.huaweicloud.com/repository/npm/color-convert/-/color-convert-1.9.3.tgz", @@ -1284,6 +2035,18 @@ "resolved": "https://repo.huaweicloud.com/repository/npm/color-name/-/color-name-1.1.3.tgz", "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=" }, + "colorette": { + "version": "2.0.16", + "resolved": "https://registry.npmmirror.com/colorette/-/colorette-2.0.16.tgz", + "integrity": "sha512-hUewv7oMjCp+wkBv5Rm0v87eJhq4woh5rSR+42YSQJKecCqgIqNkZ6lAlQms/BwHPJA5NKMRlpxPRv0n8HQW6g==", + "dev": true + }, + "colors": { + "version": "1.4.0", + "resolved": "https://registry.npmmirror.com/colors/-/colors-1.4.0.tgz", + "integrity": "sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA==", + "dev": true + }, "command-line-args": { "version": "5.2.0", "resolved": "https://repo.huaweicloud.com/repository/npm/command-line-args/-/command-line-args-5.2.0.tgz", @@ -1318,11 +2081,53 @@ } } }, + "commander": { + "version": "2.20.3", + "resolved": "https://registry.npmmirror.com/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", + "dev": true + }, + "commondir": { + "version": "1.0.1", + "resolved": "https://registry.npmmirror.com/commondir/-/commondir-1.0.1.tgz", + "integrity": "sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==", + "dev": true + }, + "component-emitter": { + "version": "1.3.0", + "resolved": "https://registry.npmmirror.com/component-emitter/-/component-emitter-1.3.0.tgz", + "integrity": "sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg==", + "dev": true + }, "concat-map": { "version": "0.0.1", "resolved": "https://repo.huaweicloud.com/repository/npm/concat-map/-/concat-map-0.0.1.tgz", "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" }, + "concat-stream": { + "version": "1.6.2", + "resolved": "https://registry.npmmirror.com/concat-stream/-/concat-stream-1.6.2.tgz", + "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", + "dev": true, + "requires": { + "buffer-from": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^2.2.2", + "typedarray": "^0.0.6" + } + }, + "console-browserify": { + "version": "1.2.0", + "resolved": "https://registry.npmmirror.com/console-browserify/-/console-browserify-1.2.0.tgz", + "integrity": "sha512-ZMkYO/LkF17QvCPqM0gxw8yUzigAOZOSWSHg91FH6orS7vcEj5dVZTidN2fQ14yBSdg97RqhSNwLUXInd52OTA==", + "dev": true + }, + "constants-browserify": { + "version": "1.0.0", + "resolved": "https://registry.npmmirror.com/constants-browserify/-/constants-browserify-1.0.0.tgz", + "integrity": "sha512-xFxOwqIzR/e1k1gLiWEophSCMqXcwVHIH7akf7b/vxcUeGunlj3hvZaaqxwHsTgn+IndtkQJgSztIDWeumWJDQ==", + "dev": true + }, "convert-source-map": { "version": "1.8.0", "resolved": "https://repo.huaweicloud.com/repository/npm/convert-source-map/-/convert-source-map-1.8.0.tgz", @@ -1331,6 +2136,26 @@ "safe-buffer": "~5.1.1" } }, + "copy-concurrently": { + "version": "1.0.5", + "resolved": "https://registry.npmmirror.com/copy-concurrently/-/copy-concurrently-1.0.5.tgz", + "integrity": "sha512-f2domd9fsVDFtaFcbaRZuYXwtdmnzqbADSwhSWYxYB/Q8zsdUUFMXVRwXGDMWmbEzAn1kdRrtI1T/KTFOL4X2A==", + "dev": true, + "requires": { + "aproba": "^1.1.1", + "fs-write-stream-atomic": "^1.0.8", + "iferr": "^0.1.5", + "mkdirp": "^0.5.1", + "rimraf": "^2.5.4", + "run-queue": "^1.0.0" + } + }, + "copy-descriptor": { + "version": "0.1.1", + "resolved": "https://registry.npmmirror.com/copy-descriptor/-/copy-descriptor-0.1.1.tgz", + "integrity": "sha512-XgZ0pFcakEUlbwQEVNg3+QAis1FyTL3Qel9FYy8pSkQqoG3PNoT0bOCQtOXcOkur21r2Eq2kI+IE+gsmAEVlYw==", + "dev": true + }, "core-js-compat": { "version": "3.18.2", "resolved": "https://repo.huaweicloud.com/repository/npm/core-js-compat/-/core-js-compat-3.18.2.tgz", @@ -1347,6 +2172,93 @@ } } }, + "core-util-is": { + "version": "1.0.3", + "resolved": "https://registry.npmmirror.com/core-util-is/-/core-util-is-1.0.3.tgz", + "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==", + "dev": true + }, + "create-ecdh": { + "version": "4.0.4", + "resolved": "https://registry.npmmirror.com/create-ecdh/-/create-ecdh-4.0.4.tgz", + "integrity": "sha512-mf+TCx8wWc9VpuxfP2ht0iSISLZnt0JgWlrOKZiNqyUZWnjIaCIVNQArMHnCZKfEYRg6IM7A+NeJoN8gf/Ws0A==", + "dev": true, + "requires": { + "bn.js": "^4.1.0", + "elliptic": "^6.5.3" + }, + "dependencies": { + "bn.js": { + "version": "4.12.0", + "resolved": "https://registry.npmmirror.com/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==", + "dev": true + } + } + }, + "create-hash": { + "version": "1.2.0", + "resolved": "https://registry.npmmirror.com/create-hash/-/create-hash-1.2.0.tgz", + "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==", + "dev": true, + "requires": { + "cipher-base": "^1.0.1", + "inherits": "^2.0.1", + "md5.js": "^1.3.4", + "ripemd160": "^2.0.1", + "sha.js": "^2.4.0" + } + }, + "create-hmac": { + "version": "1.1.7", + "resolved": "https://registry.npmmirror.com/create-hmac/-/create-hmac-1.1.7.tgz", + "integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==", + "dev": true, + "requires": { + "cipher-base": "^1.0.3", + "create-hash": "^1.1.0", + "inherits": "^2.0.1", + "ripemd160": "^2.0.0", + "safe-buffer": "^5.0.1", + "sha.js": "^2.4.8" + } + }, + "cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmmirror.com/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "dev": true, + "requires": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + } + }, + "crypto-browserify": { + "version": "3.12.0", + "resolved": "https://registry.npmmirror.com/crypto-browserify/-/crypto-browserify-3.12.0.tgz", + "integrity": "sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg==", + "dev": true, + "requires": { + "browserify-cipher": "^1.0.0", + "browserify-sign": "^4.0.0", + "create-ecdh": "^4.0.0", + "create-hash": "^1.1.0", + "create-hmac": "^1.1.0", + "diffie-hellman": "^5.0.0", + "inherits": "^2.0.1", + "pbkdf2": "^3.0.3", + "public-encrypt": "^4.0.0", + "randombytes": "^2.0.0", + "randomfill": "^1.0.3" + } + }, + "cyclist": { + "version": "1.0.1", + "resolved": "https://registry.npmmirror.com/cyclist/-/cyclist-1.0.1.tgz", + "integrity": "sha512-NJGVKPS81XejHcLhaLJS7plab0fK3slPh11mESeeDq2W4ZI5kUKK/LRRdVDvjJseojbPB7ZwjnyOybg3Igea/A==", + "dev": true + }, "debug": { "version": "4.3.2", "resolved": "https://repo.huaweicloud.com/repository/npm/debug/-/debug-4.3.2.tgz", @@ -1361,6 +2273,12 @@ "integrity": "sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==", "dev": true }, + "decode-uri-component": { + "version": "0.2.0", + "resolved": "https://registry.npmmirror.com/decode-uri-component/-/decode-uri-component-0.2.0.tgz", + "integrity": "sha512-hjf+xovcEn31w/EUYdTXQh/8smFL/dzYjohQGEIgjyNavaJfBY2p5F527Bo1VPATxv0VYTUC2bOcXvqFwk78Og==", + "dev": true + }, "deep-eql": { "version": "3.0.1", "resolved": "https://repo.huaweicloud.com/repository/npm/deep-eql/-/deep-eql-3.0.1.tgz", @@ -1383,22 +2301,174 @@ "object-keys": "^1.0.12" } }, + "define-property": { + "version": "2.0.2", + "resolved": "https://registry.npmmirror.com/define-property/-/define-property-2.0.2.tgz", + "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==", + "dev": true, + "requires": { + "is-descriptor": "^1.0.2", + "isobject": "^3.0.1" + }, + "dependencies": { + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmmirror.com/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmmirror.com/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmmirror.com/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + } + } + }, + "des.js": { + "version": "1.0.1", + "resolved": "https://registry.npmmirror.com/des.js/-/des.js-1.0.1.tgz", + "integrity": "sha512-Q0I4pfFrv2VPd34/vfLrFOoRmlYj3OV50i7fskps1jZWK1kApMWWT9G6RRUeYedLcBDIhnSDaUvJMb3AhUlaEA==", + "dev": true, + "requires": { + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0" + } + }, "diff": { "version": "5.0.0", "resolved": "https://repo.huaweicloud.com/repository/npm/diff/-/diff-5.0.0.tgz", "integrity": "sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w==", "dev": true }, + "diffie-hellman": { + "version": "5.0.3", + "resolved": "https://registry.npmmirror.com/diffie-hellman/-/diffie-hellman-5.0.3.tgz", + "integrity": "sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg==", + "dev": true, + "requires": { + "bn.js": "^4.1.0", + "miller-rabin": "^4.0.0", + "randombytes": "^2.0.0" + }, + "dependencies": { + "bn.js": { + "version": "4.12.0", + "resolved": "https://registry.npmmirror.com/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==", + "dev": true + } + } + }, + "domain-browser": { + "version": "1.2.0", + "resolved": "https://registry.npmmirror.com/domain-browser/-/domain-browser-1.2.0.tgz", + "integrity": "sha512-jnjyiM6eRyZl2H+W8Q/zLMA481hzi0eszAaBUzIVnmYVDBbnLxVNnfu1HgEBvCbL+71FrxMl3E6lpKH7Ge3OXA==", + "dev": true + }, + "duplexify": { + "version": "3.7.1", + "resolved": "https://registry.npmmirror.com/duplexify/-/duplexify-3.7.1.tgz", + "integrity": "sha512-07z8uv2wMyS51kKhD1KsdXJg5WQ6t93RneqRxUHnskXVtlYYkLqM0gqStQZ3pj073g687jPCHrqNfCzawLYh5g==", + "dev": true, + "requires": { + "end-of-stream": "^1.0.0", + "inherits": "^2.0.1", + "readable-stream": "^2.0.0", + "stream-shift": "^1.0.0" + } + }, "electron-to-chromium": { "version": "1.3.861", "resolved": "https://repo.huaweicloud.com/repository/npm/electron-to-chromium/-/electron-to-chromium-1.3.861.tgz", "integrity": "sha512-GZyflmpMnZRdZ1e2yAyvuFwz1MPSVQelwHX4TJZyXypB8NcxdPvPNwy5lOTxnlkrK13EiQzyTPugRSnj6cBgKg==" }, + "elliptic": { + "version": "6.5.4", + "resolved": "https://registry.npmmirror.com/elliptic/-/elliptic-6.5.4.tgz", + "integrity": "sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ==", + "dev": true, + "requires": { + "bn.js": "^4.11.9", + "brorand": "^1.1.0", + "hash.js": "^1.0.0", + "hmac-drbg": "^1.0.1", + "inherits": "^2.0.4", + "minimalistic-assert": "^1.0.1", + "minimalistic-crypto-utils": "^1.0.1" + }, + "dependencies": { + "bn.js": { + "version": "4.12.0", + "resolved": "https://registry.npmmirror.com/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==", + "dev": true + } + } + }, "emoji-regex": { "version": "8.0.0", "resolved": "https://repo.huaweicloud.com/repository/npm/emoji-regex/-/emoji-regex-8.0.0.tgz", "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" }, + "emojis-list": { + "version": "3.0.0", + "resolved": "https://registry.npmmirror.com/emojis-list/-/emojis-list-3.0.0.tgz", + "integrity": "sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q==", + "dev": true + }, + "end-of-stream": { + "version": "1.4.4", + "resolved": "https://registry.npmmirror.com/end-of-stream/-/end-of-stream-1.4.4.tgz", + "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", + "dev": true, + "requires": { + "once": "^1.4.0" + } + }, + "enhanced-resolve": { + "version": "4.5.0", + "resolved": "https://registry.npmmirror.com/enhanced-resolve/-/enhanced-resolve-4.5.0.tgz", + "integrity": "sha512-Nv9m36S/vxpsI+Hc4/ZGRs0n9mXqSWGGq49zxb/cJfPAQMbUtttJAlNPS4AQzaBdw/pKskw5bMbekT/Y7W/Wlg==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "memory-fs": "^0.5.0", + "tapable": "^1.0.0" + } + }, + "envinfo": { + "version": "7.8.1", + "resolved": "https://registry.npmmirror.com/envinfo/-/envinfo-7.8.1.tgz", + "integrity": "sha512-/o+BXHmB7ocbHEAs6F2EnG0ogybVVUdkRunTT2glZU9XAaGmhqskrvKwqXuDfNjEO0LZKWdejEEpnq8aM0tOaw==", + "dev": true + }, + "errno": { + "version": "0.1.8", + "resolved": "https://registry.npmmirror.com/errno/-/errno-0.1.8.tgz", + "integrity": "sha512-dJ6oBr5SQ1VSd9qkk7ByRgb/1SH4JZjCHSW/mr63/QcXO9zLVxvJ6Oy13nio03rxpSnVDDjFor75SjVeZWPW/A==", + "dev": true, + "requires": { + "prr": "~1.0.1" + } + }, "escalade": { "version": "3.1.1", "resolved": "https://repo.huaweicloud.com/repository/npm/escalade/-/escalade-3.1.1.tgz", @@ -1409,35 +2479,272 @@ "resolved": "https://repo.huaweicloud.com/repository/npm/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" }, + "eslint-scope": { + "version": "4.0.3", + "resolved": "https://registry.npmmirror.com/eslint-scope/-/eslint-scope-4.0.3.tgz", + "integrity": "sha512-p7VutNr1O/QrxysMo3E45FjYDTeXBy0iTltPFNSqKAIfjDSXC+4dj+qfyuD8bfAXrW/y6lW3O76VaYNPKfpKrg==", + "dev": true, + "requires": { + "esrecurse": "^4.1.0", + "estraverse": "^4.1.1" + } + }, "esprima": { "version": "4.0.1", "resolved": "https://repo.huaweicloud.com/repository/npm/esprima/-/esprima-4.0.1.tgz", "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==" }, + "esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmmirror.com/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "dev": true, + "requires": { + "estraverse": "^5.2.0" + }, + "dependencies": { + "estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmmirror.com/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true + } + } + }, + "estraverse": { + "version": "4.3.0", + "resolved": "https://registry.npmmirror.com/estraverse/-/estraverse-4.3.0.tgz", + "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", + "dev": true + }, "esutils": { "version": "2.0.3", "resolved": "https://repo.huaweicloud.com/repository/npm/esutils/-/esutils-2.0.3.tgz", "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==" }, - "fill-range": { - "version": "7.0.1", - "resolved": "https://repo.huaweicloud.com/repository/npm/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "events": { + "version": "3.3.0", + "resolved": "https://registry.npmmirror.com/events/-/events-3.3.0.tgz", + "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==", + "dev": true + }, + "evp_bytestokey": { + "version": "1.0.3", + "resolved": "https://registry.npmmirror.com/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz", + "integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==", "dev": true, "requires": { - "to-regex-range": "^5.0.1" + "md5.js": "^1.3.4", + "safe-buffer": "^5.1.1" } }, - "find-replace": { - "version": "3.0.0", - "resolved": "https://repo.huaweicloud.com/repository/npm/find-replace/-/find-replace-3.0.0.tgz", - "integrity": "sha512-6Tb2myMioCAgv5kfvP5/PkZZ/ntTpVK39fHY7WkWBgvbeE+VHd/tZuZ4mrC+bxh4cfOZeYKVPaJIZtZXV7GNCQ==", + "execa": { + "version": "5.1.1", + "resolved": "https://registry.npmmirror.com/execa/-/execa-5.1.1.tgz", + "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", + "dev": true, "requires": { - "array-back": "^3.0.1" - } - }, - "find-up": { - "version": "5.0.0", + "cross-spawn": "^7.0.3", + "get-stream": "^6.0.0", + "human-signals": "^2.1.0", + "is-stream": "^2.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^4.0.1", + "onetime": "^5.1.2", + "signal-exit": "^3.0.3", + "strip-final-newline": "^2.0.0" + } + }, + "expand-brackets": { + "version": "2.1.4", + "resolved": "https://registry.npmmirror.com/expand-brackets/-/expand-brackets-2.1.4.tgz", + "integrity": "sha512-w/ozOKR9Obk3qoWeY/WDi6MFta9AoMR+zud60mdnbniMcBxRuFJyDt2LdX/14A1UABeqk+Uk+LDfUpvoGKppZA==", + "dev": true, + "requires": { + "debug": "^2.3.3", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "posix-character-classes": "^0.1.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmmirror.com/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmmirror.com/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha512-Rr7ADjQZenceVOAKop6ALkkRAmH1A4Gx9hV/7ZujPUN2rkATqFO0JZLZInbAjpZYoJ1gUx8MRMQVkYemcbMSTA==", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmmirror.com/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug==", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmmirror.com/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "dev": true + } + } + }, + "extend-shallow": { + "version": "3.0.2", + "resolved": "https://registry.npmmirror.com/extend-shallow/-/extend-shallow-3.0.2.tgz", + "integrity": "sha512-BwY5b5Ql4+qZoefgMj2NUmx+tehVTH/Kf4k1ZEtOHNFcm2wSxMRo992l6X3TIgni2eZVTZ85xMOjF31fwZAj6Q==", + "dev": true, + "requires": { + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" + }, + "dependencies": { + "is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmmirror.com/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "dev": true, + "requires": { + "is-plain-object": "^2.0.4" + } + } + } + }, + "extglob": { + "version": "2.0.4", + "resolved": "https://registry.npmmirror.com/extglob/-/extglob-2.0.4.tgz", + "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", + "dev": true, + "requires": { + "array-unique": "^0.3.2", + "define-property": "^1.0.0", + "expand-brackets": "^2.1.4", + "extend-shallow": "^2.0.1", + "fragment-cache": "^0.2.1", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmmirror.com/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha512-cZTYKFWspt9jZsMscWo8sc/5lbPC9Q0N5nBLgb+Yd915iL3udB1uFgS3B8YCx66UVHq018DAVFoee7x+gxggeA==", + "dev": true, + "requires": { + "is-descriptor": "^1.0.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmmirror.com/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug==", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmmirror.com/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmmirror.com/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmmirror.com/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + } + } + }, + "fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmmirror.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true + }, + "fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmmirror.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "dev": true + }, + "fastest-levenshtein": { + "version": "1.0.12", + "resolved": "https://registry.npmmirror.com/fastest-levenshtein/-/fastest-levenshtein-1.0.12.tgz", + "integrity": "sha512-On2N+BpYJ15xIC974QNVuYGMOlEVt4s0EOI3wwMqOmK1fdDY+FN/zltPV8vosq4ad4c/gJ1KHScUn/6AWIgiow==", + "dev": true + }, + "figgy-pudding": { + "version": "3.5.2", + "resolved": "https://registry.npmmirror.com/figgy-pudding/-/figgy-pudding-3.5.2.tgz", + "integrity": "sha512-0btnI/H8f2pavGMN8w40mlSKOfTK2SVJmBfBeVIj3kNw0swwgzyRq0d5TJVOwodFmtvpPeWPN/MCcfuWF0Ezbw==", + "dev": true + }, + "fill-range": { + "version": "7.0.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "dev": true, + "requires": { + "to-regex-range": "^5.0.1" + } + }, + "find-cache-dir": { + "version": "2.1.0", + "resolved": "https://registry.npmmirror.com/find-cache-dir/-/find-cache-dir-2.1.0.tgz", + "integrity": "sha512-Tq6PixE0w/VMFfCgbONnkiQIVol/JJL7nRMi20fqzA4NRs9AfeqMGeRdPi3wIhYkxjeBaWh2rxwapn5Tu3IqOQ==", + "dev": true, + "requires": { + "commondir": "^1.0.1", + "make-dir": "^2.0.0", + "pkg-dir": "^3.0.0" + } + }, + "find-replace": { + "version": "3.0.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/find-replace/-/find-replace-3.0.0.tgz", + "integrity": "sha512-6Tb2myMioCAgv5kfvP5/PkZZ/ntTpVK39fHY7WkWBgvbeE+VHd/tZuZ4mrC+bxh4cfOZeYKVPaJIZtZXV7GNCQ==", + "requires": { + "array-back": "^3.0.1" + } + }, + "find-up": { + "version": "5.0.0", "resolved": "https://repo.huaweicloud.com/repository/npm/find-up/-/find-up-5.0.0.tgz", "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", "dev": true, @@ -1446,12 +2753,83 @@ "path-exists": "^4.0.0" } }, + "findup-sync": { + "version": "0.3.0", + "resolved": "https://registry.npmmirror.com/findup-sync/-/findup-sync-0.3.0.tgz", + "integrity": "sha512-z8Nrwhi6wzxNMIbxlrTzuUW6KWuKkogZ/7OdDVq+0+kxn77KUH1nipx8iU6suqkHqc4y6n7a9A8IpmxY/pTjWg==", + "dev": true, + "requires": { + "glob": "~5.0.0" + }, + "dependencies": { + "glob": { + "version": "5.0.15", + "resolved": "https://registry.npmmirror.com/glob/-/glob-5.0.15.tgz", + "integrity": "sha512-c9IPMazfRITpmAAKi22dK1VKxGDX9ehhqfABDriL/lzO92xcUKEJPQHrVA/2YHSNFB4iFlykVmWvwo48nr3OxA==", + "dev": true, + "requires": { + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "2 || 3", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + } + } + }, "flat": { "version": "5.0.2", "resolved": "https://repo.huaweicloud.com/repository/npm/flat/-/flat-5.0.2.tgz", "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", "dev": true }, + "flush-write-stream": { + "version": "1.1.1", + "resolved": "https://registry.npmmirror.com/flush-write-stream/-/flush-write-stream-1.1.1.tgz", + "integrity": "sha512-3Z4XhFZ3992uIq0XOqb9AreonueSYphE6oYbpt5+3u06JWklbsPkNv3ZKkP9Bz/r+1MWCaMoSQ28P85+1Yc77w==", + "dev": true, + "requires": { + "inherits": "^2.0.3", + "readable-stream": "^2.3.6" + } + }, + "for-in": { + "version": "1.0.2", + "resolved": "https://registry.npmmirror.com/for-in/-/for-in-1.0.2.tgz", + "integrity": "sha512-7EwmXrOjyL+ChxMhmG5lnW9MPt1aIeZEwKhQzoBUdTV0N3zuwWDZYVJatDvZ2OyzPUvdIAZDsCetk3coyMfcnQ==", + "dev": true + }, + "fragment-cache": { + "version": "0.2.1", + "resolved": "https://registry.npmmirror.com/fragment-cache/-/fragment-cache-0.2.1.tgz", + "integrity": "sha512-GMBAbW9antB8iZRHLoGw0b3HANt57diZYFO/HL1JGIC1MjKrdmhxvrJbupnVvpys0zsz7yBApXdQyfepKly2kA==", + "dev": true, + "requires": { + "map-cache": "^0.2.2" + } + }, + "from2": { + "version": "2.3.0", + "resolved": "https://registry.npmmirror.com/from2/-/from2-2.3.0.tgz", + "integrity": "sha512-OMcX/4IC/uqEPVgGeyfN22LJk6AZrMkRZHxcHBMBvHScDGgwTm2GT2Wkgtocyd3JfZffjj2kYUDXXII0Fk9W0g==", + "dev": true, + "requires": { + "inherits": "^2.0.1", + "readable-stream": "^2.0.0" + } + }, + "fs-write-stream-atomic": { + "version": "1.0.10", + "resolved": "https://registry.npmmirror.com/fs-write-stream-atomic/-/fs-write-stream-atomic-1.0.10.tgz", + "integrity": "sha512-gehEzmPn2nAwr39eay+x3X34Ra+M2QlVUTLhkXPjWdeO8RF9kszk116avgBJM3ZyNHgHXBNx+VmPaFC36k0PzA==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "iferr": "^0.1.5", + "imurmurhash": "^0.1.4", + "readable-stream": "1 || 2" + } + }, "fs.realpath": { "version": "1.0.0", "resolved": "https://repo.huaweicloud.com/repository/npm/fs.realpath/-/fs.realpath-1.0.0.tgz", @@ -1496,6 +2874,18 @@ "has-symbols": "^1.0.1" } }, + "get-stream": { + "version": "6.0.1", + "resolved": "https://registry.npmmirror.com/get-stream/-/get-stream-6.0.1.tgz", + "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", + "dev": true + }, + "get-value": { + "version": "2.0.6", + "resolved": "https://registry.npmmirror.com/get-value/-/get-value-2.0.6.tgz", + "integrity": "sha512-Ln0UQDlxH1BapMu3GPtf7CuYNwRZf2gwCuPqbyG6pB8WfmFpzqcy4xtAaAMUhnNqjMKTiCPZG2oMT3YSx8U2NA==", + "dev": true + }, "glob": { "version": "7.1.6", "resolved": "https://repo.huaweicloud.com/repository/npm/glob/-/glob-7.1.6.tgz", @@ -1543,6 +2933,23 @@ "function-bind": "^1.1.1" } }, + "has-ansi": { + "version": "2.0.0", + "resolved": "https://registry.npmmirror.com/has-ansi/-/has-ansi-2.0.0.tgz", + "integrity": "sha512-C8vBJ8DwUCx19vhm7urhTuUsr4/IyP6l4VzNQDv+ryHQObW3TTTp9yB68WpYgRe2bbaGuZ/se74IqFeVnMnLZg==", + "dev": true, + "requires": { + "ansi-regex": "^2.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmmirror.com/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA==", + "dev": true + } + } + }, "has-flag": { "version": "3.0.0", "resolved": "https://repo.huaweicloud.com/repository/npm/has-flag/-/has-flag-3.0.0.tgz", @@ -1553,12 +2960,209 @@ "resolved": "https://repo.huaweicloud.com/repository/npm/has-symbols/-/has-symbols-1.0.2.tgz", "integrity": "sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw==" }, + "has-value": { + "version": "1.0.0", + "resolved": "https://registry.npmmirror.com/has-value/-/has-value-1.0.0.tgz", + "integrity": "sha512-IBXk4GTsLYdQ7Rvt+GRBrFSVEkmuOUy4re0Xjd9kJSUQpnTrWR4/y9RpfexN9vkAPMFuQoeWKwqzPozRTlasGw==", + "dev": true, + "requires": { + "get-value": "^2.0.6", + "has-values": "^1.0.0", + "isobject": "^3.0.0" + } + }, + "has-values": { + "version": "1.0.0", + "resolved": "https://registry.npmmirror.com/has-values/-/has-values-1.0.0.tgz", + "integrity": "sha512-ODYZC64uqzmtfGMEAX/FvZiRyWLpAC3vYnNunURUnkGVTS+mI0smVsWaPydRBsE3g+ok7h960jChO8mFcWlHaQ==", + "dev": true, + "requires": { + "is-number": "^3.0.0", + "kind-of": "^4.0.0" + }, + "dependencies": { + "is-number": { + "version": "3.0.0", + "resolved": "https://registry.npmmirror.com/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha512-4cboCqIpliH+mAvFNegjZQ4kgKc3ZUhQVr3HvWbSh5q3WH2v82ct+T2Y1hdU5Gdtorx/cLifQjqCbL7bpznLTg==", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmmirror.com/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "kind-of": { + "version": "4.0.0", + "resolved": "https://registry.npmmirror.com/kind-of/-/kind-of-4.0.0.tgz", + "integrity": "sha512-24XsCxmEbRwEDbz/qz3stgin8TTzZ1ESR56OMCN0ujYg+vRutNSiOj9bHH9u85DKgXguraugV5sFuvbD4FW/hw==", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "hash-base": { + "version": "3.1.0", + "resolved": "https://registry.npmmirror.com/hash-base/-/hash-base-3.1.0.tgz", + "integrity": "sha512-1nmYp/rhMDiE7AYkDw+lLwlAzz0AntGIe51F3RfFfEqyQ3feY2eI/NcwC6umIQVOASPMsWJLJScWKSSvzL9IVA==", + "dev": true, + "requires": { + "inherits": "^2.0.4", + "readable-stream": "^3.6.0", + "safe-buffer": "^5.2.0" + }, + "dependencies": { + "readable-stream": { + "version": "3.6.0", + "resolved": "https://registry.npmmirror.com/readable-stream/-/readable-stream-3.6.0.tgz", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "dev": true, + "requires": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + } + }, + "safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmmirror.com/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "dev": true + } + } + }, + "hash.js": { + "version": "1.1.7", + "resolved": "https://registry.npmmirror.com/hash.js/-/hash.js-1.1.7.tgz", + "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==", + "dev": true, + "requires": { + "inherits": "^2.0.3", + "minimalistic-assert": "^1.0.1" + } + }, "he": { "version": "1.2.0", "resolved": "https://repo.huaweicloud.com/repository/npm/he/-/he-1.2.0.tgz", "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", "dev": true }, + "hmac-drbg": { + "version": "1.0.1", + "resolved": "https://registry.npmmirror.com/hmac-drbg/-/hmac-drbg-1.0.1.tgz", + "integrity": "sha512-Tti3gMqLdZfhOQY1Mzf/AanLiqh1WTiJgEj26ZuYQ9fbkLomzGchCws4FyrSd4VkpBfiNhaE1On+lOz894jvXg==", + "dev": true, + "requires": { + "hash.js": "^1.0.3", + "minimalistic-assert": "^1.0.0", + "minimalistic-crypto-utils": "^1.0.1" + } + }, + "https-browserify": { + "version": "1.0.0", + "resolved": "https://registry.npmmirror.com/https-browserify/-/https-browserify-1.0.0.tgz", + "integrity": "sha512-J+FkSdyD+0mA0N+81tMotaRMfSL9SGi+xpD3T6YApKsc3bGSXJlfXri3VyFOeYkfLRQisDk1W+jIFFKBeUBbBg==", + "dev": true + }, + "human-signals": { + "version": "2.1.0", + "resolved": "https://registry.npmmirror.com/human-signals/-/human-signals-2.1.0.tgz", + "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", + "dev": true + }, + "ieee754": { + "version": "1.2.1", + "resolved": "https://registry.npmmirror.com/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", + "dev": true + }, + "iferr": { + "version": "0.1.5", + "resolved": "https://registry.npmmirror.com/iferr/-/iferr-0.1.5.tgz", + "integrity": "sha512-DUNFN5j7Tln0D+TxzloUjKB+CtVu6myn0JEFak6dG18mNt9YkQ6lzGCdafwofISZ1lLF3xRHJ98VKy9ynkcFaA==", + "dev": true + }, + "import-local": { + "version": "3.1.0", + "resolved": "https://registry.npmmirror.com/import-local/-/import-local-3.1.0.tgz", + "integrity": "sha512-ASB07uLtnDs1o6EHjKpX34BKYDSqnFerfTOJL2HvMqF70LnxpjkzDB8J44oT9pu4AMPkQwf8jl6szgvNd2tRIg==", + "dev": true, + "requires": { + "pkg-dir": "^4.2.0", + "resolve-cwd": "^3.0.0" + }, + "dependencies": { + "find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmmirror.com/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, + "requires": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + } + }, + "locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmmirror.com/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, + "requires": { + "p-locate": "^4.1.0" + } + }, + "p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmmirror.com/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "requires": { + "p-try": "^2.0.0" + } + }, + "p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmmirror.com/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, + "requires": { + "p-limit": "^2.2.0" + } + }, + "pkg-dir": { + "version": "4.2.0", + "resolved": "https://registry.npmmirror.com/pkg-dir/-/pkg-dir-4.2.0.tgz", + "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", + "dev": true, + "requires": { + "find-up": "^4.0.0" + } + } + } + }, + "imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmmirror.com/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", + "dev": true + }, + "infer-owner": { + "version": "1.0.4", + "resolved": "https://registry.npmmirror.com/infer-owner/-/infer-owner-1.0.4.tgz", + "integrity": "sha512-IClj+Xz94+d7irH5qRyfJonOdfTzuDaifE6ZPWfx0N0+/ATZCbuTPq2prFl526urkQd90WyUKIh1DfBQ2hMz9A==", + "dev": true + }, "inflight": { "version": "1.0.6", "resolved": "https://repo.huaweicloud.com/repository/npm/inflight/-/inflight-1.0.6.tgz", @@ -1575,6 +3179,32 @@ "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", "dev": true }, + "interpret": { + "version": "2.2.0", + "resolved": "https://registry.npmmirror.com/interpret/-/interpret-2.2.0.tgz", + "integrity": "sha512-Ju0Bz/cEia55xDwUWEa8+olFpCiQoypjnQySseKtmjNrnps3P+xfpUmGr90T7yjlVJmOtybRvPXhKMbHr+fWnw==", + "dev": true + }, + "is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmmirror.com/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha512-e1BM1qnDbMRG3ll2U9dSK0UMHuWOs3pY3AtcFsmvwPtKL3MML/Q86i+GilLfvqEs4GW+ExB91tQ3Ig9noDIZ+A==", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmmirror.com/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, "is-binary-path": { "version": "2.1.0", "resolved": "https://repo.huaweicloud.com/repository/npm/is-binary-path/-/is-binary-path-2.1.0.tgz", @@ -1584,6 +3214,12 @@ "binary-extensions": "^2.0.0" } }, + "is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmmirror.com/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", + "dev": true + }, "is-core-module": { "version": "2.7.0", "resolved": "https://repo.huaweicloud.com/repository/npm/is-core-module/-/is-core-module-2.7.0.tgz", @@ -1592,6 +3228,51 @@ "has": "^1.0.3" } }, + "is-data-descriptor": { + "version": "0.1.4", + "resolved": "https://registry.npmmirror.com/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha512-+w9D5ulSoBNlmw9OHn3U2v51SyoCd0he+bB3xMl62oijhrspxowjU+AIcDY0N3iEJbUEkB15IlMASQsxYigvXg==", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmmirror.com/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmmirror.com/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" + }, + "dependencies": { + "kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmmirror.com/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", + "dev": true + } + } + }, + "is-extendable": { + "version": "0.1.1", + "resolved": "https://registry.npmmirror.com/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha512-5BMULNob1vgFX6EjQw5izWDxrecWK9AM72rugNr0TFldMOi0fj6Jk+zeKIt0xGj4cEfQIJth4w3OKWOJ4f+AFw==", + "dev": true + }, "is-extglob": { "version": "2.1.1", "resolved": "https://repo.huaweicloud.com/repository/npm/is-extglob/-/is-extglob-2.1.1.tgz", @@ -1624,6 +3305,33 @@ "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", "dev": true }, + "is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmmirror.com/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dev": true, + "requires": { + "isobject": "^3.0.1" + } + }, + "is-stream": { + "version": "2.0.1", + "resolved": "https://registry.npmmirror.com/is-stream/-/is-stream-2.0.1.tgz", + "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", + "dev": true + }, + "is-windows": { + "version": "1.0.2", + "resolved": "https://registry.npmmirror.com/is-windows/-/is-windows-1.0.2.tgz", + "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", + "dev": true + }, + "is-wsl": { + "version": "1.1.0", + "resolved": "https://registry.npmmirror.com/is-wsl/-/is-wsl-1.1.0.tgz", + "integrity": "sha512-gfygJYZ2gLTDlmbWMI0CE2MwnFzSN/2SZfkMlItC4K/JBlsWVDB0bO6XhqcY13YXE7iMcAJnzTCJjPiTeJJ0Mw==", + "dev": true + }, "isarray": { "version": "0.0.1", "resolved": "https://repo.huaweicloud.com/repository/npm/isarray/-/isarray-0.0.1.tgz", @@ -1636,6 +3344,12 @@ "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", "dev": true }, + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmmirror.com/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==", + "dev": true + }, "js-tokens": { "version": "4.0.0", "resolved": "https://repo.huaweicloud.com/repository/npm/js-tokens/-/js-tokens-4.0.0.tgz", @@ -1655,6 +3369,18 @@ "resolved": "https://repo.huaweicloud.com/repository/npm/jsesc/-/jsesc-2.5.2.tgz", "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==" }, + "json-parse-better-errors": { + "version": "1.0.2", + "resolved": "https://registry.npmmirror.com/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", + "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==", + "dev": true + }, + "json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmmirror.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true + }, "json5": { "version": "2.2.0", "resolved": "https://repo.huaweicloud.com/repository/npm/json5/-/json5-2.2.0.tgz", @@ -1669,6 +3395,12 @@ "integrity": "sha512-g3UB796vUFIY90VIv/WX3L2c8CS2MdWUww3CNrYmqza1Fg0DURc2K/O4YrnklBdQarSJ/y8JnJYDGc+1iumQjg==", "dev": true }, + "kind-of": { + "version": "6.0.3", + "resolved": "https://registry.npmmirror.com/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", + "dev": true + }, "klaw": { "version": "2.1.1", "resolved": "https://repo.huaweicloud.com/repository/npm/klaw/-/klaw-2.1.1.tgz", @@ -1677,6 +3409,34 @@ "graceful-fs": "^4.1.9" } }, + "loader-runner": { + "version": "2.4.0", + "resolved": "https://registry.npmmirror.com/loader-runner/-/loader-runner-2.4.0.tgz", + "integrity": "sha512-Jsmr89RcXGIwivFY21FcRrisYZfvLMTWx5kOLc+JTxtpBOG6xML0vzbc6SEQG2FO9/4Fc3wW4LVcB5DmGflaRw==", + "dev": true + }, + "loader-utils": { + "version": "1.4.0", + "resolved": "https://registry.npmmirror.com/loader-utils/-/loader-utils-1.4.0.tgz", + "integrity": "sha512-qH0WSMBtn/oHuwjy/NucEgbx5dbxxnxup9s4PVXJUDHZBQY+s0NWA9rJf53RBnQZxfch7euUui7hpoAPvALZdA==", + "dev": true, + "requires": { + "big.js": "^5.2.2", + "emojis-list": "^3.0.0", + "json5": "^1.0.1" + }, + "dependencies": { + "json5": { + "version": "1.0.1", + "resolved": "https://registry.npmmirror.com/json5/-/json5-1.0.1.tgz", + "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==", + "dev": true, + "requires": { + "minimist": "^1.2.0" + } + } + } + }, "locate-path": { "version": "6.0.0", "resolved": "https://repo.huaweicloud.com/repository/npm/locate-path/-/locate-path-6.0.0.tgz", @@ -1736,32 +3496,248 @@ "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, "requires": { - "color-name": "~1.1.4" + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://repo.huaweicloud.com/repository/npm/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, + "lru-cache": { + "version": "5.1.1", + "resolved": "https://registry.npmmirror.com/lru-cache/-/lru-cache-5.1.1.tgz", + "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", + "dev": true, + "requires": { + "yallist": "^3.0.2" + } + }, + "make-dir": { + "version": "2.1.0", + "resolved": "https://registry.npmmirror.com/make-dir/-/make-dir-2.1.0.tgz", + "integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==", + "dev": true, + "requires": { + "pify": "^4.0.1", + "semver": "^5.6.0" + }, + "dependencies": { + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmmirror.com/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + } + } + }, + "make-error": { + "version": "1.3.6", + "resolved": "https://registry.npmmirror.com/make-error/-/make-error-1.3.6.tgz", + "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", + "dev": true + }, + "map-cache": { + "version": "0.2.2", + "resolved": "https://registry.npmmirror.com/map-cache/-/map-cache-0.2.2.tgz", + "integrity": "sha512-8y/eV9QQZCiyn1SprXSrCmqJN0yNRATe+PO8ztwqrvrbdRLA3eYJF0yaR0YayLWkMbsQSKWS9N2gPcGEc4UsZg==", + "dev": true + }, + "map-visit": { + "version": "1.0.0", + "resolved": "https://registry.npmmirror.com/map-visit/-/map-visit-1.0.0.tgz", + "integrity": "sha512-4y7uGv8bd2WdM9vpQsiQNo41Ln1NvhvDRuVt0k2JZQ+ezN2uaQes7lZeZ+QQUHOLQAtDaBJ+7wCbi+ab/KFs+w==", + "dev": true, + "requires": { + "object-visit": "^1.0.0" + } + }, + "md5.js": { + "version": "1.3.5", + "resolved": "https://registry.npmmirror.com/md5.js/-/md5.js-1.3.5.tgz", + "integrity": "sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==", + "dev": true, + "requires": { + "hash-base": "^3.0.0", + "inherits": "^2.0.1", + "safe-buffer": "^5.1.2" + } + }, + "memory-fs": { + "version": "0.5.0", + "resolved": "https://registry.npmmirror.com/memory-fs/-/memory-fs-0.5.0.tgz", + "integrity": "sha512-jA0rdU5KoQMC0e6ppoNRtpp6vjFq6+NY7r8hywnC7V+1Xj/MtHwGIbB1QaK/dunyjWteJzmkpd7ooeWg10T7GA==", + "dev": true, + "requires": { + "errno": "^0.1.3", + "readable-stream": "^2.0.1" + } + }, + "merge-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmmirror.com/merge-stream/-/merge-stream-2.0.0.tgz", + "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", + "dev": true + }, + "micromatch": { + "version": "3.1.10", + "resolved": "https://registry.npmmirror.com/micromatch/-/micromatch-3.1.10.tgz", + "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", + "dev": true, + "requires": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "braces": "^2.3.1", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "extglob": "^2.0.4", + "fragment-cache": "^0.2.1", + "kind-of": "^6.0.2", + "nanomatch": "^1.2.9", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.2" + }, + "dependencies": { + "braces": { + "version": "2.3.2", + "resolved": "https://registry.npmmirror.com/braces/-/braces-2.3.2.tgz", + "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", + "dev": true, + "requires": { + "arr-flatten": "^1.1.0", + "array-unique": "^0.3.2", + "extend-shallow": "^2.0.1", + "fill-range": "^4.0.0", + "isobject": "^3.0.1", + "repeat-element": "^1.1.2", + "snapdragon": "^0.8.1", + "snapdragon-node": "^2.0.1", + "split-string": "^3.0.2", + "to-regex": "^3.0.1" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmmirror.com/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug==", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "fill-range": { + "version": "4.0.0", + "resolved": "https://registry.npmmirror.com/fill-range/-/fill-range-4.0.0.tgz", + "integrity": "sha512-VcpLTWqWDiTerugjj8e3+esbg+skS3M9e54UuR3iCeIDMXCLTsAH8hTSzDQU/X6/6t3eYkOKoZSef2PlU6U1XQ==", + "dev": true, + "requires": { + "extend-shallow": "^2.0.1", + "is-number": "^3.0.0", + "repeat-string": "^1.6.1", + "to-regex-range": "^2.1.0" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmmirror.com/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug==", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "is-number": { + "version": "3.0.0", + "resolved": "https://registry.npmmirror.com/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha512-4cboCqIpliH+mAvFNegjZQ4kgKc3ZUhQVr3HvWbSh5q3WH2v82ct+T2Y1hdU5Gdtorx/cLifQjqCbL7bpznLTg==", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmmirror.com/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } } }, - "color-name": { - "version": "1.1.4", - "resolved": "https://repo.huaweicloud.com/repository/npm/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "has-flag": { - "version": "4.0.0", - "resolved": "https://repo.huaweicloud.com/repository/npm/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true - }, - "supports-color": { - "version": "7.2.0", - "resolved": "https://repo.huaweicloud.com/repository/npm/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "to-regex-range": { + "version": "2.1.1", + "resolved": "https://registry.npmmirror.com/to-regex-range/-/to-regex-range-2.1.1.tgz", + "integrity": "sha512-ZZWNfCjUokXXDGXFpZehJIkZqq91BcULFq/Pi7M5i4JnxXdhMKAK682z8bCW3o8Hj1wuuzoKcW3DfVzaP6VuNg==", "dev": true, "requires": { - "has-flag": "^4.0.0" + "is-number": "^3.0.0", + "repeat-string": "^1.6.1" } } } }, + "miller-rabin": { + "version": "4.0.1", + "resolved": "https://registry.npmmirror.com/miller-rabin/-/miller-rabin-4.0.1.tgz", + "integrity": "sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA==", + "dev": true, + "requires": { + "bn.js": "^4.0.0", + "brorand": "^1.0.1" + }, + "dependencies": { + "bn.js": { + "version": "4.12.0", + "resolved": "https://registry.npmmirror.com/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==", + "dev": true + } + } + }, + "mimic-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmmirror.com/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", + "dev": true + }, + "minimalistic-assert": { + "version": "1.0.1", + "resolved": "https://registry.npmmirror.com/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", + "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==", + "dev": true + }, + "minimalistic-crypto-utils": { + "version": "1.0.1", + "resolved": "https://registry.npmmirror.com/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", + "integrity": "sha512-JIYlbt6g8i5jKfJ3xz7rF0LXmv2TkDxBLUkiBeZ7bAx4GnnNMr8xFpGnOxn6GhTEHx3SjRrZEoU+j04prX1ktg==", + "dev": true + }, "minimatch": { "version": "3.0.4", "resolved": "https://repo.huaweicloud.com/repository/npm/minimatch/-/minimatch-3.0.4.tgz", @@ -1775,6 +3751,45 @@ "resolved": "https://repo.huaweicloud.com/repository/npm/minimist/-/minimist-1.2.5.tgz", "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==" }, + "mississippi": { + "version": "3.0.0", + "resolved": "https://registry.npmmirror.com/mississippi/-/mississippi-3.0.0.tgz", + "integrity": "sha512-x471SsVjUtBRtcvd4BzKE9kFC+/2TeWgKCgw0bZcw1b9l2X3QX5vCWgF+KaZaYm87Ss//rHnWryupDrgLvmSkA==", + "dev": true, + "requires": { + "concat-stream": "^1.5.0", + "duplexify": "^3.4.2", + "end-of-stream": "^1.1.0", + "flush-write-stream": "^1.0.0", + "from2": "^2.1.0", + "parallel-transform": "^1.1.0", + "pump": "^3.0.0", + "pumpify": "^1.3.3", + "stream-each": "^1.1.0", + "through2": "^2.0.0" + } + }, + "mixin-deep": { + "version": "1.3.2", + "resolved": "https://registry.npmmirror.com/mixin-deep/-/mixin-deep-1.3.2.tgz", + "integrity": "sha512-WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA==", + "dev": true, + "requires": { + "for-in": "^1.0.2", + "is-extendable": "^1.0.1" + }, + "dependencies": { + "is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmmirror.com/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "dev": true, + "requires": { + "is-plain-object": "^2.0.4" + } + } + } + }, "mkdirp": { "version": "0.5.5", "resolved": "https://repo.huaweicloud.com/repository/npm/mkdirp/-/mkdirp-0.5.5.tgz", @@ -1883,6 +3898,20 @@ } } }, + "move-concurrently": { + "version": "1.0.1", + "resolved": "https://registry.npmmirror.com/move-concurrently/-/move-concurrently-1.0.1.tgz", + "integrity": "sha512-hdrFxZOycD/g6A6SoI2bB5NA/5NEqD0569+S47WZhPvm46sD50ZHdYaFmnua5lndde9rCHGjmfK7Z8BuCt/PcQ==", + "dev": true, + "requires": { + "aproba": "^1.1.1", + "copy-concurrently": "^1.0.0", + "fs-write-stream-atomic": "^1.0.8", + "mkdirp": "^0.5.1", + "rimraf": "^2.5.4", + "run-queue": "^1.0.3" + } + }, "ms": { "version": "2.1.2", "resolved": "https://repo.huaweicloud.com/repository/npm/ms/-/ms-2.1.2.tgz", @@ -1894,6 +3923,31 @@ "integrity": "sha512-a1cQNyczgKbLX9jwbS/+d7W8fX/RfgYR7lVWwWOGIPNgK2m0MWvrGF6/m4kk6U3QcFMnZf3RIhL0v2Jgh/0Uxw==", "dev": true }, + "nanomatch": { + "version": "1.2.13", + "resolved": "https://registry.npmmirror.com/nanomatch/-/nanomatch-1.2.13.tgz", + "integrity": "sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA==", + "dev": true, + "requires": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "fragment-cache": "^0.2.1", + "is-windows": "^1.0.2", + "kind-of": "^6.0.2", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + } + }, + "neo-async": { + "version": "2.6.2", + "resolved": "https://registry.npmmirror.com/neo-async/-/neo-async-2.6.2.tgz", + "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", + "dev": true + }, "nise": { "version": "4.1.0", "resolved": "https://repo.huaweicloud.com/repository/npm/nise/-/nise-4.1.0.tgz", @@ -1907,6 +3961,45 @@ "path-to-regexp": "^1.7.0" } }, + "node-libs-browser": { + "version": "2.2.1", + "resolved": "https://registry.npmmirror.com/node-libs-browser/-/node-libs-browser-2.2.1.tgz", + "integrity": "sha512-h/zcD8H9kaDZ9ALUWwlBUDo6TKF8a7qBSCSEGfjTVIYeqsioSKaAX+BN7NgiMGp6iSIXZ3PxgCu8KS3b71YK5Q==", + "dev": true, + "requires": { + "assert": "^1.1.1", + "browserify-zlib": "^0.2.0", + "buffer": "^4.3.0", + "console-browserify": "^1.1.0", + "constants-browserify": "^1.0.0", + "crypto-browserify": "^3.11.0", + "domain-browser": "^1.1.1", + "events": "^3.0.0", + "https-browserify": "^1.0.0", + "os-browserify": "^0.3.0", + "path-browserify": "0.0.1", + "process": "^0.11.10", + "punycode": "^1.2.4", + "querystring-es3": "^0.2.0", + "readable-stream": "^2.3.3", + "stream-browserify": "^2.0.1", + "stream-http": "^2.7.2", + "string_decoder": "^1.0.0", + "timers-browserify": "^2.0.4", + "tty-browserify": "0.0.0", + "url": "^0.11.0", + "util": "^0.11.0", + "vm-browserify": "^1.0.1" + }, + "dependencies": { + "punycode": { + "version": "1.4.1", + "resolved": "https://registry.npmmirror.com/punycode/-/punycode-1.4.1.tgz", + "integrity": "sha512-jmYNElW7yvO7TV33CjSmvSiE2yco3bV2czu/OzDKdMNVZQWfxCblURLhf+47syQRBntjfLdd/H0egrzIG+oaFQ==", + "dev": true + } + } + }, "node-releases": { "version": "1.1.77", "resolved": "https://repo.huaweicloud.com/repository/npm/node-releases/-/node-releases-1.1.77.tgz", @@ -1918,11 +4011,66 @@ "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", "dev": true }, + "npm-run-path": { + "version": "4.0.1", + "resolved": "https://registry.npmmirror.com/npm-run-path/-/npm-run-path-4.0.1.tgz", + "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", + "dev": true, + "requires": { + "path-key": "^3.0.0" + } + }, + "object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmmirror.com/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", + "dev": true + }, + "object-copy": { + "version": "0.1.0", + "resolved": "https://registry.npmmirror.com/object-copy/-/object-copy-0.1.0.tgz", + "integrity": "sha512-79LYn6VAb63zgtmAteVOWo9Vdj71ZVBy3Pbse+VqxDpEP83XuujMrGqHIwAXJ5I/aM0zU7dIyIAhifVTPrNItQ==", + "dev": true, + "requires": { + "copy-descriptor": "^0.1.0", + "define-property": "^0.2.5", + "kind-of": "^3.0.3" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmmirror.com/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha512-Rr7ADjQZenceVOAKop6ALkkRAmH1A4Gx9hV/7ZujPUN2rkATqFO0JZLZInbAjpZYoJ1gUx8MRMQVkYemcbMSTA==", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmmirror.com/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, "object-keys": { "version": "1.1.1", "resolved": "https://repo.huaweicloud.com/repository/npm/object-keys/-/object-keys-1.1.1.tgz", "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==" }, + "object-visit": { + "version": "1.0.1", + "resolved": "https://registry.npmmirror.com/object-visit/-/object-visit-1.0.1.tgz", + "integrity": "sha512-GBaMwwAVK9qbQN3Scdo0OyvgPW7l3lnaVMj84uTOZlswkX0KpF6fyDBJhtTthf7pymztoN36/KEr1DyhF96zEA==", + "dev": true, + "requires": { + "isobject": "^3.0.0" + } + }, "object.assign": { "version": "4.1.2", "resolved": "https://repo.huaweicloud.com/repository/npm/object.assign/-/object.assign-4.1.2.tgz", @@ -1934,6 +4082,15 @@ "object-keys": "^1.1.1" } }, + "object.pick": { + "version": "1.3.0", + "resolved": "https://registry.npmmirror.com/object.pick/-/object.pick-1.3.0.tgz", + "integrity": "sha512-tqa/UMy/CCoYmj+H5qc07qvSL9dqcs/WZENZ1JbtWBlATP+iVOe778gE6MSijnyCnORzDuX6hU+LA4SZ09YjFQ==", + "dev": true, + "requires": { + "isobject": "^3.0.1" + } + }, "once": { "version": "1.4.0", "resolved": "https://repo.huaweicloud.com/repository/npm/once/-/once-1.4.0.tgz", @@ -1943,6 +4100,39 @@ "wrappy": "1" } }, + "onetime": { + "version": "5.1.2", + "resolved": "https://registry.npmmirror.com/onetime/-/onetime-5.1.2.tgz", + "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", + "dev": true, + "requires": { + "mimic-fn": "^2.1.0" + } + }, + "optimist": { + "version": "0.6.1", + "resolved": "https://registry.npmmirror.com/optimist/-/optimist-0.6.1.tgz", + "integrity": "sha512-snN4O4TkigujZphWLN0E//nQmm7790RYaE53DdL7ZYwee2D8DDo9/EyYiKUfN3rneWUjhJnueija3G9I2i0h3g==", + "dev": true, + "requires": { + "minimist": "~0.0.1", + "wordwrap": "~0.0.2" + }, + "dependencies": { + "minimist": { + "version": "0.0.10", + "resolved": "https://registry.npmmirror.com/minimist/-/minimist-0.0.10.tgz", + "integrity": "sha512-iotkTvxc+TwOm5Ieim8VnSNvCDjCK9S8G3scJ50ZthspSxa7jx50jkhYduuAtAjvfDUwSgOwf8+If99AlOEhyw==", + "dev": true + } + } + }, + "os-browserify": { + "version": "0.3.0", + "resolved": "https://registry.npmmirror.com/os-browserify/-/os-browserify-0.3.0.tgz", + "integrity": "sha512-gjcpUc3clBf9+210TRaDWbf+rZZZEshZ+DlXMRCeAjp0xhTrnQsKHypIy1J3d5hKdUzj69t708EHtU8P6bUn0A==", + "dev": true + }, "os-tmpdir": { "version": "1.0.2", "resolved": "https://repo.huaweicloud.com/repository/npm/os-tmpdir/-/os-tmpdir-1.0.2.tgz", @@ -1966,6 +4156,61 @@ "p-limit": "^3.0.2" } }, + "p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmmirror.com/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true + }, + "pako": { + "version": "1.0.11", + "resolved": "https://registry.npmmirror.com/pako/-/pako-1.0.11.tgz", + "integrity": "sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==", + "dev": true + }, + "parallel-transform": { + "version": "1.2.0", + "resolved": "https://registry.npmmirror.com/parallel-transform/-/parallel-transform-1.2.0.tgz", + "integrity": "sha512-P2vSmIu38uIlvdcU7fDkyrxj33gTUy/ABO5ZUbGowxNCopBq/OoD42bP4UmMrJoPyk4Uqf0mu3mtWBhHCZD8yg==", + "dev": true, + "requires": { + "cyclist": "^1.0.1", + "inherits": "^2.0.3", + "readable-stream": "^2.1.5" + } + }, + "parse-asn1": { + "version": "5.1.6", + "resolved": "https://registry.npmmirror.com/parse-asn1/-/parse-asn1-5.1.6.tgz", + "integrity": "sha512-RnZRo1EPU6JBnra2vGHj0yhp6ebyjBZpmUCLHWiFhxlzvBCCpAuZ7elsBp1PVAbQN0/04VD/19rfzlBSwLstMw==", + "dev": true, + "requires": { + "asn1.js": "^5.2.0", + "browserify-aes": "^1.0.0", + "evp_bytestokey": "^1.0.0", + "pbkdf2": "^3.0.3", + "safe-buffer": "^5.1.1" + } + }, + "pascalcase": { + "version": "0.1.1", + "resolved": "https://registry.npmmirror.com/pascalcase/-/pascalcase-0.1.1.tgz", + "integrity": "sha512-XHXfu/yOQRy9vYOtUDVMN60OEJjW013GoObG1o+xwQTpB9eYJX/BjXMsdW13ZDPruFhYYn0AG22w0xgQMwl3Nw==", + "dev": true + }, + "path-browserify": { + "version": "0.0.1", + "resolved": "https://registry.npmmirror.com/path-browserify/-/path-browserify-0.0.1.tgz", + "integrity": "sha512-BapA40NHICOS+USX9SN4tyhq+A2RrN/Ws5F0Z5aMHDp98Fl86lX8Oti8B7uN93L4Ifv4fHOEA+pQw87gmMO/lQ==", + "dev": true + }, + "path-dirname": { + "version": "1.0.2", + "resolved": "https://registry.npmmirror.com/path-dirname/-/path-dirname-1.0.2.tgz", + "integrity": "sha512-ALzNPpyNq9AqXMBjeymIjFDAkAFH06mHJH/cSBHAgU0s4vfpBn6b2nf8tiRLvagKD8RbTpq2FKTBg7cl9l3c7Q==", + "dev": true, + "optional": true + }, "path-exists": { "version": "4.0.0", "resolved": "https://repo.huaweicloud.com/repository/npm/path-exists/-/path-exists-4.0.0.tgz", @@ -1978,6 +4223,12 @@ "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", "dev": true }, + "path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmmirror.com/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true + }, "path-parse": { "version": "1.0.7", "resolved": "https://repo.huaweicloud.com/repository/npm/path-parse/-/path-parse-1.0.7.tgz", @@ -1998,6 +4249,19 @@ "integrity": "sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==", "dev": true }, + "pbkdf2": { + "version": "3.1.2", + "resolved": "https://registry.npmmirror.com/pbkdf2/-/pbkdf2-3.1.2.tgz", + "integrity": "sha512-iuh7L6jA7JEGu2WxDwtQP1ddOpaJNC4KlDEFfdQajSGgGPNi4OyDc2R7QnbY2bR9QjBVGwgvTdNJZoE7RaxUMA==", + "dev": true, + "requires": { + "create-hash": "^1.1.2", + "create-hmac": "^1.1.4", + "ripemd160": "^2.0.1", + "safe-buffer": "^5.0.1", + "sha.js": "^2.4.8" + } + }, "picocolors": { "version": "0.2.1", "resolved": "https://repo.huaweicloud.com/repository/npm/picocolors/-/picocolors-0.2.1.tgz", @@ -2009,6 +4273,175 @@ "integrity": "sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw==", "dev": true }, + "pify": { + "version": "4.0.1", + "resolved": "https://registry.npmmirror.com/pify/-/pify-4.0.1.tgz", + "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", + "dev": true + }, + "pkg-dir": { + "version": "3.0.0", + "resolved": "https://registry.npmmirror.com/pkg-dir/-/pkg-dir-3.0.0.tgz", + "integrity": "sha512-/E57AYkoeQ25qkxMj5PBOVgF8Kiu/h7cYS30Z5+R7WaiCCBfLq58ZI/dSeaEKb9WVJV5n/03QwrN3IeWIFllvw==", + "dev": true, + "requires": { + "find-up": "^3.0.0" + }, + "dependencies": { + "find-up": { + "version": "3.0.0", + "resolved": "https://registry.npmmirror.com/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "dev": true, + "requires": { + "locate-path": "^3.0.0" + } + }, + "locate-path": { + "version": "3.0.0", + "resolved": "https://registry.npmmirror.com/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "dev": true, + "requires": { + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" + } + }, + "p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmmirror.com/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "requires": { + "p-try": "^2.0.0" + } + }, + "p-locate": { + "version": "3.0.0", + "resolved": "https://registry.npmmirror.com/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "dev": true, + "requires": { + "p-limit": "^2.0.0" + } + }, + "path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmmirror.com/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha512-bpC7GYwiDYQ4wYLe+FA8lhRjhQCMcQGuSgGGqDkg/QerRWw9CmGRT0iSOVRSZJ29NMLZgIzqaljJ63oaL4NIJQ==", + "dev": true + } + } + }, + "posix-character-classes": { + "version": "0.1.1", + "resolved": "https://registry.npmmirror.com/posix-character-classes/-/posix-character-classes-0.1.1.tgz", + "integrity": "sha512-xTgYBc3fuo7Yt7JbiuFxSYGToMoz8fLoE6TC9Wx1P/u+LfeThMOAqmuyECnlBaaJb+u1m9hHiXUEtwW4OzfUJg==", + "dev": true + }, + "prettier": { + "version": "1.19.1", + "resolved": "https://registry.npmmirror.com/prettier/-/prettier-1.19.1.tgz", + "integrity": "sha512-s7PoyDv/II1ObgQunCbB9PdLmUcBZcnWOcxDh7O0N/UwDEsHyqkW+Qh28jW+mVuCdx7gLB0BotYI1Y6uI9iyew==", + "dev": true + }, + "process": { + "version": "0.11.10", + "resolved": "https://registry.npmmirror.com/process/-/process-0.11.10.tgz", + "integrity": "sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==", + "dev": true + }, + "process-nextick-args": { + "version": "2.0.1", + "resolved": "https://registry.npmmirror.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", + "dev": true + }, + "promise-inflight": { + "version": "1.0.1", + "resolved": "https://registry.npmmirror.com/promise-inflight/-/promise-inflight-1.0.1.tgz", + "integrity": "sha512-6zWPyEOFaQBJYcGMHBKTKJ3u6TBsnMFOIZSa6ce1e/ZrrsOlnHRHbabMjLiBYKp+n44X9eUI6VUPaukCXHuG4g==", + "dev": true + }, + "prr": { + "version": "1.0.1", + "resolved": "https://registry.npmmirror.com/prr/-/prr-1.0.1.tgz", + "integrity": "sha512-yPw4Sng1gWghHQWj0B3ZggWUm4qVbPwPFcRG8KyxiU7J2OHFSoEHKS+EZ3fv5l1t9CyCiop6l/ZYeWbrgoQejw==", + "dev": true + }, + "public-encrypt": { + "version": "4.0.3", + "resolved": "https://registry.npmmirror.com/public-encrypt/-/public-encrypt-4.0.3.tgz", + "integrity": "sha512-zVpa8oKZSz5bTMTFClc1fQOnyyEzpl5ozpi1B5YcvBrdohMjH2rfsBtyXcuNuwjsDIXmBYlF2N5FlJYhR29t8Q==", + "dev": true, + "requires": { + "bn.js": "^4.1.0", + "browserify-rsa": "^4.0.0", + "create-hash": "^1.1.0", + "parse-asn1": "^5.0.0", + "randombytes": "^2.0.1", + "safe-buffer": "^5.1.2" + }, + "dependencies": { + "bn.js": { + "version": "4.12.0", + "resolved": "https://registry.npmmirror.com/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==", + "dev": true + } + } + }, + "pump": { + "version": "3.0.0", + "resolved": "https://registry.npmmirror.com/pump/-/pump-3.0.0.tgz", + "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", + "dev": true, + "requires": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + }, + "pumpify": { + "version": "1.5.1", + "resolved": "https://registry.npmmirror.com/pumpify/-/pumpify-1.5.1.tgz", + "integrity": "sha512-oClZI37HvuUJJxSKKrC17bZ9Cu0ZYhEAGPsPUy9KlMUmv9dKX2o77RUmq7f3XjIxbwyGwYzbzQ1L2Ks8sIradQ==", + "dev": true, + "requires": { + "duplexify": "^3.6.0", + "inherits": "^2.0.3", + "pump": "^2.0.0" + }, + "dependencies": { + "pump": { + "version": "2.0.1", + "resolved": "https://registry.npmmirror.com/pump/-/pump-2.0.1.tgz", + "integrity": "sha512-ruPMNRkN3MHP1cWJc9OWr+T/xDP0jhXYCLfJcBuX54hhfIBnaQmAUMfDcG4DM5UMWByBbJY69QSphm3jtDKIkA==", + "dev": true, + "requires": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + } + } + }, + "punycode": { + "version": "2.1.1", + "resolved": "https://registry.npmmirror.com/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", + "dev": true + }, + "querystring": { + "version": "0.2.0", + "resolved": "https://registry.npmmirror.com/querystring/-/querystring-0.2.0.tgz", + "integrity": "sha512-X/xY82scca2tau62i9mDyU9K+I+djTMUsvwf7xnUX5GLvVzgJybOJf4Y6o9Zx3oJK/LSXg5tTZBjwzqVPaPO2g==", + "dev": true + }, + "querystring-es3": { + "version": "0.2.1", + "resolved": "https://registry.npmmirror.com/querystring-es3/-/querystring-es3-0.2.1.tgz", + "integrity": "sha512-773xhDQnZBMFobEiztv8LIl70ch5MSF/jUQVlhwFyBILqq96anmoctVIYz+ZRp0qbCKATTn6ev02M3r7Ga5vqA==", + "dev": true + }, "randombytes": { "version": "2.1.0", "resolved": "https://repo.huaweicloud.com/repository/npm/randombytes/-/randombytes-2.1.0.tgz", @@ -2018,6 +4451,39 @@ "safe-buffer": "^5.1.0" } }, + "randomfill": { + "version": "1.0.4", + "resolved": "https://registry.npmmirror.com/randomfill/-/randomfill-1.0.4.tgz", + "integrity": "sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw==", + "dev": true, + "requires": { + "randombytes": "^2.0.5", + "safe-buffer": "^5.1.0" + } + }, + "readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmmirror.com/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + }, + "dependencies": { + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmmirror.com/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==", + "dev": true + } + } + }, "readdirp": { "version": "3.5.0", "resolved": "https://repo.huaweicloud.com/repository/npm/readdirp/-/readdirp-3.5.0.tgz", @@ -2045,6 +4511,15 @@ } } }, + "rechoir": { + "version": "0.7.1", + "resolved": "https://registry.npmmirror.com/rechoir/-/rechoir-0.7.1.tgz", + "integrity": "sha512-/njmZ8s1wVeR6pjTZ+0nCnv8SpZNRMT2D1RLOJQESlYFDBvwpTA4KWJpZ+sBJ4+vhjILRcK7JIFdGCdxEAAitg==", + "dev": true, + "requires": { + "resolve": "^1.9.0" + } + }, "reduce-flatten": { "version": "2.0.0", "resolved": "https://repo.huaweicloud.com/repository/npm/reduce-flatten/-/reduce-flatten-2.0.0.tgz", @@ -2076,6 +4551,16 @@ "@babel/runtime": "^7.8.4" } }, + "regex-not": { + "version": "1.0.2", + "resolved": "https://registry.npmmirror.com/regex-not/-/regex-not-1.0.2.tgz", + "integrity": "sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==", + "dev": true, + "requires": { + "extend-shallow": "^3.0.2", + "safe-regex": "^1.1.0" + } + }, "regexpp": { "version": "3.2.0", "resolved": "https://repo.huaweicloud.com/repository/npm/regexpp/-/regexpp-3.2.0.tgz", @@ -2114,6 +4599,25 @@ } } }, + "remove-trailing-separator": { + "version": "1.1.0", + "resolved": "https://registry.npmmirror.com/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", + "integrity": "sha512-/hS+Y0u3aOfIETiaiirUFwDBDzmXPvO+jAfKTitUngIPzdKc6Z0LoFjM/CK5PL4C+eKwHohlHAb6H0VFfmmUsw==", + "dev": true, + "optional": true + }, + "repeat-element": { + "version": "1.1.4", + "resolved": "https://registry.npmmirror.com/repeat-element/-/repeat-element-1.1.4.tgz", + "integrity": "sha512-LFiNfRcSu7KK3evMyYOuCzv3L10TW7yC1G2/+StMjK8Y6Vqd2MG7r/Qjw4ghtuCOjFvlnms/iMmLqpvW/ES/WQ==", + "dev": true + }, + "repeat-string": { + "version": "1.6.1", + "resolved": "https://registry.npmmirror.com/repeat-string/-/repeat-string-1.6.1.tgz", + "integrity": "sha512-PV0dzCYDNfRi1jCDbJzpW7jNNDRuCOG/jI5ctQcGKt/clZD+YcPS3yIlWuTJMmESC8aevCFmWJy5wjAFgNqN6w==", + "dev": true + }, "require-directory": { "version": "2.1.1", "resolved": "https://repo.huaweicloud.com/repository/npm/require-directory/-/require-directory-2.1.1.tgz", @@ -2128,6 +4632,61 @@ "path-parse": "^1.0.6" } }, + "resolve-cwd": { + "version": "3.0.0", + "resolved": "https://registry.npmmirror.com/resolve-cwd/-/resolve-cwd-3.0.0.tgz", + "integrity": "sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==", + "dev": true, + "requires": { + "resolve-from": "^5.0.0" + } + }, + "resolve-from": { + "version": "5.0.0", + "resolved": "https://registry.npmmirror.com/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", + "dev": true + }, + "resolve-url": { + "version": "0.2.1", + "resolved": "https://registry.npmmirror.com/resolve-url/-/resolve-url-0.2.1.tgz", + "integrity": "sha512-ZuF55hVUQaaczgOIwqWzkEcEidmlD/xl44x1UZnhOXcYuFN2S6+rcxpG+C1N3So0wvNI3DmJICUFfu2SxhBmvg==", + "dev": true + }, + "ret": { + "version": "0.1.15", + "resolved": "https://registry.npmmirror.com/ret/-/ret-0.1.15.tgz", + "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==", + "dev": true + }, + "rimraf": { + "version": "2.7.1", + "resolved": "https://registry.npmmirror.com/rimraf/-/rimraf-2.7.1.tgz", + "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", + "dev": true, + "requires": { + "glob": "^7.1.3" + } + }, + "ripemd160": { + "version": "2.0.2", + "resolved": "https://registry.npmmirror.com/ripemd160/-/ripemd160-2.0.2.tgz", + "integrity": "sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==", + "dev": true, + "requires": { + "hash-base": "^3.0.0", + "inherits": "^2.0.1" + } + }, + "run-queue": { + "version": "1.0.3", + "resolved": "https://registry.npmmirror.com/run-queue/-/run-queue-1.0.3.tgz", + "integrity": "sha512-ntymy489o0/QQplUDnpYAYUsO50K9SBrIVaKCWDOJzYJts0f9WH9RFJkyagebkw5+y1oi00R7ynNW/d12GBumg==", + "dev": true, + "requires": { + "aproba": "^1.1.1" + } + }, "rxjs": { "version": "6.6.7", "resolved": "https://repo.huaweicloud.com/repository/npm/rxjs/-/rxjs-6.6.7.tgz", @@ -2148,6 +4707,32 @@ "resolved": "https://repo.huaweicloud.com/repository/npm/safe-buffer/-/safe-buffer-5.1.2.tgz", "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" }, + "safe-regex": { + "version": "1.1.0", + "resolved": "https://registry.npmmirror.com/safe-regex/-/safe-regex-1.1.0.tgz", + "integrity": "sha512-aJXcif4xnaNUzvUuC5gcb46oTS7zvg4jpMTnuqtrEPlR3vFr4pxtdTwaF1Qs3Enjn9HK+ZlwQui+a7z0SywIzg==", + "dev": true, + "requires": { + "ret": "~0.1.10" + } + }, + "safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmmirror.com/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "dev": true + }, + "schema-utils": { + "version": "1.0.0", + "resolved": "https://registry.npmmirror.com/schema-utils/-/schema-utils-1.0.0.tgz", + "integrity": "sha512-i27Mic4KovM/lnGsy8whRCHhc7VicJajAjTrYg11K9zfZXnYIt4k5F+kZkwjnrhKzLic/HLU4j11mjsz2G/75g==", + "dev": true, + "requires": { + "ajv": "^6.1.0", + "ajv-errors": "^1.0.0", + "ajv-keywords": "^3.1.0" + } + }, "semver": { "version": "6.3.0", "resolved": "https://repo.huaweicloud.com/repository/npm/semver/-/semver-6.3.0.tgz", @@ -2162,6 +4747,75 @@ "randombytes": "^2.1.0" } }, + "set-value": { + "version": "2.0.1", + "resolved": "https://registry.npmmirror.com/set-value/-/set-value-2.0.1.tgz", + "integrity": "sha512-JxHc1weCN68wRY0fhCoXpyK55m/XPHafOmK4UWD7m2CI14GMcFypt4w/0+NV5f/ZMby2F6S2wwA7fgynh9gWSw==", + "dev": true, + "requires": { + "extend-shallow": "^2.0.1", + "is-extendable": "^0.1.1", + "is-plain-object": "^2.0.3", + "split-string": "^3.0.1" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmmirror.com/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug==", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "setimmediate": { + "version": "1.0.5", + "resolved": "https://registry.npmmirror.com/setimmediate/-/setimmediate-1.0.5.tgz", + "integrity": "sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA==", + "dev": true + }, + "sha.js": { + "version": "2.4.11", + "resolved": "https://registry.npmmirror.com/sha.js/-/sha.js-2.4.11.tgz", + "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", + "dev": true, + "requires": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, + "shallow-clone": { + "version": "3.0.1", + "resolved": "https://registry.npmmirror.com/shallow-clone/-/shallow-clone-3.0.1.tgz", + "integrity": "sha512-/6KqX+GVUdqPuPPd2LxDDxzX6CAbjJehAAOKlNpqqUpAqPM6HeL8f+o3a+JsyGjn2lv0WY8UsTgUJjU9Ok55NA==", + "dev": true, + "requires": { + "kind-of": "^6.0.2" + } + }, + "shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmmirror.com/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "requires": { + "shebang-regex": "^3.0.0" + } + }, + "shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmmirror.com/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true + }, + "signal-exit": { + "version": "3.0.7", + "resolved": "https://registry.npmmirror.com/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", + "dev": true + }, "sinon": { "version": "9.2.4", "resolved": "https://repo.huaweicloud.com/repository/npm/sinon/-/sinon-9.2.4.tgz", @@ -2199,16 +4853,259 @@ } } }, + "snapdragon": { + "version": "0.8.2", + "resolved": "https://registry.npmmirror.com/snapdragon/-/snapdragon-0.8.2.tgz", + "integrity": "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==", + "dev": true, + "requires": { + "base": "^0.11.1", + "debug": "^2.2.0", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "map-cache": "^0.2.2", + "source-map": "^0.5.6", + "source-map-resolve": "^0.5.0", + "use": "^3.1.0" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmmirror.com/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmmirror.com/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha512-Rr7ADjQZenceVOAKop6ALkkRAmH1A4Gx9hV/7ZujPUN2rkATqFO0JZLZInbAjpZYoJ1gUx8MRMQVkYemcbMSTA==", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmmirror.com/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug==", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmmirror.com/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "dev": true + } + } + }, + "snapdragon-node": { + "version": "2.1.1", + "resolved": "https://registry.npmmirror.com/snapdragon-node/-/snapdragon-node-2.1.1.tgz", + "integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==", + "dev": true, + "requires": { + "define-property": "^1.0.0", + "isobject": "^3.0.0", + "snapdragon-util": "^3.0.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmmirror.com/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha512-cZTYKFWspt9jZsMscWo8sc/5lbPC9Q0N5nBLgb+Yd915iL3udB1uFgS3B8YCx66UVHq018DAVFoee7x+gxggeA==", + "dev": true, + "requires": { + "is-descriptor": "^1.0.0" + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmmirror.com/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmmirror.com/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmmirror.com/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + } + } + }, + "snapdragon-util": { + "version": "3.0.1", + "resolved": "https://registry.npmmirror.com/snapdragon-util/-/snapdragon-util-3.0.1.tgz", + "integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==", + "dev": true, + "requires": { + "kind-of": "^3.2.0" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmmirror.com/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "source-list-map": { + "version": "2.0.1", + "resolved": "https://registry.npmmirror.com/source-list-map/-/source-list-map-2.0.1.tgz", + "integrity": "sha512-qnQ7gVMxGNxsiL4lEuJwe/To8UnK7fAnmbGEEH8RpLouuKbeEm0lhbQVFIrNSuB+G7tVrAlVsZgETT5nljf+Iw==", + "dev": true + }, "source-map": { "version": "0.5.7", "resolved": "https://repo.huaweicloud.com/repository/npm/source-map/-/source-map-0.5.7.tgz", "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=" }, + "source-map-resolve": { + "version": "0.5.3", + "resolved": "https://registry.npmmirror.com/source-map-resolve/-/source-map-resolve-0.5.3.tgz", + "integrity": "sha512-Htz+RnsXWk5+P2slx5Jh3Q66vhQj1Cllm0zvnaY98+NFx+Dv2CF/f5O/t8x+KaNdrdIAsruNzoh/KpialbqAnw==", + "dev": true, + "requires": { + "atob": "^2.1.2", + "decode-uri-component": "^0.2.0", + "resolve-url": "^0.2.1", + "source-map-url": "^0.4.0", + "urix": "^0.1.0" + } + }, + "source-map-support": { + "version": "0.5.21", + "resolved": "https://registry.npmmirror.com/source-map-support/-/source-map-support-0.5.21.tgz", + "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", + "dev": true, + "requires": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmmirror.com/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } + } + }, + "source-map-url": { + "version": "0.4.1", + "resolved": "https://registry.npmmirror.com/source-map-url/-/source-map-url-0.4.1.tgz", + "integrity": "sha512-cPiFOTLUKvJFIg4SKVScy4ilPPW6rFgMgfuZJPNoDuMs3nC1HbMUycBoJw77xFIp6z1UJQJOfx6C9GMH80DiTw==", + "dev": true + }, + "split-string": { + "version": "3.1.0", + "resolved": "https://registry.npmmirror.com/split-string/-/split-string-3.1.0.tgz", + "integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==", + "dev": true, + "requires": { + "extend-shallow": "^3.0.0" + } + }, "sprintf-js": { "version": "1.0.3", "resolved": "https://repo.huaweicloud.com/repository/npm/sprintf-js/-/sprintf-js-1.0.3.tgz", "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=" }, + "ssri": { + "version": "6.0.2", + "resolved": "https://registry.npmmirror.com/ssri/-/ssri-6.0.2.tgz", + "integrity": "sha512-cepbSq/neFK7xB6A50KHN0xHDotYzq58wWCa5LeWqnPrHG8GzfEjO/4O8kpmcGW+oaxkvhEJCWgbgNk4/ZV93Q==", + "dev": true, + "requires": { + "figgy-pudding": "^3.5.1" + } + }, + "static-extend": { + "version": "0.1.2", + "resolved": "https://registry.npmmirror.com/static-extend/-/static-extend-0.1.2.tgz", + "integrity": "sha512-72E9+uLc27Mt718pMHt9VMNiAL4LMsmDbBva8mxWUCkT07fSzEGMYUCk0XWY6lp0j6RBAG4cJ3mWuZv2OE3s0g==", + "dev": true, + "requires": { + "define-property": "^0.2.5", + "object-copy": "^0.1.0" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmmirror.com/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha512-Rr7ADjQZenceVOAKop6ALkkRAmH1A4Gx9hV/7ZujPUN2rkATqFO0JZLZInbAjpZYoJ1gUx8MRMQVkYemcbMSTA==", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + } + } + }, + "stream-browserify": { + "version": "2.0.2", + "resolved": "https://registry.npmmirror.com/stream-browserify/-/stream-browserify-2.0.2.tgz", + "integrity": "sha512-nX6hmklHs/gr2FuxYDltq8fJA1GDlxKQCz8O/IM4atRqBH8OORmBNgfvW5gG10GT/qQ9u0CzIvr2X5Pkt6ntqg==", + "dev": true, + "requires": { + "inherits": "~2.0.1", + "readable-stream": "^2.0.2" + } + }, + "stream-each": { + "version": "1.2.3", + "resolved": "https://registry.npmmirror.com/stream-each/-/stream-each-1.2.3.tgz", + "integrity": "sha512-vlMC2f8I2u/bZGqkdfLQW/13Zihpej/7PmSiMQsbYddxuTsJp8vRe2x2FvVExZg7FaOds43ROAuFJwPR4MTZLw==", + "dev": true, + "requires": { + "end-of-stream": "^1.1.0", + "stream-shift": "^1.0.0" + } + }, + "stream-http": { + "version": "2.8.3", + "resolved": "https://registry.npmmirror.com/stream-http/-/stream-http-2.8.3.tgz", + "integrity": "sha512-+TSkfINHDo4J+ZobQLWiMouQYB+UVYFttRA94FpEzzJ7ZdqcL4uUUQ7WkdkI4DSozGmgBUE/a47L+38PenXhUw==", + "dev": true, + "requires": { + "builtin-status-codes": "^3.0.0", + "inherits": "^2.0.1", + "readable-stream": "^2.3.6", + "to-arraybuffer": "^1.0.0", + "xtend": "^4.0.0" + } + }, + "stream-shift": { + "version": "1.0.1", + "resolved": "https://registry.npmmirror.com/stream-shift/-/stream-shift-1.0.1.tgz", + "integrity": "sha512-AiisoFqQ0vbGcZgQPY1cdP2I76glaVA/RauYR4G4thNFgkTqr90yXTo4LYX60Jl+sIlPNHHdGSwo01AvbKUSVQ==", + "dev": true + }, "string-width": { "version": "4.2.3", "resolved": "https://repo.huaweicloud.com/repository/npm/string-width/-/string-width-4.2.3.tgz", @@ -2219,6 +5116,15 @@ "strip-ansi": "^6.0.1" } }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmmirror.com/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.0" + } + }, "strip-ansi": { "version": "6.0.1", "resolved": "https://repo.huaweicloud.com/repository/npm/strip-ansi/-/strip-ansi-6.0.1.tgz", @@ -2227,6 +5133,12 @@ "ansi-regex": "^5.0.1" } }, + "strip-final-newline": { + "version": "2.0.0", + "resolved": "https://registry.npmmirror.com/strip-final-newline/-/strip-final-newline-2.0.0.tgz", + "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", + "dev": true + }, "strip-json-comments": { "version": "3.1.1", "resolved": "https://repo.huaweicloud.com/repository/npm/strip-json-comments/-/strip-json-comments-3.1.1.tgz", @@ -2264,6 +5176,65 @@ } } }, + "tapable": { + "version": "1.1.3", + "resolved": "https://registry.npmmirror.com/tapable/-/tapable-1.1.3.tgz", + "integrity": "sha512-4WK/bYZmj8xLr+HUCODHGF1ZFzsYffasLUgEiMBY4fgtltdO6B4WJtlSbPaDTLpYTcGVwM2qLnFTICEcNxs3kA==", + "dev": true + }, + "terser": { + "version": "4.8.0", + "resolved": "https://registry.npmmirror.com/terser/-/terser-4.8.0.tgz", + "integrity": "sha512-EAPipTNeWsb/3wLPeup1tVPaXfIaU68xMnVdPafIL1TV05OhASArYyIfFvnvJCNrR2NIOvDVNNTFRa+Re2MWyw==", + "dev": true, + "requires": { + "commander": "^2.20.0", + "source-map": "~0.6.1", + "source-map-support": "~0.5.12" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmmirror.com/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } + } + }, + "terser-webpack-plugin": { + "version": "1.4.5", + "resolved": "https://registry.npmmirror.com/terser-webpack-plugin/-/terser-webpack-plugin-1.4.5.tgz", + "integrity": "sha512-04Rfe496lN8EYruwi6oPQkG0vo8C+HT49X687FZnpPF0qMAIHONI6HEXYPKDOE8e5HjXTyKfqRd/agHtH0kOtw==", + "dev": true, + "requires": { + "cacache": "^12.0.2", + "find-cache-dir": "^2.1.0", + "is-wsl": "^1.1.0", + "schema-utils": "^1.0.0", + "serialize-javascript": "^4.0.0", + "source-map": "^0.6.1", + "terser": "^4.1.2", + "webpack-sources": "^1.4.0", + "worker-farm": "^1.7.0" + }, + "dependencies": { + "serialize-javascript": { + "version": "4.0.0", + "resolved": "https://registry.npmmirror.com/serialize-javascript/-/serialize-javascript-4.0.0.tgz", + "integrity": "sha512-GaNA54380uFefWghODBWEGisLZFj00nS5ACs6yHa9nLqlLpVLO8ChDGeKRjZnV4Nh4n0Qi7nhYZD/9fCPzEqkw==", + "dev": true, + "requires": { + "randombytes": "^2.1.0" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmmirror.com/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } + } + }, "test262-stream": { "version": "1.4.0", "resolved": "https://repo.huaweicloud.com/repository/npm/test262-stream/-/test262-stream-1.4.0.tgz", @@ -2273,11 +5244,68 @@ "klaw": "^2.1.0" } }, - "to-fast-properties": { - "version": "2.0.0", - "resolved": "https://repo.huaweicloud.com/repository/npm/to-fast-properties/-/to-fast-properties-2.0.0.tgz", - "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=" - }, + "through2": { + "version": "2.0.5", + "resolved": "https://registry.npmmirror.com/through2/-/through2-2.0.5.tgz", + "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", + "dev": true, + "requires": { + "readable-stream": "~2.3.6", + "xtend": "~4.0.1" + } + }, + "timers-browserify": { + "version": "2.0.12", + "resolved": "https://registry.npmmirror.com/timers-browserify/-/timers-browserify-2.0.12.tgz", + "integrity": "sha512-9phl76Cqm6FhSX9Xe1ZUAMLtm1BLkKj2Qd5ApyWkXzsMRaA7dgr81kf4wJmQf/hAvg8EEyJxDo3du/0KlhPiKQ==", + "dev": true, + "requires": { + "setimmediate": "^1.0.4" + } + }, + "to-arraybuffer": { + "version": "1.0.1", + "resolved": "https://registry.npmmirror.com/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz", + "integrity": "sha512-okFlQcoGTi4LQBG/PgSYblw9VOyptsz2KJZqc6qtgGdes8VktzUQkj4BI2blit072iS8VODNcMA+tvnS9dnuMA==", + "dev": true + }, + "to-fast-properties": { + "version": "2.0.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/to-fast-properties/-/to-fast-properties-2.0.0.tgz", + "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=" + }, + "to-object-path": { + "version": "0.3.0", + "resolved": "https://registry.npmmirror.com/to-object-path/-/to-object-path-0.3.0.tgz", + "integrity": "sha512-9mWHdnGRuh3onocaHzukyvCZhzvr6tiflAy/JRFXcJX0TjgfWA9pk9t8CMbzmBE4Jfw58pXbkngtBtqYxzNEyg==", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmmirror.com/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "to-regex": { + "version": "3.0.2", + "resolved": "https://registry.npmmirror.com/to-regex/-/to-regex-3.0.2.tgz", + "integrity": "sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==", + "dev": true, + "requires": { + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "regex-not": "^1.0.2", + "safe-regex": "^1.1.0" + } + }, "to-regex-range": { "version": "5.0.1", "resolved": "https://repo.huaweicloud.com/repository/npm/to-regex-range/-/to-regex-range-5.0.1.tgz", @@ -2287,6 +5315,91 @@ "is-number": "^7.0.0" } }, + "ts-jest": { + "version": "23.10.5", + "resolved": "https://registry.npmmirror.com/ts-jest/-/ts-jest-23.10.5.tgz", + "integrity": "sha512-MRCs9qnGoyKgFc8adDEntAOP64fWK1vZKnOYU1o2HxaqjdJvGqmkLCPCnVq1/If4zkUmEjKPnCiUisTrlX2p2A==", + "dev": true, + "requires": { + "bs-logger": "0.x", + "buffer-from": "1.x", + "fast-json-stable-stringify": "2.x", + "json5": "2.x", + "make-error": "1.x", + "mkdirp": "0.x", + "resolve": "1.x", + "semver": "^5.5", + "yargs-parser": "10.x" + }, + "dependencies": { + "camelcase": { + "version": "4.1.0", + "resolved": "https://registry.npmmirror.com/camelcase/-/camelcase-4.1.0.tgz", + "integrity": "sha512-FxAv7HpHrXbh3aPo4o2qxHay2lkLY3x5Mw3KeE4KQE8ysVfziWeRZDwcjauvwBSGEC/nXUPzZy8zeh4HokqOnw==", + "dev": true + }, + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmmirror.com/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + }, + "yargs-parser": { + "version": "10.1.0", + "resolved": "https://registry.npmmirror.com/yargs-parser/-/yargs-parser-10.1.0.tgz", + "integrity": "sha512-VCIyR1wJoEBZUqk5PA+oOBF6ypbwh5aNB3I50guxAL/quggdfs4TtNHQrSazFA3fYZ+tEqfs0zIGlv0c/rgjbQ==", + "dev": true, + "requires": { + "camelcase": "^4.1.0" + } + } + } + }, + "ts-lint": { + "version": "4.5.1", + "resolved": "https://registry.npmmirror.com/ts-lint/-/ts-lint-4.5.1.tgz", + "integrity": "sha512-gSRiCaiSisGhS5dI1UglhqisHXZyJxBiddMGwaVRqVX9tX7jFGfScYFKUgZOEyKoJv8YB+vsQ3jrda+q0R19gQ==", + "dev": true, + "requires": { + "babel-code-frame": "^6.20.0", + "colors": "^1.1.2", + "diff": "^3.0.1", + "findup-sync": "~0.3.0", + "glob": "^7.1.1", + "optimist": "~0.6.0", + "resolve": "^1.1.7", + "tsutils": "^1.1.0" + }, + "dependencies": { + "diff": { + "version": "3.5.0", + "resolved": "https://registry.npmmirror.com/diff/-/diff-3.5.0.tgz", + "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", + "dev": true + } + } + }, + "ts-loader": { + "version": "5.4.5", + "resolved": "https://registry.npmmirror.com/ts-loader/-/ts-loader-5.4.5.tgz", + "integrity": "sha512-XYsjfnRQCBum9AMRZpk2rTYSVpdZBpZK+kDh0TeT3kxmQNBDVIeUjdPjY5RZry4eIAb8XHc4gYSUiUWPYvzSRw==", + "dev": true, + "requires": { + "chalk": "^2.3.0", + "enhanced-resolve": "^4.0.0", + "loader-utils": "^1.0.2", + "micromatch": "^3.1.4", + "semver": "^5.0.1" + }, + "dependencies": { + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmmirror.com/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + } + } + }, "ts-sinon": { "version": "1.2.1", "resolved": "https://repo.huaweicloud.com/repository/npm/ts-sinon/-/ts-sinon-1.2.1.tgz", @@ -2312,12 +5425,80 @@ "resolved": "https://repo.huaweicloud.com/repository/npm/tslib/-/tslib-2.3.1.tgz", "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==" }, + "tslint": { + "version": "5.20.1", + "resolved": "https://registry.npmmirror.com/tslint/-/tslint-5.20.1.tgz", + "integrity": "sha512-EcMxhzCFt8k+/UP5r8waCf/lzmeSyVlqxqMEDQE7rWYiQky8KpIBz1JAoYXfROHrPZ1XXd43q8yQnULOLiBRQg==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.0.0", + "builtin-modules": "^1.1.1", + "chalk": "^2.3.0", + "commander": "^2.12.1", + "diff": "^4.0.1", + "glob": "^7.1.1", + "js-yaml": "^3.13.1", + "minimatch": "^3.0.4", + "mkdirp": "^0.5.1", + "resolve": "^1.3.2", + "semver": "^5.3.0", + "tslib": "^1.8.0", + "tsutils": "^2.29.0" + }, + "dependencies": { + "diff": { + "version": "4.0.2", + "resolved": "https://registry.npmmirror.com/diff/-/diff-4.0.2.tgz", + "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", + "dev": true + }, + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmmirror.com/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + }, + "tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmmirror.com/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "dev": true + }, + "tsutils": { + "version": "2.29.0", + "resolved": "https://registry.npmmirror.com/tsutils/-/tsutils-2.29.0.tgz", + "integrity": "sha512-g5JVHCIJwzfISaXpXE1qvNalca5Jwob6FjI4AoPlqMusJ6ftFE7IkkFoMhVLRgK+4Kx3gkzb8UZK5t5yTTvEmA==", + "dev": true, + "requires": { + "tslib": "^1.8.1" + } + } + } + }, + "tsutils": { + "version": "1.9.1", + "resolved": "https://registry.npmmirror.com/tsutils/-/tsutils-1.9.1.tgz", + "integrity": "sha512-Z4MMpdLvxER0Wz+l9TM71URBKGoHKBzArEraOFmTp44jxzdqiG8oTCtpjiZ9YtFXNwWQfMv+g8VAxTlBEVS6yw==", + "dev": true + }, + "tty-browserify": { + "version": "0.0.0", + "resolved": "https://registry.npmmirror.com/tty-browserify/-/tty-browserify-0.0.0.tgz", + "integrity": "sha512-JVa5ijo+j/sOoHGjw0sxw734b1LhBkQ3bvUGNdxnVXDCX81Yx7TFgnZygxrIIWn23hbfTaMYLwRmAxFyDuFmIw==", + "dev": true + }, "type-detect": { "version": "4.0.8", "resolved": "https://repo.huaweicloud.com/repository/npm/type-detect/-/type-detect-4.0.8.tgz", "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", "dev": true }, + "typedarray": { + "version": "0.0.6", + "resolved": "https://registry.npmmirror.com/typedarray/-/typedarray-0.0.6.tgz", + "integrity": "sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==", + "dev": true + }, "typescript": { "version": "4.4.3", "resolved": "https://registry.npmmirror.com/typescript/download/typescript-4.4.3.tgz?cache=0&sync_timestamp=1632381565165&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Ftypescript%2Fdownload%2Ftypescript-4.4.3.tgz", @@ -2358,6 +5539,36 @@ "resolved": "https://repo.huaweicloud.com/repository/npm/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-2.0.0.tgz", "integrity": "sha512-5Zfuy9q/DFr4tfO7ZPeVXb1aPoeQSdeFMLpYuFebehDAhbuevLs5yxSZmIFN1tP5F9Wl4IpJrYojg85/zgyZHQ==" }, + "union-value": { + "version": "1.0.1", + "resolved": "https://registry.npmmirror.com/union-value/-/union-value-1.0.1.tgz", + "integrity": "sha512-tJfXmxMeWYnczCVs7XAEvIV7ieppALdyepWMkHkwciRpZraG/xwT+s2JN8+pr1+8jCRf80FFzvr+MpQeeoF4Xg==", + "dev": true, + "requires": { + "arr-union": "^3.1.0", + "get-value": "^2.0.6", + "is-extendable": "^0.1.1", + "set-value": "^2.0.1" + } + }, + "unique-filename": { + "version": "1.1.1", + "resolved": "https://registry.npmmirror.com/unique-filename/-/unique-filename-1.1.1.tgz", + "integrity": "sha512-Vmp0jIp2ln35UTXuryvjzkjGdRyf9b2lTXuSYUiPmzRcl3FDtYqAwOnTJkAngD9SWhnoJzDbTKwaOrZ+STtxNQ==", + "dev": true, + "requires": { + "unique-slug": "^2.0.0" + } + }, + "unique-slug": { + "version": "2.0.2", + "resolved": "https://registry.npmmirror.com/unique-slug/-/unique-slug-2.0.2.tgz", + "integrity": "sha512-zoWr9ObaxALD3DOPfjPSqxt4fnZiWblxHIgeWqW8x7UqDzEtHEQLzji2cuJYQFCU6KmoJikOYAZlrTHHebjx2w==", + "dev": true, + "requires": { + "imurmurhash": "^0.1.4" + } + }, "unique-temp-dir": { "version": "1.0.0", "resolved": "https://repo.huaweicloud.com/repository/npm/unique-temp-dir/-/unique-temp-dir-1.0.0.tgz", @@ -2368,6 +5579,426 @@ "uid2": "0.0.3" } }, + "unset-value": { + "version": "1.0.0", + "resolved": "https://registry.npmmirror.com/unset-value/-/unset-value-1.0.0.tgz", + "integrity": "sha512-PcA2tsuGSF9cnySLHTLSh2qrQiJ70mn+r+Glzxv2TWZblxsxCC52BDlZoPCsz7STd9pN7EZetkWZBAvk4cgZdQ==", + "dev": true, + "requires": { + "has-value": "^0.3.1", + "isobject": "^3.0.0" + }, + "dependencies": { + "has-value": { + "version": "0.3.1", + "resolved": "https://registry.npmmirror.com/has-value/-/has-value-0.3.1.tgz", + "integrity": "sha512-gpG936j8/MzaeID5Yif+577c17TxaDmhuyVgSwtnL/q8UUTySg8Mecb+8Cf1otgLoD7DDH75axp86ER7LFsf3Q==", + "dev": true, + "requires": { + "get-value": "^2.0.3", + "has-values": "^0.1.4", + "isobject": "^2.0.0" + }, + "dependencies": { + "isobject": { + "version": "2.1.0", + "resolved": "https://registry.npmmirror.com/isobject/-/isobject-2.1.0.tgz", + "integrity": "sha512-+OUdGJlgjOBZDfxnDjYYG6zp487z0JGNQq3cYQYg5f5hKR+syHMsaztzGeml/4kGG55CSpKSpWTY+jYGgsHLgA==", + "dev": true, + "requires": { + "isarray": "1.0.0" + } + } + } + }, + "has-values": { + "version": "0.1.4", + "resolved": "https://registry.npmmirror.com/has-values/-/has-values-0.1.4.tgz", + "integrity": "sha512-J8S0cEdWuQbqD9//tlZxiMuMNmxB8PlEwvYwuxsTmR1G5RXUePEX/SJn7aD0GMLieuZYSwNH0cQuJGwnYunXRQ==", + "dev": true + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmmirror.com/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==", + "dev": true + } + } + }, + "upath": { + "version": "1.2.0", + "resolved": "https://registry.npmmirror.com/upath/-/upath-1.2.0.tgz", + "integrity": "sha512-aZwGpamFO61g3OlfT7OQCHqhGnW43ieH9WZeP7QxN/G/jS4jfqUkZxoryvJgVPEcrl5NL/ggHsSmLMHuH64Lhg==", + "dev": true, + "optional": true + }, + "uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmmirror.com/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dev": true, + "requires": { + "punycode": "^2.1.0" + } + }, + "urix": { + "version": "0.1.0", + "resolved": "https://registry.npmmirror.com/urix/-/urix-0.1.0.tgz", + "integrity": "sha512-Am1ousAhSLBeB9cG/7k7r2R0zj50uDRlZHPGbazid5s9rlF1F/QKYObEKSIunSjIOkJZqwRRLpvewjEkM7pSqg==", + "dev": true + }, + "url": { + "version": "0.11.0", + "resolved": "https://registry.npmmirror.com/url/-/url-0.11.0.tgz", + "integrity": "sha512-kbailJa29QrtXnxgq+DdCEGlbTeYM2eJUxsz6vjZavrCYPMIFHMKQmSKYAIuUK2i7hgPm28a8piX5NTUtM/LKQ==", + "dev": true, + "requires": { + "punycode": "1.3.2", + "querystring": "0.2.0" + }, + "dependencies": { + "punycode": { + "version": "1.3.2", + "resolved": "https://registry.npmmirror.com/punycode/-/punycode-1.3.2.tgz", + "integrity": "sha512-RofWgt/7fL5wP1Y7fxE7/EmTLzQVnB0ycyibJ0OOHIlJqTNzglYFxVwETOcIoJqJmpDXJ9xImDv+Fq34F/d4Dw==", + "dev": true + } + } + }, + "use": { + "version": "3.1.1", + "resolved": "https://registry.npmmirror.com/use/-/use-3.1.1.tgz", + "integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==", + "dev": true + }, + "util": { + "version": "0.11.1", + "resolved": "https://registry.npmmirror.com/util/-/util-0.11.1.tgz", + "integrity": "sha512-HShAsny+zS2TZfaXxD9tYj4HQGlBezXZMZuM/S5PKLLoZkShZiGk9o5CzukI1LVHZvjdvZ2Sj1aW/Ndn2NB/HQ==", + "dev": true, + "requires": { + "inherits": "2.0.3" + }, + "dependencies": { + "inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmmirror.com/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha512-x00IRNXNy63jwGkJmzPigoySHbaqpNuzKbBOmzK+g2OdZpQ9w+sxCN+VSB3ja7IAge2OP2qpfxTjeNcyjmW1uw==", + "dev": true + } + } + }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmmirror.com/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", + "dev": true + }, + "vm-browserify": { + "version": "1.1.2", + "resolved": "https://registry.npmmirror.com/vm-browserify/-/vm-browserify-1.1.2.tgz", + "integrity": "sha512-2ham8XPWTONajOR0ohOKOHXkm3+gaBmGut3SRuu75xLd/RRaY6vqgh8NBYYk7+RW3u5AtzPQZG8F10LHkl0lAQ==", + "dev": true + }, + "watchpack": { + "version": "1.7.5", + "resolved": "https://registry.npmmirror.com/watchpack/-/watchpack-1.7.5.tgz", + "integrity": "sha512-9P3MWk6SrKjHsGkLT2KHXdQ/9SNkyoJbabxnKOoJepsvJjJG8uYTR3yTPxPQvNDI3w4Nz1xnE0TLHK4RIVe/MQ==", + "dev": true, + "requires": { + "chokidar": "^3.4.1", + "graceful-fs": "^4.1.2", + "neo-async": "^2.5.0", + "watchpack-chokidar2": "^2.0.1" + } + }, + "watchpack-chokidar2": { + "version": "2.0.1", + "resolved": "https://registry.npmmirror.com/watchpack-chokidar2/-/watchpack-chokidar2-2.0.1.tgz", + "integrity": "sha512-nCFfBIPKr5Sh61s4LPpy1Wtfi0HE8isJ3d2Yb5/Ppw2P2B/3eVSEBjKfN0fmHJSK14+31KwMKmcrzs2GM4P0Ww==", + "dev": true, + "optional": true, + "requires": { + "chokidar": "^2.1.8" + }, + "dependencies": { + "anymatch": { + "version": "2.0.0", + "resolved": "https://registry.npmmirror.com/anymatch/-/anymatch-2.0.0.tgz", + "integrity": "sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw==", + "dev": true, + "optional": true, + "requires": { + "micromatch": "^3.1.4", + "normalize-path": "^2.1.1" + }, + "dependencies": { + "normalize-path": { + "version": "2.1.1", + "resolved": "https://registry.npmmirror.com/normalize-path/-/normalize-path-2.1.1.tgz", + "integrity": "sha512-3pKJwH184Xo/lnH6oyP1q2pMd7HcypqqmRs91/6/i2CGtWwIKGCkOOMTm/zXbgTEWHw1uNpNi/igc3ePOYHb6w==", + "dev": true, + "optional": true, + "requires": { + "remove-trailing-separator": "^1.0.1" + } + } + } + }, + "binary-extensions": { + "version": "1.13.1", + "resolved": "https://registry.npmmirror.com/binary-extensions/-/binary-extensions-1.13.1.tgz", + "integrity": "sha512-Un7MIEDdUC5gNpcGDV97op1Ywk748MpHcFTHoYs6qnj1Z3j7I53VG3nwZhKzoBZmbdRNnb6WRdFlwl7tSDuZGw==", + "dev": true, + "optional": true + }, + "braces": { + "version": "2.3.2", + "resolved": "https://registry.npmmirror.com/braces/-/braces-2.3.2.tgz", + "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", + "dev": true, + "optional": true, + "requires": { + "arr-flatten": "^1.1.0", + "array-unique": "^0.3.2", + "extend-shallow": "^2.0.1", + "fill-range": "^4.0.0", + "isobject": "^3.0.1", + "repeat-element": "^1.1.2", + "snapdragon": "^0.8.1", + "snapdragon-node": "^2.0.1", + "split-string": "^3.0.2", + "to-regex": "^3.0.1" + } + }, + "chokidar": { + "version": "2.1.8", + "resolved": "https://registry.npmmirror.com/chokidar/-/chokidar-2.1.8.tgz", + "integrity": "sha512-ZmZUazfOzf0Nve7duiCKD23PFSCs4JPoYyccjUFF3aQkQadqBhfzhjkwBH2mNOG9cTBwhamM37EIsIkZw3nRgg==", + "dev": true, + "optional": true, + "requires": { + "anymatch": "^2.0.0", + "async-each": "^1.0.1", + "braces": "^2.3.2", + "fsevents": "^1.2.7", + "glob-parent": "^3.1.0", + "inherits": "^2.0.3", + "is-binary-path": "^1.0.0", + "is-glob": "^4.0.0", + "normalize-path": "^3.0.0", + "path-is-absolute": "^1.0.0", + "readdirp": "^2.2.1", + "upath": "^1.1.1" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmmirror.com/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug==", + "dev": true, + "optional": true, + "requires": { + "is-extendable": "^0.1.0" + } + }, + "fill-range": { + "version": "4.0.0", + "resolved": "https://registry.npmmirror.com/fill-range/-/fill-range-4.0.0.tgz", + "integrity": "sha512-VcpLTWqWDiTerugjj8e3+esbg+skS3M9e54UuR3iCeIDMXCLTsAH8hTSzDQU/X6/6t3eYkOKoZSef2PlU6U1XQ==", + "dev": true, + "optional": true, + "requires": { + "extend-shallow": "^2.0.1", + "is-number": "^3.0.0", + "repeat-string": "^1.6.1", + "to-regex-range": "^2.1.0" + } + }, + "fsevents": { + "version": "1.2.13", + "resolved": "https://registry.npmmirror.com/fsevents/-/fsevents-1.2.13.tgz", + "integrity": "sha512-oWb1Z6mkHIskLzEJ/XWX0srkpkTQ7vaopMQkyaEIoq0fmtFVxOthb8cCxeT+p3ynTdkk/RZwbgG4brR5BeWECw==", + "dev": true, + "optional": true + }, + "glob-parent": { + "version": "3.1.0", + "resolved": "https://registry.npmmirror.com/glob-parent/-/glob-parent-3.1.0.tgz", + "integrity": "sha512-E8Ak/2+dZY6fnzlR7+ueWvhsH1SjHr4jjss4YS/h4py44jY9MhK/VFdaZJAWDz6BbL21KeteKxFSFpq8OS5gVA==", + "dev": true, + "optional": true, + "requires": { + "is-glob": "^3.1.0", + "path-dirname": "^1.0.0" + }, + "dependencies": { + "is-glob": { + "version": "3.1.0", + "resolved": "https://registry.npmmirror.com/is-glob/-/is-glob-3.1.0.tgz", + "integrity": "sha512-UFpDDrPgM6qpnFNI+rh/p3bUaq9hKLZN8bMUWzxmcnZVS3omf4IPK+BrewlnWjO1WmUsMYuSjKh4UJuV4+Lqmw==", + "dev": true, + "optional": true, + "requires": { + "is-extglob": "^2.1.0" + } + } + } + }, + "is-binary-path": { + "version": "1.0.1", + "resolved": "https://registry.npmmirror.com/is-binary-path/-/is-binary-path-1.0.1.tgz", + "integrity": "sha512-9fRVlXc0uCxEDj1nQzaWONSpbTfx0FmJfzHF7pwlI8DkWGoHBBea4Pg5Ky0ojwwxQmnSifgbKkI06Qv0Ljgj+Q==", + "dev": true, + "optional": true, + "requires": { + "binary-extensions": "^1.0.0" + } + }, + "is-number": { + "version": "3.0.0", + "resolved": "https://registry.npmmirror.com/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha512-4cboCqIpliH+mAvFNegjZQ4kgKc3ZUhQVr3HvWbSh5q3WH2v82ct+T2Y1hdU5Gdtorx/cLifQjqCbL7bpznLTg==", + "dev": true, + "optional": true, + "requires": { + "kind-of": "^3.0.2" + } + }, + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmmirror.com/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==", + "dev": true, + "optional": true, + "requires": { + "is-buffer": "^1.1.5" + } + }, + "readdirp": { + "version": "2.2.1", + "resolved": "https://registry.npmmirror.com/readdirp/-/readdirp-2.2.1.tgz", + "integrity": "sha512-1JU/8q+VgFZyxwrJ+SVIOsh+KywWGpds3NTqikiKpDMZWScmAYyKIgqkO+ARvNWJfXeXR1zxz7aHF4u4CyH6vQ==", + "dev": true, + "optional": true, + "requires": { + "graceful-fs": "^4.1.11", + "micromatch": "^3.1.10", + "readable-stream": "^2.0.2" + } + }, + "to-regex-range": { + "version": "2.1.1", + "resolved": "https://registry.npmmirror.com/to-regex-range/-/to-regex-range-2.1.1.tgz", + "integrity": "sha512-ZZWNfCjUokXXDGXFpZehJIkZqq91BcULFq/Pi7M5i4JnxXdhMKAK682z8bCW3o8Hj1wuuzoKcW3DfVzaP6VuNg==", + "dev": true, + "optional": true, + "requires": { + "is-number": "^3.0.0", + "repeat-string": "^1.6.1" + } + } + } + }, + "webpack": { + "version": "4.46.0", + "resolved": "https://registry.npmmirror.com/webpack/-/webpack-4.46.0.tgz", + "integrity": "sha512-6jJuJjg8znb/xRItk7bkT0+Q7AHCYjjFnvKIWQPkNIOyRqoCGvkOs0ipeQzrqz4l5FtN5ZI/ukEHroeX/o1/5Q==", + "dev": true, + "requires": { + "@webassemblyjs/ast": "1.9.0", + "@webassemblyjs/helper-module-context": "1.9.0", + "@webassemblyjs/wasm-edit": "1.9.0", + "@webassemblyjs/wasm-parser": "1.9.0", + "acorn": "^6.4.1", + "ajv": "^6.10.2", + "ajv-keywords": "^3.4.1", + "chrome-trace-event": "^1.0.2", + "enhanced-resolve": "^4.5.0", + "eslint-scope": "^4.0.3", + "json-parse-better-errors": "^1.0.2", + "loader-runner": "^2.4.0", + "loader-utils": "^1.2.3", + "memory-fs": "^0.4.1", + "micromatch": "^3.1.10", + "mkdirp": "^0.5.3", + "neo-async": "^2.6.1", + "node-libs-browser": "^2.2.1", + "schema-utils": "^1.0.0", + "tapable": "^1.1.3", + "terser-webpack-plugin": "^1.4.3", + "watchpack": "^1.7.4", + "webpack-sources": "^1.4.1" + }, + "dependencies": { + "memory-fs": { + "version": "0.4.1", + "resolved": "https://registry.npmmirror.com/memory-fs/-/memory-fs-0.4.1.tgz", + "integrity": "sha512-cda4JKCxReDXFXRqOHPQscuIYg1PvxbE2S2GP45rnwfEK+vZaXC8C1OFvdHIbgw0DLzowXGVoxLaAmlgRy14GQ==", + "dev": true, + "requires": { + "errno": "^0.1.3", + "readable-stream": "^2.0.1" + } + } + } + }, + "webpack-cli": { + "version": "4.9.2", + "resolved": "https://registry.npmmirror.com/webpack-cli/-/webpack-cli-4.9.2.tgz", + "integrity": "sha512-m3/AACnBBzK/kMTcxWHcZFPrw/eQuY4Df1TxvIWfWM2x7mRqBQCqKEd96oCUa9jkapLBaFfRce33eGDb4Pr7YQ==", + "dev": true, + "requires": { + "@discoveryjs/json-ext": "^0.5.0", + "@webpack-cli/configtest": "^1.1.1", + "@webpack-cli/info": "^1.4.1", + "@webpack-cli/serve": "^1.6.1", + "colorette": "^2.0.14", + "commander": "^7.0.0", + "execa": "^5.0.0", + "fastest-levenshtein": "^1.0.12", + "import-local": "^3.0.2", + "interpret": "^2.2.0", + "rechoir": "^0.7.0", + "webpack-merge": "^5.7.3" + }, + "dependencies": { + "commander": { + "version": "7.2.0", + "resolved": "https://registry.npmmirror.com/commander/-/commander-7.2.0.tgz", + "integrity": "sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==", + "dev": true + } + } + }, + "webpack-merge": { + "version": "5.8.0", + "resolved": "https://registry.npmmirror.com/webpack-merge/-/webpack-merge-5.8.0.tgz", + "integrity": "sha512-/SaI7xY0831XwP6kzuwhKWVKDP9t1QY1h65lAFLbZqMPIuYcD9QAW4u9STIbU9kaJbPBB/geU/gLr1wDjOhQ+Q==", + "dev": true, + "requires": { + "clone-deep": "^4.0.1", + "wildcard": "^2.0.0" + } + }, + "webpack-sources": { + "version": "1.4.3", + "resolved": "https://registry.npmmirror.com/webpack-sources/-/webpack-sources-1.4.3.tgz", + "integrity": "sha512-lgTS3Xhv1lCOKo7SA5TjKXMjpSM4sBjNV5+q2bqesbSPs5FjGmU6jjtBSkX9b4qW87vDIsCIlUPOEhbZrMdjeQ==", + "dev": true, + "requires": { + "source-list-map": "^2.0.0", + "source-map": "~0.6.1" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmmirror.com/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } + } + }, "which": { "version": "2.0.2", "resolved": "https://repo.huaweicloud.com/repository/npm/which/-/which-2.0.2.tgz", @@ -2419,6 +6050,18 @@ } } }, + "wildcard": { + "version": "2.0.0", + "resolved": "https://registry.npmmirror.com/wildcard/-/wildcard-2.0.0.tgz", + "integrity": "sha512-JcKqAHLPxcdb9KM49dufGXn2x3ssnfjbcaQdLlfZsL9rH9wgDQjUtDxbo8NE0F6SFvydeu1VhZe7hZuHsB2/pw==", + "dev": true + }, + "wordwrap": { + "version": "0.0.3", + "resolved": "https://registry.npmmirror.com/wordwrap/-/wordwrap-0.0.3.tgz", + "integrity": "sha512-1tMA907+V4QmxV7dbRvb4/8MaRALK6q9Abid3ndMYnbyo8piisCmeONVqVSXqQA3KaP4SLt5b7ud6E2sqP8TFw==", + "dev": true + }, "wordwrapjs": { "version": "4.0.1", "resolved": "https://repo.huaweicloud.com/repository/npm/wordwrapjs/-/wordwrapjs-4.0.1.tgz", @@ -2435,6 +6078,15 @@ } } }, + "worker-farm": { + "version": "1.7.0", + "resolved": "https://registry.npmmirror.com/worker-farm/-/worker-farm-1.7.0.tgz", + "integrity": "sha512-rvw3QTZc8lAxyVrqcSGVm5yP/IJ2UcB3U0graE3LCFoZ0Yn2x4EoVSqJKdB/T5M+FLcRPjz4TDacRf3OCfNUzw==", + "dev": true, + "requires": { + "errno": "~0.1.7" + } + }, "workerpool": { "version": "6.1.0", "resolved": "https://repo.huaweicloud.com/repository/npm/workerpool/-/workerpool-6.1.0.tgz", @@ -2480,11 +6132,23 @@ "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", "dev": true }, + "xtend": { + "version": "4.0.2", + "resolved": "https://registry.npmmirror.com/xtend/-/xtend-4.0.2.tgz", + "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", + "dev": true + }, "y18n": { "version": "5.0.8", "resolved": "https://repo.huaweicloud.com/repository/npm/y18n/-/y18n-5.0.8.tgz", "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==" }, + "yallist": { + "version": "3.1.1", + "resolved": "https://registry.npmmirror.com/yallist/-/yallist-3.1.1.tgz", + "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", + "dev": true + }, "yargs": { "version": "16.2.0", "resolved": "https://repo.huaweicloud.com/repository/npm/yargs/-/yargs-16.2.0.tgz", diff --git a/ts2panda/package.json b/ts2panda/package.json old mode 100755 new mode 100644 index f37f0d41b643c30529a895a3837a4db118232e35..4d2d5abd58136b94ed80b3cb96ef613a0f689281 --- a/ts2panda/package.json +++ b/ts2panda/package.json @@ -2,38 +2,36 @@ "name": "ts2panda", "version": "1.0.0", "description": "", - "main": "index.js", + "main": "src/index.js", + "types": "types/index.d.ts", + "private": false, "scripts": { - "build:ts2abc-linux": "mkdir -p build && cd build && cmake -DCMAKE_TOOLCHAIN_FILE=../../submodules/panda/cmake/toolchain/host_clang_8.cmake ../ts2abc && make ts2abc -j4", - "build:ts2abc-win": "mkdir -p build-win && cd build-win && cmake -DCMAKE_TOOLCHAIN_FILE=../../submodules/panda/cmake/toolchain/cross-clang-8-x86_64-w64-mingw32-static.cmake ../ts2abc && make ts2abc -j4", - "build:ts2abc-mac": "mkdir -p build-mac && cd build-mac && cmake -DPANDA_ENABLE_CLANG_TIDY=false ../ts2abc && make ts2abc -j4", - "build": "npm run build:irnodes && npm run build:diagnostic && npm run build:ts2abc-linux && npm run build:sources-linux", - "build-win": "npm run build:irnodes && npm run build:diagnostic && npm run build:ts2abc-win && npm run build:sources-win", - "build-mac": "npm run build:irnodes && npm run build:diagnostic && npm run build:ts2abc-mac && npm run build:sources-mac", - "build-full": "npm run build && npm run build-win && npm run build-mac", - "build:irnodes": "scripts/gen_irnodes.sh", - "build:diagnostic": "scripts/gen_diagnostic.sh", - "build:sources-linux": "tsc -b src", - "build:sources-win": "tsc -b src/tsconfig.win.json", - "build:sources-mac": "node_modules/typescript/bin/tsc -b src/tsconfig.mac.json", - "build:tests": "tsc -b src tests", - "run:tests": "mocha \"build/tests/**/*.test.js\"", - "test": "npm run build:tests && npm run run:tests", - "ast": "tsc -b tools && node build/tools/astPrinter.js", - "dev": "node --expose-gc build/src/index.js", - "clean": "rm -rf build && rm -fr build-win && rm -fr build-mac && rm -f src/irnodes.ts && rm -rf src/diagnostic.ts && rm -rf src/builtinsMap.ts" + "build": "node_modules/webpack/bin/webpack.js --config webpack.config.js --progress --env buildMode=release && rm -rf build && mv dist build && cp -r node_modules build/", + "build-debug": "node_modules/webpack/bin/webpack.js --config webpack.config.js --progress --env buildMode=debug && rm -rf build && mv dist build && cp -r node_modules build/" + }, + "repository": { + "type": "", + "url": "" }, "author": "", "license": "", "devDependencies": { "@types/chai": "^4.2.12", "@types/mocha": "^8.0.2", - "@types/node": "^14.0.27", + "clean-webpack-plugin": "^1.0.1", + "@types/node": "10.5.5", + "prettier": "^1.16.4", + "ts-jest": "^23.0.1", "chai": "^4.2.0", "mocha": "^8.1.1", "sinon": "^9.0.3", + "ts-lint": "^4.5.1", + "ts-loader": "^5.3.3", + "tslint": "^5.11.0", "ts-sinon": "^1.2.1", - "typescript": "^4.1.3" + "typescript": "^4.1.3", + "webpack": "^4.46.0", + "webpack-cli": "^4.9.2" }, "dependencies": { "@babel/core": "^7.12.10", diff --git a/ts2panda/scripts/diagnosticMessages.json b/ts2panda/scripts/diagnosticMessages.json index b4142d717dcbc994e804387a8ca6c6a0b4e5a635..6fa9df1efc8ae1b8350344eb258931d7cdca81a0 100755 --- a/ts2panda/scripts/diagnosticMessages.json +++ b/ts2panda/scripts/diagnosticMessages.json @@ -143,6 +143,10 @@ "category": "Error", "code": 1119 }, + "An export assignment cannot have modifiers.": { + "category": "Error", + "code": 1120 + }, "Octal literals are not allowed in strict mode.": { "category": "Error", "code": 1121 @@ -159,6 +163,10 @@ "category": "Error", "code": 1142 }, + "Cannot use imports, exports, or module augmentations when '--module' is 'none'.": { + "category": "Error", + "code": 1148 + }, "The 'const' declarations can only be declared inside a block.": { "category": "Error", "code": 1156 @@ -227,6 +235,14 @@ "category": "Error", "code": 1190 }, + "An import declaration cannot have modifiers.": { + "category": "Error", + "code": 1191 + }, + "An export declaration cannot have modifiers.": { + "category": "Error", + "code": 1193 + }, "Line terminator not permitted before arrow.": { "category": "Error", "code": 1200 @@ -243,6 +259,10 @@ "category": "Error", "code": 1210 }, + "A class or function declaration without the 'default' modifier must have a name.": { + "category": "Error", + "code": 1211 + }, "Identifier expected. '{0}' is a reserved word in strict mode.": { "category": "Error", "code": 1212 @@ -255,6 +275,10 @@ "category": "Error", "code": 1214 }, + "An export assignment must be at the top level of a file or module declaration.": { + "category": "Error", + "code": 1231 + }, "An import declaration can only be used in a namespace or module.": { "category": "Error", "code": 1232 @@ -339,6 +363,18 @@ "category": "Error", "code": 2300 }, + "Module '{0}' has no exported member '{1}'.": { + "category": "Error", + "code": 2305 + }, + "Module '{0}' has already exported a member named '{1}'.": { + "category": "Error", + "code": 2308 + }, + "An export assignment cannot be used in a module with other exported elements.": { + "category": "Error", + "code": 2309 + }, "The 'super' can only be referenced in a derived class.": { "category": "Error", "code": 2335 @@ -395,6 +431,10 @@ "category": "Error", "code": 2404 }, + "Import declaration conflicts with local declaration of '{0}'.": { + "category": "Error", + "code": 2440 + }, "The 'super' cannot be referenced in a computed property name.": { "category": "Error", "code": 2466 @@ -423,6 +463,10 @@ "category": "Error", "code": 2501 }, + "A module cannot have multiple default exports.": { + "category": "Error", + "code": 2528 + }, "The 'super' can only be referenced in members of derived classes or object literal expressions.": { "category": "Error", "code": 2660 @@ -512,8 +556,12 @@ "category": "Error", "code": 19009 }, - "Invalid regular expression flag '{0}'":{ + "Invalid regular expression flag '{0}'": { "category": "Error", "code": 19010 + }, + "Unexpected eval or arguments in strict mode": { + "category": "Error", + "code": 20000 } } \ No newline at end of file diff --git a/ts2panda/scripts/run.py b/ts2panda/scripts/run.py index 089868e28ebadbc5744a2d904db3804377078657..661c1c02c037670ece8318acd835e15ab6be4f0d 100755 --- a/ts2panda/scripts/run.py +++ b/ts2panda/scripts/run.py @@ -23,6 +23,7 @@ import sys import subprocess import argparse import platform +import shutil def parse_args(): @@ -38,7 +39,10 @@ def parse_args(): help='node path') parser.add_argument("--node-modules", help='path to node-modules exetuable') - + parser.add_argument("--buildMode", + help='buildMode, as: debug, release') + parser.add_argument("--js2abc", + help='js2abc file') return parser.parse_args() @@ -72,20 +76,47 @@ def node_modules(options): run_command(['npm', 'install'], dist_dir) +def per_platForm_config(options, dir): + dist_dir = options.dist_dir + if os.path.exists(os.path.join(dist_dir, dir)): + shutil.rmtree(os.path.join(dist_dir, dir), ignore_errors=True) + cmd = ['mv', 'dist', dir] + run_command(cmd, dist_dir) + run_command(['cp', '-f', "package.json", + "./{}/package.json".format(dir)], dist_dir) + run_command(['cp', '-f', "package-lock.json", + "./{}/package-lock.json".format(dir)], dist_dir) + (js2abc_dir, _) = os.path.split(options.js2abc) + build_dir = os.path.join(js2abc_dir, dir) + if os.path.exists(build_dir): + shutil.rmtree(build_dir) + run_command(['cp', '-r', os.path.join(dist_dir, dir), js2abc_dir]) + bin_dir = os.path.join(build_dir, 'bin') + if not os.path.exists(bin_dir): + os.mkdir(bin_dir) + run_command(['cp', '-f', options.js2abc, bin_dir]) + obj_bin_dir = os.path.join(dist_dir, dir, 'bin/') + if not os.path.exists(obj_bin_dir): + os.mkdir(obj_bin_dir) + run_command(['cp', '-f', options.js2abc, obj_bin_dir]) + run_command(['cp', '-r', os.path.join(dist_dir,"node_modules"), + os.path.join(dist_dir, dir)]) + + def npm_run_build(options): plat_form = options.platform os.chdir(options.dist_dir) - tsc = "node_modules/typescript/bin/tsc" + webpack = "node_modules/webpack/bin/webpack.js" + cmd = [webpack, '--config', 'webpack.config.js', '--progress', + '--env', 'buildMode={}'.format(options.buildMode)] + run_command(cmd, options.dist_dir) if plat_form == "linux": - cmd = [tsc, '-b', 'src'] - run_command(cmd, options.dist_dir) + per_platForm_config(options, "build") elif plat_form == "win": - cmd = [tsc, '-b', 'src/tsconfig.win.json'] - run_command(cmd, options.dist_dir) + per_platForm_config(options, "build-win") elif plat_form == 'mac': - cmd = [tsc, '-b', 'src/tsconfig.mac.json'] - run_command(cmd, options.dist_dir) + per_platForm_config(options, "build-mac") def main(): diff --git a/ts2panda/scripts/run_tests.py b/ts2panda/scripts/run_tests.py index 52899474369f1d258ad17092390426c723f93c6a..8e25749fadb862812ae3dfc5477b1afcb4061901 100755 --- a/ts2panda/scripts/run_tests.py +++ b/ts2panda/scripts/run_tests.py @@ -129,12 +129,18 @@ class Ts2abcTests(): tests_args = "tests/**/*.test.js" if plat_form == "linux": + cmd = ['cp', f'{self.src_dir}/src/jshelpers.js', f'build/src/' ] + run_command(cmd, self.dist_dir) cmd = [mocha, f'build/{tests_args}'] ret = run_command(cmd, self.dist_dir) elif plat_form == "win": + cmd = ['cp', f'{self.src_dir}/src/jshelpers.js', f'build-win/src/' ] + run_command(cmd, self.dist_dir) cmd = [mocha, f'build-win/{tests_args}'] ret = run_command(cmd, self.dist_dir) elif plat_form == 'mac': + cmd = ['cp', f'{self.src_dir}/src/jshelpers.js', f'build-mac/src/' ] + run_command(cmd, self.dist_dir) cmd = [mocha, f'build-mac/{tests_args}'] ret = run_command(cmd, self.dist_dir) if ret: diff --git a/ts2panda/src/addVariable2Scope.ts b/ts2panda/src/addVariable2Scope.ts index a4416549993d1fcc20ce215af9ca64a4e04b4a00..b966e6ccf7d2d08066b97c7c527608a35a20bf28 100644 --- a/ts2panda/src/addVariable2Scope.ts +++ b/ts2panda/src/addVariable2Scope.ts @@ -15,6 +15,7 @@ import * as ts from "typescript"; import { isBindingPattern } from "./base/util"; +import { CmdOptions } from "./cmdOptions"; import * as jshelpers from "./jshelpers"; import { Recorder } from "./recorder"; import { @@ -30,13 +31,11 @@ import { VariableScope } from "./scope"; import { isGlobalIdentifier } from "./syntaxCheckHelper"; +import { TypeRecorder } from "./typeRecorder"; import { VarDeclarationKind, Variable } from "./variable"; -import { TypeRecorder } from "./typeRecorder"; -import { CmdOptions } from "./cmdOptions"; -import { PrimitiveType } from "./base/typeSystem"; function setVariableOrParameterType(node: ts.Node, v: Variable | undefined) { if (v) { @@ -78,14 +77,13 @@ function addInnerArgs(node: ts.Node, scope: VariableScope, enableTypeRecord: boo addParameters(funcNode, scope, enableTypeRecord); } - if (scope.getUseArgs()) { + if (scope.getUseArgs() || CmdOptions.isDebugMode()) { if (ts.isArrowFunction(node)) { let parentVariableScope = scope.getParentVariableScope(); parentVariableScope.add("arguments", VarDeclarationKind.CONST, InitStatus.INITIALIZED); parentVariableScope.setUseArgs(true); - scope.setUseArgs(false); - } else { + } else if (scope.getUseArgs()){ if (!scope.findLocal("arguments")) { scope.add("arguments", VarDeclarationKind.CONST, InitStatus.INITIALIZED); } @@ -107,9 +105,9 @@ export function addVariableToScope(recorder: Recorder, enableTypeRecord: boolean hoistDecls.forEach(hoistDecl => { let v: Variable | undefined; if (hoistDecl instanceof VarDecl) { - v = scope.add(hoistDecl.name, VarDeclarationKind.VAR); + v = scope.add(hoistDecl, VarDeclarationKind.VAR); } else if (hoistDecl instanceof FuncDecl) { - v = scope.add(hoistDecl.name, VarDeclarationKind.FUNCTION); + v = scope.add(hoistDecl, VarDeclarationKind.FUNCTION); } else { throw new Error("Wrong type of declaration to be hoisted") } @@ -127,25 +125,26 @@ export function addVariableToScope(recorder: Recorder, enableTypeRecord: boolean hoistDecls = hoistMap.get(nearestVariableScope); for (let j = 0; j < decls.length; j++) { let decl = decls[j]; + // @ts-ignore if (hoistDecls && hoistDecls.includes(decl)) { continue; } let v: Variable | undefined; if (decl instanceof LetDecl) { - v = scope.add(decl.name, VarDeclarationKind.LET, InitStatus.UNINITIALIZED); + v = scope.add(decl, VarDeclarationKind.LET, InitStatus.UNINITIALIZED); } else if (decl instanceof ConstDecl) { - v = scope.add(decl.name, VarDeclarationKind.CONST, InitStatus.UNINITIALIZED); + v = scope.add(decl, VarDeclarationKind.CONST, InitStatus.UNINITIALIZED); } else if (decl instanceof FuncDecl) { - v = scope.add(decl.name, VarDeclarationKind.FUNCTION); + v = scope.add(decl, VarDeclarationKind.FUNCTION); } else if (decl instanceof CatchParameter) { - v = scope.add(decl.name, VarDeclarationKind.LET); + v = scope.add(decl, VarDeclarationKind.LET); } else if (decl instanceof ClassDecl) { let classNode = decl.node; if (ts.isClassDeclaration(classNode)) { - v = scope.add(decl.name, VarDeclarationKind.CLASS, InitStatus.UNINITIALIZED); + v = scope.add(decl, VarDeclarationKind.CLASS, InitStatus.UNINITIALIZED); } else { let classScope = recorder.getScopeOfNode(classNode); - v = classScope.add(decl.name, VarDeclarationKind.CLASS, InitStatus.UNINITIALIZED); + v = classScope.add(decl, VarDeclarationKind.CLASS, InitStatus.UNINITIALIZED); } } else { /** diff --git a/ts2panda/src/assemblyDumper.ts b/ts2panda/src/assemblyDumper.ts index c425d876fd61d73eab8fac56a20e11827d81adf6..c2de81cd0283aad8ca96173ec79dea77f9590ca9 100644 --- a/ts2panda/src/assemblyDumper.ts +++ b/ts2panda/src/assemblyDumper.ts @@ -82,7 +82,7 @@ export class AssemblyDumper { for (let i = 0; i < parametersCount; ++i) { let node = irNodes[i]; this.output += "\t"; - this.output += node.mnemonic + " v" + (node.operands[0]).num + ", a" + ((node.operands[0]).num) + "\n"; + this.output += node.getMnemonic() + " v" + (node.operands[0]).num + ", a" + ((node.operands[0]).num) + "\n"; } for (let i = parametersCount; i < irNodes.length; ++i) { @@ -96,16 +96,16 @@ export class AssemblyDumper { } this.output += "\t" - this.output += node.mnemonic + " "; + this.output += node.getMnemonic() + " "; let operands = node.operands; - let formats = node.formats; + let formats = node.getFormats(); var outputRangeVregNum = getRangeExplicitVregNums(node); for (let j = 0; j < operands.length; ++j) { if (outputRangeVregNum == 0) { break; } let format = formats[0]; - let kind = format[j].kind; + let kind = format[j][0]; let op = operands[j]; if (kind == OperandKind.Imm) { @@ -122,7 +122,7 @@ export class AssemblyDumper { || kind == OperandKind.SrcVReg) { let v = op; if (v.num < 0) { - throw Error("invalid register, please check your insn!\nRegister was allocated at:\n" + v.getStackTrace() + "\n"); + throw Error("invalid register, please check your insn!\n"); } this.output += "v" + v.num.toString(); // we don't need to print all the registers for range inst, just the first one diff --git a/ts2panda/src/base/bcGenUtil.ts b/ts2panda/src/base/bcGenUtil.ts old mode 100755 new mode 100644 index 5410714703804c239f4f61d1a87d00d1c9fd69d7..4fa141739e14ef3d6ae6b401f3621070cf434eb3 --- a/ts2panda/src/base/bcGenUtil.ts +++ b/ts2panda/src/base/bcGenUtil.ts @@ -22,7 +22,6 @@ import { EcmaCallithisrangedyn, EcmaCloseiterator, EcmaCopydataproperties, - EcmaCopymodule, EcmaCreatearraywithbuffer, EcmaCreateemptyarray, EcmaCreateemptyobject, @@ -43,26 +42,30 @@ import { EcmaGetiteratornext, EcmaGetnextpropname, EcmaGetpropiterator, - EcmaImportmodule, + EcmaGetmodulenamespace, EcmaIsfalse, EcmaIstrue, EcmaLdglobalvar, EcmaLdhomeobject, EcmaLdlexenvdyn, EcmaLdlexvardyn, - EcmaLdmodvarbyname, + EcmaLdmodulevar, EcmaLdobjbyindex, EcmaLdobjbyname, EcmaLdobjbyvalue, EcmaLdsuperbyname, EcmaLdsuperbyvalue, EcmaNewlexenvdyn, + EcmaNewlexenvwithnamedyn, EcmaNewobjdynrange, EcmaPoplexenvdyn, EcmaReturnundefined, EcmaSetobjectwithproto, EcmaStarrayspread, + EcmaStclasstoglobalrecord, + EcmaStconsttoglobalrecord, EcmaStglobalvar, + EcmaStlettoglobalrecord, EcmaStlexvardyn, EcmaStmodulevar, EcmaStobjbyindex, @@ -70,8 +73,8 @@ import { EcmaStobjbyvalue, EcmaStownbyindex, EcmaStownbyname, - EcmaStownbyvalue, EcmaStownbynamewithnameset, + EcmaStownbyvalue, EcmaStownbyvaluewithnameset, EcmaStsuperbyname, EcmaStsuperbyvalue, @@ -96,21 +99,17 @@ import { LdaiDyn, LdaStr, MovDyn, - ResultType, StaDyn, - EcmaStclasstoglobalrecord, - EcmaStconsttoglobalrecord, - EcmaStlettoglobalrecord, EcmaLdbigint, VReg } from "../irnodes"; export function loadAccumulatorInt(value: number): IRNode { - return new LdaiDyn(new Imm(ResultType.Int, value)); + return new LdaiDyn(new Imm(value)); } export function loadAccumulatorFloat(value: number): IRNode { - return new FldaiDyn(new Imm(ResultType.Float, value)); + return new FldaiDyn(new Imm(value)); } export function loadAccumulatorString(value: string): IRNode { @@ -161,8 +160,11 @@ export function throwDeleteSuperProperty() { return new EcmaThrowdeletesuperproperty(); } -export function newLexicalEnv(numVars: number) { - return new EcmaNewlexenvdyn(new Imm(ResultType.Int, numVars)); +export function newLexicalEnv(numVars: number, scopeInfoIdx: number | undefined) { + if (scopeInfoIdx == undefined) { + return new EcmaNewlexenvdyn(new Imm(numVars)); + } + return new EcmaNewlexenvwithnamedyn(new Imm(numVars), new Imm(scopeInfoIdx)); } export function loadLexicalEnv() { @@ -174,11 +176,11 @@ export function popLexicalEnv() { } export function loadLexicalVar(level: number, slot: number) { - return new EcmaLdlexvardyn(new Imm(ResultType.Int, level), new Imm(ResultType.Int, slot)); + return new EcmaLdlexvardyn(new Imm(level), new Imm(slot)); } export function storeLexicalVar(level: number, slot: number, value: VReg) { - return new EcmaStlexvardyn(new Imm(ResultType.Int, level), new Imm(ResultType.Int, slot), value); + return new EcmaStlexvardyn(new Imm(level), new Imm(slot), value); } export function tryLoadGlobalByName(key: string) { @@ -206,11 +208,11 @@ export function storeObjByName(obj: VReg, key: string) { } export function loadObjByIndex(obj: VReg, index: number) { - return new EcmaLdobjbyindex(obj, new Imm(ResultType.Int, index)); + return new EcmaLdobjbyindex(obj, new Imm(index)); } export function storeObjByIndex(obj: VReg, index: number) { - return new EcmaStobjbyindex(obj, new Imm(ResultType.Int, index)); + return new EcmaStobjbyindex(obj, new Imm(index)); } export function loadObjByValue(obj: VReg, prop: VReg): IRNode { @@ -226,7 +228,7 @@ export function storeOwnByName(obj: VReg, key: string, nameSetting: boolean): IR } export function storeOwnByIndex(obj: VReg, index: number) { - return new EcmaStownbyindex(obj, new Imm(ResultType.Int, index)); + return new EcmaStownbyindex(obj, new Imm(index)); } export function storeOwnByValue(obj: VReg, value: VReg, nameSetting: boolean) { @@ -234,7 +236,7 @@ export function storeOwnByValue(obj: VReg, value: VReg, nameSetting: boolean) { } export function throwIfSuperNotCorrectCall(num: number) { - return new EcmaThrowifsupernotcorrectcall(new Imm(ResultType.Int, num)); + return new EcmaThrowifsupernotcorrectcall(new Imm(num)); } export function call(args: VReg[], passThis: boolean) { @@ -255,17 +257,17 @@ export function call(args: VReg[], passThis: boolean) { insn = new EcmaCallargs3dyn(args[0], args[1], args[2], args[3]); break; default: - insn = new EcmaCallirangedyn(new Imm(ResultType.Int, length - 1), args); + insn = new EcmaCallirangedyn(new Imm(length - 1), args); } } else { - insn = new EcmaCallithisrangedyn(new Imm(ResultType.Int, length - 1), args); + insn = new EcmaCallithisrangedyn(new Imm(length - 1), args); } return insn; } export function newObject(args: VReg[]) { - return new EcmaNewobjdynrange(new Imm(ResultType.Int, args.length), args); + return new EcmaNewobjdynrange(new Imm(args.length), args); } export function getPropIterator() { @@ -285,11 +287,11 @@ export function createEmptyObject() { } export function createObjectHavingMethod(idx: number) { - return new EcmaCreateobjecthavingmethod(new Imm(ResultType.Int, idx)); + return new EcmaCreateobjecthavingmethod(new Imm(idx)); } export function createObjectWithBuffer(idx: number) { - return new EcmaCreateobjectwithbuffer(new Imm(ResultType.Int, idx)); + return new EcmaCreateobjectwithbuffer(new Imm(idx)); } export function setObjectWithProto(proto: VReg, object: VReg) { @@ -309,7 +311,7 @@ export function createEmptyArray() { } export function createArrayWithBuffer(idx: number) { - return new EcmaCreatearraywithbuffer(new Imm(ResultType.Int, idx)); + return new EcmaCreatearraywithbuffer(new Imm(idx)); } export function storeArraySpread(array: VReg, index: VReg) { @@ -317,11 +319,11 @@ export function storeArraySpread(array: VReg, index: VReg) { } export function defineClassWithBuffer(id: string, idx: number, parameterLength: number, env: VReg, base: VReg) { - return new EcmaDefineclasswithbuffer(id, new Imm(ResultType.Int, idx), new Imm(ResultType.Int, parameterLength), env, base); + return new EcmaDefineclasswithbuffer(id, new Imm(idx), new Imm(parameterLength), env, base); } export function createObjectWithExcludedKeys(obj: VReg, args: VReg[]) { - return new EcmaCreateobjectwithexcludedkeys(new Imm(ResultType.Int, args.length - 1), obj, args); + return new EcmaCreateobjectwithexcludedkeys(new Imm(args.length - 1), obj, args); } export function throwObjectNonCoercible() { @@ -345,7 +347,7 @@ export function closeIterator(iter: VReg) { } export function superCall(num: number, start: VReg) { - return new EcmaSupercall(new Imm(ResultType.Int, num), start); + return new EcmaSupercall(new Imm(num), start); } export function superCallSpread(vs: VReg) { @@ -368,20 +370,16 @@ export function ldSuperByValue(obj: VReg, prop: VReg): IRNode { return new EcmaLdsuperbyvalue(obj, prop); } -export function importModule(name: string) { - return new EcmaImportmodule(name); -} - -export function loadModuleVarByName(name: string, module: VReg) { - return new EcmaLdmodvarbyname(name, module); +export function loadModuleVariable(name: string, isLocal: number) { + return new EcmaLdmodulevar(name, new Imm(isLocal)); } export function storeModuleVariable(name: string) { return new EcmaStmodulevar(name); } -export function copyModuleIntoCurrentModule(mod: VReg) { - return new EcmaCopymodule(mod); +export function getModuleNamespace(localName: string) { + return new EcmaGetmodulenamespace(localName); } export function loadHomeObject() { @@ -389,23 +387,23 @@ export function loadHomeObject() { } export function defineFunc(name: string, env: VReg, paramLength: number) { - return new EcmaDefinefuncdyn(name, new Imm(ResultType.Int, paramLength), env); + return new EcmaDefinefuncdyn(name, new Imm(paramLength), env); } export function defineAsyncFunc(name: string, env: VReg, paramLength: number) { - return new EcmaDefineasyncfunc(name, new Imm(ResultType.Int, paramLength), env); + return new EcmaDefineasyncfunc(name, new Imm(paramLength), env); } export function defineGeneratorFunc(name: string, env: VReg, paramLength: number) { - return new EcmaDefinegeneratorfunc(name, new Imm(ResultType.Int, paramLength), env); + return new EcmaDefinegeneratorfunc(name, new Imm(paramLength), env); } export function defineNCFunc(name: string, env: VReg, paramLength: number) { - return new EcmaDefinencfuncdyn(name, new Imm(ResultType.Int, paramLength), env); + return new EcmaDefinencfuncdyn(name, new Imm(paramLength), env); } export function defineMethod(name: string, env: VReg, paramLength: number) { - return new EcmaDefinemethod(name, new Imm(ResultType.Int, paramLength), env); + return new EcmaDefinemethod(name, new Imm(paramLength), env); } export function isTrue() { @@ -417,18 +415,18 @@ export function isFalse() { } export function createRegExpWithLiteral(pattern: string, flags: number) { - return new EcmaCreateregexpwithliteral(pattern, new Imm(ResultType.Int, flags)); + return new EcmaCreateregexpwithliteral(pattern, new Imm(flags)); } -export function stLetToGlobalRecord (name: string) { +export function stLetToGlobalRecord(name: string) { return new EcmaStlettoglobalrecord(name); } -export function stConstToGlobalRecord (name: string) { +export function stConstToGlobalRecord(name: string) { return new EcmaStconsttoglobalrecord(name); } -export function stClassToGlobalRecord (name: string) { +export function stClassToGlobalRecord(name: string) { return new EcmaStclasstoglobalrecord(name); } diff --git a/ts2panda/src/base/lexEnv.ts b/ts2panda/src/base/lexEnv.ts old mode 100755 new mode 100644 index 7a01c4bb58491ddfafae9cdaa29a4b166ce95ae6..c52373900c631a4319a79b37151209193043fcf2 --- a/ts2panda/src/base/lexEnv.ts +++ b/ts2panda/src/base/lexEnv.ts @@ -13,6 +13,7 @@ * limitations under the License. */ +import { CmdOptions } from "../cmdOptions"; import { IRNode } from "../irnodes"; @@ -28,9 +29,14 @@ import { CacheList, getVregisterCache } from "./vregisterCache"; function createLexEnv(pandaGen: PandaGen, scope: VariableScope): IRNode[] { let lexEnvVars = scope.getNumLexEnv(); let insns: IRNode[] = []; + let scopeInfoIdx: number | undefined = undefined; + let lexVarInfo = scope.getLexVarInfo(); + if (CmdOptions.isDebugMode()) { + scopeInfoIdx = pandaGen.appendScopeInfo(lexVarInfo); + } insns.push( - newLexicalEnv(lexEnvVars), + newLexicalEnv(lexEnvVars, scopeInfoIdx), storeAccumulator(getVregisterCache(pandaGen, CacheList.LexEnv)) ); diff --git a/ts2panda/src/base/literal.ts b/ts2panda/src/base/literal.ts index c98f498528c47dc2c52b40c681fece3044b22751..f4483a1d37bf95a7d4fc5afff689c1606025a7c7 100755 --- a/ts2panda/src/base/literal.ts +++ b/ts2panda/src/base/literal.ts @@ -26,44 +26,44 @@ export enum LiteralTag { } export class Literal { - private tag: LiteralTag; - private value: any; + private t: LiteralTag; + private v: any; - constructor(tag: LiteralTag, value: any) { - this.tag = tag; - this.value = value; + constructor(t: LiteralTag, v: any) { + this.t = t; + this.v = v; } getTag() { - return this.tag; + return this.t; } getValue() { - return this.value; + return this.v; } } export class LiteralBuffer { - private literalBuffer: Literal[] = []; + private lb: Literal[] = []; constructor() { }; addLiterals(...literals: Array) { - this.literalBuffer.push(...literals); + this.lb.push(...literals); } getLiterals() { - return this.literalBuffer; + return this.lb; } isEmpty() { - return this.literalBuffer.length == 0; + return this.lb.length == 0; } getLiteral(index: number) { - if (index >= this.literalBuffer.length || this.literalBuffer.length <=0) { + if (index >= this.lb.length || this.lb.length <=0) { return ; } - return this.literalBuffer[index]; + return this.lb[index]; } } \ No newline at end of file diff --git a/ts2panda/src/base/typeSystem.ts b/ts2panda/src/base/typeSystem.ts index 92022145631829b4be6b5ecebe39ca7f51245caa..edda3c06d61c095bfbd48c551492158a1c8d97ca 100755 --- a/ts2panda/src/base/typeSystem.ts +++ b/ts2panda/src/base/typeSystem.ts @@ -14,17 +14,15 @@ */ import * as ts from "typescript"; +import * as jshelpers from "../jshelpers"; +import { PandaGen } from "../pandagen"; +import { TypeChecker } from "../typeChecker"; +import { TypeRecorder } from "../typeRecorder"; import { Literal, LiteralBuffer, LiteralTag } from "./literal"; -import { LOGD } from "../log"; -import { TypeChecker } from "../typeChecker"; -import { TypeRecorder } from "../typeRecorder"; -import { PandaGen } from "../pandagen"; -import * as jshelpers from "../jshelpers"; -import { access } from "fs"; export enum PrimitiveType { ANY, diff --git a/ts2panda/src/base/util.ts b/ts2panda/src/base/util.ts old mode 100755 new mode 100644 index b985453a4b61b7be100b1a260e303858276ce86d..775d2df1437e0c2044697020041023450c8cfa23 --- a/ts2panda/src/base/util.ts +++ b/ts2panda/src/base/util.ts @@ -13,9 +13,8 @@ * limitations under the License. */ -import path = require("path"); +import * as path from "path"; import { extractCtorOfClass } from "../statement/classStatement"; -import { LocalVariable, Variable } from "../variable"; import * as ts from "typescript"; import { EcmaCallirangedyn, @@ -26,7 +25,6 @@ import { } from "../irnodes"; import * as jshelpers from "../jshelpers"; import { LOGD } from "../log"; -import { ModuleScope, Scope } from "../scope"; import { isFunctionLikeDeclaration } from "../syntaxCheckHelper"; export function containSpreadElement(args?: ts.NodeArray): boolean { @@ -69,16 +67,6 @@ export function hasDefaultKeywordModifier(node: ts.Node): boolean { return hasDefault; } -export function setVariableExported(varName: string, scope: Scope) { - if (!(scope instanceof ModuleScope)) { - throw new Error("variable can't be exported out of module scope"); - } - - let variable: { scope: Scope | undefined, level: number, v: Variable | undefined } = scope.find(varName); - (variable.v!).setExport(); - (variable.v!).setExportedName(varName); -} - export function execute(cmd: string, args: Array) { var spawn = require('child_process').spawn; @@ -192,8 +180,9 @@ export function escapeUnicode(data: string) { } export function initiateTs2abc(args: Array) { - let js2abc = path.join(path.resolve(__dirname, '../../bin'), "js2abc"); + let js2abc = path.join(path.resolve(__dirname, '../bin'), "js2abc"); args.unshift("--compile-by-pipe"); + // @ts-ignore var spawn = require('child_process').spawn; let child = spawn(js2abc, [...args], { stdio: ['pipe', 'inherit', 'inherit', 'pipe'] @@ -303,4 +292,4 @@ export function setPos(node: ts.Node) { setPos(childNode); }); return node; -} \ No newline at end of file +} diff --git a/ts2panda/src/base/vregisterCache.ts b/ts2panda/src/base/vregisterCache.ts index e4b3082acf658539c8f00ab43d2599c4d3189263..b9a4cb34d1c2ebf8a78900d0bf762ca227db1421 100755 --- a/ts2panda/src/base/vregisterCache.ts +++ b/ts2panda/src/base/vregisterCache.ts @@ -44,15 +44,8 @@ export enum CacheList { FUNC, // load function Infinity, undefined, - // Boolean, - // Number, - // String, - // BigInt, Symbol, - // RegExp, Null, - // Object, - // Function, Global, LexEnv, // Lex Env must come before True and False, because LexEnv depends on True and False True, @@ -64,15 +57,8 @@ let cacheExpandHandlers = new Map([ [CacheList.NaN, expandNaN], [CacheList.Infinity, expandInfinity], [CacheList.undefined, expandUndefined], - // [CacheList.Boolean, expandBoolean], - // [CacheList.Number, expandNumber], - // [CacheList.String, expandString], - // [CacheList.BigInt, expandBigInt], [CacheList.Symbol, expandSymbol], - // [CacheList.RegExp, expandRegExp], [CacheList.Null, expandNull], - // [CacheList.Object, expandObject], - // [CacheList.Function, expandFunction], [CacheList.Global, expandGlobal], [CacheList.LexEnv, expandLexEnv], [CacheList.True, expandTrue], diff --git a/ts2panda/src/cmdOptions.ts b/ts2panda/src/cmdOptions.ts index 884d706ea7ffed403982e683fcd50e820285d88c..f802f1302f6e0c89116bdd85571c23a619ee5523 100644 --- a/ts2panda/src/cmdOptions.ts +++ b/ts2panda/src/cmdOptions.ts @@ -18,11 +18,10 @@ import commandLineArgs from "command-line-args"; import commandLineUsage from "command-line-usage"; import * as ts from "typescript"; import { LOGE } from "./log"; -import path = require("path"); +import * as path from "path"; import { execute } from "./base/util"; const ts2pandaOptions = [ - { name: 'variant-bytecode', alias: 'r', type: Boolean, defaultValue: true, description: "emit 2nd bytecode to pandafile." }, { name: 'modules', alias: 'm', type: Boolean, defaultValue: false, description: "compile as module." }, { name: 'debug-log', alias: 'l', type: Boolean, defaultValue: false, description: "show info debug log and generate the json file."}, { name: 'dump-assembly', alias: 'a', type: Boolean, defaultValue: false, description: "dump assembly to file." }, @@ -79,13 +78,6 @@ export class CmdOptions { return this.options["modules"]; } - static isVariantBytecode(): boolean { - if (!this.options) { - return true; - } - return this.options["variant-bytecode"]; - } - static getOptLevel(): number { return this.options["opt-level"]; } @@ -210,6 +202,7 @@ export class CmdOptions { return this.options["debug-type"]; } + // @ts-ignore static parseUserCmd(args: string[]): ts.ParsedCommandLine | undefined { this.options = commandLineArgs(ts2pandaOptions, { partial: true }); if (this.options.help) { diff --git a/ts2panda/src/compiler.ts b/ts2panda/src/compiler.ts index be4e0254120f1f82f525b320b92f304f622e311f..c94253e9ccfd90df6f29aada4898cd37d40af92f 100644 --- a/ts2panda/src/compiler.ts +++ b/ts2panda/src/compiler.ts @@ -27,12 +27,11 @@ import { AssignmentOperator } from "typescript"; import * as astutils from "./astutils"; import { LReference } from "./base/lreference"; import { - hasDefaultKeywordModifier, hasExportKeywordModifier, isBindingPattern, - setVariableExported } from "./base/util"; import { CacheList, getVregisterCache } from "./base/vregisterCache"; +import { CmdOptions } from "./cmdOptions"; import { CompilerDriver } from "./compilerDriver"; import { DebugInfo, NodeKind } from "./debuginfo"; import { DiagnosticCode, DiagnosticError } from "./diagnostic"; @@ -85,7 +84,6 @@ import { import { checkValidUseSuperBeforeSuper, compileClassDeclaration, - compileConstructor, compileDefaultConstructor, compileDefaultInitClassMembers, compileReturnThis4Ctor, @@ -115,6 +113,7 @@ import { isAssignmentOperator } from "./syntaxCheckHelper"; import { GlobalVariable, LocalVariable, + ModuleVariable, VarDeclarationKind, Variable } from "./variable"; @@ -148,7 +147,7 @@ export class Compiler { // spare v3 to save the currrent lexcial env getVregisterCache(this.pandaGen, CacheList.LexEnv); - this.envUnion.push(getVregisterCache(this.pandaGen, CacheList.LexEnv)) + this.envUnion.push(getVregisterCache(this.pandaGen, CacheList.LexEnv)); this.pandaGen.loadAccFromArgs(this.rootNode); } @@ -177,11 +176,15 @@ export class Compiler { } private callOpt() { + if (CmdOptions.isDebugMode()) { + return; + } let CallMap: Map = new Map([ ["this", 1], ["4newTarget", 2], ["0newTarget", 2], - ["argumentsOrRestargs", 4] + ["argumentsOrRestargs", 4], + ["4funcObj", 8] ]); let callType = 0; let scope = this.pandaGen.getScope(); @@ -205,6 +208,7 @@ export class Compiler { tempLocals.push(this.pandaGen.getLocals()[i]); } let name2variable = scope.getName2variable(); + // @ts-ignore name2variable.forEach((value, key) => { if (tempNames.has(key)) { name2variable.delete(key) @@ -212,7 +216,7 @@ export class Compiler { }) this.pandaGen.setLocals(tempLocals); - this.pandaGen.setParametersCount(this.pandaGen.getParametersCount()-count); + this.pandaGen.setParametersCount(this.pandaGen.getParametersCount() - count); if (scope.getArgumentsOrRestargs()) { callType += CallMap.get("argumentsOrRestargs") ?? 0; @@ -254,18 +258,25 @@ export class Compiler { private storeSpecialArg2LexEnv(arg: string) { let variableInfo = this.scope.find(arg); let v = variableInfo.v; + let pandaGen = this.pandaGen; - if (v && v.isLexVar) { - if ((arg === "this" || arg === "4newTarget") && variableInfo.scope instanceof FunctionScope) { - variableInfo.scope.setCallOpt(arg); - } - if (arg === "arguments" && variableInfo.scope instanceof FunctionScope) { - variableInfo.scope.setArgumentsOrRestargs(); + if (CmdOptions.isDebugMode()) { + variableInfo.scope!.setLexVar(v!, this.scope); + pandaGen.storeLexicalVar(this.rootNode, variableInfo.level, + (variableInfo.v).idxLex, + pandaGen.getVregForVariable(variableInfo.v)); + } else { + if (v && v.isLexVar) { + if ((arg === "this" || arg === "4newTarget") && variableInfo.scope instanceof FunctionScope) { + variableInfo.scope.setCallOpt(arg); + } + if (arg === "arguments" && variableInfo.scope instanceof FunctionScope) { + variableInfo.scope.setArgumentsOrRestargs(); + } + let vreg = "4funcObj" === arg ? getVregisterCache(pandaGen, CacheList.FUNC) : + pandaGen.getVregForVariable(variableInfo.v); + pandaGen.storeLexicalVar(this.rootNode, variableInfo.level, v.idxLex, vreg); } - let pandaGen = this.pandaGen; - let vreg = "4funcObj" === arg ? getVregisterCache(pandaGen, CacheList.FUNC) : pandaGen.getVregForVariable(variableInfo.v); - let slot = (variableInfo.v).idxLex; - pandaGen.storeLexicalVar(this.rootNode, variableInfo.level, slot, vreg); } } @@ -516,18 +527,12 @@ export class Compiler { private compileVariableStatement(stmt: ts.VariableStatement) { let declList = stmt.declarationList; - let isExported: boolean = hasExportKeywordModifier(stmt); declList.declarations.forEach((decl) => { - this.compileVariableDeclaration(decl, isExported) + this.compileVariableDeclaration(decl) }); } - compileVariableDeclaration(decl: ts.VariableDeclaration, isExported: boolean = false) { - if (isExported) { - let name = jshelpers.getTextOfIdentifierOrLiteral(decl.name); - setVariableExported(name, this.getCurrentScope()); - } - + compileVariableDeclaration(decl: ts.VariableDeclaration) { let lref = LReference.generateLReference(this, decl.name, true); if (decl.initializer) { this.compileExpression(decl.initializer); @@ -541,7 +546,6 @@ export class Compiler { && decl.parent.kind != ts.SyntaxKind.CatchClause) { this.pandaGen.loadAccumulator(decl, getVregisterCache(this.pandaGen, CacheList.undefined)); } - } lref.setValue(); } @@ -696,26 +700,16 @@ export class Compiler { private compileFunctionDeclaration(decl: ts.FunctionDeclaration) { if (!decl.name) { - let hasExport: boolean = hasExportKeywordModifier(decl); - let hasDefault: boolean = hasDefaultKeywordModifier(decl); - if (hasExport && hasDefault) { - if (this.scope instanceof ModuleScope) { - let internalName = this.compilerDriver.getFuncInternalName(decl, this.recorder); - let env = this.getCurrentEnv(); - this.pandaGen.defineFunction(NodeKind.FirstNodeOfFunction, decl, internalName, env); - this.pandaGen.storeModuleVar(decl, "default"); - } else { - throw new Error("SyntaxError: export function declaration cannot in other scope except ModuleScope"); - } - } else { - throw new Error("Function declaration without name is unimplemented"); + if (hasExportKeywordModifier(decl) && this.scope instanceof ModuleScope) { + return; } + throw new Error("Function declaration without name is unimplemented"); } } private compileExportAssignment(stmt: ts.ExportAssignment) { this.compileExpression(stmt.expression); - this.pandaGen.storeModuleVar(stmt, "default"); + this.pandaGen.storeModuleVariable(stmt, "*default*"); } compileCondition(expr: ts.Expression, ifFalseLabel: Label) { @@ -1483,13 +1477,43 @@ export class Compiler { } else { this.pandaGen.storeGlobalVar(node, variable.v.getName()); } + } else if (variable.v instanceof ModuleVariable) { + // import module variable is const, throw `const assignment error` + if (!isDeclaration && variable.v.isConst()) { + let nameReg = this.pandaGen.getTemp(); + this.pandaGen.loadAccumulatorString(node, variable.v.getName()); + this.pandaGen.storeAccumulator(node, nameReg); + this.pandaGen.throwConstAssignment(node, nameReg); + this.pandaGen.freeTemps(nameReg); + return; + } + + if (isDeclaration) { + variable.v.initialize(); + } + + if ((variable.v.isLet() || variable.v.isClass()) && !variable.v.isInitialized()) { + let valueReg = this.pandaGen.getTemp(); + let holeReg = this.pandaGen.getTemp(); + let nameReg = this.pandaGen.getTemp(); + this.pandaGen.storeAccumulator(node, valueReg); + this.pandaGen.loadModuleVariable(node, variable.v.getName(), true); + this.pandaGen.storeAccumulator(node, holeReg); + this.pandaGen.loadAccumulatorString(node, variable.v.getName()); + this.pandaGen.storeAccumulator(node, nameReg); + this.pandaGen.throwUndefinedIfHole(node, holeReg, nameReg); + this.pandaGen.loadAccumulator(node, valueReg); + this.pandaGen.freeTemps(valueReg, holeReg, nameReg); + } + + this.pandaGen.storeModuleVariable(node, variable.v.getName()); } else { throw new Error("invalid lhsRef to store"); } } loadTarget(node: ts.Node, variable: { scope: Scope | undefined, level: number, v: Variable | undefined }) { - if (variable.v instanceof LocalVariable) { + if (variable.v instanceof LocalVariable) { if (variable.v.isLetOrConst() || variable.v.isClass()) { if (variable.scope instanceof GlobalScope) { this.pandaGen.tryLoadGlobalByName(node, variable.v.getName()); @@ -1497,7 +1521,7 @@ export class Compiler { } } - if (variable.scope && variable.level >= 0) { // inner most function will load outer env instead of new a lex env + if (variable.scope && variable.level >= 0) { // leaf function will load outer env instead of new a lex env let scope = this.scope; let needSetLexVar: boolean = false; while (scope != variable.scope) { @@ -1526,6 +1550,19 @@ export class Compiler { } else { this.pandaGen.loadGlobalVar(node, variable.v.getName()); } + } else if (variable.v instanceof ModuleVariable) { + let isLocal: boolean = variable.v.isExportVar() ? true : false; + this.pandaGen.loadModuleVariable(node, variable.v.getName(), isLocal); + if ((variable.v.isLetOrConst() || variable.v.isClass()) && !variable.v.isInitialized()) { + let valueReg = this.pandaGen.getTemp(); + let nameReg = this.pandaGen.getTemp(); + this.pandaGen.storeAccumulator(node, valueReg); + this.pandaGen.loadAccumulatorString(node, variable.v.getName()); + this.pandaGen.storeAccumulator(node, nameReg); + this.pandaGen.throwUndefinedIfHole(node, valueReg, nameReg); + this.pandaGen.loadAccumulator(node, valueReg); + this.pandaGen.freeTemps(valueReg, nameReg); + } } else { // Handle the variables from lexical scope throw new Error("Only local and global variables are implemented"); diff --git a/ts2panda/src/compilerDriver.ts b/ts2panda/src/compilerDriver.ts index e4dd5dc0c6a34290e38ef6b1db101abba0b67565..fc4f34063f119295d36cc1805dc2b375ccb042c3 100644 --- a/ts2panda/src/compilerDriver.ts +++ b/ts2panda/src/compilerDriver.ts @@ -17,7 +17,7 @@ import { writeFileSync } from "fs"; import * as ts from "typescript"; import { addVariableToScope } from "./addVariable2Scope"; import { AssemblyDumper } from "./assemblyDumper"; -import { initiateTs2abc, listenChildExit, listenErrorEvent, terminateWritePipe } from "./base/util"; +import { hasDefaultKeywordModifier, hasExportKeywordModifier, initiateTs2abc, listenChildExit, listenErrorEvent, terminateWritePipe } from "./base/util"; import { CmdOptions } from "./cmdOptions"; import { Compiler @@ -25,9 +25,8 @@ import { import { CompilerStatistics } from "./compilerStatistics"; import { DebugInfo } from "./debuginfo"; import { hoisting } from "./hoisting"; -import { IntrinsicExpander } from "./intrinsicExpander"; import { LOGD } from "./log"; -import { setExportBinding, setImport } from "./modules"; +import { setModuleNamespaceImports } from "./ecmaModule"; import { PandaGen } from "./pandagen"; import { Pass } from "./pass"; import { CacheExpander } from "./pass/cacheExpander"; @@ -41,10 +40,11 @@ import { VariableScope } from "./scope"; import { getClassNameForConstructor } from "./statement/classStatement"; -import { checkDuplicateDeclaration, checkExportEntries } from "./syntaxChecker"; +import { checkDuplicateDeclaration } from "./syntaxChecker"; import { Ts2Panda } from "./ts2panda"; import { TypeRecorder } from "./typeRecorder"; import { LiteralBuffer } from "./base/literal"; +import { findOuterNodeOfParenthesis } from "./expression/parenthesizedExpression"; export class PendingCompilationUnit { constructor( @@ -59,13 +59,14 @@ export class PendingCompilationUnit { * It handles all dependencies and run passes. */ export class CompilerDriver { + static isTsFile: boolean = false; private fileName: string; - private passes: Pass[]; + private passes: Pass[] = []; private compilationUnits: PandaGen[]; pendingCompilationUnits: PendingCompilationUnit[]; private functionId: number = 1; // 0 reserved for main private funcIdMap: Map = new Map(); - private statistics: CompilerStatistics; + private statistics: CompilerStatistics | undefined; private needDumpHeader: boolean = true; private ts2abcProcess: any = undefined; @@ -74,12 +75,13 @@ export class CompilerDriver { // register passes here this.passes = [ new CacheExpander(), - new IntrinsicExpander(), new RegAlloc() ]; this.compilationUnits = []; this.pendingCompilationUnits = []; - this.statistics = new CompilerStatistics(); + if (CmdOptions.showHistogramStatistics() || CmdOptions.showHoistingStatistics()) { + this.statistics = new CompilerStatistics(); + } } initiateTs2abcChildProcess() { @@ -148,10 +150,10 @@ export class CompilerDriver { compileForSyntaxCheck(node: ts.SourceFile): void { let recorder = this.compilePrologue(node, false); checkDuplicateDeclaration(recorder); - checkExportEntries(recorder); } compile(node: ts.SourceFile): void { + CompilerDriver.isTsFile = CompilerDriver.isTypeScriptSourceFile(node); if (CmdOptions.showASTStatistics()) { let statics: number[] = new Array(ts.SyntaxKind.Count).fill(0); @@ -182,6 +184,7 @@ export class CompilerDriver { Ts2Panda.dumpStringsArray(ts2abcProc); Ts2Panda.dumpConstantPool(ts2abcProc); + Ts2Panda.dumpModuleRecords(ts2abcProc); terminateWritePipe(ts2abcProc); if (CmdOptions.isEnableDebugLog()) { @@ -217,13 +220,9 @@ export class CompilerDriver { let compiler = new Compiler(node, pandaGen, this, recorder); - if (CmdOptions.isModules() && ts.isSourceFile(node) && scope instanceof ModuleScope) { - setImport(recorder.getImportStmts(), scope, pandaGen); - setExportBinding(recorder.getExportStmts(), scope, pandaGen); - } - // because of para vreg, don't change hosting's position hoisting(node, pandaGen, recorder, compiler); + setModuleNamespaceImports(compiler, scope, pandaGen); compiler.compile(); this.passes.forEach((pass) => pass.run(pandaGen)); @@ -240,7 +239,7 @@ export class CompilerDriver { } if (CmdOptions.showHistogramStatistics()) { - this.statistics.getInsHistogramStatistics(pandaGen); + this.statistics!.getInsHistogramStatistics(pandaGen); } } @@ -263,12 +262,8 @@ export class CompilerDriver { let pandaGen = new PandaGen(internalName, this.getParametersCount(node), scope); let compiler = new Compiler(node, pandaGen, this, recorder); - if (CmdOptions.isModules() && ts.isSourceFile(node) && scope instanceof ModuleScope) { - setImport(recorder.getImportStmts(), scope, pandaGen); - setExportBinding(recorder.getExportStmts(), scope, pandaGen); - } - hoisting(node, pandaGen, recorder, compiler); + setModuleNamespaceImports(compiler, scope, pandaGen); compiler.compile(); this.passes.forEach((pass) => pass.run(pandaGen)); @@ -276,7 +271,7 @@ export class CompilerDriver { this.compilationUnits.push(pandaGen); } - private isTypeScriptSourceFile(node: ts.SourceFile) { + static isTypeScriptSourceFile(node: ts.SourceFile) { let fileName = node.fileName; if (fileName && fileName.endsWith(".ts")) { return true; @@ -293,15 +288,17 @@ export class CompilerDriver { topLevelScope = new GlobalScope(node); } - let isTsFile = this.isTypeScriptSourceFile(node); - let enableTypeRecord = recordType && CmdOptions.needRecordType() && isTsFile; + let enableTypeRecord = recordType && CmdOptions.needRecordType() && CompilerDriver.isTsFile; if (enableTypeRecord) { TypeRecorder.createInstance(); } - let recorder = new Recorder(node, topLevelScope, this, enableTypeRecord, isTsFile); + let recorder = new Recorder(node, topLevelScope, this, enableTypeRecord, CompilerDriver.isTsFile); recorder.record(); - + if (topLevelScope instanceof ModuleScope) { + topLevelScope.module().setModuleEnvironment(topLevelScope); + } addVariableToScope(recorder, enableTypeRecord); + let postOrderVariableScopes = this.postOrderAnalysis(topLevelScope); for (let variableScope of postOrderVariableScopes) { @@ -313,11 +310,11 @@ export class CompilerDriver { showStatistics(): void { if (CmdOptions.showHistogramStatistics()) { - this.statistics.printHistogram(false); + this.statistics!.printHistogram(false); } if (CmdOptions.showHoistingStatistics()) { - this.statistics.printHoistStatistics(); + this.statistics!.printHoistStatistics(); } } @@ -352,6 +349,10 @@ export class CompilerDriver { let funcNode = node; name = (recorder.getScopeOfNode(funcNode)).getFuncName(); if (name == '') { + if ((ts.isFunctionDeclaration(node) && hasExportKeywordModifier(node) && hasDefaultKeywordModifier(node)) + || ts.isExportAssignment(findOuterNodeOfParenthesis(node))) { + return 'default'; + } return `#${this.getFuncId(funcNode)}#`; } diff --git a/ts2panda/src/compilerStatistics.ts b/ts2panda/src/compilerStatistics.ts index 71f1ef1c7ee0761ec76ebc48dbb262ab3563595f..5fd1d08069035c96b05f42bc6808ba8b5d28c4cb 100644 --- a/ts2panda/src/compilerStatistics.ts +++ b/ts2panda/src/compilerStatistics.ts @@ -13,7 +13,7 @@ * limitations under the License. */ -import { getInstructionSize, Imm, IRNode, IRNodeKind } from "./irnodes"; +import { getInstructionSize, IRNode, IRNodeKind } from "./irnodes"; import { LOGD } from "./log"; import { PandaGen } from "./pandagen"; @@ -129,7 +129,7 @@ class HistogramStatistics { let part = mnemonic.split('.'); return part[2]; } - return ins.mnemonic; + return ins.getMnemonic(); } unionStatistics(histogram: HistogramStatistics): void { @@ -175,6 +175,7 @@ class HistogramStatistics { getTotal() { let totalInsnsNum: number = 0; let totalSize: number = 0; + // @ts-ignore this.insHistogram.forEach((value, key) => { totalInsnsNum += value.getCount(); totalSize += value.getTotalSize(); @@ -252,7 +253,8 @@ export class CompilerStatistics { printHistogram(verbose: boolean) { let totalHistogram = new HistogramStatistics("Total"); - + + // @ts-ignore this.histogramMap.forEach((histogram, funcName) => { totalHistogram.unionStatistics(histogram); diff --git a/ts2panda/src/compilerUtils.ts b/ts2panda/src/compilerUtils.ts index 4e667e175810d6493c47126d780ca5664c28a6e5..42082fb7c2da751d22ea8b530ae884ee3de08ae3 100644 --- a/ts2panda/src/compilerUtils.ts +++ b/ts2panda/src/compilerUtils.ts @@ -29,7 +29,7 @@ import { Label, VReg } from "./irnodes"; -import jshelpers from "./jshelpers"; +import * as jshelpers from "./jshelpers"; import { CatchTable, LabelPair @@ -221,7 +221,6 @@ function emitRestElement(restElement: ts.BindingName | ts.Expression, iterator: ); // get value from iter and store it to arrayObj - // getIterValue(iterRecord, iterValue, pandaGen, restElement); iterator.iteratorValue(iterResult); pandaGen.storeObjProperty(restElement, arrayObj, index); @@ -339,7 +338,6 @@ function compileObjectDestructuring(obj: ts.ObjectBindingOrAssignmentPattern, pa if (ts.isComputedPropertyName(key)) { compiler.compileExpression(key.expression); } else { - // compiler.compileExpression(key); if (ts.isIdentifier(key)) { let keyName = jshelpers.getTextOfIdentifierOrLiteral(key); pandaGen.loadAccumulatorString(key, keyName); diff --git a/ts2panda/src/debuginfo.ts b/ts2panda/src/debuginfo.ts index 0eac8157e6c2df57d3045c98042328fda43a3371..b5f5007684ab166a79b825d2a629f4cc56743211 100644 --- a/ts2panda/src/debuginfo.ts +++ b/ts2panda/src/debuginfo.ts @@ -18,7 +18,8 @@ import { CmdOptions } from "./cmdOptions"; import { CalliDynRange, CallRange, - DebugInsPlaceHolder, + DebugInsStartPlaceHolder, + DebugInsEndPlaceHolder, IRNode, Label, VReg @@ -31,11 +32,10 @@ import { } from "./variable"; export class DebugPosInfo { - private boundLeft: number | undefined = 0; - private boundRight: number | undefined = 0; - private lineNum: number = -1; - private columnNum: number = -1; - private wholeLine: string | undefined = ""; + private bl: number | undefined; // bound left + private br: number | undefined; // bound right + private l: number = -1; // line number + private c: number = -1; // column number private nodeKind: NodeKind | undefined = NodeKind.FirstNodeOfFunction; constructor() { } @@ -53,74 +53,65 @@ export class DebugPosInfo { } public setBoundLeft(boundLeft: number): void { - this.boundLeft = boundLeft; + this.bl = boundLeft; } public getBoundLeft(): number | undefined { - return this.boundLeft; + return this.bl; } public setBoundRight(boundRight: number): void { - this.boundRight = boundRight; + this.br = boundRight; } public getBoundRight(): number | undefined { - return this.boundRight; + return this.br; } public setSourecLineNum(lineNum: number): void { - this.lineNum = lineNum; + this.l = lineNum; } public getSourceLineNum(): number { - return this.lineNum; + return this.l; } public setSourecColumnNum(columnNum: number): void { - this.columnNum = columnNum; + this.c = columnNum; } public getSourceColumnNum(): number { - return this.columnNum; + return this.c; } - public setWholeLine(wholeLine: string): void { - this.wholeLine = wholeLine; - } - - public getWholeLine(): string | undefined { - return this.wholeLine; - } - - public ClearMembersForReleaseBuild(): void { - this.ClearMembersForDebugBuild(); - this.boundLeft = undefined; - this.boundRight = undefined; - } - - public ClearMembersForDebugBuild(): void { - this.wholeLine = undefined; + public ClearNodeKind(): void { this.nodeKind = undefined; } } export class VariableDebugInfo { - private name = ""; - private variable: Variable | undefined; - private signature = ""; - private signatureType = ""; - private reg: number = -1; + // @ts-ignore + private n = ""; // name + // @ts-ignore + private v: Variable | undefined; // variables + // @ts-ignore + private s = ""; // signature + // @ts-ignore + private st = ""; // signature type + // @ts-ignore + private r: number = -1; private start: number = -1; - private length: number = -1; + // @ts-ignore + private len: number = -1; constructor(name: string, signature: string, signatureType: string, reg: number, start: number = 0, length: number = 0) { - this.name = name; - this.signature = signature; - this.signatureType = signatureType; - this.reg = reg; + this.n = name; + this.s = signature; + this.st = signatureType; + this.r = reg; this.start = start; - this.length = length; + this.len = length; } public setStart(start: number): void { @@ -132,7 +123,7 @@ export class VariableDebugInfo { } public setLength(length: number): void { - this.length = length; + this.len = length; } } @@ -179,17 +170,14 @@ export class DebugInfo { loc: { line : -1, character : -1 - }, - wholeLineText: "" + } } } pos = node.getStart(); let loc = file.getLineAndCharacterOfPosition(pos); - let wholeLineText = node.getText(); return { - loc: loc, - wholeLineText: wholeLineText + loc: loc } } @@ -202,7 +190,6 @@ export class DebugInfo { } posInfo.setSourecLineNum(res.loc.line); posInfo.setSourecColumnNum(res.loc.character); - posInfo.setWholeLine(res.wholeLineText); } } @@ -223,35 +210,31 @@ export class DebugInfo { let lineNumber = -1; let columnNumber = -1; - let wholeLineText = ""; if (DebugInfo.isNode(node)) { let tsNode = (node); let res = this.searchForPos(tsNode); if (!res) { return; } - wholeLineText = res.wholeLineText; lineNumber = res.loc.line; columnNumber = res.loc.character; } - for (let i = 0; i < insns.length; i++) { - let pos = new DebugPosInfo(); - pos.setSourecLineNum(lineNumber); - pos.setSourecColumnNum(columnNumber); - pos.setWholeLine(wholeLineText); - pos.setDebugPosInfoNodeState(node); - - insns[i].debugPosInfo = pos; - } + insns.forEach(insn => { + insn.debugPosInfo.setSourecLineNum(lineNumber); + insn.debugPosInfo.setSourecColumnNum(columnNumber); + insn.debugPosInfo.setDebugPosInfoNodeState(node); + }) } private static matchFormat(irnode: IRNode): number { let formatIndex = 0; - for (let i = 0; i < irnode.formats[0].length; i++) { + let formats = irnode.getFormats(); + for (let i = 0; i < formats[0].length; i++) { if (irnode.operands[i] instanceof VReg) { - for (let j = 0; j < irnode.formats.length; j++) { - if ((irnode.operands[i]).num < (1 << irnode.formats[j][i].bitwidth)) { + for (let j = 0; j < formats.length; j++) { + // formats[j][i][1] is vreg’s bitwidth + if ((irnode.operands[i]).num < (1 << formats[j][i][1])) { formatIndex = j > formatIndex ? j : formatIndex; continue; } @@ -262,72 +245,45 @@ export class DebugInfo { } private static getIRNodeWholeLength(irnode: IRNode): number { - if (irnode instanceof Label || irnode instanceof DebugInsPlaceHolder) { + if (irnode instanceof Label || + irnode instanceof DebugInsStartPlaceHolder || + irnode instanceof DebugInsEndPlaceHolder) { return 0; } let length = 1; - if (!irnode.formats[0]) { + if (!irnode.getFormats()[0]) { return 0; } let formatIndex = this.matchFormat(irnode); - let formats = irnode.formats[formatIndex]; + let formats = irnode.getFormats()[formatIndex]; // count operands length for (let i = 0; i < formats.length; i++) { if ((irnode instanceof CalliDynRange) || (irnode instanceof CallRange)) { - length += formats[0].bitwidth / 8; // 8 indicates that one byte is composed of 8 bits - length += formats[1].bitwidth / 8; + length += formats[0][1] / 8; // 8 indicates that one byte is composed of 8 bits + length += formats[1][1] / 8; break; } - length += (formats[i].bitwidth / 8); + length += (formats[i][1] / 8); } return length; } - private static setVariablesDebugInfoInternal(pandaGen: PandaGen, scope: Scope) { - let insns = pandaGen.getInsns(); - // count variables offset - let startIdx = 0; - let startIns = scope.getScopeStartIns(); - let endIns = scope.getScopeEndIns(); - - for (let i = 0; i < insns.length; i++) { - if (startIns == insns[i]) { - startIdx = i; - } - - if (endIns == insns[i]) { - let name2variable = scope.getName2variable(); - name2variable.forEach((value, key) => { - if (!value.hasAlreadyBinded()) { - return; - } - let variableInfo = new VariableDebugInfo(key, "any", "any", (value.getVreg().num)); - variableInfo.setStart(startIdx); - variableInfo.setLength(i - startIdx + 1); - pandaGen.addDebugVariableInfo(variableInfo); - }); - } - } - } - private static setPosDebugInfo(pandaGen: PandaGen) { - let insns = pandaGen.getInsns(); + let insns: IRNode[] = pandaGen.getInsns(); let offset = 0; + // count pos offset for (let i = 0; i < insns.length; i++) { if (insns[i].debugPosInfo.getDebugPosInfoNodeState() == NodeKind.FirstNodeOfFunction) { DebugInfo.setPosInfoForUninitializeIns(insns[i].debugPosInfo, pandaGen); } - } - // count pos offset - for (let i = 0; i < insns.length; i++) { let insLength = DebugInfo.getIRNodeWholeLength(insns[i]); let insnsDebugPosInfo = insns[i].debugPosInfo; - if (insnsDebugPosInfo) { + if (insnsDebugPosInfo && CmdOptions.isDebugMode()) { insnsDebugPosInfo.setBoundLeft(offset); insnsDebugPosInfo.setBoundRight(offset + insLength); } @@ -340,20 +296,36 @@ export class DebugInfo { } } - private static removeDebugIns(pandaGen: PandaGen) { + private static setVariablesDebugInfo(pandaGen: PandaGen) { let insns = pandaGen.getInsns(); + for (let i = 0; i < insns.length; i++) { - if (insns[i] instanceof DebugInsPlaceHolder) { + if (insns[i] instanceof DebugInsStartPlaceHolder) { + ( insns[i]).getScope().setScopeStartInsIdx(i); + // delete ins placeholder + insns.splice(i, 1); + i--; + } + if (insns[i] instanceof DebugInsEndPlaceHolder) { + ( insns[i]).getScope().setScopeEndInsIdx(i); + // delete ins placeholder insns.splice(i, 1); i--; } } - } - private static setVariablesDebugInfo(pandaGen: PandaGen) { let recordArray = DebugInfo.getScopeArray(); recordArray.forEach(scope => { - DebugInfo.setVariablesDebugInfoInternal(pandaGen, scope); + let name2variable = scope.getName2variable(); + name2variable.forEach((value, key) => { + if (!value.hasAlreadyBinded()) { + return; + } + let variableInfo = new VariableDebugInfo(key, "any", "any", (value.getVreg().num)); + variableInfo.setStart(scope.getScopeStartInsIdx()); + variableInfo.setLength(scope.getScopeEndInsIdx() - scope.getScopeStartInsIdx()); + pandaGen.addDebugVariableInfo(variableInfo); + }); }); } @@ -364,9 +336,6 @@ export class DebugInfo { // set variable debug info DebugInfo.setVariablesDebugInfo(pandaGen); - // delete ins placeholder - DebugInfo.removeDebugIns(pandaGen) - // clear scope array DebugInfo.clearScopeArray(); return; @@ -387,24 +356,22 @@ export class DebugInfo { public static copyDebugInfo(insn: IRNode, expansion: IRNode[]) { - let debugPosInfo = insn.debugPosInfo; - for (let j = 0; j < expansion.length; j++) { - expansion[j].debugPosInfo = debugPosInfo; - } + expansion.forEach(irNode => irNode.debugPosInfo = insn.debugPosInfo); } public static addDebugIns(scope: Scope, pandaGen: PandaGen, isStart: boolean) { if (!CmdOptions.isDebugMode()) { return; } + let insns = pandaGen.getInsns(); - let placeHolder = new DebugInsPlaceHolder(); - insns.push(placeHolder); + let placeHolder: IRNode; if (isStart) { - scope.setScopeStartIns(placeHolder); + placeHolder = new DebugInsStartPlaceHolder(scope); DebugInfo.addScope(scope); } else { - scope.setScopeEndIns(placeHolder); + placeHolder = new DebugInsEndPlaceHolder(scope); } + insns.push(placeHolder); } } diff --git a/ts2panda/src/ecmaModule.ts b/ts2panda/src/ecmaModule.ts new file mode 100644 index 0000000000000000000000000000000000000000..dae40da02d08e5c7445fd0d62535eb3ccb343034 --- /dev/null +++ b/ts2panda/src/ecmaModule.ts @@ -0,0 +1,225 @@ +import * as ts from "typescript"; +import { PandaGen } from "./pandagen"; +import { DiagnosticCode, DiagnosticError } from "./diagnostic"; +import { ModuleScope, Scope } from "./scope"; +import { getSourceFileOfNode } from "./jshelpers"; +import { LReference } from "./base/lreference"; +import { Compiler } from "./compiler"; + +class Entry { + node: ts.Node; + exportName: string | undefined; + localName: string | undefined; + importName: string | undefined; + moduleRequest: number = -1; + + constructor(node: ts.Node, exportName: string | undefined, localName: string | undefined, importName: string | undefined, moduleRequest?: number) { + this.node = node; + this.exportName = exportName; + this.localName = localName; + this.importName = importName; + if (moduleRequest !== undefined) { + this.moduleRequest = moduleRequest; + } + } +} + +export class SourceTextModuleRecord { + private moduleName: string; + private moduleRequests: Array = []; + private moduleRequestIdxMap: Map = new Map(); + + private regularImportEntries: Map = new Map(); + private namespaceImportEntries: Array = []; + + private localExportEntries: Map> = new Map>(); + private starExportEntries: Array = []; + private indirectExportEntries: Array = []; + + constructor(moduleName: string) { + this.moduleName = moduleName; + } + + addModuleRequest(moduleRequest: string): number { + if (this.moduleRequestIdxMap.has(moduleRequest)) { + return this.moduleRequestIdxMap.get(moduleRequest)!; + } + let index = this.moduleRequests.length; + this.moduleRequests.push(moduleRequest); + this.moduleRequestIdxMap.set(moduleRequest, index); + return index; + } + + // import x from 'test.js'; + // import {x} from 'test.js'; + // import {x as y} from 'test.js'; + // import defaultExport from 'test.js' + addImportEntry(node: ts.Node, importName: string, localName: string, moduleRequest: string) { + let importEntry: Entry = new Entry(node, undefined, localName, importName, this.addModuleRequest(moduleRequest)); + // We don't care if there's already an entry for this local name, as in that + // case we will report an error when declaring the variable. + this.regularImportEntries.set(localName, importEntry); + } + + // import 'test.js' + // import {} from 'test.js' + // export {} from 'test.js' + addEmptyImportEntry(moduleRequest: string) { + this.addModuleRequest(moduleRequest); + } + + // import * as x from 'test.js'; + addStarImportEntry(node: ts.Node, localName: string, moduleRequest: string) { + let starImportEntry: Entry = new Entry(node, undefined, localName, undefined, this.addModuleRequest(moduleRequest)); + this.namespaceImportEntries.push(starImportEntry); + } + + // export {x}; + // export {x as y}; + // export VariableStatement + // export Declaration + // export default ... + addLocalExportEntry(node: ts.Node, exportName: string, localName: string) { + let localExportEntry: Entry = new Entry(node, exportName, localName, undefined); + if (this.localExportEntries.has(localName)) { + this.localExportEntries.get(localName)!.push(localExportEntry); + } else { + this.localExportEntries.set(localName, [localExportEntry]); + } + } + + // export {x} from 'test.js'; + // export {x as y} from 'test.js'; + // import { x } from 'test.js'; export { x } + addIndirectExportEntry(node: ts.Node, importName: string, exportName: string, moduleRequest: string) { + let indirectExportEntry: Entry = new Entry(node, exportName, undefined, importName, this.addModuleRequest(moduleRequest)); + this.indirectExportEntries.push(indirectExportEntry); + } + + // export * from 'test.js'; + addStarExportEntry(node: ts.Node, moduleRequest: string) { + let starExportEntry: Entry = new Entry(node, undefined, undefined, undefined, this.addModuleRequest(moduleRequest)); + this.starExportEntries.push(starExportEntry); + } + + getModuleName() { + return this.moduleName; + } + + getModuleRequests() { + return this.moduleRequests; + } + + getRegularImportEntries() { + return this.regularImportEntries; + } + + getNamespaceImportEntries() { + return this.namespaceImportEntries; + } + + getLocalExportEntries() { + return this.localExportEntries; + } + + getStarExportEntries() { + return this.starExportEntries; + } + + getIndirectExportEntries() { + return this.indirectExportEntries; + } + + makeIndirectExportsExplicit() { + // @ts-ignore + this.localExportEntries.forEach((entries: Array, localName: string) => { + for (let idx = 0; idx < entries.length;) { + let importEntry: Entry | undefined = this.regularImportEntries.get(entries[idx].localName!); + // get an indirect export entry + if (importEntry) { + entries[idx].importName = importEntry.importName; + entries[idx].moduleRequest = importEntry.moduleRequest; + entries[idx].localName = undefined; + + this.indirectExportEntries.push(entries[idx]); + entries.splice(idx, 1); + } else { + idx += 1; + } + } + }); + } + + nextDuplicateExportEntry(candidate: Entry, exportNameEntry: Map, currentCandidate: Entry | undefined) { + if (!exportNameEntry.has(candidate.exportName!)) { + exportNameEntry.set(candidate.exportName!, candidate); + return currentCandidate; + } + + if (currentCandidate === undefined) { + currentCandidate = candidate; + } + + return candidate.node.pos > currentCandidate.node.pos ? candidate : currentCandidate; + } + + searchDuplicateExport(): Entry | undefined { + let duplicateEntry: Entry | undefined; + let exportNameEntry: Map = new Map(); + + // @ts-ignore + this.localExportEntries.forEach((entries: Array, localName: string) => { + entries.forEach((e: Entry) => { + duplicateEntry = this.nextDuplicateExportEntry(e, exportNameEntry, duplicateEntry); + }); + }); + + this.indirectExportEntries.forEach((e: Entry) => { + duplicateEntry = this.nextDuplicateExportEntry(e, exportNameEntry, duplicateEntry); + }); + + return duplicateEntry; + } + + validateModuleRecordEntries(moduleScope: ModuleScope) { + // check module is well-formed and report errors if not + { + let dupExportEntry: Entry | undefined = this.searchDuplicateExport(); + if (dupExportEntry !== undefined) { + throw new DiagnosticError(dupExportEntry.node, DiagnosticCode.Module_0_has_already_exported_a_member_named_1, getSourceFileOfNode(dupExportEntry.node), [getSourceFileOfNode(dupExportEntry.node).fileName, dupExportEntry.exportName]); + } + } + + this.localExportEntries.forEach((entry: Array, localName: string) => { + if (!moduleScope.hasDecl(localName) && localName != '*default*') { + throw new DiagnosticError(entry[0].node, DiagnosticCode.Module_0_has_no_exported_member_1, getSourceFileOfNode(entry[0].node), [getSourceFileOfNode(entry[0].node).fileName, localName]); + } + }); + + this.makeIndirectExportsExplicit(); + } + + setExportedDecls(moduleScope: ModuleScope) { + // @ts-ignore + this.localExportEntries.forEach((entry: Array, localName: string) => { + moduleScope.setExportDecl(localName); + }) + } + + setModuleEnvironment(moduleScope: ModuleScope) { + this.validateModuleRecordEntries(moduleScope); + this.setExportedDecls(moduleScope); + } +} + +export function setModuleNamespaceImports(compiler: Compiler, moduleScope: Scope, pandagen: PandaGen) { + if (!(moduleScope instanceof ModuleScope)) { + return; + } + + moduleScope.module().getNamespaceImportEntries().forEach(entry => { + let namespace_lref = LReference.generateLReference(compiler, (entry.node).name, true); + pandagen.getModuleNamespace(entry.node, entry.localName!); + namespace_lref.setValue(); + }); +} \ No newline at end of file diff --git a/ts2panda/src/expression/callExpression.ts b/ts2panda/src/expression/callExpression.ts index 90603bedb619465bb43a664bf77d84df4f699d39..ef5336575c466d9a04be4cb3fa493890938bde15 100644 --- a/ts2panda/src/expression/callExpression.ts +++ b/ts2panda/src/expression/callExpression.ts @@ -14,15 +14,16 @@ */ import * as ts from "typescript"; +import { isMemberExpression } from "../base/util"; import { CacheList, getVregisterCache } from "../base/vregisterCache"; import { Compiler } from "../compiler"; import { VReg } from "../irnodes"; import { compileSuperCall, compileSuperProperty } from "../statement/classStatement"; import { createArrayFromElements } from "./arrayLiteralExpression"; import { getObjAndProp } from "./memberAccessExpression"; -import { isMemberExpression } from "../base/util"; +// @ts-ignore export function compileCallExpression(expr: ts.CallExpression, compiler: Compiler, inTailPos?: boolean) { let pandaGen = compiler.getPandaGen(); // import call should be supported further @@ -58,6 +59,7 @@ export function getHiddenParameters(expr: ts.Expression, compiler: Compiler) { passThis = true; let thisReg = pandaGen.getTemp(); let propReg = pandaGen.getTemp(); + // @ts-ignore let { obj: obj, prop: prop } = getObjAndProp(expr, thisReg, propReg, compiler); if ((expr).expression.kind == ts.SyntaxKind.SuperKeyword) { diff --git a/ts2panda/src/function/asyncFunctionBuilder.ts b/ts2panda/src/function/asyncFunctionBuilder.ts index 63b68879fc771ab0bdbc199928cda416dd88c561..5c29ae1f70095b9771722685ee45000b46087559 100644 --- a/ts2panda/src/function/asyncFunctionBuilder.ts +++ b/ts2panda/src/function/asyncFunctionBuilder.ts @@ -13,7 +13,7 @@ * limitations under the License. */ -import ts from "typescript"; +import * as ts from "typescript"; import { CacheList, getVregisterCache } from "../base/vregisterCache"; import { NodeKind } from "../debuginfo"; import { diff --git a/ts2panda/src/function/functionBuilder.ts b/ts2panda/src/function/functionBuilder.ts old mode 100755 new mode 100644 index 0d56c987cbf2906e5a6ca597088fe9d58285153f..f05185a8e159f2d17fc4a7425d63fb70250bfb7c --- a/ts2panda/src/function/functionBuilder.ts +++ b/ts2panda/src/function/functionBuilder.ts @@ -20,9 +20,11 @@ import { AsyncFunctionBuilder } from "./asyncFunctionBuilder"; export type FunctionBuilderType = AsyncFunctionBuilder | GeneratorFunctionBuilder | FunctionBuilder; export class FunctionBuilder { + // @ts-ignore prepare(node: ts.Node): void { } + // @ts-ignore cleanUp(node: ts.Node): void { } } \ No newline at end of file diff --git a/ts2panda/src/function/generatorFunctionBuilder.ts b/ts2panda/src/function/generatorFunctionBuilder.ts index 73a26c6be44ff69a8472f50db41a2eea4feec2d8..b7297aebd1462233cc4ef8002c0448c3d4f006cc 100755 --- a/ts2panda/src/function/generatorFunctionBuilder.ts +++ b/ts2panda/src/function/generatorFunctionBuilder.ts @@ -14,7 +14,7 @@ */ import { Scope } from "src/scope"; -import ts from "typescript"; +import * as ts from "typescript"; import { CacheList, getVregisterCache } from "../base/vregisterCache"; import { Compiler, ControlFlowChange } from "../compiler"; import { @@ -47,8 +47,8 @@ export class GeneratorFunctionBuilder { prepare(node: ts.Node, recorder: Recorder) { let pandaGen = this.pandaGen; + // @ts-ignore let scope = recorder.getScopeOfNode(node); - let funcObj = scope.getName2variable().get("4funcObj")!.getVreg(); // backend handle funcobj, frontend set undefined pandaGen.createGeneratorObj(node, getVregisterCache(pandaGen, CacheList.FUNC)); diff --git a/ts2panda/src/hoisting.ts b/ts2panda/src/hoisting.ts index c18cab39dc057896cf695d6ed7f4b1d3f92c6c6d..2ff281e88df7387a6ae55e7a98bf235d823ed7e6 100644 --- a/ts2panda/src/hoisting.ts +++ b/ts2panda/src/hoisting.ts @@ -14,7 +14,6 @@ */ import * as ts from "typescript"; -import { hasExportKeywordModifier, hasDefaultKeywordModifier } from "./base/util"; import { CacheList, getVregisterCache } from "./base/vregisterCache"; import { Compiler } from "./compiler"; import { CompilerDriver } from "./compilerDriver"; @@ -27,14 +26,14 @@ import { GlobalScope, LocalScope, ModuleScope, + ModuleVarKind, Scope, VarDecl, VariableScope } from "./scope"; -import { LocalVariable } from "./variable"; export function hoisting(rootNode: ts.SourceFile | ts.FunctionLikeDeclaration, pandaGen: PandaGen, - recorder: Recorder, compiler: Compiler) { + recorder: Recorder, compiler: Compiler) { let variableScope = recorder.getScopeOfNode(rootNode); let hoistDecls = recorder.getHoistDeclsOfScope(variableScope); @@ -59,7 +58,11 @@ export function hoistVar(decl: VarDecl, scope: Scope, pandaGen: PandaGen) { } else if (scope instanceof FunctionScope || scope instanceof ModuleScope) { let v = scope.findLocal(name)!; pandaGen.loadAccumulator(NodeKind.FirstNodeOfFunction, getVregisterCache(pandaGen, CacheList.undefined)); - pandaGen.storeAccToLexEnv(NodeKind.FirstNodeOfFunction, scope, 0, v, true); + if (decl.isModule !== ModuleVarKind.NOT) { + pandaGen.storeModuleVariable(NodeKind.FirstNodeOfFunction, name); + } else { + pandaGen.storeAccToLexEnv(NodeKind.FirstNodeOfFunction, scope, 0, v, true); + } } else { throw new Error("Wrong scope to hoist"); } @@ -74,19 +77,13 @@ export function hoistFunction(decl: FuncDecl, scope: Scope, pandaGen: PandaGen, pandaGen.defineFunction(NodeKind.FirstNodeOfFunction, decl.node, internalName, env); pandaGen.storeGlobalVar(NodeKind.FirstNodeOfFunction, funcName); } else if ((scope instanceof FunctionScope) || (scope instanceof LocalScope) || (scope instanceof ModuleScope)) { - let hasExport: boolean = hasExportKeywordModifier(decl.node); - let hasDefault: boolean = hasDefaultKeywordModifier(decl.node); let v = scope.findLocal(funcName)!; - if (hasExport && scope instanceof ModuleScope) { - (v).setExport(); - if (hasDefault) { - (v).setExportedName("default"); - } else { - (v).setExportedName(v.getName()); - } - } pandaGen.defineFunction(NodeKind.FirstNodeOfFunction, decl.node, internalName, env); - pandaGen.storeAccToLexEnv(NodeKind.FirstNodeOfFunction, scope, 0, v, true); + if (decl.isModule !== ModuleVarKind.NOT) { + pandaGen.storeModuleVariable(NodeKind.FirstNodeOfFunction, funcName); + } else { + pandaGen.storeAccToLexEnv(NodeKind.FirstNodeOfFunction, scope, 0, v, true); + } } else { throw new Error("Wrong scope to hoist"); } diff --git a/ts2panda/src/index.ts b/ts2panda/src/index.ts index 0c4ef703815165fb00d5b7a78df50858f7b434e6..0342f1b209652bcb479226de6035d6e1ab5dfd99 100644 --- a/ts2panda/src/index.ts +++ b/ts2panda/src/index.ts @@ -13,20 +13,16 @@ * limitations under the License. */ +import * as path from "path"; import * as ts from "typescript"; +import * as fs from "fs"; import { CmdOptions } from "./cmdOptions"; import { CompilerDriver } from "./compilerDriver"; import * as diag from "./diagnostic"; -import { LOGD, LOGE } from "./log"; -import { Pass } from "./pass"; -import { CacheExpander } from "./pass/cacheExpander"; -import { ICPass } from "./pass/ICPass"; -import { RegAlloc } from "./regAllocator"; -import { setGlobalStrict, setGlobalDeclare, isGlobalDeclare } from "./strictMode"; +import * as jshelpers from "./jshelpers"; +import { LOGE } from "./log"; +import { setGlobalDeclare, setGlobalStrict } from "./strictMode"; import { TypeChecker } from "./typeChecker"; -import { TypeRecorder } from "./typeRecorder"; -import jshelpers = require("./jshelpers"); -import path = require("path"); import { setPos } from "./base/util"; function checkIsGlobalDeclaration(sourceFile: ts.SourceFile) { @@ -50,15 +46,6 @@ function generateDTs(node: ts.SourceFile, options: ts.CompilerOptions) { let outputBinName = getOutputBinName(node); let compilerDriver = new CompilerDriver(outputBinName); setGlobalStrict(jshelpers.isEffectiveStrictModeSourceFile(node, options)); - if (CmdOptions.isVariantBytecode()) { - LOGD("variant bytecode dump"); - let passes: Pass[] = [ - new CacheExpander(), - new ICPass(), - new RegAlloc() - ]; - compilerDriver.setCustomPasses(passes); - } compilerDriver.compile(node); compilerDriver.showStatistics(); } @@ -84,6 +71,7 @@ function main(fileNames: string[], options: ts.CompilerOptions) { undefined, { before: [ + // @ts-ignore (ctx: ts.TransformationContext) => { return (node: ts.SourceFile) => { let outputBinName = getOutputBinName(node); @@ -94,6 +82,7 @@ function main(fileNames: string[], options: ts.CompilerOptions) { } ], after: [ + // @ts-ignore (ctx: ts.TransformationContext) => { return (node: ts.SourceFile) => { if (ts.getEmitHelpers(node)) { @@ -113,15 +102,6 @@ function main(fileNames: string[], options: ts.CompilerOptions) { let outputBinName = getOutputBinName(node); let compilerDriver = new CompilerDriver(outputBinName); setGlobalStrict(jshelpers.isEffectiveStrictModeSourceFile(node, options)); - if (CmdOptions.isVariantBytecode()) { - LOGD("variant bytecode dump"); - let passes: Pass[] = [ - new CacheExpander(), - new ICPass(), - new RegAlloc() - ]; - compilerDriver.setCustomPasses(passes); - } compilerDriver.compile(node); compilerDriver.showStatistics(); return node; @@ -155,6 +135,25 @@ function getOutputBinName(node: ts.SourceFile) { return outputBinName; } +function getDtsFiles(libDir: string): string[] { + let dtsFiles:string[] = []; + function finDtsFile(dir){ + let files = fs.readdirSync(dir); + files.forEach(function (item, _) { + let fPath = path.join(dir,item); + let stat = fs.statSync(fPath); + if(stat.isDirectory() === true) { + finDtsFile(fPath); + } + if (stat.isFile() === true && item.endsWith(".d.ts") === true) { + dtsFiles.push(fPath); + } + }); + } + finDtsFile(libDir); + return dtsFiles; +} + namespace Compiler { export namespace Options { export let Default: ts.CompilerOptions = { @@ -166,7 +165,8 @@ namespace Compiler { module: ts.ModuleKind.ES2015, strictNullChecks: true, skipLibCheck: true, - alwaysStrict: true + alwaysStrict: true, + importsNotUsedAsValues: ts.ImportsNotUsedAsValues.Preserve }; } } @@ -200,5 +200,7 @@ function run(args: string[], options?: ts.CompilerOptions): void { } } +let dtsFiles = getDtsFiles(path["join"](__dirname, "../node_modules/typescript/lib")); +process.argv.push(...dtsFiles); run(process.argv.slice(2), Compiler.Options.Default); global.gc(); diff --git a/ts2panda/src/intrinsicExpander.ts b/ts2panda/src/intrinsicExpander.ts deleted file mode 100644 index cefb3c22b00827f153780142726c92ac15de9ed8..0000000000000000000000000000000000000000 --- a/ts2panda/src/intrinsicExpander.ts +++ /dev/null @@ -1,192 +0,0 @@ -/* - * Copyright (c) 2021 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { AssemblyDumper, IntrinsicInfo } from "./assemblyDumper"; -import { DebugInfo } from "./debuginfo"; -import { - Call, - CallRange, - CallShort, - FldaiDyn, - Imm, - Intrinsic, - IRNode, - LdaiDyn, - LdaStr, - OperandKind, - ResultDst, - ResultType, - StaDyn, - VReg -} from "./irnodes"; -import { PandaGen } from "./pandagen"; -import { Pass } from "./pass"; - -export class IntrinsicExpanderInternal { - private temps: VReg[] = []; - - getTemp(): VReg { - if (this.temps.length > 0) { - return this.temps.pop()!; - } else { - return new VReg(); - } - } - - freeTemps(temps: VReg[]) { - this.temps = this.temps.concat(temps); - } - - // this method records the intrinsic usage during the whole source code - // it can help dumper to write the intrinsic function declaration in the front of bytecode - intrinsicDeclRec(ins: Intrinsic) { - let intrinsicName = ins.mnemonic; - let argsNum = ins.operands.length; - let resultType: string = ""; - if (ins.resultIn() == ResultDst.None) { - resultType = "void"; - } else if (ins.resultIn() == ResultDst.Acc) { - resultType = "any"; - } else { - throw new Error("resultType of" + ins.resultIn() + "is not implement"); - } - let intrinsicInfo = new IntrinsicInfo(intrinsicName, argsNum, resultType); - AssemblyDumper.intrinsicRec.set(ins.mnemonic, intrinsicInfo); - } - - // Transforms a synthetic "intrinsic instruction" into an intrinsic function call. - // Returns an array of instructions forming intrinsic call and - // an array of temporary registers used for expansion. - expandInstruction(ins: Intrinsic): [IRNode[], VReg[]] { - let operands = ins.operands; - let formats = ins.formats; - let expansion: IRNode[] = []; - let callArgs: VReg[] = []; - let tempVregs: VReg[] = []; - - let intrinsicName = "Ecmascript.Intrinsics." + ins.mnemonic; - - // Walk the rest of the arguments. - for (let i = 0; i < operands.length; ++i) { - let format = formats[0]; - let kind: OperandKind; - kind = format[i].kind; - - let operand = operands[i]; - - if (kind === OperandKind.SrcVReg) { - callArgs.push(operand); - continue; - } - - // Imm has to be put into a vreg to be passed to intrinsic. - // for defineFuncDyn - if (kind === OperandKind.Imm) { - let tempImm: VReg = this.getTemp(); - let imm = operand; - let type = imm.resultType(); - if (type == ResultType.Int || type == ResultType.Long) { - expansion.push(new LdaiDyn(imm)); - } else if (type == ResultType.Float) { - expansion.push(new FldaiDyn(imm)); - } else { - throw new Error("Unexpected result type for an Imm"); - } - expansion.push(new StaDyn(tempImm)); - callArgs.push(tempImm); - tempVregs.push(tempImm); - continue; - } - - // Put id into vreg as a string object. - if (kind === OperandKind.Id) { - let tempId: VReg = this.getTemp(); - expansion.push(new LdaStr(operand)); - expansion.push(new StaDyn(tempId)); - callArgs.push(tempId); - tempVregs.push(tempId); - continue; - } - - // For simplicity, intrinsics shall not have destinations other than accumulator. - // Also, no labels are allowed as operands. - if (kind === OperandKind.DstVReg - || kind === OperandKind.SrcDstVReg - || ins.resultIn() === ResultDst.VReg) { - throw new Error("Intrinsic " + ins.mnemonic + " has unexpected operand kinds"); - } else { - throw new Error("Unknown operand kind for intrinsic " + ins.mnemonic); - } - } - - // Call the intrinsic. - switch (callArgs.length) { - case 0: - expansion.push(new CallShort(intrinsicName)); - break; - case 1: - expansion.push(new CallShort(intrinsicName, callArgs[0])); - break; - case 2: - expansion.push(new CallShort(intrinsicName, callArgs[0], callArgs[1])); - break; - case 3: - expansion.push(new Call(intrinsicName, callArgs[0], callArgs[1], callArgs[2])); - break; - case 4: - expansion.push(new Call(intrinsicName, callArgs[0], callArgs[1], callArgs[2], callArgs[3])); - break; - default: - expansion.push(new CallRange(intrinsicName, callArgs)); - } - return [expansion, tempVregs]; - } - - run(pg: PandaGen): void { - let insns: IRNode[] = pg.getInsns(); - let origTemps: VReg[] = pg.getTemps(); - - for (let i = 0; i < insns.length; ++i) { - let ins: IRNode = insns[i]; - if (ins instanceof Intrinsic) { - // record the intrinsic - if (!AssemblyDumper.intrinsicRec.has(ins.mnemonic)) { - this.intrinsicDeclRec(ins); - } - - let [expansion, temps] = this.expandInstruction(ins); - - // for debuginfo - DebugInfo.copyDebugInfo(insns[i], expansion); - - insns.splice(i, 1, ...expansion); - // Since we put something into the original array, its length changed. - // Skip what we've just added. - let step = expansion.length - 1; - i += step; - - this.freeTemps(temps); - } - } - // We need extra registers in the function. - origTemps.push(...this.temps); - } -} -export class IntrinsicExpander implements Pass { - run(pg: PandaGen): void { - let intrinsicExpanderInternal = new IntrinsicExpanderInternal(); - intrinsicExpanderInternal.run(pg); - } -} diff --git a/ts2panda/src/lexenv.ts b/ts2panda/src/lexenv.ts index d4c1cc77760c973702b96b8a651974effd2fb03f..bcc822013dc3b519af8219dafa335560f415172a 100644 --- a/ts2panda/src/lexenv.ts +++ b/ts2panda/src/lexenv.ts @@ -13,14 +13,13 @@ * limitations under the License. */ -import ts from "typescript"; +import * as ts from "typescript"; import { loadAccumulator, loadAccumulatorString, loadLexicalVar, storeAccumulator, storeLexicalVar, - storeModuleVariable, throwConstAssignment, throwUndefinedIfHole } from "./base/bcGenUtil"; @@ -37,7 +36,7 @@ import { LocalVariable, Variable } from "./variable"; -import jshelpers from "./jshelpers"; +import * as jshelpers from "./jshelpers"; abstract class VariableAccessBase { variable: Variable; @@ -93,10 +92,9 @@ export class VariableAccessLoad extends VariableAccessBase { return insns; } if (v.getName() === "4funcObj") { - insns.push(loadAccumulator(getVregisterCache(pandaGen, CacheList.FUNC))); - } else { - insns.push(loadAccumulator(bindVreg)); + this.scope.setCallOpt("4funcObj") } + insns.push(loadAccumulator(bindVreg)); return insns; } @@ -109,7 +107,7 @@ export class VariableAccessLoad extends VariableAccessBase { insns.push(loadLexicalVar(this.level, slot)); // check TDZ - if (v.isLetOrConst()) { + if (v.isLetOrConst() || v.isClass()) { let tempReg = pandaGen.getTemp(); insns.push(storeAccumulator(tempReg)); @@ -162,11 +160,10 @@ export class VariableAcessStore extends VariableAccessBase { checkConstAssignment(pandaGen, v, insns, this.node); } - insns.push(storeAccumulator(bindVreg)); - - if (v.isExportVar()) { - insns.push(storeModuleVariable(v.getExportedName())); + if (v.getName() === "4funcObj") { + this.scope.setCallOpt("4funcObj") } + insns.push(storeAccumulator(bindVreg)); return insns; } @@ -200,9 +197,7 @@ export class VariableAcessStore extends VariableAccessBase { insns.push(storeLexicalVar(this.level, slot, valueReg)); insns.push(loadAccumulator(valueReg)); - if (v.isExportVar()) { - insns.push(storeModuleVariable(v.getExportedName())); - } + pandaGen.freeTemps(valueReg); return insns; @@ -246,4 +241,4 @@ function checkConstAssignment(pg: PandaGen, v: Variable, expansion: IRNode[], no } pg.freeTemps(nameReg); -} \ No newline at end of file +} diff --git a/ts2panda/src/modules.ts b/ts2panda/src/modules.ts index 8e1ea468a7997abc8d56396a510f4141e71c6a66..ddb83fa5f66b384e1b908eabbc7591be3c84a84d 100644 --- a/ts2panda/src/modules.ts +++ b/ts2panda/src/modules.ts @@ -13,12 +13,10 @@ * limitations under the License. */ +// [delete it when type system adapts for ESM] import * as ts from "typescript"; -import { PandaGen } from "./pandagen"; -import jshelpers from "./jshelpers"; -import { LocalVariable } from "./variable"; +import * as jshelpers from "./jshelpers"; import { DiagnosticCode, DiagnosticError } from "./diagnostic"; -import { ModuleScope } from "./scope"; export class ModuleStmt { private node: ts.Node @@ -76,63 +74,3 @@ export class ModuleStmt { return this.isCopy; } } - -export function setImport(importStmts: Array, moduleScope: ModuleScope, pandagen: PandaGen) { - importStmts.forEach((importStmt) => { - pandagen.importModule(importStmt.getNode(), importStmt.getModuleRequest()); - // import * as xxx from "a.js" - if (importStmt.getNameSpace()) { - let v = moduleScope.findLocal(importStmt.getNameSpace())!; - pandagen.storeAccToLexEnv(importStmt.getNode(), moduleScope, 0, v, true); - (v).initialize(); - } - - // import { ... } from "a.js" - // import defaultExport, * as a from "a.js" - let moduleReg = pandagen.allocLocalVreg(); - pandagen.storeAccumulator(importStmt.getNode(), moduleReg); - - let bindingNameMap = importStmt.getBindingNameMap(); - bindingNameMap.forEach((value: string, key: string) => { - let v = moduleScope.findLocal(key)!; - pandagen.loadModuleVariable(importStmt.getNode(), moduleReg, value); - pandagen.storeAccToLexEnv(importStmt.getNode(), moduleScope, 0, v, true); - (v).initialize(); - }); - }) -} - -export function setExportBinding(exportStmts: Array, moduleScope: ModuleScope, pandagen: PandaGen) { - exportStmts.forEach((exportStmt) => { - if (exportStmt.getModuleRequest()) { - pandagen.importModule(exportStmt.getNode(), exportStmt.getModuleRequest()); - let moduleReg = pandagen.allocLocalVreg(); - pandagen.storeAccumulator(exportStmt.getNode(), moduleReg); - - if (!exportStmt.getCopyFlag()) { - if (exportStmt.getNameSpace()) { - pandagen.storeModuleVar(exportStmt.getNode(), exportStmt.getNameSpace()); - } - - let bindingNameMap = exportStmt.getBindingNameMap(); - bindingNameMap.forEach((value: string, key: string) => { - pandagen.loadModuleVariable(exportStmt.getNode(), moduleReg, value); - pandagen.storeModuleVar(exportStmt.getNode(), key); - }); - } else { - pandagen.copyModule(exportStmt.getNode(), moduleReg); - } - } else { - let bindingNameMap = exportStmt.getBindingNameMap(); - bindingNameMap.forEach((value: string, key: string) => { - let v = moduleScope.findLocal(value); - if (typeof v == 'undefined') { - throw new DiagnosticError(exportStmt.getNode(), DiagnosticCode.Cannot_export_0_Only_local_declarations_can_be_exported_from_a_module, jshelpers.getSourceFileOfNode(exportStmt.getNode()), [value]); - } - - (v).setExport(); - (v).setExportedName(key); - }); - } - }) -} \ No newline at end of file diff --git a/ts2panda/src/pandagen.ts b/ts2panda/src/pandagen.ts index 51a48dc3856c26ddd72b786157e0d5e301e1e96e..64813bdc346615b15eb7942f6c7b753e3d12fb5f 100644 --- a/ts2panda/src/pandagen.ts +++ b/ts2panda/src/pandagen.ts @@ -30,7 +30,6 @@ import { call, closeIterator, copyDataProperties, - copyModuleIntoCurrentModule, creatDebugger, createArrayWithBuffer, createEmptyArray, @@ -51,7 +50,7 @@ import { getIteratorNext, getNextPropName, getPropIterator, - importModule, + getModuleNamespace, isFalse, isTrue, jumpTarget, @@ -63,9 +62,8 @@ import { loadAccumulatorString, loadGlobalVar, loadHomeObject, - loadLexicalEnv, loadLexicalVar, - loadModuleVarByName, + loadModuleVariable, loadObjByIndex, loadObjByName, loadObjByValue, @@ -93,6 +91,7 @@ import { stSuperByValue, superCall, superCallSpread, + throwConstAssignment, throwDeleteSuperProperty, throwException, throwIfNotObject, @@ -104,7 +103,12 @@ import { tryStoreGlobalByName, loadAccumulatorBigInt } from "./base/bcGenUtil"; -import { LiteralBuffer } from "./base/literal"; +import { + Literal, + LiteralBuffer, + LiteralTag +} from "./base/literal"; +import { BaseType } from "./base/typeSystem"; import { getParamLengthOfFunc } from "./base/util"; import { CacheList, @@ -165,7 +169,6 @@ import { IRNode, Jeqz, Label, - ResultType, ReturnDyn, VReg } from "./irnodes"; @@ -181,13 +184,11 @@ import { VariableScope } from "./scope"; import { CatchTable } from "./statement/tryStatement"; -import { - Variable -} from "./variable"; -import { BaseType } from "./base/typeSystem"; import { TypeRecorder } from "./typeRecorder"; +import { Variable } from "./variable"; export class PandaGen { + // @ts-ignore private debugTag: string = "PandaGen"; readonly internalName: string; private parametersCount: number; @@ -203,7 +204,6 @@ export class PandaGen { private firstStmt: ts.Statement | undefined; private sourceFileDebugInfo: string = ""; private sourceCodeDebugInfo: string | undefined; - private icSize: number = 0; private callType: number = 0; private static literalArrayBuffer: Array = new Array(); @@ -215,6 +215,25 @@ export class PandaGen { this.vregisterCache = new VregisterCache(); } + public appendScopeInfo(lexVarInfo: Map): number | undefined { + if (lexVarInfo.size == 0) { + return undefined; + } + + let scopeInfoIdx: number | undefined = undefined; + scopeInfoIdx = PandaGen.getLiteralArrayBuffer().length; + let scopeInfo = new LiteralBuffer(); + let scopeInfoLiterals = new Array(); + scopeInfoLiterals.push(new Literal(LiteralTag.INTEGER, lexVarInfo.size)); + lexVarInfo.forEach((slot: number, name: string) => { + scopeInfoLiterals.push(new Literal(LiteralTag.STRING, name)); + scopeInfoLiterals.push(new Literal(LiteralTag.INTEGER, slot)); + }); + scopeInfo.addLiterals(...scopeInfoLiterals); + PandaGen.getLiteralArrayBuffer().push(scopeInfo); + return scopeInfoIdx; + } + public setCallType(callType: number) { this.callType = callType; } @@ -222,7 +241,7 @@ export class PandaGen { public getCallType(): number { return this.callType; } - + static getExportedTypes() { if (TypeRecorder.getInstance()) { return TypeRecorder.getInstance().getExportedType(); @@ -277,14 +296,6 @@ export class PandaGen { } } - getICSize() { - return this.icSize; - } - - setICSize(total: number) { - this.icSize = total; - } - static appendTypeArrayBuffer(type: BaseType): number { let index = PandaGen.literalArrayBuffer.length; PandaGen.literalArrayBuffer.push(type.transfer2LiteralBuffer()); @@ -349,20 +360,10 @@ export class PandaGen { retval = new VReg(); } - if (CmdOptions.isEnableDebugLog()) { - if (retval.getStackTrace() !== undefined) { - throw new Error("stack trace of new temp register is not empty"); - } - retval.setStackTrace(); - } return retval; } freeTemps(...temps: VReg[]) { - if (CmdOptions.isEnableDebugLog()) - for (let value of temps) - value.setStackTrace(null); - this.temps.unshift(...temps); } @@ -370,6 +371,10 @@ export class PandaGen { return this.insns; } + setInsns(insns: IRNode[]) { + this.insns = insns; + } + printInsns() { LOGE("function " + this.internalName + "() {"); this.getInsns().forEach(ins => { @@ -435,21 +440,18 @@ export class PandaGen { } createLexEnv(node: ts.Node, env: VReg, scope: VariableScope | LoopScope) { - let needCreateNewEnv = scope.need2CreateLexEnv(); let numVars = scope.getNumLexEnv(); - if (needCreateNewEnv) { - this.add( - node, - newLexicalEnv(numVars), - storeAccumulator(env) - ) - } else { - this.add( - node, - loadLexicalEnv(), - storeAccumulator(env) - ) + let scopeInfoIdx: number | undefined = undefined; + let lexVarInfo = scope.getLexVarInfo(); + if (CmdOptions.isDebugMode()) { + scopeInfoIdx = this.appendScopeInfo(lexVarInfo); } + + this.add( + node, + newLexicalEnv(numVars, scopeInfoIdx), + storeAccumulator(env) + ) } popLexicalEnv(node: ts.Node) { @@ -655,6 +657,7 @@ export class PandaGen { this.add(node, moveVreg(vd, vs)); } + // @ts-ignore label(node: ts.Node, label: Label) { this.add(NodeKind.FirstNodeOfFunction, label); } @@ -875,6 +878,10 @@ export class PandaGen { this.add(node, throwDeleteSuperProperty()); } + throwConstAssignment(node: ts.Node, nameReg: VReg) { + this.add(node, throwConstAssignment(nameReg)); + } + return(node: ts.Node | NodeKind) { this.add(node, new ReturnDyn()); } @@ -1011,7 +1018,7 @@ export class PandaGen { } copyRestArgs(node: ts.Node, index: number) { - this.add(node, new EcmaCopyrestargs(new Imm(ResultType.Int, index))); + this.add(node, new EcmaCopyrestargs(new Imm(index))); } getPropIterator(node: ts.Node) { @@ -1081,20 +1088,16 @@ export class PandaGen { ) } - importModule(node: ts.Node, moduleName: string) { - this.add(node, importModule(moduleName)); - } - - loadModuleVariable(node: ts.Node, module: VReg, varName: string) { - this.add(node, loadModuleVarByName(varName, module)); + loadModuleVariable(node: ts.Node, moduleVarName: string, isLocal: boolean) { + this.add(node, loadModuleVariable(moduleVarName, isLocal ? 1 : 0)); } - storeModuleVar(node: ts.Node, moduleVarName: string) { + storeModuleVariable(node: ts.Node | NodeKind, moduleVarName: string) { this.add(node, storeModuleVariable(moduleVarName)); } - copyModule(node: ts.Node, module: VReg) { - this.add(node, copyModuleIntoCurrentModule(module)); + getModuleNamespace(node: ts.Node, localName: string) { + this.add(node, getModuleNamespace(localName)); } defineClassWithBuffer(node: ts.Node, name: string, idx: number, parameterLength: number, base: VReg) { @@ -1304,6 +1307,6 @@ export class PandaGen { // set pos debug info if debug mode DebugInfo.setDebuginfoForIns(node, ...insns); - this.insns = this.insns.concat(insns); + this.insns.push(...insns); } } diff --git a/ts2panda/src/pandasm.ts b/ts2panda/src/pandasm.ts index 565615a2f5f02e75553723fec2af9ccf9d17fbee..9b368824b98dd6fd63bed8ce7a67e4d21a620a79 100644 --- a/ts2panda/src/pandasm.ts +++ b/ts2panda/src/pandasm.ts @@ -13,8 +13,8 @@ * limitations under the License. */ -import { DebugPosInfo, VariableDebugInfo } from "./debuginfo"; import { LiteralBuffer } from "./base/literal"; +import { DebugPosInfo, VariableDebugInfo } from "./debuginfo"; export class Metadata { public attribute: string; @@ -27,84 +27,83 @@ export class Metadata { } export class Signature { - public params: number; - public retType: string | undefined; // return type is always 'any', so we ignore it in json + public p: number; // parameters + public rt: string | undefined; // return type is always 'any', so we ignore it in json constructor(params: number = 0, retType?: string | undefined) { - this.params = params; - this.retType = retType; + this.p = params; + this.rt = retType; } } export class Ins { - public op: string; - public regs: Array | undefined; - public ids: Array | undefined; - public imms: Array | undefined; - public label: string | undefined; + public o: number | undefined; // op + public r: Array | undefined; // resgs + public id: Array | undefined; // ids + public im: Array | undefined; // imms + public l: string | undefined; // label - public debug_pos_info: DebugPosInfo | undefined; + public d: DebugPosInfo | undefined; // debug position info constructor( - op: string, + op: number | undefined = undefined, regs: Array | undefined = undefined, ids: Array | undefined = undefined, imms: Array | undefined = undefined, label: string | undefined = undefined, - debug_pos_info: DebugPosInfo | undefined = undefined, + dbg_pos: DebugPosInfo | undefined = undefined, ) { - this.op = op; - this.regs = regs; - this.ids = ids; - this.imms = imms; - this.label = label; - this.debug_pos_info = debug_pos_info; + this.o = op; + this.r = regs; + this.id = ids; + this.im = imms; + this.l = label; + this.d = dbg_pos; } } export class Function { - public name: string; - public signature: Signature; - public regs_num: number; - public ins: Array; - public labels: Array; - public metadata: Metadata; - public catchTables: Array; - public variables: Array | undefined; - public sourceFile: string; - public sourceCode: string | undefined; - public callType: number; - public typeInfo: Array; - public exportedSymbol2Types: Array | undefined; - public declaredSymbol2Types: Array | undefined; + public n: string; // name + public s: Signature; // signature + public r: number; // regs number + public i: Array; // ins + public l: Array | undefined; // labels + public ca_tab: Array | undefined; // catch tabels + public v: Array | undefined; // variables + public sf: string; // source file + public sc: string | undefined; // source code + public ct: number | undefined; // call type + public ti: Array | undefined; // typeinfo: record type index array, starts from reg_0 + public es2t: Array | undefined; // exportedSymbol2Types + public ds2t: Array | undefined; // declaredSymbol2Types constructor( name: string, signature: Signature, regs_num: number = 0, ins: Array = [], - labels: Array = [], - variables: Array | undefined = undefined, - sourceFile: string = "", - sourceCode: string | undefined = undefined, - callType: number = 0, - typeInfo: Array, + labs: Array | undefined = undefined, + vars: Array | undefined = undefined, + catchTables: Array | undefined = undefined, + sourceFiles: string = "", + sourceCodes: string | undefined = undefined, + callType: number | undefined = undefined, + typeInfo: Array | undefined = undefined, exportedSymbol2Types: Array | undefined = undefined, declaredSymbol2Types: Array | undefined = undefined ) { - this.name = name; - this.signature = signature; - this.ins = ins; - this.labels = labels; - this.regs_num = regs_num; - this.metadata = new Metadata(); - this.catchTables = []; - this.variables = variables; - this.sourceFile = sourceFile; - this.sourceCode = sourceCode; - this.callType = callType; - this.typeInfo = typeInfo; - this.exportedSymbol2Types = exportedSymbol2Types; - this.declaredSymbol2Types = declaredSymbol2Types; + this.n = name; + this.s = signature; + this.i = ins; + this.l = labs; + this.r = regs_num; + this.ca_tab = catchTables; + this.v = vars; + this.sf = sourceFiles; + this.sc = sourceCodes; + this.ct = callType; + this.ti = typeInfo; + this.es2t = exportedSymbol2Types; + this.ds2t = declaredSymbol2Types; } } @@ -163,23 +162,25 @@ export class Program { } export class CatchTable { - public tryBeginLabel: string; - public tryEndLabel: string; - public catchBeginLabel: string; + public tb_lab: string; // try begine label + public te_lab: string; // try end label + public cb_lab: string; // catch begin label constructor( tryBeginLabel: string, tryEndLabel: string, catchBeginLabel: string ) { - this.tryBeginLabel = tryBeginLabel; - this.tryEndLabel = tryEndLabel; - this.catchBeginLabel = catchBeginLabel; + this.tb_lab = tryBeginLabel; + this.te_lab = tryEndLabel; + this.cb_lab = catchBeginLabel; } } export class TypeOfVreg { + // @ts-ignore private vregNum: number; + // @ts-ignore private typeIndex: number; constructor(vregNum: number, typeIndex: number) { @@ -189,7 +190,9 @@ export class TypeOfVreg { } export class ExportedSymbol2Type { + // @ts-ignore private symbol: string; + // @ts-ignore private type: number; constructor(symbol: string, type: number) { @@ -199,7 +202,9 @@ export class ExportedSymbol2Type { } export class DeclaredSymbol2Type { + // @ts-ignore private symbol: string; + // @ts-ignore private type: number; constructor(symbol: string, type: number) { @@ -208,6 +213,60 @@ export class DeclaredSymbol2Type { } } +export class RegularImportEntry { + public localName: string; + public importName: string; + public moduleRequest: number; + + constructor(localName: string, importName: string, moduleRequest: number) { + this.localName = localName; + this.importName = importName; + this.moduleRequest = moduleRequest; + } +} + +export class NamespaceImportEntry { + public localName: string; + public moduleRequest: number; + + constructor(localName: string, moduleRequest: number) { + this.localName = localName; + this.moduleRequest = moduleRequest; + } +} + +export class LocalExportEntry { + public localName: string; + public exportName: string; + + constructor(localName: string, exportName: string) { + this.localName = localName; + this.exportName = exportName; + } +} + +export class IndirectExportEntry { + public exportName: string; + public importName: string; + public moduleRequest: number; + + constructor(exportName: string, importName: string, moduleRequest: number) { + this.exportName = exportName; + this.importName = importName; + this.moduleRequest = moduleRequest; + } +} + +export class ModuleRecord { + public moduleName: string = ""; + public moduleRequests: Array = []; + public regularImportEntries: Array = []; + public namespaceImportEntries: Array = []; + public localExportEntries: Array = []; + public indirectExportEntries: Array = []; + public starExportEntries: Array = []; +} + export interface Emmiter { generate_program: (filename: string, program: Program) => string; } diff --git a/ts2panda/src/pass/ICPass.ts b/ts2panda/src/pass/ICPass.ts deleted file mode 100644 index e05499f05c8cfa76ebf5ca86174f9e49b6b4f0cd..0000000000000000000000000000000000000000 --- a/ts2panda/src/pass/ICPass.ts +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright (c) 2021 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { - Intrinsic, IRNode -} from "../irnodes"; -import { LOGE } from "../log"; -import { PandaGen } from "../pandagen"; -import { Pass } from "../pass"; - -class ICPassImpl { - constructor() { } - - run(pg: PandaGen): void { - let insns: IRNode[] = pg.getInsns(); - let icSize: number = 0; - - for (let i = 0; i < insns.length; ++i) { - if (!(insns[i] instanceof Intrinsic)) { - continue; - } - - let ins: Intrinsic = (insns[i]); - if (!ins.hasIC()) { - continue; - } - - icSize = ins.updateICOffset(icSize); - } - - if (icSize >= 0xFFFF) { - LOGE("ICPass: <" + pg.internalName + "> slot size overflow! total:" + icSize); - } - pg.setICSize(icSize); - } -} - -export class ICPass implements Pass { - run(pg: PandaGen): void { - let icPass = new ICPassImpl(); - icPass.run(pg); - } -} \ No newline at end of file diff --git a/ts2panda/src/pass/cacheExpander.ts b/ts2panda/src/pass/cacheExpander.ts index cfb0137a907b327a6be42e90be1d5fe15ed09e90..85dc5bc812eba171ea281a4067873676360cc667 100755 --- a/ts2panda/src/pass/cacheExpander.ts +++ b/ts2panda/src/pass/cacheExpander.ts @@ -32,7 +32,7 @@ export class CacheExpander implements Pass { if (item.isNeeded()) { let expander = item.getExpander(); let expansion = expander(pandaGen); - insns.splice(0, 0, ...expansion); + insns.unshift(...expansion); } } } diff --git a/ts2panda/src/recorder.ts b/ts2panda/src/recorder.ts index 670bd357f2cb17b733691f9442c546a9a33a013d..6ca5732434a3ec7f37e10e472567b329e8ea1349 100644 --- a/ts2panda/src/recorder.ts +++ b/ts2panda/src/recorder.ts @@ -13,16 +13,20 @@ * limitations under the License. */ -import ts from "typescript"; +import * as ts from "typescript"; import * as astutils from "./astutils"; -import { isAnonymousFunctionDefinition } from "./base/util"; +import { + hasDefaultKeywordModifier, + hasExportKeywordModifier, + isAnonymousFunctionDefinition +} from "./base/util"; import { CmdOptions } from "./cmdOptions"; import { CompilerDriver } from "./compilerDriver"; import { DiagnosticCode, DiagnosticError } from "./diagnostic"; import { findOuterNodeOfParenthesis } from "./expression/parenthesizedExpression"; import * as jshelpers from "./jshelpers"; import { LOGD } from "./log"; -import { ModuleStmt } from "./modules"; +import { ModuleStmt } from "./modules"; // [delete it when type system adapts for ESM] import { CatchParameter, ClassDecl, @@ -36,6 +40,7 @@ import { LocalScope, LoopScope, ModuleScope, + ModuleVarKind, Scope, VarDecl, VariableScope @@ -51,6 +56,7 @@ import { TypeChecker } from "./typeChecker"; import { VarDeclarationKind } from "./variable"; import { TypeRecorder } from "./typeRecorder"; import { PandaGen } from "./pandagen"; +import path from "path"; export class Recorder { node: ts.Node; @@ -62,10 +68,10 @@ export class Recorder { private parametersMap: Map = new Map(); private funcNameMap: Map; private class2Ctor: Map = new Map(); + private isTsFile: boolean; + // [delete it when type system adapts for ESM] private importStmts: Array = []; private exportStmts: Array = []; - private defaultUsed: boolean = false; - private isTsFile: boolean; constructor(node: ts.Node, scope: Scope, compilerDriver: CompilerDriver, recordType: boolean, isTsFile: boolean) { this.node = node; @@ -116,7 +122,7 @@ export class Recorder { private recordInfo(node: ts.Node, scope: Scope) { node.forEachChild(childNode => { if (!this.recordType) { - checkSyntaxError(childNode); + checkSyntaxError(childNode, scope); } switch (childNode.kind) { case ts.SyntaxKind.FunctionExpression: @@ -132,7 +138,17 @@ export class Recorder { } case ts.SyntaxKind.FunctionDeclaration: { let functionScope = this.buildVariableScope(scope, childNode); - this.recordFuncDecl(childNode, scope); + let isExport: boolean = false; + if (hasExportKeywordModifier(childNode)) { + if (!CmdOptions.isModules()) { + throw new DiagnosticError(childNode, DiagnosticCode.Cannot_use_imports_exports_or_module_augmentations_when_module_is_none, jshelpers.getSourceFileOfNode(childNode)); + } + this.recordEcmaExportInfo(childNode, scope); + isExport = true; + } + // recordFuncDecl must behind recordEcmaExportInfo() cause function without name + // should be SyntaxChecked in recordEcmaExportInfo + this.recordFuncDecl(childNode, scope, isExport); if (this.recordType) { TypeChecker.getInstance().formatNodeType(childNode); } @@ -161,9 +177,23 @@ export class Recorder { this.recordInfo(childNode, loopScope); break; } - case ts.SyntaxKind.ClassDeclaration: + case ts.SyntaxKind.ClassDeclaration: { + let isExport: boolean = false; + if (hasExportKeywordModifier(childNode)) { + if (!CmdOptions.isModules()) { + throw new DiagnosticError(childNode, DiagnosticCode.Cannot_use_imports_exports_or_module_augmentations_when_module_is_none, jshelpers.getSourceFileOfNode(childNode)); + } + this.recordEcmaExportInfo(childNode, scope); + isExport = true; + } + this.recordClassInfo(childNode, scope, isExport); + if (this.recordType) { + TypeChecker.getInstance().formatNodeType(childNode); + } + break; + } case ts.SyntaxKind.ClassExpression: { - this.recordClassInfo(childNode, scope); + this.recordClassInfo(childNode, scope, false); if (this.recordType) { TypeChecker.getInstance().formatNodeType(childNode); } @@ -181,12 +211,11 @@ export class Recorder { } case ts.SyntaxKind.ImportDeclaration: { if (!CmdOptions.isModules()) { - throw new DiagnosticError(childNode, DiagnosticCode.An_import_declaration_can_only_be_used_in_a_namespace_or_module, jshelpers.getSourceFileOfNode(childNode)); - } - if (!(scope instanceof ModuleScope)) { - throw new Error("SyntaxError: import statement cannot in other scope except ModuleScope"); + throw new DiagnosticError(childNode, DiagnosticCode.Cannot_use_imports_exports_or_module_augmentations_when_module_is_none, jshelpers.getSourceFileOfNode(childNode)); } - let importStmt = this.recordImportInfo(childNode, scope); + this.recordEcmaImportInfo(childNode, scope); + + let importStmt = this.recordImportInfo(childNode); // [delete it when type system adapts for ESM] if (this.recordType) { TypeChecker.getInstance().formatNodeType(childNode, importStmt); } @@ -194,22 +223,22 @@ export class Recorder { } case ts.SyntaxKind.ExportDeclaration: { if (!CmdOptions.isModules()) { - throw new DiagnosticError(childNode, DiagnosticCode.An_export_declaration_can_only_be_used_in_a_module, jshelpers.getSourceFileOfNode(childNode)); + throw new DiagnosticError(childNode, DiagnosticCode.Cannot_use_imports_exports_or_module_augmentations_when_module_is_none, jshelpers.getSourceFileOfNode(childNode)); } - if (!(scope instanceof ModuleScope)) { - throw new Error("SyntaxError: export statement cannot in other scope except ModuleScope"); - } - let exportStmt = this.recordExportInfo(childNode); + this.recordEcmaExportInfo(childNode, scope); + + let exportStmt = this.recordExportInfo(childNode); // [delete it when type system adapts for ESM] if (this.recordType) { TypeChecker.getInstance().formatNodeType(childNode, exportStmt); } break; } case ts.SyntaxKind.ExportAssignment: { - if (this.defaultUsed) { - throw new DiagnosticError(childNode, DiagnosticCode.Duplicate_identifier_0, jshelpers.getSourceFileOfNode(childNode), ["default"]); + if (!CmdOptions.isModules()) { + throw new DiagnosticError(childNode, DiagnosticCode.Cannot_use_imports_exports_or_module_augmentations_when_module_is_none, jshelpers.getSourceFileOfNode(childNode)); } - this.defaultUsed = true; + this.recordEcmaExportInfo(childNode, scope); + this.recordInfo(childNode, scope); if (this.recordType) { TypeChecker.getInstance().formatNodeType(childNode); @@ -217,6 +246,12 @@ export class Recorder { break; } case ts.SyntaxKind.VariableStatement: { + if (hasExportKeywordModifier(childNode)) { + if (!CmdOptions.isModules()) { + throw new DiagnosticError(childNode, DiagnosticCode.Cannot_use_imports_exports_or_module_augmentations_when_module_is_none, jshelpers.getSourceFileOfNode(childNode)); + } + this.recordEcmaExportInfo(childNode, scope); + } if (this.recordType) { TypeChecker.getInstance().formatNodeType(childNode); } @@ -229,7 +264,7 @@ export class Recorder { }); } - private recordClassInfo(childNode: ts.ClassLikeDeclaration, scope: Scope) { + private recordClassInfo(childNode: ts.ClassLikeDeclaration, scope: Scope, isExport: boolean) { let localScope = new LocalScope(scope); this.setScopeMap(childNode, localScope); let ctor = extractCtorOfClass(childNode); @@ -240,8 +275,9 @@ export class Recorder { } if (childNode.name) { let name = jshelpers.getTextOfIdentifierOrLiteral(childNode.name); - let calssDecl = new ClassDecl(name, childNode); - scope.setDecls(calssDecl); + let moduleKind = isExport ? ModuleVarKind.EXPORTED : ModuleVarKind.NOT; + let classDecl = new ClassDecl(name, childNode, moduleKind); + scope.setDecls(classDecl); } this.recordInfo(childNode, localScope); } @@ -260,11 +296,14 @@ export class Recorder { let parent = this.getDeclarationNodeOfId(id); if (parent) { - // console.log(id.getText()); let declKind = astutils.getVarDeclarationKind(parent); + let isExportDecl: boolean = false; + if ((parent).parent.parent.kind == ts.SyntaxKind.VariableStatement) { + isExportDecl = hasExportKeywordModifier((parent).parent.parent); + } // collect declaration information to corresponding scope - let decl = this.addVariableDeclToScope(scope, id, parent, name, declKind); + let decl = this.addVariableDeclToScope(scope, id, parent, name, declKind, isExportDecl); if (declKind == VarDeclarationKind.VAR) { let variableScopeParent = scope.getNearestVariableScope(); this.collectHoistDecls(id, variableScopeParent, decl); @@ -304,8 +343,10 @@ export class Recorder { } } - private addVariableDeclToScope(scope: Scope, node: ts.Node, parent: ts.Node, name: string, declKind: VarDeclarationKind): Decl { - let decl = new VarDecl(name, node); + private addVariableDeclToScope(scope: Scope, node: ts.Node, parent: ts.Node, name: string, declKind: VarDeclarationKind, isExportDecl: boolean): Decl { + let moduleKind = isExportDecl ? ModuleVarKind.EXPORTED : ModuleVarKind.NOT; + let decl = new VarDecl(name, node, moduleKind); + switch (declKind) { case VarDeclarationKind.VAR: break; @@ -313,11 +354,11 @@ export class Recorder { if (parent.parent.kind == ts.SyntaxKind.CatchClause) { decl = new CatchParameter(name, node); } else { - decl = new LetDecl(name, node); + decl = new LetDecl(name, node, moduleKind); } break; case VarDeclarationKind.CONST: - decl = new ConstDecl(name, node); + decl = new ConstDecl(name, node, moduleKind); break; default: throw new Error("Wrong type of declaration"); @@ -343,7 +384,8 @@ export class Recorder { } } - private recordImportInfo(node: ts.ImportDeclaration, scope: ModuleScope): ModuleStmt { + // [delete it when type system adapts for ESM] + private recordImportInfo(node: ts.ImportDeclaration): ModuleStmt { if (!ts.isStringLiteral(node.moduleSpecifier)) { throw new Error("moduleSpecifier must be a stringLiteral"); } @@ -360,7 +402,6 @@ export class Recorder { // import defaultExport from "a.js" if (importClause.name) { let name = jshelpers.getTextOfIdentifierOrLiteral(importClause.name); - scope.setDecls(new ConstDecl(name, importClause.name)); importStmt.addLocalName(name, "default"); importStmt.addNodeMap(importClause.name, importClause.name); } @@ -373,7 +414,6 @@ export class Recorder { // import * as a from "a.js" if (ts.isNamespaceImport(namedBindings)) { let nameSpace = jshelpers.getTextOfIdentifierOrLiteral((namedBindings).name); - scope.setDecls(new ConstDecl(nameSpace, namedBindings)); importStmt.setNameSpace(nameSpace); } @@ -382,7 +422,6 @@ export class Recorder { namedBindings.elements.forEach((element) => { let name: string = jshelpers.getTextOfIdentifierOrLiteral(element.name); let exoticName: string = element.propertyName ? jshelpers.getTextOfIdentifierOrLiteral(element.propertyName) : name; - scope.setDecls(new ConstDecl(name, element)); importStmt.addLocalName(name, exoticName); importStmt.addNodeMap(element.name, element.propertyName ? element.propertyName : element.name); }); @@ -394,6 +433,7 @@ export class Recorder { return importStmt; } + // [delete it when type system adapts for ESM] private recordExportInfo(node: ts.ExportDeclaration): ModuleStmt { let origNode = ts.getOriginalNode(node); let exportStmt: ModuleStmt; @@ -416,13 +456,6 @@ export class Recorder { if (ts.isNamedExports(namedBindings)) { namedBindings.elements.forEach((element) => { let name: string = jshelpers.getTextOfIdentifierOrLiteral(element.name); - if (name == 'default') { - if (this.defaultUsed) { - throw new DiagnosticError(origNode, DiagnosticCode.Duplicate_identifier_0, jshelpers.getSourceFileOfNode(origNode), [name]); - } else { - this.defaultUsed = true; - } - } let exoticName: string = element.propertyName ? jshelpers.getTextOfIdentifierOrLiteral(element.propertyName) : name; exportStmt.addLocalName(name, exoticName); exportStmt.addNodeMap(element.name, element.propertyName ? element.propertyName : element.name); @@ -433,16 +466,166 @@ export class Recorder { return exportStmt; } - private recordFuncDecl(node: ts.FunctionDeclaration, scope: Scope) { + private getNormalizeModuleSpecifier(moduleSpecifier: ts.Expression): string { + if (!ts.isStringLiteral(moduleSpecifier)) { + throw new Error("moduleSpecifier must be a stringLiteral"); + } + return path.normalize(jshelpers.getTextOfIdentifierOrLiteral(moduleSpecifier)); + } + + private recordEcmaNamedBindings(namedBindings: ts.NamedImportBindings, scope: ModuleScope, moduleRequest: string) { + // import * as a from "a.js" + if (ts.isNamespaceImport(namedBindings)) { + let nameSpace = jshelpers.getTextOfIdentifierOrLiteral((namedBindings).name); + scope.setDecls(new ConstDecl(nameSpace, namedBindings, ModuleVarKind.NOT)); + scope.module().addStarImportEntry(namedBindings, nameSpace, moduleRequest); + } else if (ts.isNamedImports(namedBindings)) { + if (namedBindings.elements.length == 0) { + // import {} from "a.js" + scope.module().addEmptyImportEntry(moduleRequest); + } + // import { ... } from "a.js" + namedBindings.elements.forEach((element: any) => { + let localName: string = jshelpers.getTextOfIdentifierOrLiteral(element.name); + let importName: string = element.propertyName ? jshelpers.getTextOfIdentifierOrLiteral(element.propertyName) : localName; + scope.setDecls(new ConstDecl(localName, element, ModuleVarKind.IMPORTED)); + scope.module().addImportEntry(element, importName, localName, moduleRequest); + }); + } else { + throw new Error("Unreachable kind for namedBindings"); + } + } + + private recordEcmaImportClause(importClause: ts.ImportClause, scope: ModuleScope, moduleRequest: string) { + // import defaultExport from "a.js" + if (importClause.name) { + let localName = jshelpers.getTextOfIdentifierOrLiteral(importClause.name); + scope.setDecls(new ConstDecl(localName, importClause.name, ModuleVarKind.IMPORTED)); + scope.module().addImportEntry(importClause, "default", localName, moduleRequest); + } + if (importClause.namedBindings) { + let namedBindings = importClause.namedBindings; + this.recordEcmaNamedBindings(namedBindings, scope, moduleRequest); + } + } + + private recordEcmaImportInfo(node: ts.ImportDeclaration, scope: Scope) { + if (!(scope instanceof ModuleScope)) { + return; + } + + let moduleRequest: string = this.getNormalizeModuleSpecifier(node.moduleSpecifier); + + if (node.importClause) { + let importClause: ts.ImportClause = node.importClause; + this.recordEcmaImportClause(importClause, scope, moduleRequest); + } else { + // import "a.js" + scope.module().addEmptyImportEntry(moduleRequest); + } + } + + private recordEcmaExportDecl(node: ts.ExportDeclaration, scope: ModuleScope) { + if (node.moduleSpecifier) { + let moduleRequest: string = this.getNormalizeModuleSpecifier(node.moduleSpecifier); + + if (node.exportClause) { + let namedBindings: ts.NamedExportBindings = node.exportClause; + if (ts.isNamespaceExport(namedBindings)) { + // export * as m from "mod"; + // `export namespace` is not the ECMA2018's feature + } else if (ts.isNamedExports(namedBindings)) { + if (namedBindings.elements.length == 0) { + // export {} from "mod"; + scope.module().addEmptyImportEntry(moduleRequest); + } + // export {x} from "mod"; + // export {v as x} from "mod"; + namedBindings.elements.forEach((element: any) => { + let exportName: string = jshelpers.getTextOfIdentifierOrLiteral(element.name); + let importName: string = element.propertyName ? jshelpers.getTextOfIdentifierOrLiteral(element.propertyName) : exportName; + scope.module().addIndirectExportEntry(element, importName, exportName, moduleRequest); + }); + } + } else { + // export * from "mod"; + scope.module().addStarExportEntry(node, moduleRequest); + } + } else if (node.exportClause && ts.isNamedExports(node.exportClause)) { + // export {x}; + // export {v as x}; + node.exportClause.elements.forEach((element: any) => { + let exportName: string = jshelpers.getTextOfIdentifierOrLiteral(element.name); + let localName: string = element.propertyName ? jshelpers.getTextOfIdentifierOrLiteral(element.propertyName) : exportName; + scope.module().addLocalExportEntry(element, exportName, localName); + }); + } else { + throw new Error("Unreachable node kind for Export Declaration"); + } + } + + private recordEcmaExportInfo(node: ts.ExportDeclaration | ts.ExportAssignment | ts.VariableStatement | ts.FunctionDeclaration | ts.ClassDeclaration, scope: Scope) { + if (!(scope instanceof ModuleScope)) { + return; + } + + switch (node.kind) { + case ts.SyntaxKind.ExportDeclaration: { + this.recordEcmaExportDecl(node, scope); + break; + } + case ts.SyntaxKind.ExportAssignment: { + // export default 42; + // export default v; + // "*default*" is used within this specification as a synthetic name for anonymous default export values. + scope.module().addLocalExportEntry(node, "default", "*default*"); + break; + } + case ts.SyntaxKind.VariableStatement: { + // export var a,b; + node.declarationList.declarations.forEach(decl => { + let name = jshelpers.getTextOfIdentifierOrLiteral(decl.name); + scope.module().addLocalExportEntry(decl, name, name); + }); + break; + } + case ts.SyntaxKind.FunctionDeclaration: + case ts.SyntaxKind.ClassDeclaration: { + if (hasDefaultKeywordModifier(node)) { + // HoistableDeclaration : FunctionDecl/GeneratorDecl/AsyncFunctionDecl/AsyncGeneratorDecl + // export default function f(){} + // export default function(){} + // export default class{} + let localName = node.name ? jshelpers.getTextOfIdentifierOrLiteral(node.name) : "*default*"; + scope.module().addLocalExportEntry(node, "default", localName); + } else { + // export function f(){} + // export class c{} + if (!node.name) { + throw new DiagnosticError(node, DiagnosticCode.A_class_or_function_declaration_without_the_default_modifier_must_have_a_name, jshelpers.getSourceFileOfNode(node)); + } + let name = jshelpers.getTextOfIdentifierOrLiteral(node.name!); + scope.module().addLocalExportEntry(node, name, name); + } + break; + } + default: + throw new Error("Unreachable syntax kind for static exporting"); + } + } + + private recordFuncDecl(node: ts.FunctionDeclaration, scope: Scope, isExport: boolean) { this.recordFuncInfo(node); let funcId = (node).name; - if (!funcId) { - // function declaration without name doesn't need to record hoisting. + if (!funcId && !isExport) { + // unexported function declaration without name doesn't need to record hoisting. return; } - let funcName = jshelpers.getTextOfIdentifierOrLiteral(funcId); - let funcDecl = new FuncDecl(funcName, node); + // if function without name must has modifiers of 'export' & 'default' + let funcName = funcId ? jshelpers.getTextOfIdentifierOrLiteral(funcId) : '*default*'; + let moduleKind = isExport ? ModuleVarKind.EXPORTED : ModuleVarKind.NOT; + let funcDecl = new FuncDecl(funcName, node, moduleKind); scope.setDecls(funcDecl); let hoistScope = scope; if (scope instanceof GlobalScope || scope instanceof ModuleScope) { @@ -473,15 +656,19 @@ export class Recorder { let outerNode = findOuterNodeOfParenthesis(node); if (ts.isVariableDeclaration(outerNode)) { + // @ts-ignore let id = outerNode.name; if (ts.isIdentifier(id)) { name = jshelpers.getTextOfIdentifierOrLiteral(id); } } else if (ts.isBinaryExpression(outerNode)) { + // @ts-ignore if (outerNode.operatorToken.kind == ts.SyntaxKind.EqualsToken && ts.isIdentifier(outerNode.left)) { + // @ts-ignore name = jshelpers.getTextOfIdentifierOrLiteral(outerNode.left); } } else if (ts.isPropertyAssignment(outerNode)) { + // @ts-ignore let propName = outerNode.name; if (ts.isIdentifier(propName) || ts.isStringLiteral(propName) || ts.isNumericLiteral(propName)) { name = jshelpers.getTextOfIdentifierOrLiteral(propName); @@ -600,14 +787,6 @@ export class Recorder { return this.scopeMap.get(node); } - getImportStmts() { - return this.importStmts; - } - - getExportStmts() { - return this.exportStmts; - } - setHoistMap(scope: VariableScope, decl: Decl) { if (!this.hoistMap.has(scope)) { this.hoistMap.set(scope, [decl]); @@ -645,4 +824,4 @@ export class Recorder { getFuncNameMap() { return this.funcNameMap; } -} \ No newline at end of file +} diff --git a/ts2panda/src/regAllocator.ts b/ts2panda/src/regAllocator.ts index b771b6b2f62fcf78b59eb3c1b3a4af2dd7a60ca7..dfcc44b3be0e6f417c3be0cb49fcf5fb2cc0898d 100644 --- a/ts2panda/src/regAllocator.ts +++ b/ts2panda/src/regAllocator.ts @@ -13,42 +13,32 @@ * limitations under the License. */ +import { + getRangeStartVregPos, isRangeInst +} from "./base/util"; import { CacheList } from "./base/vregisterCache"; import { DebugInfo } from "./debuginfo"; import { - EcmaCallithisrangedyn, - EcmaCallirangedyn, - EcmaNewobjdynrange, - EcmaCreateobjectwithexcludedkeys, Format, IRNode, MovDyn, OperandKind, OperandType, - VReg, - Imm + VReg } from "./irnodes"; import { PandaGen } from "./pandagen"; -import { - isRangeInst, - getRangeStartVregPos, - getRangeExplicitVregNums, -} from "./base/util"; const MAX_VREGA = 16; const MAX_VREGB = 256; const MAX_VREGC = 65536; -class VRegWithFlag { - constructor(vreg: VReg) { - this.flag = false; - this.vreg = vreg; - } +interface VRegWithFlag { vreg: VReg; flag: boolean; // indicate whether it is used as a temporary register for spill } class RegAllocator { + private newInsns: IRNode[] = []; private spills: VReg[] = []; private vRegsId: number = 0; private usedVreg: VRegWithFlag[] = []; @@ -61,7 +51,7 @@ class RegAllocator { allocIndexForVreg(vreg: VReg) { let num = this.getFreeVreg(); vreg.num = num; - this.usedVreg[num] = new VRegWithFlag(vreg); + this.usedVreg[num] = {vreg: vreg, flag: false}; } findTmpVreg(level: number): VReg { @@ -114,7 +104,7 @@ class RegAllocator { let num = 0; for (let j = 0; j < operands.length; ++j) { if (operands[j] instanceof VReg) { - if ((operands[j]).num >= (1 << format[j].bitwidth)) { + if ((operands[j]).num >= (1 << format[j][1])) { num++; } } @@ -128,7 +118,7 @@ class RegAllocator { this.tmpVreg.push(this.usedVreg[num]); } - doRealAdjustment(operands: OperandType[], format: Format, index: number, irNodes: IRNode[]): number { + doRealAdjustment(operands: OperandType[], format: Format, index: number, irNodes: IRNode[]) { let head: IRNode[] = []; let tail: IRNode[] = []; let spills: VReg[] = []; @@ -142,22 +132,22 @@ class RegAllocator { for (let j = 0; j < operands.length; ++j) { if (operands[j] instanceof VReg) { let vOrigin = operands[j]; - if (vOrigin.num >= (1 << format[j].bitwidth)) { + if (vOrigin.num >= (1 << format[j][1])) { let spill = this.allocSpill(); spills.push(spill); let vTmp; try { - vTmp = this.findTmpVreg(1 << format[j].bitwidth); + vTmp = this.findTmpVreg(1 << format[j][1]); } catch { throw Error("no available tmp vReg"); } head.push(new MovDyn(spill, vTmp)); operands[j] = vTmp; - if (format[j].kind == OperandKind.SrcVReg) { + if (format[j][0] == OperandKind.SrcVReg) { head.push(new MovDyn(vTmp, vOrigin)); - } else if (format[j].kind == OperandKind.DstVReg) { + } else if (format[j][0] == OperandKind.DstVReg) { tail.push(new MovDyn(vOrigin, vTmp)) - } else if (format[j].kind == OperandKind.SrcDstVReg) { + } else if (format[j][0] == OperandKind.SrcDstVReg) { head.push(new MovDyn(vTmp, vOrigin)); tail.push(new MovDyn(vOrigin, vTmp)) } else { @@ -172,20 +162,18 @@ class RegAllocator { DebugInfo.copyDebugInfo(irNodes[index], head); DebugInfo.copyDebugInfo(irNodes[index], tail); - irNodes.splice(index, 0, ...head); - irNodes.splice(index + head.length + 1, 0, ...tail); + this.newInsns.push(...head, irNodes[index], ...tail); + for (let j = spills.length - 1; j >= 0; --j) { this.freeSpill(spills[j]); } this.clearVregFlags(); - - return (head.length + tail.length); } checkDynRangeInstruction(irNodes: IRNode[], index: number): boolean { let operands = irNodes[index].operands; let rangeRegOffset = getRangeStartVregPos(irNodes[index]); - let level = 1 << irNodes[index].formats[0][rangeRegOffset].bitwidth; + let level = 1 << (irNodes[index].getFormats())[0][rangeRegOffset][1]; /* 1. "CalliDynRange 4, v255" is a valid insn, there is no need for all 4 registers numbers to be less than 255, @@ -202,7 +190,6 @@ class RegAllocator { /* the first operand is an imm */ let startNum = (operands[rangeRegOffset]).num; let i = rangeRegOffset + 1; - let implicitRegNums = (irNodes[index]).operands.length - i; for (; i < (irNodes[index]).operands.length; ++i) { if ((startNum + 1) != (operands[i]).num) { throw Error("Warning: VReg sequence of DynRange is not continuous. Please adjust it now."); @@ -219,7 +206,7 @@ class RegAllocator { return false; } - adjustDynRangeInstruction(irNodes: IRNode[], index: number): number { + adjustDynRangeInstruction(irNodes: IRNode[], index: number) { let head: IRNode[] = []; let tail: IRNode[] = []; let spills: VReg[] = []; @@ -229,7 +216,7 @@ class RegAllocator { let rangeRegOffset = getRangeStartVregPos(irNodes[index]); let regNums = operands.length - getRangeStartVregPos(irNodes[index]); - let level = 1 << irNodes[index].formats[0][rangeRegOffset].bitwidth; + let level = 1 << (irNodes[index].getFormats())[0][rangeRegOffset][1]; let tmp = this.findTmpVreg(level); for (let i = 0; i < regNums; i++) { @@ -247,26 +234,23 @@ class RegAllocator { DebugInfo.copyDebugInfo(irNodes[index], head); DebugInfo.copyDebugInfo(irNodes[index], tail); - irNodes.splice(index, 0, ...head); - irNodes.splice(index + head.length + 1, 0, ...tail); + this.newInsns.push(...head, irNodes[index], ...tail); for (let i = spills.length - 1; i >= 0; --i) { this.freeSpill(spills[i]); } this.clearVregFlags(); - - return (head.length + tail.length); } adjustInstructionsIfNeeded(irNodes: IRNode[]): void { for (let i = 0; i < irNodes.length; ++i) { let operands = irNodes[i].operands; - let formats = irNodes[i].formats; + let formats = irNodes[i].getFormats(); if (isRangeInst(irNodes[i])) { if (this.checkDynRangeInstruction(irNodes, i)) { + this.newInsns.push(irNodes[i]); continue; } - - i += this.adjustDynRangeInstruction(irNodes, i); + this.adjustDynRangeInstruction(irNodes, i); continue; } @@ -280,8 +264,10 @@ class RegAllocator { } } if (min > 0) { - i += this.doRealAdjustment(operands, minFormat, i, irNodes); + this.doRealAdjustment(operands, minFormat, i, irNodes); + continue; } + this.newInsns.push(irNodes[i]); } } @@ -312,8 +298,10 @@ class RegAllocator { for (let i = 0; i < parametersCount; ++i) { let v = new VReg(); this.allocIndexForVreg(v); - irNodes.splice(0, 0, new MovDyn(locals[i], v)); + this.newInsns.unshift(new MovDyn(locals[i], v)); } + + pandaGen.setInsns(this.newInsns); } } diff --git a/ts2panda/src/scope.ts b/ts2panda/src/scope.ts index 79a59c04865401021aba827a91071010202e6d23..92f7f8dac2a3dc98d1fca16947db9e8590a051e0 100644 --- a/ts2panda/src/scope.ts +++ b/ts2panda/src/scope.ts @@ -14,11 +14,12 @@ */ import * as ts from "typescript"; -import { DebugInsPlaceHolder } from "./irnodes"; +import { SourceTextModuleRecord } from "./ecmaModule"; import { LOGD, LOGE } from "./log"; import { GlobalVariable, LocalVariable, + ModuleVariable, VarDeclarationKind, Variable } from "./variable"; @@ -27,89 +28,97 @@ export enum InitStatus { INITIALIZED, UNINITIALIZED } +export enum ModuleVarKind { + IMPORTED, EXPORTED, NOT +} + export abstract class Decl { name: string; node: ts.Node; - constructor(name: string, node: ts.Node) { + isModule: ModuleVarKind; + + constructor(name: string, node: ts.Node, isModule: ModuleVarKind) { this.name = name; this.node = node; + this.isModule = isModule; } } export class VarDecl extends Decl { - constructor(varName: string, node: ts.Node) { - super(varName, node); + constructor(varName: string, node: ts.Node, isModule: ModuleVarKind) { + super(varName, node, isModule); } } export class LetDecl extends Decl { - constructor(letName: string, node: ts.Node) { - super(letName, node); + constructor(letName: string, node: ts.Node, isModule: ModuleVarKind) { + super(letName, node, isModule); } } export class ConstDecl extends Decl { - constructor(constName: string, node: ts.Node) { - super(constName, node); + constructor(constName: string, node: ts.Node, isModule: ModuleVarKind) { + super(constName, node, isModule); } } export class FuncDecl extends Decl { - constructor(funcName: string, node: ts.Node) { - super(funcName, node); + constructor(funcName: string, node: ts.Node, isModule: ModuleVarKind) { + super(funcName, node, isModule); } } export class ClassDecl extends Decl { - constructor(className: string, node: ts.Node) { - super(className, node); + constructor(className: string, node: ts.Node, isModule: ModuleVarKind) { + super(className, node, isModule); } } export class CatchParameter extends Decl { - constructor(CpName: string, node: ts.Node) { - super(CpName, node); + constructor(CpName: string, node: ts.Node, isModule: ModuleVarKind = ModuleVarKind.NOT) { + super(CpName, node, isModule); } } export class FunctionParameter extends Decl { - constructor(FpName: string, node: ts.Node) { - super(FpName, node); + constructor(FpName: string, node: ts.Node, isModule: ModuleVarKind = ModuleVarKind.NOT) { + super(FpName, node, isModule); } } export abstract class Scope { protected debugTag = "scope"; - protected globals: Variable[] = []; - protected locals: Variable[] = []; protected name2variable: Map = new Map(); protected decls: Decl[] = []; protected parent: Scope | undefined = undefined; // for debuginfo - protected startIns: DebugInsPlaceHolder = new DebugInsPlaceHolder(); - protected endIns: DebugInsPlaceHolder = new DebugInsPlaceHolder(); + protected startInsIdx: number | undefined; + protected endInsIdx: number | undefined; + private callOpt: Set = new Set(); + private isArgumentsOrRestargs: boolean = false; + constructor() { } - abstract add(name: string, declKind: VarDeclarationKind, status?: InitStatus): Variable | undefined; + abstract add(decl: Decl | string, declKind: VarDeclarationKind, status?: InitStatus): Variable | undefined; getName2variable(): Map { return this.name2variable; } - getScopeStartIns() { - return this.startIns; + getScopeStartInsIdx() { + return this.startInsIdx; } - setScopeStartIns(startIns: DebugInsPlaceHolder) { - this.startIns = startIns; + setScopeStartInsIdx(startInsIdx: number) { + this.startInsIdx = startInsIdx; } - setScopeEndIns(endIns: DebugInsPlaceHolder) { - this.endIns = endIns; + setScopeEndInsIdx(endInsIdx: number) { + this.endInsIdx = endInsIdx; } - getScopeEndIns() { - return this.endIns; + getScopeEndInsIdx() { + return this.endInsIdx; } setParent(parentScope: Scope | undefined) { @@ -249,6 +258,34 @@ export abstract class Scope { getDecls() { return this.decls; } + + public getCallOpt() { + return this.callOpt; + } + + public setCallOpt(key: String) { + if (this instanceof FunctionScope) { + this.callOpt.add(key); + } else { + let parent = this.parent; + while (parent != undefined) { + if (parent instanceof FunctionScope) { + parent.callOpt.add(key); + break; + } else { + parent = parent.parent; + } + } + } + } + + public setArgumentsOrRestargs() { + this.isArgumentsOrRestargs = true; + } + + public getArgumentsOrRestargs() { + return this.isArgumentsOrRestargs; + } } export abstract class VariableScope extends Scope { @@ -259,6 +296,11 @@ export abstract class VariableScope extends Scope { protected node: ts.Node | undefined = undefined; protected parentVariableScope: VariableScope | null = null; protected childVariableScope: VariableScope[] = []; + protected lexVarInfo: Map = new Map(); + + getLexVarInfo() { + return this.lexVarInfo; + } getBindingNode() { return this.node; @@ -322,7 +364,8 @@ export abstract class VariableScope extends Scope { setLexVar(v: Variable, refScope: Scope) { if (!v.isLexVar) { - v.setLexVar(this); + let slot = v.setLexVar(this); + this.lexVarInfo.set(v.getName(), slot); } LOGD(this.debugTag, "VariableScope.setLexVar(" + v.idxLex + ")"); @@ -352,15 +395,14 @@ export class GlobalScope extends VariableScope { this.node = node ? node : undefined; } - add(name: string, declKind: VarDeclarationKind, status?: InitStatus): Variable | undefined { + add(decl: Decl | string, declKind: VarDeclarationKind, status?: InitStatus): Variable | undefined { + let name = decl instanceof Decl ? decl.name : decl; LOGD(this.debugTag, "globalscope.add (" + name + "), kind:" + declKind); let v: Variable | undefined; if (declKind == VarDeclarationKind.NONE || declKind == VarDeclarationKind.VAR || declKind == VarDeclarationKind.FUNCTION) { v = new GlobalVariable(declKind, name); - this.globals.push(v); } else { v = new LocalVariable(declKind, name, status); - this.locals.push(v); } this.name2variable.set(name, v); return v; @@ -368,24 +410,45 @@ export class GlobalScope extends VariableScope { } export class ModuleScope extends VariableScope { - constructor(node?: ts.SourceFile | ts.ModuleBlock) { + private moduleRecord: SourceTextModuleRecord; + + constructor(node: ts.SourceFile) { super(); - this.node = node ? node : undefined; + this.node = node; + this.moduleRecord = new SourceTextModuleRecord(node.fileName); } - add(name: string, declKind: VarDeclarationKind, status?: InitStatus): Variable | undefined { + setExportDecl(exportedLocalName: string) { + let decl = this.getDecl(exportedLocalName); + if (decl) { + decl.isModule = ModuleVarKind.EXPORTED; + } + } + + module() { + return this.moduleRecord; + } + + add(decl: Decl | string, declKind: VarDeclarationKind, status?: InitStatus): Variable | undefined { + let [name, isModule] = decl instanceof Decl ? [decl.name, decl.isModule] : [decl, ModuleVarKind.NOT]; LOGD(this.debugTag, "modulescope.add (" + name + "), kind:" + declKind); let v: Variable | undefined; - if (declKind == VarDeclarationKind.NONE) { - v = new GlobalVariable(declKind, name); - this.globals.push(v); - } else if (declKind == VarDeclarationKind.VAR || declKind == VarDeclarationKind.FUNCTION) { - v = new LocalVariable(declKind, name); - this.locals.push(v); + + if (isModule !== ModuleVarKind.NOT) { + v = new ModuleVariable(declKind, name, InitStatus.UNINITIALIZED); + if (isModule == ModuleVarKind.EXPORTED) { + (v).setExport(); + } } else { - v = new LocalVariable(declKind, name, status); - this.locals.push(v); + if (declKind === VarDeclarationKind.NONE) { + v = new GlobalVariable(declKind, name); + } else if (declKind == VarDeclarationKind.VAR || declKind == VarDeclarationKind.FUNCTION) { + v = new LocalVariable(declKind, name); + } else { + v = new LocalVariable(declKind, name, status); + } } + this.name2variable.set(name, v); return v; } @@ -394,8 +457,6 @@ export class ModuleScope extends VariableScope { export class FunctionScope extends VariableScope { private parameterLength: number = 0; private funcName: string = ""; - private callOpt: Set = new Set(); - private isArgumentsOrRestargs: boolean = false; constructor(parent?: Scope, node?: ts.FunctionLikeDeclaration) { super(); this.parent = parent ? parent : undefined; @@ -418,27 +479,12 @@ export class FunctionScope extends VariableScope { return this.funcName; } - public getCallOpt() { - return this.callOpt; - } - - public setCallOpt(key: String) { - this.callOpt.add(key); - } - - public setArgumentsOrRestargs() { - this.isArgumentsOrRestargs = true; - } - - public getArgumentsOrRestargs() { - return this.isArgumentsOrRestargs; - } - getParent(): Scope | undefined { return this.parent; } - add(name: string, declKind: VarDeclarationKind, status?: InitStatus): Variable | undefined { + add(decl: Decl | string, declKind: VarDeclarationKind, status?: InitStatus): Variable | undefined { + let name = decl instanceof Decl ? decl.name : decl; let v: Variable | undefined; LOGD(this.debugTag, "functionscope.add (" + name + "), kind:" + declKind); @@ -446,7 +492,7 @@ export class FunctionScope extends VariableScope { // the variable declared without anything should be global // See EcmaStandard: 13.3.2 Variable Statement let globalScope = this.getRootScope(); - if (globalScope instanceof GlobalScope || globalScope instanceof ModuleScope) { + if (globalScope instanceof GlobalScope) { v = globalScope.add(name, declKind); } else { v = undefined; @@ -454,11 +500,9 @@ export class FunctionScope extends VariableScope { } } else if (declKind == VarDeclarationKind.VAR || declKind == VarDeclarationKind.FUNCTION) { v = new LocalVariable(declKind, name); - this.locals.push(v); this.name2variable.set(name, v); } else { v = new LocalVariable(declKind, name, status); - this.locals.push(v); this.name2variable.set(name, v); } return v; @@ -472,19 +516,20 @@ export class LocalScope extends Scope { } setLexVar(v: Variable, srcScope: Scope) { - let variableScope = this.getNearestLexicalScope(); - variableScope.setLexVar(v, srcScope); + let lexicalScope = this.getNearestLexicalScope(); + lexicalScope.setLexVar(v, srcScope); } - add(name: string, declKind: VarDeclarationKind, status?: InitStatus): Variable | undefined { + add(decl: Decl | string, declKind: VarDeclarationKind, status?: InitStatus): Variable | undefined { + let name = decl instanceof Decl ? decl.name : decl; let v: Variable | undefined; LOGD(this.debugTag, "localscope.add (" + name + "), kind:" + declKind); if (declKind == VarDeclarationKind.NONE) { let root = this.getRootScope(); - if (root instanceof GlobalScope || root instanceof ModuleScope) { + if (root instanceof GlobalScope) { return root.add(name, declKind, status); } else { LOGE(undefined, "Error: the root of this scope is not global scope, it is wrong"); @@ -500,7 +545,6 @@ export class LocalScope extends Scope { v = functionScope!.add(name, declKind); } else { v = new LocalVariable(declKind, name, status); - this.locals.push(v); this.name2variable.set(name, v); } @@ -511,13 +555,15 @@ export class LocalScope extends Scope { export class LoopScope extends LocalScope { protected startLexIdx: number = 0; protected needCreateLexEnv: boolean = false; + protected lexVarInfo: Map = new Map(); constructor(parent: Scope) { super(parent); } setLexVar(v: Variable, refScope: Scope) { if (!v.isLexVar) { - v.setLexVar(this); + let idxLex = v.setLexVar(this); + this.lexVarInfo.set(v.getName(), idxLex); } LOGD(this.debugTag, "LoopScope.setLexVar(" + v.idxLex + ")"); @@ -531,6 +577,10 @@ export class LoopScope extends LocalScope { } } + getLexVarInfo() { + return this.lexVarInfo; + } + need2CreateLexEnv(): boolean { return this.needCreateLexEnv; } diff --git a/ts2panda/src/statement/classStatement.ts b/ts2panda/src/statement/classStatement.ts index 982d1ab35dd80d43d486a00a5184c8284fd87401..6e977d831a4b9ff49ee7903d21cd773c6a88a704 100644 --- a/ts2panda/src/statement/classStatement.ts +++ b/ts2panda/src/statement/classStatement.ts @@ -13,7 +13,6 @@ * limitations under the License. */ -import { Ts2Panda } from "src/ts2panda"; import * as ts from "typescript"; import { Literal, LiteralBuffer, LiteralTag } from "../base/literal"; import { LReference } from "../base/lreference"; @@ -24,7 +23,13 @@ import { propertyKeyAsString, PropertyKind } from "../base/properties"; -import { getParameterLength4Ctor, getParamLengthOfFunc, isUndefinedIdentifier } from "../base/util"; +import { + getParameterLength4Ctor, + getParamLengthOfFunc, + hasDefaultKeywordModifier, + hasExportKeywordModifier, + isUndefinedIdentifier +} from "../base/util"; import { CacheList, getVregisterCache } from "../base/vregisterCache"; import { Compiler } from "../compiler"; import { createArrayFromElements } from "../expression/arrayLiteralExpression"; @@ -43,7 +48,7 @@ import { Scope, VariableScope } from "../scope"; -import { LocalVariable, Variable } from "../variable"; +import { LocalVariable, ModuleVariable, Variable } from "../variable"; export function compileClassDeclaration(compiler: Compiler, stmt: ts.ClassLikeDeclaration) { compiler.pushScope(stmt); @@ -113,15 +118,30 @@ export function compileClassDeclaration(compiler: Compiler, stmt: ts.ClassLikeDe compileUnCompiledProperty(compiler, properties, classReg); pandaGen.loadAccumulator(stmt, classReg); - if (stmt.name) { - let className = jshelpers.getTextOfIdentifierOrLiteral(stmt.name); - let classScope = compiler.getRecorder().getScopeOfNode(stmt); - if (!ts.isClassExpression(stmt) && classScope.getParent() instanceof GlobalScope) { - pandaGen.stClassToGlobalRecord(stmt, className); - } else { + let classScope = compiler.getRecorder().getScopeOfNode(stmt); + if (hasExportKeywordModifier(stmt)) { + if (stmt.name) { + let className = jshelpers.getTextOfIdentifierOrLiteral(stmt.name); let classInfo = classScope.find(className); - (classInfo.v).initialize(); - pandaGen.storeAccToLexEnv(stmt, classInfo.scope!, classInfo.level, classInfo.v!, true); + (classInfo.v).initialize(); + pandaGen.storeModuleVariable(stmt, className); + } else if (hasDefaultKeywordModifier(stmt)) { + pandaGen.storeModuleVariable(stmt, "*default*"); + } else { + // throw SyntaxError in Recorder + } + } else { + if (stmt.name) { + let className = jshelpers.getTextOfIdentifierOrLiteral(stmt.name); + if (!ts.isClassExpression(stmt) && classScope.getParent() instanceof GlobalScope) { + pandaGen.stClassToGlobalRecord(stmt, className); + } else { + let classInfo = classScope.find(className); + (classInfo.v).initialize(); + pandaGen.storeAccToLexEnv(stmt, classInfo.scope!, classInfo.level, classInfo.v!, true); + } + } else { + // throw SyntaxError in SyntaxChecker } } @@ -402,7 +422,6 @@ function loadCtorObj(node: ts.CallExpression, compiler: Compiler) { } if (ts.isConstructorDeclaration(nearestFunc)) { - let funcObj = nearestFuncScope.findLocal("4funcObj"); pandaGen.loadAccumulator(node, getVregisterCache(pandaGen, CacheList.FUNC)); } else { let outerFunc = jshelpers.getContainingFunctionDeclaration(nearestFunc); @@ -499,6 +518,10 @@ export function getClassNameForConstructor(classNode: ts.ClassLikeDeclaration) { if (!isAnonymousClass(classNode)) { className = jshelpers.getTextOfIdentifierOrLiteral(classNode.name!); } else { + if (ts.isClassDeclaration(classNode) && hasExportKeywordModifier(classNode) && hasDefaultKeywordModifier(classNode)) { + return 'default'; + } + let outerNode = findOuterNodeOfParenthesis(classNode); if (ts.isVariableDeclaration(outerNode)) { @@ -516,6 +539,8 @@ export function getClassNameForConstructor(classNode: ts.ClassLikeDeclaration) { if (ts.isIdentifier(propName) || ts.isStringLiteral(propName) || ts.isNumericLiteral(propName)) { className = jshelpers.getTextOfIdentifierOrLiteral(propName); } + } else if (ts.isExportAssignment(outerNode)) { + className = 'default'; } } @@ -610,7 +635,7 @@ function generatePropertyFromExpr(node: ts.ClassLikeDeclaration, classFields: Ar let staticItems = properties.slice(properties.length - staticNum) properties = properties.slice(0, properties.length - staticNum); properties = properties.reverse(); - properties = properties.concat(staticItems); + properties.push(...staticItems); if (constructNode) { defineClassMember("constructor", constructNode, PropertyKind.Variable, properties, namedPropertyMap); diff --git a/ts2panda/src/statement/forOfStatement.ts b/ts2panda/src/statement/forOfStatement.ts index 31710788804e7aebe386846b697c81ff4a963bab..a6bbe5feb7cf94dd7a7ee33720c0b733911f5e83 100644 --- a/ts2panda/src/statement/forOfStatement.ts +++ b/ts2panda/src/statement/forOfStatement.ts @@ -64,7 +64,7 @@ export function compileForOfStatement(stmt: ts.ForOfStatement, compiler: Compile let object = pandaGen.getTemp(); let loopScope = compiler.getRecorder().getScopeOfNode(stmt); - let needCreateLoopEnv: boolean = loopScope.need2CreateLexEnv() ? true : false; + let needCreateLoopEnv: boolean = loopScope.need2CreateLexEnv(); let loopEnv = pandaGen.getTemp(); // for now Async is not handled. @@ -80,7 +80,8 @@ export function compileForOfStatement(stmt: ts.ForOfStatement, compiler: Compile LabelTarget.pushLabelTarget(labelTarget); LabelTarget.updateName2LabelTarget(stmt.parent, labelTarget); - let tryBuilderWithForOf = new TryBuilderWithForOf(compiler, pandaGen, stmt, doneReg, iterator, labelTarget, needCreateLoopEnv, needCreateLoopEnv ? loopEnv : undefined); + let tryBuilderWithForOf = new TryBuilderWithForOf(compiler, pandaGen, stmt, doneReg, iterator, labelTarget, + needCreateLoopEnv, needCreateLoopEnv ? loopEnv : undefined); compiler.constructTry(stmt, tryBuilderWithForOf, nextLabel); pandaGen.label(stmt, endLabel); diff --git a/ts2panda/src/statement/loopStatement.ts b/ts2panda/src/statement/loopStatement.ts index fc6b1247ae11b3acfc6137728e5dc897c5c83c58..e8cafffd82d42eb9e74f0d0b16f3ab180edc45a4 100644 --- a/ts2panda/src/statement/loopStatement.ts +++ b/ts2panda/src/statement/loopStatement.ts @@ -121,7 +121,7 @@ export function compileForStatement(stmt: ts.ForStatement, compiler: Compiler) { // determine if loopenv need to be created let loopScope = compiler.getRecorder().getScopeOfNode(stmt); - let needCreateLoopEnv: boolean = loopScope.need2CreateLexEnv() ? true : false; + let needCreateLoopEnv: boolean = loopScope.need2CreateLexEnv(); let loopEnv = pandaGen.getTemp(); let createEnvAtBegining: boolean = false; if (needCreateLoopEnv) { diff --git a/ts2panda/src/statement/tryStatement.ts b/ts2panda/src/statement/tryStatement.ts index c5a81771153bf2d04dff0fc42938b36de63bce83..2ae2fa97d592c49d4b0f9ab99a1f3f152e177bd3 100644 --- a/ts2panda/src/statement/tryStatement.ts +++ b/ts2panda/src/statement/tryStatement.ts @@ -25,10 +25,10 @@ import { CacheList, getVregisterCache } from "../base/vregisterCache"; -import { IteratorType, IteratorRecord } from "./forOfStatement"; +import { IteratorRecord } from "./forOfStatement"; import * as astutils from "../astutils"; import { VarDeclarationKind } from "../variable"; -import jshelpers from "../jshelpers"; +import * as jshelpers from "../jshelpers"; // adjust the try...catch...finally into nested try(try...catch) finally export function transformTryCatchFinally(tryStmt: ts.TryStatement, recorder: Recorder): ts.TryStatement { @@ -221,6 +221,7 @@ export class TryBuilder extends TryBuilderBase { } } + // @ts-ignore compileFinalizer(cfc: ControlFlowChange, continueTargetLabel: Label) { this.compiler.compileStatement((this.stmt).finallyBlock!); } diff --git a/ts2panda/src/strictMode.ts b/ts2panda/src/strictMode.ts index 901098efb5c65b0734d38e87591327c3195dbd9b..b23d76e820a1a3145543528a2179cecbfb21fe62 100644 --- a/ts2panda/src/strictMode.ts +++ b/ts2panda/src/strictMode.ts @@ -14,7 +14,7 @@ */ import * as ts from "typescript"; -import jshelpers from "./jshelpers"; +import * as jshelpers from "./jshelpers"; let globalStrict = true; let globalDeclare = false; diff --git a/ts2panda/src/syntaxCheckHelper.ts b/ts2panda/src/syntaxCheckHelper.ts index 8439b27263c0053e12b7543c7300efa8f5c99d11..d7e4ba85967a5440066a4d4b222cfb389c5f2daf 100644 --- a/ts2panda/src/syntaxCheckHelper.ts +++ b/ts2panda/src/syntaxCheckHelper.ts @@ -14,7 +14,7 @@ */ import * as ts from "typescript"; -import jshelpers = require("./jshelpers"); +import * as jshelpers from "./jshelpers"; export function isOctalNumber(num: string): boolean { if (!num || num.length < 2) { diff --git a/ts2panda/src/syntaxChecker.ts b/ts2panda/src/syntaxChecker.ts index 185e3a2df366f5fa3369b44b7e2d68d8dd127b38..e7311cf8eee7c15d3db1a73ea71be67f2e1402ef 100644 --- a/ts2panda/src/syntaxChecker.ts +++ b/ts2panda/src/syntaxChecker.ts @@ -21,7 +21,8 @@ import { } from "./diagnostic"; import { hasExportKeywordModifier } from "./base/util"; import { findInnerExprOfParenthesis } from "./expression/parenthesizedExpression"; -import jshelpers, { getContainingFunction, getContainingFunctionDeclaration, getSourceFileOfNode } from "./jshelpers"; +import * as jshelpers from "./jshelpers"; +import { getContainingFunction, getContainingFunctionDeclaration, getSourceFileOfNode } from "./jshelpers"; import { LOGE } from "./log"; import { Recorder } from "./recorder"; import { @@ -143,6 +144,7 @@ function hasDuplicateEntryInScope(decl1: Decl, decl2: Decl, scope: Scope) { return decl1.name == decl2.name; } // Var and FunctionDeclaration with same names, FunctionDeclaration and FunctionDeclaration with same names are illegal in strict mode + // and Module /** * eg1. * if (true) { @@ -155,15 +157,16 @@ function hasDuplicateEntryInScope(decl1: Decl, decl2: Decl, scope: Scope) { * function a() {}; * function a() {}; * } + * eg3. [module] + * var a; + * function a(){}; */ - if (scope instanceof LocalScope) { - if (isStrictMode(decl1.node)) { - if (decl1 instanceof FuncDecl || decl2 instanceof FuncDecl) { - if (isFunctionLikeDeclaration(decl1.node.parent.parent) || isFunctionLikeDeclaration(decl2.node.parent.parent)) { - return false; - } - return decl1.name == decl2.name; + if (scope instanceof LocalScope && isStrictMode(decl1.node) || scope instanceof ModuleScope) { + if (decl1 instanceof FuncDecl || decl2 instanceof FuncDecl) { + if (isFunctionLikeDeclaration(decl1.node.parent.parent) || isFunctionLikeDeclaration(decl2.node.parent.parent)) { + return false; } + return decl1.name == decl2.name; } } @@ -215,6 +218,7 @@ function checkDuplicateParameter(node: ts.FunctionLikeDeclaration, recorder: Rec return; } parameters.forEach(param => { + // @ts-ignore if (tempNames.includes(param.name)) { throwDupIdError(param); } else { @@ -233,6 +237,7 @@ function checkDuplicateParameterVar(parameterNames: string[] | undefined, scope: continue; } let name = decls[i].name; + // @ts-ignore if (parameterNames.includes(name)) { throwDupIdError(decls[i]); } @@ -263,10 +268,10 @@ function throwDupIdError(decl: Decl) { } //**********************************Part 2: Implementing syntax check except declaration******************************************// -export function checkSyntaxError(node: ts.Node) { +export function checkSyntaxError(node: ts.Node, scope:Scope) { checkSyntaxErrorForSloppyAndStrictMode(node); if (isStrictMode(node) || CmdOptions.isModules()) { - checkSyntaxErrorForStrictMode(node); + checkSyntaxErrorForStrictMode(node, scope); } } @@ -1028,6 +1033,7 @@ function checkInvalidQuestionMark(questionToken: ts.QuestionToken | undefined) { } } +// @ts-ignore function getPropertieDeclaration(node: ts.Node, name: ts.Node) { let decl = undefined; if (ts.isShorthandPropertyAssignment(node)) { @@ -1418,18 +1424,3 @@ function checkBindingPattern(node: ts.BindingPattern) { } } } - -export function checkExportEntries(recorder: Recorder) { - let exportStmts = recorder.getExportStmts(); - let exportNames: Set = new Set(); - exportStmts.forEach(exportStmt => { - let bindingNameMap = exportStmt.getBindingNameMap(); - bindingNameMap.forEach((value: string, key: string) => { - if (!exportNames.has(key)) { - exportNames.add(key); - } else { - throw new DiagnosticError(exportStmt.getNode(), DiagnosticCode.Duplicate_identifier_0, jshelpers.getSourceFileOfNode(exportStmt.getNode()), [key]); - } - }) - }) -} \ No newline at end of file diff --git a/ts2panda/src/syntaxCheckerForStrcitMode.ts b/ts2panda/src/syntaxCheckerForStrcitMode.ts index 42b09db21ea3cbc61e3a2d34db731a325edbddff..2b35fc1d154d65457477f4be45338b4d42c662a5 100644 --- a/ts2panda/src/syntaxCheckerForStrcitMode.ts +++ b/ts2panda/src/syntaxCheckerForStrcitMode.ts @@ -14,10 +14,12 @@ */ import * as ts from "typescript"; +import { hasDefaultKeywordModifier, hasExportKeywordModifier } from "./base/util"; import { CmdOptions } from "./cmdOptions"; import { DiagnosticCode, DiagnosticError } from "./diagnostic"; import { findInnerExprOfParenthesis } from "./expression/parenthesizedExpression"; -import jshelpers from "./jshelpers"; +import * as jshelpers from "./jshelpers"; +import { ModuleScope, Scope } from "./scope"; import { checkStrictModeStatementList } from "./strictMode"; import { isAssignmentOperator, @@ -171,7 +173,6 @@ function checkNoSubstitutionTemplateLiteral(expr: ts.NoSubstitutionTemplateLiter } function checkFunctionDeclaration(node: ts.FunctionDeclaration) { - checkEvalOrArgumentsOrOriginalKeyword(node, node.name); checkParameters(node); if (!isInBlockScope(node.parent!)) { @@ -179,7 +180,57 @@ function checkFunctionDeclaration(node: ts.FunctionDeclaration) { } } -export function checkSyntaxErrorForStrictMode(node: ts.Node) { +function checkClassDeclaration(node: ts.ClassDeclaration) { + if (!hasExportKeywordModifier(node) && !node.name) { + if (!node.name && !hasDefaultKeywordModifier(node)) { + throw new DiagnosticError(node, DiagnosticCode.Identifier_expected); + } + } +} + +function checkImportDeclaration(node: ts.ImportDeclaration, scope: Scope) { + if (!(scope instanceof ModuleScope)) { + throw new DiagnosticError(node, DiagnosticCode.An_import_declaration_can_only_be_used_in_a_namespace_or_module); + } + + if (node.modifiers) { + throw new DiagnosticError(node, DiagnosticCode.An_import_declaration_cannot_have_modifiers); + } + + if (node.importClause && node.importClause.namedBindings) { + let namedBindings = node.importClause.namedBindings; + if (ts.isNamedImports(namedBindings)) { + namedBindings.elements.forEach((element: any) => { + if (jshelpers.getTextOfIdentifierOrLiteral(element.name) == 'arguments' + || jshelpers.getTextOfIdentifierOrLiteral(element.name) == 'eval') { + throw new DiagnosticError(node, DiagnosticCode.Unexpected_eval_or_arguments_in_strict_mode); + } + }); + } + } +} + +function checkExportAssignment(node: ts.ExportAssignment, scope: Scope) { + if (!(scope instanceof ModuleScope)) { + throw new DiagnosticError(node, DiagnosticCode.An_export_assignment_must_be_at_the_top_level_of_a_file_or_module_declaration); + } + + if (node.modifiers) { + throw new DiagnosticError(node, DiagnosticCode.An_export_assignment_cannot_have_modifiers); + } +} + +function checkExportDeclaration(node: ts.ExportDeclaration, scope: Scope) { + if (!(scope instanceof ModuleScope)) { + throw new DiagnosticError(node, DiagnosticCode.An_export_declaration_can_only_be_used_in_a_module); + } + + if (node.modifiers) { + throw new DiagnosticError(node, DiagnosticCode.An_export_declaration_cannot_have_modifiers); + } +} + +export function checkSyntaxErrorForStrictMode(node: ts.Node, scope: Scope) { switch (node.kind) { case ts.SyntaxKind.NumericLiteral: checkNumericLiteral(node); @@ -199,6 +250,9 @@ export function checkSyntaxErrorForStrictMode(node: ts.Node) { case ts.SyntaxKind.ArrowFunction: checkParameters(node); break; + case ts.SyntaxKind.ClassDeclaration: + checkClassDeclaration(node); + break; case ts.SyntaxKind.VariableDeclaration: let varNode = node; checkEvalOrArgumentsOrOriginalKeyword(varNode, varNode.name); @@ -229,7 +283,16 @@ export function checkSyntaxErrorForStrictMode(node: ts.Node) { case ts.SyntaxKind.LastLiteralToken: checkNoSubstitutionTemplateLiteral(node); break; + case ts.SyntaxKind.ImportDeclaration: + checkImportDeclaration(node, scope); + break; + case ts.SyntaxKind.ExportAssignment: + checkExportAssignment(node, scope); + break; + case ts.SyntaxKind.ExportDeclaration: + checkExportDeclaration(node, scope); + break; default: break; } -} \ No newline at end of file +} diff --git a/ts2panda/src/ts2panda.ts b/ts2panda/src/ts2panda.ts index 6e0d6e7cd998823d434bf796f1d7ba567171bcc9..660637b88cc479cb8015db8d0cd6d94776892c8b 100644 --- a/ts2panda/src/ts2panda.ts +++ b/ts2panda/src/ts2panda.ts @@ -14,10 +14,11 @@ */ import { CmdOptions } from "./cmdOptions"; -import { DebugPosInfo } from "./debuginfo"; +import { SourceTextModuleRecord } from "./ecmaModule"; import { Imm, IRNode, + IRNodeKind, Label, OperandType, VReg @@ -30,6 +31,11 @@ import { ExportedSymbol2Type, Function, Ins, + IndirectExportEntry, + LocalExportEntry, + ModuleRecord, + NamespaceImportEntry, + RegularImportEntry, Signature } from "./pandasm"; import { generateCatchTables } from "./statement/tryStatement"; @@ -38,8 +44,9 @@ import { isRangeInst, getRangeStartVregPos } from "./base/util"; -import { TypeOfVreg } from "./pandasm"; import { LiteralBuffer } from "./base/literal"; +import { CompilerDriver } from "./compilerDriver"; +import { ModuleScope } from "./scope"; const dollarSign: RegExp = /\$/g; @@ -48,13 +55,14 @@ const JsonType = { "record": 1, "string": 2, "literal_arr": 3, - "options": 4, - "type_arr": 5 + "module": 4, + "options": 5 }; export class Ts2Panda { static strings: Set = new Set(); - static labelPrefix = "LABEL_"; + static labelPrefix = "L_"; static jsonString: string = ""; + static moduleRecordlist: Array = []; constructor() { } @@ -68,12 +76,11 @@ export class Ts2Panda { let labels: Array = []; pg.getInsns().forEach((insn: IRNode) => { - let insOpcode = insn.mnemonic; + let insOpcode = insn.kind >= IRNodeKind.VREG ? undefined : insn.kind; let insRegs: Array = []; let insIds: Array = []; let insImms: Array = []; let insLabel: string = ""; - let insDebugInfo: DebugPosInfo = new DebugPosInfo(); if (insn instanceof Label) { insLabel = Ts2Panda.labelPrefix + insn.id; @@ -103,12 +110,8 @@ export class Ts2Panda { } }); } - insDebugInfo = insn.debugPosInfo; - if (CmdOptions.isDebugMode()) { - insDebugInfo.ClearMembersForDebugBuild(); - } else { - insDebugInfo.ClearMembersForReleaseBuild(); - } + + insn.debugPosInfo.ClearNodeKind(); insns.push(new Ins( insOpcode, @@ -116,32 +119,31 @@ export class Ts2Panda { insIds.length == 0 ? undefined : insIds, insImms.length == 0 ? undefined : insImms, insLabel === "" ? undefined : insLabel, - insDebugInfo, + insn.debugPosInfo, )); }); return { insns: insns, regsNum: (pg.getTotalRegsNum() - pg.getParametersCount()), - labels: labels + labels: labels.length == 0 ? undefined : labels }; } static dumpStringsArray(ts2abc: any) { let strings_arr = Array.from(Ts2Panda.strings); - strings_arr.forEach(function(str) { - let strObject = { - "type": JsonType.string, - "string": str - } - let jsonStrUnicode = escapeUnicode(JSON.stringify(strObject, null, 2)); - jsonStrUnicode = "$" + jsonStrUnicode.replace(dollarSign, '#$') + "$"; - if (CmdOptions.isEnableDebugLog()) { - Ts2Panda.jsonString += jsonStrUnicode; - } - ts2abc.stdio[3].write(jsonStrUnicode + '\n'); - }); + let strObject = { + "t": JsonType.string, + "s": strings_arr + } + + let jsonStrUnicode = escapeUnicode(JSON.stringify(strObject, null, 2)); + jsonStrUnicode = "$" + jsonStrUnicode.replace(dollarSign, '#$') + "$"; + if (CmdOptions.isEnableDebugLog()) { + Ts2Panda.jsonString += jsonStrUnicode; + } + ts2abc.stdio[3].write(jsonStrUnicode + '\n'); } static dumpTypeLiteralArrayBuffer() { @@ -168,8 +170,8 @@ export class Ts2Panda { literalArrays.forEach(function(literalArray) { let literalArrayObject = { - "type": JsonType.literal_arr, - "literalArray": literalArray + "t": JsonType.literal_arr, + "lit_arr": literalArray } let jsonLiteralArrUnicode = escapeUnicode(JSON.stringify(literalArrayObject, null, 2)); jsonLiteralArrUnicode = "$" + jsonLiteralArrUnicode.replace(dollarSign, '#$') + "$"; @@ -182,7 +184,7 @@ export class Ts2Panda { static dumpCmdOptions(ts2abc: any): void { let options = { - "type": JsonType.options, + "t": JsonType.options, "module_mode": CmdOptions.isModules(), "debug_mode": CmdOptions.isDebugMode(), "log_enabled": CmdOptions.isEnableDebugLog(), @@ -197,6 +199,7 @@ export class Ts2Panda { ts2abc.stdio[3].write(jsonOpt + '\n'); } + // @ts-ignore static dumpPandaGen(pg: PandaGen, ts2abc: any, recordType?: boolean): void { let funcName = pg.internalName; let funcSignature = Ts2Panda.getFuncSignature(pg); @@ -204,34 +207,45 @@ export class Ts2Panda { let sourceFile = pg.getSourceFileDebugInfo(); let callType = pg.getCallType(); let typeRecord = pg.getLocals(); - let typeInfo = new Array(); - typeRecord.forEach((vreg) => { - let typeOfVreg = new TypeOfVreg(vreg.num, vreg.getTypeIndex()); - typeInfo.push(typeOfVreg); - if (CmdOptions.enableTypeLog()) { - console.log("---------------------------------------"); - console.log("- vreg name:", vreg.getVariableName()); - console.log("- vreg local num:", vreg.num); - console.log("- vreg type:", vreg.getTypeIndex()); - } - }); + let typeInfo = undefined; + let exportedSymbol2Types: undefined | Array = undefined; + let declaredSymbol2Types: undefined | Array = undefined; + if (CmdOptions.needRecordType() && CompilerDriver.isTsFile) { + typeInfo = new Array(); + typeRecord.forEach((vreg) => { + typeInfo.push(vreg.getTypeIndex()); + if (CmdOptions.enableTypeLog()) { + console.log("---------------------------------------"); + console.log("- vreg name:", vreg.getVariableName()); + console.log("- vreg local num:", vreg.num); + console.log("- vreg type:", vreg.getTypeIndex()); + } + }); - let exportedTypes = PandaGen.getExportedTypes(); - let exportedSymbol2Types = exportedTypes.size == 0 ? undefined : new Array(); - if (funcName == "func_main_0") { - exportedTypes.forEach((type: number, symbol: string) => { - let exportedSymbol2Type = new ExportedSymbol2Type(symbol, type); - exportedSymbol2Types!.push(exportedSymbol2Type); - }) + if (funcName == "func_main_0") { + let exportedTypes = PandaGen.getExportedTypes(); + let declareddTypes = PandaGen.getDeclaredTypes(); + if (exportedTypes.size != 0) { + exportedSymbol2Types = new Array(); + exportedTypes.forEach((type: number, symbol: string) => { + let exportedSymbol2Type = new ExportedSymbol2Type(symbol, type); + exportedSymbol2Types.push(exportedSymbol2Type); + }); + } + if (declareddTypes.size != 0) { + declaredSymbol2Types = new Array(); + declareddTypes.forEach((type: number, symbol: string) => { + let declaredSymbol2Type = new DeclaredSymbol2Type(symbol, type); + declaredSymbol2Types.push(declaredSymbol2Type); + }); + } + } } - let declareddTypes = PandaGen.getDeclaredTypes(); - let declaredSymbol2Types = declareddTypes.size == 0 ? undefined : new Array(); - if (funcName == "func_main_0") { - declareddTypes.forEach((type: number, symbol: string) => { - let declaredSymbol2Type = new DeclaredSymbol2Type(symbol, type); - declaredSymbol2Types!.push(declaredSymbol2Type); - }) + if (pg.getScope() instanceof ModuleScope) { + Ts2Panda.moduleRecordlist.push( + makeModuleRecord((pg.getScope()).module()) + ); } let variables, sourceCode; @@ -243,6 +257,25 @@ export class Ts2Panda { sourceCode = undefined; } + let catchTableArr; + let catchTables = generateCatchTables(pg.getCatchMap()); + if (!catchTables) { + catchTableArr = undefined; + } else { + catchTableArr = []; + catchTables.forEach((catchTable) => { + let catchBeginLabel = catchTable.getCatchBeginLabel(); + let labelPairs = catchTable.getLabelPairs(); + labelPairs.forEach((labelPair) => { + catchTableArr.push(new CatchTable( + Ts2Panda.labelPrefix + labelPair.getBeginLabel().id, + Ts2Panda.labelPrefix + labelPair.getEndLabel().id, + Ts2Panda.labelPrefix + catchBeginLabel.id + )); + }); + }); + } + let func = new Function( funcName, funcSignature, @@ -250,6 +283,7 @@ export class Ts2Panda { funcInsnsAndRegsNum.insns, funcInsnsAndRegsNum.labels, variables, + catchTableArr, sourceFile, sourceCode, callType, @@ -257,24 +291,12 @@ export class Ts2Panda { exportedSymbol2Types, declaredSymbol2Types ); - let catchTables = generateCatchTables(pg.getCatchMap()); - catchTables.forEach((catchTable) => { - let catchBeginLabel = catchTable.getCatchBeginLabel(); - let labelPairs = catchTable.getLabelPairs(); - labelPairs.forEach((labelPair) => { - func.catchTables.push(new CatchTable( - Ts2Panda.labelPrefix + labelPair.getBeginLabel().id, - Ts2Panda.labelPrefix + labelPair.getEndLabel().id, - Ts2Panda.labelPrefix + catchBeginLabel.id - )); - }); - }); LOGD(func); let funcObject = { - "type": JsonType.function, - "func_body": func + "t": JsonType.function, + "fb": func } let jsonFuncUnicode = escapeUnicode(JSON.stringify(funcObject, null, 2)); jsonFuncUnicode = "$" + jsonFuncUnicode.replace(dollarSign, '#$') + "$"; @@ -284,8 +306,55 @@ export class Ts2Panda { ts2abc.stdio[3].write(jsonFuncUnicode + '\n'); } + static dumpModuleRecords(ts2abc: any): void { + Ts2Panda.moduleRecordlist.forEach(function(module){ + let moduleObject = { + "t": JsonType.module, + "mod": module + }; + let jsonModuleUnicode = escapeUnicode(JSON.stringify(moduleObject, null, 2)); + jsonModuleUnicode = "$" + jsonModuleUnicode.replace(dollarSign, '#$') + "$"; + if (CmdOptions.isEnableDebugLog()) { + Ts2Panda.jsonString += jsonModuleUnicode; + } + ts2abc.stdio[3].write(jsonModuleUnicode + '\n'); + }); + } + static clearDumpData() { Ts2Panda.strings.clear(); Ts2Panda.jsonString = ""; + Ts2Panda.moduleRecordlist = []; } } + +function makeModuleRecord(sourceTextModule: SourceTextModuleRecord): ModuleRecord { + let moduleRecord = new ModuleRecord(); + moduleRecord.moduleName = sourceTextModule.getModuleName(); + + moduleRecord.moduleRequests = [...sourceTextModule.getModuleRequests()]; + + sourceTextModule.getRegularImportEntries().forEach(e => { + moduleRecord.regularImportEntries.push(new RegularImportEntry(e.localName!, e.importName!, e.moduleRequest!)); + }); + + sourceTextModule.getNamespaceImportEntries().forEach(e => { + moduleRecord.namespaceImportEntries.push(new NamespaceImportEntry(e.localName!, e.moduleRequest!)); + }); + + sourceTextModule.getLocalExportEntries().forEach(entries => { + entries.forEach(e => { + moduleRecord.localExportEntries.push(new LocalExportEntry(e.localName!, e.exportName!)); + }); + }); + + sourceTextModule.getIndirectExportEntries().forEach(e => { + moduleRecord.indirectExportEntries.push(new IndirectExportEntry(e.exportName!, e.importName!, e.moduleRequest!)); + }); + + sourceTextModule.getStarExportEntries().forEach(e => { + moduleRecord.starExportEntries.push(e.moduleRequest!); + }); + + return moduleRecord; +} diff --git a/ts2panda/src/typeChecker.ts b/ts2panda/src/typeChecker.ts index 5d2f71a0a3a93ae8b2e1c7bc490e958ca406e87a..07a10c131f42eb7cad12926d5d8774ff5ad3632d 100755 --- a/ts2panda/src/typeChecker.ts +++ b/ts2panda/src/typeChecker.ts @@ -1,21 +1,20 @@ -import ts, { forEachChild } from "typescript"; +import * as ts from "typescript"; import { - ClassType, + ArrayType, ClassInstType, + ClassType, ExternalType, - UnionType, - ArrayType, FunctionType, InterfaceType, - ObjectType + ObjectType, + PrimitiveType, + UnionType } from "./base/typeSystem"; -import { ModuleStmt } from "./modules"; -import { TypeRecorder } from "./typeRecorder"; import * as jshelpers from "./jshelpers"; import { LOGD } from "./log"; -import { PrimitiveType } from "./base/typeSystem"; +import { ModuleStmt } from "./modules"; import { isGlobalDeclare } from "./strictMode"; -import { syncBuiltinESMExports } from "module"; +import { TypeRecorder } from "./typeRecorder"; export class TypeChecker { private static instance: TypeChecker; diff --git a/ts2panda/src/typeRecorder.ts b/ts2panda/src/typeRecorder.ts index 33169181b74a9d5b8e35f4948df0a12be3d4bc81..686758d7d856690050522445f5f74aad592d687b 100755 --- a/ts2panda/src/typeRecorder.ts +++ b/ts2panda/src/typeRecorder.ts @@ -13,16 +13,13 @@ * limitations under the License. */ -import ts, { IndexedAccessType } from "typescript"; +import * as ts from "typescript"; import { - ClassType, - ExternalType, - TypeSummary + ExternalType, PrimitiveType, TypeSummary } from "./base/typeSystem"; +import * as jshelpers from "./jshelpers"; import { ModuleStmt } from "./modules"; import { TypeChecker } from "./typeChecker"; -import { PrimitiveType } from "./base/typeSystem"; -import * as jshelpers from "./jshelpers"; export class TypeRecorder { private static instance: TypeRecorder; diff --git a/ts2panda/src/variable.ts b/ts2panda/src/variable.ts index 5563f6dfead7b6694efec3e7d6c0ad4f026be703..37c79530900c9e7d2a9072e09268995ee8e9ebe1 100644 --- a/ts2panda/src/variable.ts +++ b/ts2panda/src/variable.ts @@ -26,7 +26,6 @@ export enum VarDeclarationKind { CONST, VAR, FUNCTION, - MODULE, CLASS } @@ -78,6 +77,7 @@ export abstract class Variable { this.idxLex = scope.getLexVarIdx() scope.pendingCreateEnv(); this.isLexVar = true; + return this.idxLex; } clearLexVar() { @@ -112,8 +112,6 @@ export abstract class Variable { export class LocalVariable extends Variable { status: InitStatus | null; - isExport: boolean = false; - exportedName: string = ""; constructor(declKind: VarDeclarationKind, name: string, status?: InitStatus) { super(declKind, name); @@ -130,24 +128,35 @@ export class LocalVariable extends Variable { } return true; } +} - setExport() { - this.isExport = true; - } +export class ModuleVariable extends Variable { + private isExport: boolean = false; + private status: InitStatus | null; - isExportVar() { - return this.isExport; + + constructor(declKind: VarDeclarationKind, name: string, status?: InitStatus) { + super(declKind, name); + this.status = status ? status : null; } - setExportedName(name: string) { - this.exportedName = name; + initialize() { + this.status = InitStatus.INITIALIZED; } - getExportedName() { - if (!this.exportedName) { - throw new Error("Exported Variable " + this.getName() + " doesn't have exported name"); + isInitialized() { + if (this.status != null) { + return this.status == InitStatus.INITIALIZED; } - return this.exportedName; + return true; + } + + setExport() { + this.isExport = true; + } + + isExportVar() { + return this.isExport; } } @@ -155,4 +164,4 @@ export class GlobalVariable extends Variable { constructor(declKind: VarDeclarationKind, name: string) { super(declKind, name); } -} \ No newline at end of file +} diff --git a/ts2panda/templates/diagnostic.ts.erb b/ts2panda/templates/diagnostic.ts.erb index 795fda099aa820287af95bc61ec1e981a6c8638a..1de13a95244cf349f2f2b32c6273cd68615ed509 100755 --- a/ts2panda/templates/diagnostic.ts.erb +++ b/ts2panda/templates/diagnostic.ts.erb @@ -46,26 +46,26 @@ export function createDiagnosticOnFirstToken(file:ts.SourceFile, node: ts.Node , return diagnostic; } -export function createFileDiagnostic(file:ts.SourceFile, node: ts.Node, message: ts.DiagnosticMessage,...args:(string | number | undefined)[]) { - - let diagnostic; - let span = jshelpers.getErrorSpanForNode(file, node); - switch (node.kind) { - case ts.SyntaxKind.Identifier: - diagnostic = jshelpers.createFileDiagnostic(file,span.start,span.length,message,ts.idText(node)); - break; - case ts.SyntaxKind.PrivateIdentifier: - diagnostic = jshelpers.createFileDiagnostic(file,span.start,span.length,message,ts.idText(node)); - break; - case ts.SyntaxKind.ReturnStatement: - diagnostic = createDiagnosticOnFirstToken(file,node,message,...args); - break; - default: - diagnostic = jshelpers.createFileDiagnostic(file,span.start,span.length,message,...args); - break; - } +export function createFileDiagnostic(node: ts.Node, message: ts.DiagnosticMessage, ...args: (string | number | undefined)[]) { + let diagnostic; + let soureceFile: ts.SourceFile = jshelpers.getSourceFileOfNode(node); + let span = jshelpers.getErrorSpanForNode(soureceFile, node); + switch (node.kind) { + case ts.SyntaxKind.Identifier: + diagnostic = jshelpers.createFileDiagnostic(soureceFile, span.start, span.length, message, ts.idText(node)); + break; + case ts.SyntaxKind.PrivateIdentifier: + diagnostic = jshelpers.createFileDiagnostic(soureceFile, span.start, span.length, message, ts.idText(node)); + break; + case ts.SyntaxKind.ReturnStatement: + diagnostic = createDiagnosticOnFirstToken(soureceFile, node, message, ...args); + break; + default: + diagnostic = jshelpers.createDiagnosticForNode(node, message, ...args); + break; + } - return diagnostic; + return diagnostic; } export function createDiagnostic(file:ts.SourceFile | undefined, location: ts.Node | undefined, message: ts.DiagnosticMessage,...args:(string | number | undefined)[]) { @@ -76,7 +76,7 @@ export function createDiagnostic(file:ts.SourceFile | undefined, location: ts.No } if (file) { - diagnostic = createFileDiagnostic(file, location, message, ...args); + diagnostic = createFileDiagnostic(location, message, ...args); } else { diagnostic = jshelpers.createDiagnosticForNode(location, message, ...args) } @@ -84,6 +84,7 @@ export function createDiagnostic(file:ts.SourceFile | undefined, location: ts.No return diagnostic } +// @ts-ignore function diag(code:number, category:ts.DiagnosticCategory, key:string, message:string, reportsUnnecessary?:{},elidedInCompatabilityPyramid?:{}):ts.DiagnosticMessage { return { code: code, category: category, key: key, message: message, reportsUnnecessary: reportsUnnecessary }; } diff --git a/ts2panda/templates/irnodes.ts.erb b/ts2panda/templates/irnodes.ts.erb index bbe51f5d1f63d45df2e16e879710d7e807dbb627..40cbc33f374074fa546881fd82027161e85e9185 100755 --- a/ts2panda/templates/irnodes.ts.erb +++ b/ts2panda/templates/irnodes.ts.erb @@ -14,27 +14,177 @@ % def get_node_kind(mnemonic) % return "#{mnemonic.gsub('.', '_').upcase}" % end - +% +% def insn2node(insn) +% mnemonic = insn.mnemonic.split('.') +% return mnemonic.map{|el| el == '64' ? 'Wide' : el.capitalize}.join() +% end +% +% def get_result_type(insn) +% if insn.mnemonic.start_with? "call" +% return "ResultType.Unknown" +% end +% case insn.dtype +% when 'i32' +% return "ResultType.Int" +% when 'i64', 'b64' +% return "ResultType.Long" +% when 'f64' +% return "ResultType.Float" +% when 'obj' +% return "ResultType.Obj" +% else +% return "ResultType.None" +% end +% end +% +% def get_result_dst(insn) +% if insn.properties.include? "acc_write" +% return "ResultDst.Acc" +% end +% dst_operands = insn.operands.select { |op| op.dst? } +% if dst_operands.length > 0 and dst_operands[0].reg? +% return "ResultDst.VReg" +% end +% return "ResultDst.None" +% end +% +% def is_VReg(name) +% if name == :v +% return true +% end +% end +% +% def is_Acc(name) +% if name == :acc +% return true +% end +% end +% +% def is_Imm(name) +% if name == :imm +% return true +% end +% end +% +% def is_Id(name) +% if %i[method_id type_id field_id string_id literalarray_id callsite_id].include?(name) +% return true +% end +% end +% +% def is_Call(insn) +% if insn.mnemonic.start_with? "call" +% return true +% end +% return false +% end +% +% def is_CallRange(insn) +% if insn.mnemonic == "call.range" or insn.mnemonic == "calli.dyn.range" or insn.mnemonic == "ecma.callirangedyn" or insn.mnemonic == "ecma.callithisrangedyn" or insn.mnemonic == "ecma.createobjectwithexcludedkeys" or insn.mnemonic == "ecma.newobjdynrange" +% return true +% end +% return false +% end +% +% def get_operand_type(name, insn) +% if is_VReg(name) +% return "VReg" +% elsif is_Imm(name) +% is_jump = insn.properties.include? 'jump' +% return is_jump ? "Label" : "Imm" +% elsif is_Id(name) +% return "string" +% else +% return nil +% end +% end +% +% def get_operands(sig) +% return [] unless sig.include? ' ' +% _, operands = sig.match(/(\S+) (.+)/).captures +% operands = operands.split(', ') +% end +% +% def get_ctor_args(insn) +% operands = get_operands(insn.sig) +% ops = Array.new +% ctor_args = Array.new +% operands.map do |operand| +% operand_parts = operand.split(':') +% case operand_parts.size +% when 1 +% name = operand_parts[0] +% when 2 +% name, _ = operand_parts +% when 3 +% name, _, _ = operand_parts +% else +% raise 'Unexpected operand string' +% end +% ops.push(name) +% name_tmp = name.to_s.gsub(/[0-9]/, '').to_sym +% type = get_operand_type(name_tmp,insn) +% if is_Call(insn) and !is_CallRange(insn) and is_VReg(name_tmp) and !insn.mnemonic.include?('acc') +% ctor_args.push("#{name}?: #{type}") +% else +% ctor_args.push("#{name}: #{type}") +% end +% end +% return ops,ctor_args +% end +% +% def get_operand_kind(op, insn) +% if op.reg? +% if op.src? and op.dst? +% return 2 +% elsif op.src? +% return 0 +% elsif op.dst? +% return 1 +% end +% return nil +% elsif op.imm? +% is_jump = insn.properties.include? 'jump' +% return is_jump ? 6 : 3 +% elsif op.id? +% is_string_id = insn.properties.include? 'string_id' +% return is_string_id ? 5 : 4 +% else +% return nil +% end +% end +% +% def make_format(fmt, insn) +% operands = fmt.operands.map {|op| "[#{get_operand_kind(op, insn)}, #{op.width}]"} +% return "[" + operands.join(", ") + "]" +% end +% +% def get_parent_type(insn) +% if insn.prefix != nil and insn.prefix.name == "ecma" +% return "Intrinsic" +% else +% return "IRNode" +% end +% end // Autogenerated file -- DO NOT EDIT! -import { PandaGen } from "./pandagen"; import * as ts from "typescript"; -import * as jshelpers from "./jshelpers"; import { - DebugInfo, DebugPosInfo, NodeKind } from "./debuginfo"; -import { LOGE } from "./log" +import { Scope } from "./scope"; export enum IRNodeKind { +% Panda::instructions.group_by(&:mnemonic).each do |mnemonic, group| + <%= get_node_kind(mnemonic) %>, +% end VREG, IMM, LABEL, - VIRTUALINS_DYN, + VIRTUALSTARTINS_DYN, + VIRTUALENDINS_DYN, DEFINE_GLOBAL_VAR, -% Panda::instructions.group_by(&:mnemonic).each do |mnemonic, group| - <%= get_node_kind(mnemonic) %>, -% end } export function getInstructionSize(opcode: IRNodeKind) { @@ -92,41 +242,62 @@ export type OperandType = VReg | Imm | Label | string | number export enum OperandKind { // the least significant bit indicates vreg // the second bit indicates src or dst - SrcVReg, DstVReg, SrcDstVReg, Imm, Id, StringId, Label + SrcVReg = 0, DstVReg, SrcDstVReg, Imm, Id, StringId, Label } export namespace OperandKind { + // @ts-ignore function isVReg(kind: OperandKind): boolean { return kind === OperandKind.SrcVReg || kind === OperandKind.DstVReg || kind === OperandKind.SrcDstVReg; } } -export class FormatItem { - constructor( - readonly kind: OperandKind, - readonly bitwidth: number, - ) {} +export type Format = number[][] + +export function getInsnMnemonic(opcode: IRNodeKind): string { + switch(opcode) { +% Panda::instructions.group_by(&:mnemonic).each do |mnemonic, group| +% node_kind = get_node_kind(mnemonic) +% kind = "IRNodeKind." + node_kind + case <%= kind %>: + return "<%= mnemonic %>"; +% end + default: + return ''; + } } -export type Format = FormatItem[] +export function getInsnFormats(opcode: IRNodeKind) { + switch(opcode) { +% Panda::instructions.group_by(&:mnemonic).each do |mnemonic, group| +% insn = group.first +% formats = group.map {|i| make_format(i,insn) } +% node_kind = get_node_kind(mnemonic) +% kind = "IRNodeKind." + node_kind + case <%= kind %>: { + return [ + <%= formats.join(",\n ") %> + ]; + } +% end + default: + return []; + } +} export abstract class IRNode { private node: ts.Node | NodeKind = NodeKind.Normal; constructor( readonly kind: IRNodeKind, - readonly mnemonic: string, readonly operands: OperandType[], - readonly formats: Format[] ) {} // for debuginfo public debugPosInfo: DebugPosInfo = new DebugPosInfo(); - abstract resultType(): ResultType; - abstract resultIn(): ResultDst; - toString(): string { - let out = this.mnemonic + "\t"; - if (this.mnemonic.length < 8) { + let mnemonic = this.getMnemonic(); + let out = mnemonic + "\t"; + if (mnemonic.length < 8) { out += "\t"; } @@ -150,127 +321,64 @@ export abstract class IRNode { return "undefined"; } + + getMnemonic() { + return getInsnMnemonic(this.kind); + } + + getFormats() { + return getInsnFormats(this.kind); + } } export abstract class Intrinsic extends IRNode { - slotSize: number = 0; constructor( readonly kind: IRNodeKind, - readonly mnemonic: string, readonly operands: OperandType[], - readonly formats: Format[] ) { - super(kind, mnemonic, operands, formats); + super(kind, operands); } toString(): string { return super.toString() + " [i]"; } - - hasIC(): boolean { - return this.slotSize > 0; - } - - updateICOffset(base: number): number {return 0}; - - validateIC(offset: number, slotSize: number): number { - let end = offset + slotSize; - if (end > 0xFFFF) { - return 0xFFFF; - } else { - return offset; - } - } } export class VReg { - private static global_id = 0; - private typeIndex: number = 0; - private variableName: string = ""; - readonly id: number; // used for debug purpose to distinguish one instance from another num: number = -1; - // for debug purposes - private stacktrace: (undefined | string); - toString(): string { - if (this.num != -1) { return "V" + this.num; - } else { - return "L" + this.id; - } } constructor() { - this.id = VReg.global_id++; - - // for debug purposes - this.setStackTrace(null); - } - - // for debug purposes - getStackTrace(): (undefined | string) { - return this.stacktrace; - } - - setStackTrace(stack?: null): void { - if (stack === undefined) { - let error = new Error(); - let trace = error.stack; - - this.stacktrace = trace; - return; - } - - if (stack === null) { - this.stacktrace = undefined; - return; - } } getTypeIndex() { - return this.typeIndex; + return 0; } + // @ts-ignore setTypeIndex(typeIndex: number) { - this.typeIndex = typeIndex; } getVariableName() { - return this.variableName; + return ''; } + // @ts-ignore setVariableName(variableName: string) { - this.variableName = variableName; } } export class Imm extends IRNode { - private type: ResultType; readonly value: number; - constructor(type: ResultType, value: number) { - super(IRNodeKind.IMM, "", [], []); - this.type = type; + constructor(value: number) { + super(IRNodeKind.IMM, []); this.value = value; } - static zero(): Imm { - return new Imm(ResultType.Int, 0); - } - - static one(): Imm { - return new Imm(ResultType.Int, 1); - } - - resultType(): ResultType { - return this.type; - } - - resultIn(): ResultDst { - return ResultDst.None; - } - toString(): string { return "#" + this.value; } @@ -278,192 +386,44 @@ export class Imm extends IRNode { export class Label extends IRNode { private static global_id = 0; - readonly id: number; // used for debug purpose to distinguish one instance from another + readonly id: number; constructor() { - super(IRNodeKind.LABEL, "", [], []); + super(IRNodeKind.LABEL, []); this.id = Label.global_id++; } - resultType(): ResultType { - return ResultType.None; + toString(): string { + return "LABEL_" + this.id; } +} + +export class DebugInsStartPlaceHolder extends IRNode { + private scope: Scope; - resultIn(): ResultDst { - return ResultDst.None; + constructor(scope: Scope) { + super(IRNodeKind.VIRTUALSTARTINS_DYN, []); + this.scope = scope; } - toString(): string { - return "LABEL_" + this.id; + getScope() { + return this.scope; } } -export class DebugInsPlaceHolder extends IRNode { - constructor() { - super(IRNodeKind.VIRTUALINS_DYN, "", [], []); - } +export class DebugInsEndPlaceHolder extends IRNode { + private scope: Scope; - resultType(): ResultType { - return ResultType.None; + constructor(scope: Scope) { + super(IRNodeKind.VIRTUALENDINS_DYN, []); + this.scope = scope; } - resultIn(): ResultDst { - return ResultDst.None; + getScope() { + return this.scope; } } -% def insn2node(insn) -% mnemonic = insn.mnemonic.split('.') -% return mnemonic.map{|el| el == '64' ? 'Wide' : el.capitalize}.join() -% end -% -% def get_result_type(insn) -% if insn.mnemonic.start_with? "call" -% return "ResultType.Unknown" -% end -% case insn.dtype -% when 'i32' -% return "ResultType.Int" -% when 'i64', 'b64' -% return "ResultType.Long" -% when 'f64' -% return "ResultType.Float" -% when 'obj' -% return "ResultType.Obj" -% else -% return "ResultType.None" -% end -% end -% -% def get_result_dst(insn) -% if insn.properties.include? "acc_write" -% return "ResultDst.Acc" -% end -% dst_operands = insn.operands.select { |op| op.dst? } -% if dst_operands.length > 0 and dst_operands[0].reg? -% return "ResultDst.VReg" -% end -% return "ResultDst.None" -% end -% -% def is_VReg(name) -% if name == :v -% return true -% end -% end -% -% def is_Acc(name) -% if name == :acc -% return true -% end -% end -% -% def is_Imm(name) -% if name == :imm -% return true -% end -% end -% -% def is_Id(name) -% if %i[method_id type_id field_id string_id literalarray_id callsite_id].include?(name) -% return true -% end -% end -% -% def is_Call(insn) -% if insn.mnemonic.start_with? "call" -% return true -% end -% return false -% end -% -% def is_CallRange(insn) -% if insn.mnemonic == "call.range" or insn.mnemonic == "calli.dyn.range" or insn.mnemonic == "ecma.callirangedyn" or insn.mnemonic == "ecma.callithisrangedyn" or insn.mnemonic == "ecma.createobjectwithexcludedkeys" or insn.mnemonic == "ecma.newobjdynrange" -% return true -% end -% return false -% end -% -% def get_operand_type(name, insn) -% if is_VReg(name) -% return "VReg" -% elsif is_Imm(name) -% is_jump = insn.properties.include? 'jump' -% return is_jump ? "Label" : "Imm" -% elsif is_Id(name) -% return "string" -% else -% return nil -% end -% end -% -% def get_operands(sig) -% return [] unless sig.include? ' ' -% _, operands = sig.match(/(\S+) (.+)/).captures -% operands = operands.split(', ') -% end -% -% def get_ctor_args(insn) -% operands = get_operands(insn.sig) -% ops = Array.new -% ctor_args = Array.new -% operands.map do |operand| -% operand_parts = operand.split(':') -% case operand_parts.size -% when 1 -% name = operand_parts[0] -% when 2 -% name, _ = operand_parts -% when 3 -% name, _, _ = operand_parts -% else -% raise 'Unexpected operand string' -% end -% ops.push(name) -% name_tmp = name.to_s.gsub(/[0-9]/, '').to_sym -% type = get_operand_type(name_tmp,insn) -% if is_Call(insn) and !is_CallRange(insn) and is_VReg(name_tmp) and !insn.mnemonic.include?('acc') -% ctor_args.push("#{name}?: #{type}") -% else -% ctor_args.push("#{name}: #{type}") -% end -% end -% return ops,ctor_args -% end -% -% def get_operand_kind(op, insn) -% if op.reg? -% if op.src? and op.dst? -% return "OperandKind.SrcDstVReg" -% elsif op.src? -% return "OperandKind.SrcVReg" -% elsif op.dst? -% return "OperandKind.DstVReg" -% end -% return nil -% elsif op.imm? -% is_jump = insn.properties.include? 'jump' -% return is_jump ? "OperandKind.Label" : "OperandKind.Imm" -% elsif op.id? -% is_string_id = insn.properties.include? 'string_id' -% return is_string_id ? "OperandKind.StringId" : "OperandKind.Id" -% else -% return nil -% end -% end -% -% def make_format(fmt, insn) -% operands = fmt.operands.map {|op| "new FormatItem(#{get_operand_kind(op, insn)}, #{op.width})"} -% return "[" + operands.join(", ") + "]" -% end -% -% def get_parent_type(insn) -% if insn.prefix != nil and insn.prefix.name == "ecma" -% return "Intrinsic" -% else -% return "IRNode" -% end -% end % Panda::instructions.group_by(&:mnemonic).each do |mnemonic, group| % insn = group.first % jump = insn.properties.include? 'jump' @@ -472,7 +432,6 @@ export class DebugInsPlaceHolder extends IRNode { % ops_list,ctor_arg_list = get_ctor_args(insn) % ctor_args = ctor_arg_list.map {|arg| "#{arg}"}.join(", ") % ops = ops_list.map { |op| "#{op}"}.join(", ") -% formats = group.map {|i| make_format(i,insn) } % result_type = get_result_type(insn) % result_dst = get_result_dst(insn); % is_call_op = is_Call(insn) @@ -513,28 +472,20 @@ export class <%= insn2node(insn) %> extends <%=parent_type %> { % end super( <%= kind %>, - "<%= insn.mnemonic %>", % if is_call_op or is_callrange_op or insn2node(insn) == "BuiltinR2i" operands, % else - [<%= ops %>], + [<%= ops %>] % end - [ - <%= formats.join(",\n ") %> - ] ); } - resultType(): ResultType { - return <%= result_type %>; - } - resultIn(): ResultDst { - return <%= result_dst %>; - } % if jump % target_index = insn.operands.index {|op| op.imm? } + getTarget(): Label { return