arkanalyzer 1.0.86 → 1.0.88
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.en.md +69 -65
- package/README.md +56 -70
- package/config/arkanalyzer.json +7 -2
- package/docs/cppFrontend/ArkAnalyzer-cpp_usage_guide.md +245 -0
- package/docs/cppFrontend/cpp_frontend_build_guide.md +126 -0
- package/docs/cppFrontend/cpp_frontend_user_guide.md +175 -0
- package/docs/cppFrontend/img.png +0 -0
- package/docs/cppFrontend/img_1.png +0 -0
- package/docs/cppFrontend/img_10.png +0 -0
- package/docs/cppFrontend/img_11.png +0 -0
- package/docs/cppFrontend/img_12.png +0 -0
- package/docs/cppFrontend/img_13.png +0 -0
- package/docs/cppFrontend/img_14.png +0 -0
- package/docs/cppFrontend/img_15.png +0 -0
- package/docs/cppFrontend/img_16.png +0 -0
- package/docs/cppFrontend/img_17.png +0 -0
- package/docs/cppFrontend/img_18.png +0 -0
- package/docs/cppFrontend/img_19.png +0 -0
- package/docs/cppFrontend/img_2.png +0 -0
- package/docs/cppFrontend/img_20.png +0 -0
- package/docs/cppFrontend/img_21.png +0 -0
- package/docs/cppFrontend/img_22.png +0 -0
- package/docs/cppFrontend/img_23.png +0 -0
- package/docs/cppFrontend/img_3.png +0 -0
- package/docs/cppFrontend/img_4.png +0 -0
- package/docs/cppFrontend/img_5.png +0 -0
- package/docs/cppFrontend/img_6.png +0 -0
- package/docs/cppFrontend/img_7.png +0 -0
- package/docs/cppFrontend/img_8.png +0 -0
- package/docs/cppFrontend/img_9.png +0 -0
- package/docs/sig_programanalysis.en.md +66 -0
- package/docs/sig_programanalysis.md +73 -0
- package/lib/Config.d.ts +35 -1
- package/lib/Config.d.ts.map +1 -1
- package/lib/Config.js +91 -2
- package/lib/Scene.d.ts +25 -2
- package/lib/Scene.d.ts.map +1 -1
- package/lib/Scene.js +151 -44
- package/lib/callgraph/algorithm/AbstractAnalysis.d.ts +4 -3
- package/lib/callgraph/algorithm/AbstractAnalysis.d.ts.map +1 -1
- package/lib/callgraph/algorithm/AbstractAnalysis.js +17 -17
- package/lib/callgraph/algorithm/RapidTypeAnalysis.d.ts +6 -1
- package/lib/callgraph/algorithm/RapidTypeAnalysis.d.ts.map +1 -1
- package/lib/callgraph/algorithm/RapidTypeAnalysis.js +117 -14
- package/lib/callgraph/common/Statistics.d.ts +4 -2
- package/lib/callgraph/common/Statistics.d.ts.map +1 -1
- package/lib/callgraph/common/Statistics.js +14 -2
- package/lib/callgraph/model/CallGraph.d.ts +12 -8
- package/lib/callgraph/model/CallGraph.d.ts.map +1 -1
- package/lib/callgraph/model/CallGraph.js +53 -29
- package/lib/callgraph/model/builder/CallGraphBuilder.d.ts +1 -0
- package/lib/callgraph/model/builder/CallGraphBuilder.d.ts.map +1 -1
- package/lib/callgraph/model/builder/CallGraphBuilder.js +5 -1
- package/lib/callgraph/pointerAnalysis/Pag.d.ts.map +1 -1
- package/lib/callgraph/pointerAnalysis/Pag.js +3 -0
- package/lib/callgraph/pointerAnalysis/PointerAnalysis.js +4 -2
- package/lib/cli/cli.d.ts +3 -0
- package/lib/cli/cli.d.ts.map +1 -0
- package/lib/cli/cli.js +82 -0
- package/lib/cli/commands/cg.d.ts +53 -0
- package/lib/cli/commands/cg.d.ts.map +1 -0
- package/lib/cli/commands/cg.js +404 -0
- package/lib/cli/commands/index.d.ts +6 -0
- package/lib/cli/commands/index.d.ts.map +1 -0
- package/lib/cli/commands/index.js +64 -0
- package/lib/cli/commands/ir.d.ts +26 -0
- package/lib/cli/commands/ir.d.ts.map +1 -0
- package/lib/cli/commands/ir.js +94 -0
- package/lib/core/base/Constant.d.ts +1 -1
- package/lib/core/base/Constant.d.ts.map +1 -1
- package/lib/core/base/Constant.js +1 -1
- package/lib/core/base/Expr.d.ts +29 -5
- package/lib/core/base/Expr.d.ts.map +1 -1
- package/lib/core/base/Expr.js +145 -23
- package/lib/core/base/Position.d.ts +14 -0
- package/lib/core/base/Position.d.ts.map +1 -1
- package/lib/core/base/Position.js +27 -0
- package/lib/core/base/Ref.d.ts +1 -0
- package/lib/core/base/Ref.d.ts.map +1 -1
- package/lib/core/base/Ref.js +4 -1
- package/lib/core/base/Type.d.ts +64 -24
- package/lib/core/base/Type.d.ts.map +1 -1
- package/lib/core/base/Type.js +144 -49
- package/lib/core/common/ArkError.d.ts +26 -2
- package/lib/core/common/ArkError.d.ts.map +1 -1
- package/lib/core/common/ArkError.js +56 -2
- package/lib/core/common/ArkIRTransformer.d.ts +11 -10
- package/lib/core/common/ArkIRTransformer.d.ts.map +1 -1
- package/lib/core/common/ArkIRTransformer.js +1 -1
- package/lib/core/common/ArkValueTransformer.d.ts +14 -12
- package/lib/core/common/ArkValueTransformer.d.ts.map +1 -1
- package/lib/core/common/ArkValueTransformer.js +1 -5
- package/lib/core/common/Const.d.ts +4 -0
- package/lib/core/common/Const.d.ts.map +1 -1
- package/lib/core/common/Const.js +5 -1
- package/lib/core/common/DummyMainCreater.d.ts +23 -13
- package/lib/core/common/DummyMainCreater.d.ts.map +1 -1
- package/lib/core/common/DummyMainCreater.js +66 -43
- package/lib/core/common/EtsConst.d.ts +11 -0
- package/lib/core/common/EtsConst.d.ts.map +1 -1
- package/lib/core/common/EtsConst.js +12 -1
- package/lib/core/common/IRInference.d.ts.map +1 -1
- package/lib/core/common/IRInference.js +6 -2
- package/lib/core/common/IRUtils.d.ts.map +1 -1
- package/lib/core/common/IRUtils.js +3 -33
- package/lib/core/common/ModelUtils.d.ts +4 -7
- package/lib/core/common/ModelUtils.d.ts.map +1 -1
- package/lib/core/common/ModelUtils.js +77 -110
- package/lib/core/common/SdkUtils.d.ts +1 -1
- package/lib/core/common/SdkUtils.d.ts.map +1 -1
- package/lib/core/common/SdkUtils.js +14 -5
- package/lib/core/common/TypeInference.d.ts.map +1 -1
- package/lib/core/common/TypeInference.js +9 -3
- package/lib/core/graph/BaseExplicitGraph.d.ts +4 -4
- package/lib/core/graph/BaseExplicitGraph.d.ts.map +1 -1
- package/lib/core/graph/BaseExplicitGraph.js +15 -8
- package/lib/core/graph/BasicBlock.d.ts.map +1 -1
- package/lib/core/graph/Scc.d.ts.map +1 -1
- package/lib/core/graph/Scc.js +7 -2
- package/lib/core/graph/builder/CfgBuilder.d.ts +10 -7
- package/lib/core/graph/builder/CfgBuilder.d.ts.map +1 -1
- package/lib/core/graph/builder/CfgBuilder.js +12 -5
- package/lib/core/inference/Inference.d.ts.map +1 -1
- package/lib/core/inference/Inference.js +7 -0
- package/lib/core/inference/ModelInference.d.ts +1 -1
- package/lib/core/inference/ModelInference.d.ts.map +1 -1
- package/lib/core/inference/ValueInference.d.ts +3 -2
- package/lib/core/inference/ValueInference.d.ts.map +1 -1
- package/lib/core/inference/ValueInference.js +64 -12
- package/lib/core/inference/abc/AbcInference.d.ts +28 -2
- package/lib/core/inference/abc/AbcInference.d.ts.map +1 -1
- package/lib/core/inference/abc/AbcInference.js +105 -4
- package/lib/core/model/ArkBaseModel.d.ts +14 -1
- package/lib/core/model/ArkBaseModel.d.ts.map +1 -1
- package/lib/core/model/ArkBaseModel.js +61 -2
- package/lib/core/model/ArkBody.d.ts.map +1 -1
- package/lib/core/model/ArkBody.js +1 -3
- package/lib/core/model/ArkClass.d.ts +25 -2
- package/lib/core/model/ArkClass.d.ts.map +1 -1
- package/lib/core/model/ArkClass.js +72 -30
- package/lib/core/model/ArkField.d.ts.map +1 -1
- package/lib/core/model/ArkField.js +3 -1
- package/lib/core/model/ArkFile.d.ts +4 -1
- package/lib/core/model/ArkFile.d.ts.map +1 -1
- package/lib/core/model/ArkFile.js +44 -3
- package/lib/core/model/ArkImport.d.ts.map +1 -1
- package/lib/core/model/ArkImport.js +9 -1
- package/lib/core/model/ArkMetadata.d.ts +32 -1
- package/lib/core/model/ArkMetadata.d.ts.map +1 -1
- package/lib/core/model/ArkMetadata.js +28 -2
- package/lib/core/model/ArkMethod.d.ts +5 -0
- package/lib/core/model/ArkMethod.d.ts.map +1 -1
- package/lib/core/model/ArkMethod.js +33 -1
- package/lib/core/model/ArkNamespace.d.ts +2 -0
- package/lib/core/model/ArkNamespace.d.ts.map +1 -1
- package/lib/core/model/ArkNamespace.js +11 -0
- package/lib/core/model/ArkSignature.d.ts +3 -3
- package/lib/core/model/ArkSignature.d.ts.map +1 -1
- package/lib/core/model/ArkSignature.js +14 -9
- package/lib/core/model/builder/ArkClassBuilder.d.ts +2 -0
- package/lib/core/model/builder/ArkClassBuilder.d.ts.map +1 -1
- package/lib/core/model/builder/ArkClassBuilder.js +3 -3
- package/lib/core/model/builder/ArkMetadataBuilder.d.ts +21 -0
- package/lib/core/model/builder/ArkMetadataBuilder.d.ts.map +1 -0
- package/lib/core/model/builder/ArkMetadataBuilder.js +160 -0
- package/lib/core/model/builder/ArkMethodBuilder.d.ts +4 -1
- package/lib/core/model/builder/ArkMethodBuilder.d.ts.map +1 -1
- package/lib/core/model/builder/ArkMethodBuilder.js +50 -29
- package/lib/core/model/builder/ArkNamespaceBuilder.d.ts +1 -0
- package/lib/core/model/builder/ArkNamespaceBuilder.d.ts.map +1 -1
- package/lib/core/model/builder/ArkNamespaceBuilder.js +2 -1
- package/lib/core/model/builder/BodyBuilder.d.ts +4 -0
- package/lib/core/model/builder/BodyBuilder.d.ts.map +1 -1
- package/lib/core/model/builder/builderUtils.d.ts +1 -0
- package/lib/core/model/builder/builderUtils.d.ts.map +1 -1
- package/lib/core/model/builder/builderUtils.js +7 -3
- package/lib/frontend/cppFrontend/ast/ArkCxxAstNode.d.ts +296 -0
- package/lib/frontend/cppFrontend/ast/ArkCxxAstNode.d.ts.map +1 -0
- package/lib/frontend/cppFrontend/ast/ArkCxxAstNode.js +145 -0
- package/lib/frontend/cppFrontend/ast/astJsonNapi/napiApi.d.ts +8 -0
- package/lib/frontend/cppFrontend/ast/astJsonNapi/napiApi.d.ts.map +1 -0
- package/lib/frontend/cppFrontend/ast/astJsonNapi/napiApi.js +90 -0
- package/lib/frontend/cppFrontend/ast/astJsonNapi/napiRunner.d.ts +8 -0
- package/lib/frontend/cppFrontend/ast/astJsonNapi/napiRunner.d.ts.map +1 -0
- package/lib/frontend/cppFrontend/ast/astJsonNapi/napiRunner.js +183 -0
- package/lib/frontend/cppFrontend/ast/astParser.d.ts +25 -0
- package/lib/frontend/cppFrontend/ast/astParser.d.ts.map +1 -0
- package/lib/frontend/cppFrontend/ast/astParser.js +280 -0
- package/lib/frontend/cppFrontend/ast/astUtils.d.ts +18 -0
- package/lib/frontend/cppFrontend/ast/astUtils.d.ts.map +1 -0
- package/lib/frontend/cppFrontend/ast/astUtils.js +158 -0
- package/lib/frontend/cppFrontend/ast/const.d.ts +17 -0
- package/lib/frontend/cppFrontend/ast/const.d.ts.map +1 -0
- package/lib/frontend/cppFrontend/ast/const.js +58 -0
- package/lib/frontend/cppFrontend/ast/index.d.ts +5 -0
- package/lib/frontend/cppFrontend/ast/index.d.ts.map +1 -0
- package/lib/frontend/cppFrontend/ast/index.js +31 -0
- package/lib/frontend/cppFrontend/base/Constant.d.ts +9 -0
- package/lib/frontend/cppFrontend/base/Constant.d.ts.map +1 -0
- package/lib/frontend/cppFrontend/base/Constant.js +33 -0
- package/lib/frontend/cppFrontend/base/Expr.d.ts +174 -0
- package/lib/frontend/cppFrontend/base/Expr.d.ts.map +1 -0
- package/lib/frontend/cppFrontend/base/Expr.js +530 -0
- package/lib/frontend/cppFrontend/base/Ref.d.ts +25 -0
- package/lib/frontend/cppFrontend/base/Ref.d.ts.map +1 -0
- package/lib/frontend/cppFrontend/base/Ref.js +53 -0
- package/lib/frontend/cppFrontend/base/Trap.d.ts +8 -0
- package/lib/frontend/cppFrontend/base/Trap.d.ts.map +1 -0
- package/lib/frontend/cppFrontend/base/Trap.js +28 -0
- package/lib/frontend/cppFrontend/base/Type.d.ts +264 -0
- package/lib/frontend/cppFrontend/base/Type.d.ts.map +1 -0
- package/lib/frontend/cppFrontend/base/Type.js +600 -0
- package/lib/frontend/cppFrontend/common/ArkIRTransformer.d.ts +109 -0
- package/lib/frontend/cppFrontend/common/ArkIRTransformer.d.ts.map +1 -0
- package/lib/frontend/cppFrontend/common/ArkIRTransformer.js +925 -0
- package/lib/frontend/cppFrontend/common/ArkValueTransformer.d.ts +477 -0
- package/lib/frontend/cppFrontend/common/ArkValueTransformer.d.ts.map +1 -0
- package/lib/frontend/cppFrontend/common/ArkValueTransformer.js +2746 -0
- package/lib/frontend/cppFrontend/common/Builtin.d.ts +57 -0
- package/lib/frontend/cppFrontend/common/Builtin.d.ts.map +1 -0
- package/lib/frontend/cppFrontend/common/Builtin.js +106 -0
- package/lib/frontend/cppFrontend/common/IRInference.d.ts +94 -0
- package/lib/frontend/cppFrontend/common/IRInference.d.ts.map +1 -0
- package/lib/frontend/cppFrontend/common/IRInference.js +1087 -0
- package/lib/frontend/cppFrontend/common/IRUtils.d.ts +23 -0
- package/lib/frontend/cppFrontend/common/IRUtils.d.ts.map +1 -0
- package/lib/frontend/cppFrontend/common/IRUtils.js +168 -0
- package/lib/frontend/cppFrontend/common/ModelUtils.d.ts +44 -0
- package/lib/frontend/cppFrontend/common/ModelUtils.d.ts.map +1 -0
- package/lib/frontend/cppFrontend/common/ModelUtils.js +567 -0
- package/lib/frontend/cppFrontend/common/TypeInference.d.ts +278 -0
- package/lib/frontend/cppFrontend/common/TypeInference.d.ts.map +1 -0
- package/lib/frontend/cppFrontend/common/TypeInference.js +1354 -0
- package/lib/frontend/cppFrontend/common/ValueUtil.d.ts +16 -0
- package/lib/frontend/cppFrontend/common/ValueUtil.d.ts.map +1 -0
- package/lib/frontend/cppFrontend/common/ValueUtil.js +61 -0
- package/lib/frontend/cppFrontend/graph/builder/CfgBuilder.d.ts +182 -0
- package/lib/frontend/cppFrontend/graph/builder/CfgBuilder.d.ts.map +1 -0
- package/lib/frontend/cppFrontend/graph/builder/CfgBuilder.js +1435 -0
- package/lib/frontend/cppFrontend/graph/builder/ConditionBuilder.d.ts +21 -0
- package/lib/frontend/cppFrontend/graph/builder/ConditionBuilder.d.ts.map +1 -0
- package/lib/frontend/cppFrontend/graph/builder/ConditionBuilder.js +303 -0
- package/lib/frontend/cppFrontend/graph/builder/IfBuilder.d.ts +15 -0
- package/lib/frontend/cppFrontend/graph/builder/IfBuilder.d.ts.map +1 -0
- package/lib/frontend/cppFrontend/graph/builder/IfBuilder.js +161 -0
- package/lib/frontend/cppFrontend/graph/builder/LoopBuilder.d.ts +21 -0
- package/lib/frontend/cppFrontend/graph/builder/LoopBuilder.d.ts.map +1 -0
- package/lib/frontend/cppFrontend/graph/builder/LoopBuilder.js +261 -0
- package/lib/frontend/cppFrontend/graph/builder/SwitchBuilder.d.ts +12 -0
- package/lib/frontend/cppFrontend/graph/builder/SwitchBuilder.d.ts.map +1 -0
- package/lib/frontend/cppFrontend/graph/builder/SwitchBuilder.js +155 -0
- package/lib/frontend/cppFrontend/graph/builder/TrapBuilder.d.ts +29 -0
- package/lib/frontend/cppFrontend/graph/builder/TrapBuilder.d.ts.map +1 -0
- package/lib/frontend/cppFrontend/graph/builder/TrapBuilder.js +302 -0
- package/lib/frontend/cppFrontend/inference/CxxInference.d.ts +10 -0
- package/lib/frontend/cppFrontend/inference/CxxInference.d.ts.map +1 -0
- package/lib/frontend/cppFrontend/inference/CxxInference.js +41 -0
- package/lib/frontend/cppFrontend/inference/CxxModelInference.d.ts +28 -0
- package/lib/frontend/cppFrontend/inference/CxxModelInference.d.ts.map +1 -0
- package/lib/frontend/cppFrontend/inference/CxxModelInference.js +98 -0
- package/lib/frontend/cppFrontend/inference/CxxValueInference.d.ts +20 -0
- package/lib/frontend/cppFrontend/inference/CxxValueInference.d.ts.map +1 -0
- package/lib/frontend/cppFrontend/inference/CxxValueInference.js +128 -0
- package/lib/frontend/cppFrontend/model/builder/ArkClassBuilder.d.ts +11 -0
- package/lib/frontend/cppFrontend/model/builder/ArkClassBuilder.d.ts.map +1 -0
- package/lib/frontend/cppFrontend/model/builder/ArkClassBuilder.js +413 -0
- package/lib/frontend/cppFrontend/model/builder/ArkFieldBuilder.d.ts +5 -0
- package/lib/frontend/cppFrontend/model/builder/ArkFieldBuilder.d.ts.map +1 -0
- package/lib/frontend/cppFrontend/model/builder/ArkFieldBuilder.js +61 -0
- package/lib/frontend/cppFrontend/model/builder/ArkFileBuilder.d.ts +17 -0
- package/lib/frontend/cppFrontend/model/builder/ArkFileBuilder.d.ts.map +1 -0
- package/lib/frontend/cppFrontend/model/builder/ArkFileBuilder.js +284 -0
- package/lib/frontend/cppFrontend/model/builder/ArkImportBuilder.d.ts +6 -0
- package/lib/frontend/cppFrontend/model/builder/ArkImportBuilder.d.ts.map +1 -0
- package/lib/frontend/cppFrontend/model/builder/ArkImportBuilder.js +57 -0
- package/lib/frontend/cppFrontend/model/builder/ArkMethodBuilder.d.ts +14 -0
- package/lib/frontend/cppFrontend/model/builder/ArkMethodBuilder.d.ts.map +1 -0
- package/lib/frontend/cppFrontend/model/builder/ArkMethodBuilder.js +422 -0
- package/lib/frontend/cppFrontend/model/builder/ArkNamespaceBuilder.d.ts +8 -0
- package/lib/frontend/cppFrontend/model/builder/ArkNamespaceBuilder.d.ts.map +1 -0
- package/lib/frontend/cppFrontend/model/builder/ArkNamespaceBuilder.js +194 -0
- package/lib/frontend/cppFrontend/model/builder/BodyBuilder.d.ts +59 -0
- package/lib/frontend/cppFrontend/model/builder/BodyBuilder.d.ts.map +1 -0
- package/lib/frontend/cppFrontend/model/builder/BodyBuilder.js +605 -0
- package/lib/frontend/cppFrontend/model/builder/builderUtils.d.ts +46 -0
- package/lib/frontend/cppFrontend/model/builder/builderUtils.d.ts.map +1 -0
- package/lib/frontend/cppFrontend/model/builder/builderUtils.js +499 -0
- package/lib/frontend/cppFrontend/utils/cmakeUtils.d.ts +44 -0
- package/lib/frontend/cppFrontend/utils/cmakeUtils.d.ts.map +1 -0
- package/lib/frontend/cppFrontend/utils/cmakeUtils.js +240 -0
- package/lib/index.d.ts +2 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +8 -1
- package/lib/node_modules/ohos-typescript/.ohos-typescript-version +1 -0
- package/{node_modules → lib/node_modules}/ohos-typescript/package.json +2 -1
- package/lib/save/CGJsonPrinter.d.ts +8 -0
- package/lib/save/CGJsonPrinter.d.ts.map +1 -0
- package/lib/save/CGJsonPrinter.js +41 -0
- package/lib/save/GraphPrinter.js +2 -2
- package/lib/save/json/JsonDto.d.ts +86 -2
- package/lib/save/json/JsonDto.d.ts.map +1 -1
- package/lib/save/json/JsonSerialization.d.ts +1 -1
- package/lib/save/json/JsonSerialization.d.ts.map +1 -1
- package/lib/save/json/JsonSerialization.js +235 -145
- package/lib/save/source/SourceStmt.d.ts.map +1 -1
- package/lib/save/source/SourceStmt.js +3 -1
- package/lib/save/source/SourceTransformer.d.ts.map +1 -1
- package/lib/save/source/SourceTransformer.js +0 -3
- package/lib/utils/CxxSceneUtils.d.ts +11 -0
- package/lib/utils/CxxSceneUtils.d.ts.map +1 -0
- package/lib/utils/CxxSceneUtils.js +178 -0
- package/lib/utils/FileUtils.d.ts +8 -8
- package/lib/utils/FileUtils.d.ts.map +1 -1
- package/lib/utils/FileUtils.js +35 -45
- package/lib/utils/LRUCacheDecorator.d.ts +20 -0
- package/lib/utils/LRUCacheDecorator.d.ts.map +1 -0
- package/lib/utils/LRUCacheDecorator.js +89 -0
- package/lib/utils/ModuleUtils.d.ts +39 -0
- package/lib/utils/ModuleUtils.d.ts.map +1 -0
- package/lib/utils/ModuleUtils.js +261 -0
- package/package.json +13 -7
- /package/{node_modules → lib/node_modules}/ohos-typescript/LICENSE +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/README.OpenSource +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/README.md +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/SECURITY.md +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/ThirdPartyNoticeText.txt +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/bin/tsc +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/bin/tsserver +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/README.md +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/cancellationToken.js +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/cs/diagnosticMessages.generated.json +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/de/diagnosticMessages.generated.json +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/es/diagnosticMessages.generated.json +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/fr/diagnosticMessages.generated.json +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/it/diagnosticMessages.generated.json +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/ja/diagnosticMessages.generated.json +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/ko/diagnosticMessages.generated.json +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.d.ts +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.dom.d.ts +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.dom.iterable.d.ts +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.es2015.collection.d.ts +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.es2015.core.d.ts +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.es2015.d.ts +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.es2015.generator.d.ts +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.es2015.iterable.d.ts +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.es2015.promise.d.ts +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.es2015.proxy.d.ts +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.es2015.reflect.d.ts +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.es2015.symbol.d.ts +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.es2015.symbol.wellknown.d.ts +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.es2016.array.include.d.ts +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.es2016.d.ts +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.es2016.full.d.ts +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.es2017.d.ts +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.es2017.full.d.ts +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.es2017.intl.d.ts +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.es2017.object.d.ts +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.es2017.sharedmemory.d.ts +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.es2017.string.d.ts +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.es2017.typedarrays.d.ts +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.es2018.asyncgenerator.d.ts +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.es2018.asynciterable.d.ts +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.es2018.d.ts +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.es2018.full.d.ts +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.es2018.intl.d.ts +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.es2018.promise.d.ts +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.es2018.regexp.d.ts +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.es2019.array.d.ts +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.es2019.d.ts +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.es2019.full.d.ts +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.es2019.intl.d.ts +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.es2019.object.d.ts +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.es2019.string.d.ts +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.es2019.symbol.d.ts +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.es2020.bigint.d.ts +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.es2020.d.ts +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.es2020.date.d.ts +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.es2020.full.d.ts +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.es2020.intl.d.ts +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.es2020.number.d.ts +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.es2020.promise.d.ts +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.es2020.sharedmemory.d.ts +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.es2020.string.d.ts +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.es2020.symbol.wellknown.d.ts +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.es2021.d.ts +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.es2021.full.d.ts +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.es2021.intl.d.ts +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.es2021.promise.d.ts +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.es2021.string.d.ts +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.es2021.weakref.d.ts +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.es2022.array.d.ts +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.es2022.d.ts +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.es2022.error.d.ts +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.es2022.full.d.ts +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.es2022.intl.d.ts +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.es2022.object.d.ts +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.es2022.sharedmemory.d.ts +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.es2022.string.d.ts +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.es5.d.ts +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.es6.d.ts +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.esnext.d.ts +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.esnext.full.d.ts +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.esnext.intl.d.ts +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.scripthost.d.ts +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.webworker.d.ts +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.webworker.importscripts.d.ts +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/lib.webworker.iterable.d.ts +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/pl/diagnosticMessages.generated.json +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/pt-br/diagnosticMessages.generated.json +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/ru/diagnosticMessages.generated.json +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/tr/diagnosticMessages.generated.json +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/tsc.js +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/tsserver.js +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/tsserverlibrary.d.ts +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/tsserverlibrary.js +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/typesMap.json +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/typescript.d.ts +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/typescript.js +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/typingsInstaller.js +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/watchGuard.js +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/zh-cn/diagnosticMessages.generated.json +0 -0
- /package/{node_modules → lib/node_modules}/ohos-typescript/lib/zh-tw/diagnosticMessages.generated.json +0 -0
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { ClassSignature, FileSignature } from '../../../core/model/ArkSignature';
|
|
2
|
+
import { ClassType } from '../../../core/base/Type';
|
|
3
|
+
export declare class BuiltinCxx {
|
|
4
|
+
static ARRAY: string;
|
|
5
|
+
static SET: string;
|
|
6
|
+
static MAP: string;
|
|
7
|
+
static UNORDERED_MAP: string;
|
|
8
|
+
static QUEUE: string;
|
|
9
|
+
static DEQUE: string;
|
|
10
|
+
static STACK: string;
|
|
11
|
+
static LIST: string;
|
|
12
|
+
static VECTOR: string;
|
|
13
|
+
static UNORDERED_SET: string;
|
|
14
|
+
static PRIORITY_QUEUE: string;
|
|
15
|
+
static FORWARD_LIST: string;
|
|
16
|
+
static MULTISET: string;
|
|
17
|
+
static MULTIMAP: string;
|
|
18
|
+
static UNORDERED_MULTIMAP: string;
|
|
19
|
+
static UNORDERED_MULTISET: string;
|
|
20
|
+
static OBJECT: string;
|
|
21
|
+
static REGEXP: string;
|
|
22
|
+
static CXXSTD: string;
|
|
23
|
+
static CXXSTDREF: string;
|
|
24
|
+
static TYPENAME_KEYWORD: string;
|
|
25
|
+
static ANONYMOUS_NAMESPACE_REF: string;
|
|
26
|
+
static OPERATOR_ISTREAM: string;
|
|
27
|
+
static OPERATOR_OSTREAM: string;
|
|
28
|
+
static BUILT_IN_CLASSES: Set<string>;
|
|
29
|
+
static DUMMY_PROJECT_NAME: string;
|
|
30
|
+
static DUMMY_FILE_NAME: string;
|
|
31
|
+
static BUILT_IN_CLASSES_FILE_SIGNATURE: FileSignature;
|
|
32
|
+
static OBJECT_CLASS_SIGNATURE: ClassSignature;
|
|
33
|
+
static OBJECT_CLASS_TYPE: ClassType;
|
|
34
|
+
static ARRAY_CLASS_SIGNATURE: ClassSignature;
|
|
35
|
+
static SET_CLASS_SIGNATURE: ClassSignature;
|
|
36
|
+
static MAP_CLASS_SIGNATURE: ClassSignature;
|
|
37
|
+
static REGEXP_CLASS_SIGNATURE: ClassSignature;
|
|
38
|
+
static REGEXP_CLASS_TYPE: ClassType;
|
|
39
|
+
static BUILT_IN_CLASS_SIGNATURE_MAP: Map<string, ClassSignature>;
|
|
40
|
+
static ITERATOR_FUNCTION: string;
|
|
41
|
+
static ITERATOR: string;
|
|
42
|
+
static ITERATOR_NEXT: string;
|
|
43
|
+
static ITERATOR_RESULT: string;
|
|
44
|
+
static ITERATOR_RESULT_BEGIN: string;
|
|
45
|
+
static ITERATOR_RESULT_END: string;
|
|
46
|
+
static ITERATOR_VALUE: string;
|
|
47
|
+
static ITERATOR_CLASS_SIGNATURE: ClassSignature;
|
|
48
|
+
static ITERATOR_RESULT_CLASS_SIGNATURE: ClassSignature;
|
|
49
|
+
static ITERATOR_CLASS_TYPE: ClassType;
|
|
50
|
+
static ITERATOR_RESULT_CLASS_TYPE: ClassType;
|
|
51
|
+
private static buildBuiltInClasses;
|
|
52
|
+
private static buildBuiltInClassesFileSignature;
|
|
53
|
+
static buildBuiltInClassSignature(className: string): ClassSignature;
|
|
54
|
+
static isBuiltinClass(classSignature: ClassSignature): boolean;
|
|
55
|
+
private static buildBuiltInClassSignatureMap;
|
|
56
|
+
}
|
|
57
|
+
//# sourceMappingURL=Builtin.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Builtin.d.ts","sourceRoot":"","sources":["../../../../src/frontend/cppFrontend/common/Builtin.ts"],"names":[],"mappings":"AAeA,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAC;AACjF,OAAO,EAAE,SAAS,EAAe,MAAM,yBAAyB,CAAC;AAEjE,qBAAa,UAAU;IAEnB,OAAc,KAAK,SAAW;IAC9B,OAAc,GAAG,SAAS;IAC1B,OAAc,GAAG,SAAS;IAC1B,OAAc,aAAa,SAAmB;IAC9C,OAAc,KAAK,SAAW;IAC9B,OAAc,KAAK,SAAW;IAC9B,OAAc,KAAK,SAAW;IAC9B,OAAc,IAAI,SAAU;IAC5B,OAAc,MAAM,SAAY;IAChC,OAAc,aAAa,SAAmB;IAC9C,OAAc,cAAc,SAAoB;IAChD,OAAc,YAAY,SAAkB;IAC5C,OAAc,QAAQ,SAAc;IACpC,OAAc,QAAQ,SAAc;IACpC,OAAc,kBAAkB,SAAwB;IACxD,OAAc,kBAAkB,SAAwB;IACxD,OAAc,MAAM,SAAY;IAChC,OAAc,MAAM,SAAY;IAChC,OAAc,MAAM,SAAS;IAC7B,OAAc,SAAS,SAAW;IAClC,OAAc,gBAAgB,SAAe;IAC7C,OAAc,uBAAuB,SAA6B;IAClE,OAAc,gBAAgB,SAAgB;IAC9C,OAAc,gBAAgB,SAAgB;IAE9C,OAAc,gBAAgB,cAA8B;IAE5D,OAAc,kBAAkB,SAAa;IAC7C,OAAc,eAAe,SAAkB;IAE/C,OAAc,+BAA+B,gBAAiD;IAC9F,OAAc,sBAAsB,iBAAgD;IACpF,OAAc,iBAAiB,YAA8C;IAC7E,OAAc,qBAAqB,iBAA+C;IAClF,OAAc,mBAAmB,iBAA6C;IAC9E,OAAc,mBAAmB,iBAA6C;IAC9E,OAAc,sBAAsB,iBAAgD;IACpF,OAAc,iBAAiB,YAA8C;IAC7E,OAAc,4BAA4B,8BAAwC;IAKlF,OAAc,iBAAiB,SAAc;IAC7C,OAAc,QAAQ,SAAsB;IAC5C,OAAc,aAAa,SAAgB;IAC3C,OAAc,eAAe,SAAe;IAC5C,OAAc,qBAAqB,SAAW;IAC9C,OAAc,mBAAmB,SAAS;IAC1C,OAAc,cAAc,SAAO;IAEnC,OAAc,wBAAwB,iBAAkD;IACxF,OAAc,+BAA+B,iBAAyD;IACtG,OAAc,mBAAmB,YAAwE;IACzG,OAAc,0BAA0B,YAA+E;IACvH,OAAO,CAAC,MAAM,CAAC,mBAAmB;IAclC,OAAO,CAAC,MAAM,CAAC,gCAAgC;WAIjC,0BAA0B,CAAC,SAAS,EAAE,MAAM,GAAG,cAAc;WAG7D,cAAc,CAAC,cAAc,EAAE,cAAc,GAAG,OAAO;IAMrE,OAAO,CAAC,MAAM,CAAC,6BAA6B;CAS/C"}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Copyright (c) 2024-2025 Huawei Device Co., Ltd.
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
var _a;
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.BuiltinCxx = void 0;
|
|
19
|
+
const ArkSignature_1 = require("../../../core/model/ArkSignature");
|
|
20
|
+
const Type_1 = require("../../../core/base/Type");
|
|
21
|
+
class BuiltinCxx {
|
|
22
|
+
static buildBuiltInClasses() {
|
|
23
|
+
const builtInClasses = new Set();
|
|
24
|
+
builtInClasses.add(this.ARRAY);
|
|
25
|
+
builtInClasses.add(this.SET);
|
|
26
|
+
builtInClasses.add(this.MAP);
|
|
27
|
+
builtInClasses.add(this.UNORDERED_MAP);
|
|
28
|
+
builtInClasses.add(this.QUEUE);
|
|
29
|
+
builtInClasses.add(this.DEQUE);
|
|
30
|
+
builtInClasses.add(this.STACK);
|
|
31
|
+
builtInClasses.add(this.LIST);
|
|
32
|
+
builtInClasses.add(this.VECTOR);
|
|
33
|
+
return builtInClasses;
|
|
34
|
+
}
|
|
35
|
+
static buildBuiltInClassesFileSignature() {
|
|
36
|
+
return new ArkSignature_1.FileSignature(this.DUMMY_PROJECT_NAME, this.DUMMY_FILE_NAME);
|
|
37
|
+
}
|
|
38
|
+
static buildBuiltInClassSignature(className) {
|
|
39
|
+
return new ArkSignature_1.ClassSignature(className, this.BUILT_IN_CLASSES_FILE_SIGNATURE);
|
|
40
|
+
}
|
|
41
|
+
static isBuiltinClass(classSignature) {
|
|
42
|
+
const className = classSignature.getClassName();
|
|
43
|
+
const projectName = classSignature.getDeclaringFileSignature().getProjectName();
|
|
44
|
+
return this.BUILT_IN_CLASSES.has(className) && projectName === this.DUMMY_PROJECT_NAME;
|
|
45
|
+
}
|
|
46
|
+
static buildBuiltInClassSignatureMap() {
|
|
47
|
+
const builtInClassSignatureMap = new Map();
|
|
48
|
+
builtInClassSignatureMap.set(this.OBJECT, this.OBJECT_CLASS_SIGNATURE);
|
|
49
|
+
builtInClassSignatureMap.set(this.ARRAY, this.ARRAY_CLASS_SIGNATURE);
|
|
50
|
+
builtInClassSignatureMap.set(this.SET, this.SET_CLASS_SIGNATURE);
|
|
51
|
+
builtInClassSignatureMap.set(this.MAP, this.MAP_CLASS_SIGNATURE);
|
|
52
|
+
builtInClassSignatureMap.set(this.REGEXP, this.REGEXP_CLASS_SIGNATURE);
|
|
53
|
+
return builtInClassSignatureMap;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
exports.BuiltinCxx = BuiltinCxx;
|
|
57
|
+
_a = BuiltinCxx;
|
|
58
|
+
// built-in classes
|
|
59
|
+
BuiltinCxx.ARRAY = 'array';
|
|
60
|
+
BuiltinCxx.SET = 'set';
|
|
61
|
+
BuiltinCxx.MAP = 'map';
|
|
62
|
+
BuiltinCxx.UNORDERED_MAP = 'unordered_map';
|
|
63
|
+
BuiltinCxx.QUEUE = 'queue';
|
|
64
|
+
BuiltinCxx.DEQUE = 'deque';
|
|
65
|
+
BuiltinCxx.STACK = 'stack';
|
|
66
|
+
BuiltinCxx.LIST = 'list';
|
|
67
|
+
BuiltinCxx.VECTOR = 'vector';
|
|
68
|
+
BuiltinCxx.UNORDERED_SET = 'unordered_set';
|
|
69
|
+
BuiltinCxx.PRIORITY_QUEUE = 'priority_queue';
|
|
70
|
+
BuiltinCxx.FORWARD_LIST = 'forward_list';
|
|
71
|
+
BuiltinCxx.MULTISET = 'multiset';
|
|
72
|
+
BuiltinCxx.MULTIMAP = 'multimap';
|
|
73
|
+
BuiltinCxx.UNORDERED_MULTIMAP = 'unordered_multimap';
|
|
74
|
+
BuiltinCxx.UNORDERED_MULTISET = 'unordered_multiset';
|
|
75
|
+
BuiltinCxx.OBJECT = 'Object';
|
|
76
|
+
BuiltinCxx.REGEXP = 'RegExp';
|
|
77
|
+
BuiltinCxx.CXXSTD = 'std';
|
|
78
|
+
BuiltinCxx.CXXSTDREF = 'std::';
|
|
79
|
+
BuiltinCxx.TYPENAME_KEYWORD = 'typename ';
|
|
80
|
+
BuiltinCxx.ANONYMOUS_NAMESPACE_REF = '(anonymous namespace)::';
|
|
81
|
+
BuiltinCxx.OPERATOR_ISTREAM = 'operator>>';
|
|
82
|
+
BuiltinCxx.OPERATOR_OSTREAM = 'operator<<';
|
|
83
|
+
BuiltinCxx.BUILT_IN_CLASSES = _a.buildBuiltInClasses();
|
|
84
|
+
BuiltinCxx.DUMMY_PROJECT_NAME = 'CXX/std';
|
|
85
|
+
BuiltinCxx.DUMMY_FILE_NAME = 'BuiltinClass';
|
|
86
|
+
BuiltinCxx.BUILT_IN_CLASSES_FILE_SIGNATURE = BuiltinCxx.buildBuiltInClassesFileSignature();
|
|
87
|
+
BuiltinCxx.OBJECT_CLASS_SIGNATURE = _a.buildBuiltInClassSignature(_a.OBJECT);
|
|
88
|
+
BuiltinCxx.OBJECT_CLASS_TYPE = new Type_1.ClassType(_a.OBJECT_CLASS_SIGNATURE);
|
|
89
|
+
BuiltinCxx.ARRAY_CLASS_SIGNATURE = _a.buildBuiltInClassSignature(_a.ARRAY);
|
|
90
|
+
BuiltinCxx.SET_CLASS_SIGNATURE = _a.buildBuiltInClassSignature(_a.SET);
|
|
91
|
+
BuiltinCxx.MAP_CLASS_SIGNATURE = _a.buildBuiltInClassSignature(_a.MAP);
|
|
92
|
+
BuiltinCxx.REGEXP_CLASS_SIGNATURE = _a.buildBuiltInClassSignature(_a.REGEXP);
|
|
93
|
+
BuiltinCxx.REGEXP_CLASS_TYPE = new Type_1.ClassType(_a.REGEXP_CLASS_SIGNATURE);
|
|
94
|
+
BuiltinCxx.BUILT_IN_CLASS_SIGNATURE_MAP = _a.buildBuiltInClassSignatureMap();
|
|
95
|
+
// signature for built-in class
|
|
96
|
+
BuiltinCxx.ITERATOR_FUNCTION = 'iterator';
|
|
97
|
+
BuiltinCxx.ITERATOR = 'IterableIterator';
|
|
98
|
+
BuiltinCxx.ITERATOR_NEXT = 'iterator++';
|
|
99
|
+
BuiltinCxx.ITERATOR_RESULT = 'operator*';
|
|
100
|
+
BuiltinCxx.ITERATOR_RESULT_BEGIN = 'begin';
|
|
101
|
+
BuiltinCxx.ITERATOR_RESULT_END = 'end';
|
|
102
|
+
BuiltinCxx.ITERATOR_VALUE = '*';
|
|
103
|
+
BuiltinCxx.ITERATOR_CLASS_SIGNATURE = _a.buildBuiltInClassSignature(_a.ITERATOR);
|
|
104
|
+
BuiltinCxx.ITERATOR_RESULT_CLASS_SIGNATURE = _a.buildBuiltInClassSignature(_a.ITERATOR_RESULT);
|
|
105
|
+
BuiltinCxx.ITERATOR_CLASS_TYPE = new Type_1.ClassType(_a.ITERATOR_CLASS_SIGNATURE, [new Type_1.GenericType('T')]);
|
|
106
|
+
BuiltinCxx.ITERATOR_RESULT_CLASS_TYPE = new Type_1.ClassType(_a.ITERATOR_RESULT_CLASS_SIGNATURE, [new Type_1.GenericType('T')]);
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { ArkMethod } from '../../../core/model/ArkMethod';
|
|
2
|
+
import { ClassType, Type } from '../../../core/base/Type';
|
|
3
|
+
import { Local } from '../../../core/base/Local';
|
|
4
|
+
import { AbstractExpr, AbstractInvokeExpr, AliasTypeExpr, ArkInstanceInvokeExpr, ArkStaticInvokeExpr } from '../../../core/base/Expr';
|
|
5
|
+
import { Scene } from '../../../Scene';
|
|
6
|
+
import { ArkClass } from '../../../core/model/ArkClass';
|
|
7
|
+
import { ClassSignature, FieldSignature, MethodSignature } from '../../../core/model/ArkSignature';
|
|
8
|
+
import { AbstractFieldRef, AbstractRef, ArkInstanceFieldRef, ArkParameterRef } from '../../../core/base/Ref';
|
|
9
|
+
import { ArkFile } from '../../../core/model/ArkFile';
|
|
10
|
+
import { KeyofTypeExpr, TypeQueryExpr } from '../../../core/base/TypeExpr';
|
|
11
|
+
export declare class IRInference {
|
|
12
|
+
private static inferExportInfos;
|
|
13
|
+
private static inferImportInfos;
|
|
14
|
+
static inferFile(file: ArkFile): void;
|
|
15
|
+
static inferStaticInvokeExpr(expr: ArkStaticInvokeExpr, arkMethod: ArkMethod): AbstractInvokeExpr;
|
|
16
|
+
static inferStaticInvokeExprByMethodName(methodName: string, arkMethod: ArkMethod, expr: AbstractInvokeExpr): AbstractInvokeExpr;
|
|
17
|
+
private static processArkExportForMethodAndSignature;
|
|
18
|
+
static inferInstanceInvokeExpr(expr: ArkInstanceInvokeExpr, arkMethod: ArkMethod): AbstractInvokeExpr;
|
|
19
|
+
/**
|
|
20
|
+
* process arkUI function with Annotation @Extend @Styles @AnimatableExtend
|
|
21
|
+
* @param expr
|
|
22
|
+
* @param arkMethod
|
|
23
|
+
* @param methodName
|
|
24
|
+
*/
|
|
25
|
+
private static processExtendFunc;
|
|
26
|
+
static inferFieldRef(ref: ArkInstanceFieldRef, arkMethod: ArkMethod): AbstractRef;
|
|
27
|
+
private static inferBase;
|
|
28
|
+
static inferThisLocal(arkMethod: ArkMethod): Local | null;
|
|
29
|
+
static inferArgs(expr: AbstractInvokeExpr, arkMethod: ArkMethod): void;
|
|
30
|
+
private static inferArg;
|
|
31
|
+
static inferRightWithSdkType(leftType: Type, rightType: Type, ackClass: ArkClass): void;
|
|
32
|
+
static inferArgTypeWithSdk(sdkType: ClassType, scene: Scene, argType: Type): void;
|
|
33
|
+
private static inferInvokeExpr;
|
|
34
|
+
private static inferInvokeExprWithArray;
|
|
35
|
+
private static inferInvokeExprWithFunction;
|
|
36
|
+
private static inferInvokeExprWithDeclaredClass;
|
|
37
|
+
private static changePtrInvokeExpr;
|
|
38
|
+
private static getRealTypes;
|
|
39
|
+
static replaceMethodSignature(init: MethodSignature, declared: MethodSignature): MethodSignature;
|
|
40
|
+
private static processForEach;
|
|
41
|
+
static inferLocal(base: Local, arkMethod: ArkMethod): void;
|
|
42
|
+
static generateNewFieldSignature(ref: AbstractFieldRef, arkClass: ArkClass, baseType: Type): FieldSignature | null;
|
|
43
|
+
private static repairType;
|
|
44
|
+
static inferAnonymousClass(anon: ArkClass | null, declaredSignature: ClassSignature, set?: Set<string>): void;
|
|
45
|
+
private static assignAnonMethod;
|
|
46
|
+
private static assignAnonField;
|
|
47
|
+
static inferAliasTypeExpr(expr: AliasTypeExpr, arkMethod: ArkMethod): AbstractExpr;
|
|
48
|
+
static inferTypeQueryExpr(expr: TypeQueryExpr, arkMethod: ArkMethod): void;
|
|
49
|
+
static inferKeyofTypeExpr(expr: KeyofTypeExpr, arkMethod: ArkMethod): void;
|
|
50
|
+
static inferParameterRef(ref: ArkParameterRef, arkMethod: ArkMethod): AbstractRef;
|
|
51
|
+
/**
|
|
52
|
+
* map c++ function declaration to Implementation.
|
|
53
|
+
*
|
|
54
|
+
*This function traverses all C++header files to find the corresponding implementation file for each class and method,
|
|
55
|
+
*And establish the mapping relationship between methods and implementation files
|
|
56
|
+
*/
|
|
57
|
+
static mapCxxDeclAndImpl(scene: Scene): void;
|
|
58
|
+
private static mapClassDeclAndImpl;
|
|
59
|
+
/**
|
|
60
|
+
*Implementation method of search method
|
|
61
|
+
*@ param mtd - Ark method object
|
|
62
|
+
*@ param headerPath - Header file path
|
|
63
|
+
*@ param sortedRefFiles - sorted reference file array
|
|
64
|
+
*/
|
|
65
|
+
private static findMtdImpl;
|
|
66
|
+
/**
|
|
67
|
+
*Get the C++header file reference mapping table
|
|
68
|
+
*
|
|
69
|
+
*This function traverses all files and filters out C++source files (.cpp ,.c,.cxx),
|
|
70
|
+
*Then analyze the import information in these source files, and establish the reference relationship mapping from the header file to the source file.
|
|
71
|
+
*
|
|
72
|
+
*@ returns Map<string, string []>The mapping from the header file path to the source file path array that references the header file
|
|
73
|
+
*/
|
|
74
|
+
private static getCxxHeaderFileRefMap;
|
|
75
|
+
/**
|
|
76
|
+
*Process import information and establish header file reference relationship mapping
|
|
77
|
+
*@ param im Import information object, including imported module information
|
|
78
|
+
*@ param filePath Path of the current file
|
|
79
|
+
*@ param headerFileRefMap header file reference relationship mapping table, used to record which files are referenced by each header file
|
|
80
|
+
*/
|
|
81
|
+
private static processImportInfo;
|
|
82
|
+
/**
|
|
83
|
+
*Sort the reference file array, and prioritize the reference files with the same name as the target file
|
|
84
|
+
*@ param headerFilePath Destination header file path
|
|
85
|
+
*@ param refFiles Array of reference file paths to be sorted
|
|
86
|
+
*@ returns The array of reference file paths sorted, with files with the same name first and other files second
|
|
87
|
+
*/
|
|
88
|
+
private static sortRefFiles;
|
|
89
|
+
private static mapHeaderToSource;
|
|
90
|
+
private static getClassWithNameAndNamespace;
|
|
91
|
+
private static getMatchedMtdImpl;
|
|
92
|
+
private static processMethodDeclAndImpl;
|
|
93
|
+
}
|
|
94
|
+
//# sourceMappingURL=IRInference.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IRInference.d.ts","sourceRoot":"","sources":["../../../../src/frontend/cppFrontend/common/IRInference.ts"],"names":[],"mappings":"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"}
|