arkanalyzer 1.0.94 → 2.0.0-beta1

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.
Files changed (291) hide show
  1. package/lib/Config.d.ts +7 -0
  2. package/lib/Config.d.ts.map +1 -1
  3. package/lib/Scene.d.ts +134 -170
  4. package/lib/Scene.d.ts.map +1 -1
  5. package/lib/Scene.js +412 -976
  6. package/lib/callgraph/algorithm/AbstractAnalysis.js +3 -2
  7. package/lib/callgraph/algorithm/RapidTypeAnalysis.js +1 -1
  8. package/lib/callgraph/model/CallGraph.js +1 -1
  9. package/lib/callgraph/pointerAnalysis/PTAUtils.d.ts +1 -3
  10. package/lib/callgraph/pointerAnalysis/PTAUtils.d.ts.map +1 -1
  11. package/lib/callgraph/pointerAnalysis/PTAUtils.js +17 -7
  12. package/lib/callgraph/pointerAnalysis/Pag.d.ts.map +1 -1
  13. package/lib/callgraph/pointerAnalysis/Pag.js +4 -14
  14. package/lib/callgraph/pointerAnalysis/PagBuilder.d.ts.map +1 -1
  15. package/lib/callgraph/pointerAnalysis/PagBuilder.js +2 -1
  16. package/lib/callgraph/pointerAnalysis/PointerAnalysis.d.ts.map +1 -1
  17. package/lib/callgraph/pointerAnalysis/PointerAnalysis.js +1 -2
  18. package/lib/callgraph/pointerAnalysis/plugins/WorkerPlugin.d.ts.map +1 -1
  19. package/lib/callgraph/pointerAnalysis/plugins/WorkerPlugin.js +0 -1
  20. package/lib/cli/commands/cg.d.ts +1 -0
  21. package/lib/cli/commands/cg.d.ts.map +1 -1
  22. package/lib/cli/commands/cg.js +22 -18
  23. package/lib/cli/commands/ir.d.ts +1 -0
  24. package/lib/cli/commands/ir.d.ts.map +1 -1
  25. package/lib/cli/commands/ir.js +5 -2
  26. package/lib/core/base/Constant.d.ts +5 -5
  27. package/lib/core/base/Constant.d.ts.map +1 -1
  28. package/lib/core/base/Constant.js +12 -9
  29. package/lib/core/base/Expr.d.ts +36 -20
  30. package/lib/core/base/Expr.d.ts.map +1 -1
  31. package/lib/core/base/Expr.js +206 -94
  32. package/lib/core/base/Local.d.ts +10 -20
  33. package/lib/core/base/Local.d.ts.map +1 -1
  34. package/lib/core/base/Local.js +25 -28
  35. package/lib/core/base/Position.d.ts +6 -0
  36. package/lib/core/base/Position.d.ts.map +1 -1
  37. package/lib/core/base/Position.js +37 -11
  38. package/lib/core/base/Ref.d.ts +45 -33
  39. package/lib/core/base/Ref.d.ts.map +1 -1
  40. package/lib/core/base/Ref.js +225 -51
  41. package/lib/core/base/Stmt.d.ts +19 -9
  42. package/lib/core/base/Stmt.d.ts.map +1 -1
  43. package/lib/core/base/Stmt.js +135 -52
  44. package/lib/core/base/Type.d.ts +67 -4
  45. package/lib/core/base/Type.d.ts.map +1 -1
  46. package/lib/core/base/Type.js +391 -20
  47. package/lib/core/base/TypeExpr.d.ts +6 -4
  48. package/lib/core/base/TypeExpr.d.ts.map +1 -1
  49. package/lib/core/base/TypeExpr.js +34 -10
  50. package/lib/core/base/Value.d.ts +20 -2
  51. package/lib/core/base/Value.d.ts.map +1 -1
  52. package/lib/core/base/Value.js +12 -0
  53. package/lib/core/common/ArkIRTransformer.d.ts +18 -0
  54. package/lib/core/common/ArkIRTransformer.d.ts.map +1 -1
  55. package/lib/core/common/ArkIRTransformer.js +94 -75
  56. package/lib/core/common/ArkValueTransformer.d.ts +21 -3
  57. package/lib/core/common/ArkValueTransformer.d.ts.map +1 -1
  58. package/lib/core/common/ArkValueTransformer.js +455 -265
  59. package/lib/core/common/Builtin.d.ts +48 -24
  60. package/lib/core/common/Builtin.d.ts.map +1 -1
  61. package/lib/core/common/Builtin.js +90 -52
  62. package/lib/core/common/CanonicalizerValidator.d.ts +308 -0
  63. package/lib/core/common/CanonicalizerValidator.d.ts.map +1 -0
  64. package/lib/core/common/CanonicalizerValidator.js +888 -0
  65. package/lib/core/common/Const.d.ts +3 -3
  66. package/lib/core/common/Const.d.ts.map +1 -1
  67. package/lib/core/common/Const.js +3 -3
  68. package/lib/core/common/DummyMainCreater.d.ts +2 -21
  69. package/lib/core/common/DummyMainCreater.d.ts.map +1 -1
  70. package/lib/core/common/DummyMainCreater.js +8 -105
  71. package/lib/core/common/IRInference.d.ts +55 -3
  72. package/lib/core/common/IRInference.d.ts.map +1 -1
  73. package/lib/core/common/IRInference.js +407 -126
  74. package/lib/core/common/IRUtils.d.ts +1 -0
  75. package/lib/core/common/IRUtils.d.ts.map +1 -1
  76. package/lib/core/common/IRUtils.js +44 -13
  77. package/lib/core/common/ModelUtils.d.ts +44 -20
  78. package/lib/core/common/ModelUtils.d.ts.map +1 -1
  79. package/lib/core/common/ModelUtils.js +378 -208
  80. package/lib/core/common/SdkUtils.d.ts +35 -5
  81. package/lib/core/common/SdkUtils.d.ts.map +1 -1
  82. package/lib/core/common/SdkUtils.js +181 -53
  83. package/lib/core/common/SignatureCanonicalizer.d.ts +95 -0
  84. package/lib/core/common/SignatureCanonicalizer.d.ts.map +1 -0
  85. package/lib/core/common/SignatureCanonicalizer.js +116 -0
  86. package/lib/core/common/SignatureCanonicalizerRegistry.d.ts +176 -0
  87. package/lib/core/common/SignatureCanonicalizerRegistry.d.ts.map +1 -0
  88. package/lib/core/common/SignatureCanonicalizerRegistry.js +343 -0
  89. package/lib/core/common/SignatureModelCanonicalizer.d.ts +69 -0
  90. package/lib/core/common/SignatureModelCanonicalizer.d.ts.map +1 -0
  91. package/lib/core/common/SignatureModelCanonicalizer.js +109 -0
  92. package/lib/core/common/StmtUseReplacer.d.ts +1 -0
  93. package/lib/core/common/StmtUseReplacer.d.ts.map +1 -1
  94. package/lib/core/common/StmtUseReplacer.js +9 -0
  95. package/lib/core/common/StringUtils.d.ts +12 -1
  96. package/lib/core/common/StringUtils.d.ts.map +1 -1
  97. package/lib/core/common/StringUtils.js +36 -17
  98. package/lib/core/common/TempSignatureCanonicalizer.d.ts +82 -0
  99. package/lib/core/common/TempSignatureCanonicalizer.d.ts.map +1 -0
  100. package/lib/core/common/TempSignatureCanonicalizer.js +177 -0
  101. package/lib/core/common/TypeInference.d.ts +24 -6
  102. package/lib/core/common/TypeInference.d.ts.map +1 -1
  103. package/lib/core/common/TypeInference.js +243 -117
  104. package/lib/core/common/ValueUtil.d.ts +2 -1
  105. package/lib/core/common/ValueUtil.d.ts.map +1 -1
  106. package/lib/core/common/ValueUtil.js +4 -1
  107. package/lib/core/graph/Cfg.d.ts.map +1 -1
  108. package/lib/core/graph/Cfg.js +21 -6
  109. package/lib/core/graph/builder/CfgBuilder.d.ts.map +1 -1
  110. package/lib/core/graph/builder/CfgBuilder.js +46 -33
  111. package/lib/core/graph/builder/IfBuilder.d.ts.map +1 -1
  112. package/lib/core/graph/builder/IfBuilder.js +6 -2
  113. package/lib/core/graph/builder/ViewTreeBuilder.d.ts.map +1 -1
  114. package/lib/core/graph/builder/ViewTreeBuilder.js +6 -2
  115. package/lib/core/inference/ModelInference.d.ts +24 -4
  116. package/lib/core/inference/ModelInference.d.ts.map +1 -1
  117. package/lib/core/inference/ModelInference.js +273 -79
  118. package/lib/core/inference/ValueInference.d.ts +3 -2
  119. package/lib/core/inference/ValueInference.d.ts.map +1 -1
  120. package/lib/core/inference/ValueInference.js +90 -40
  121. package/lib/core/inference/abc/AbcInference.d.ts.map +1 -1
  122. package/lib/core/inference/abc/AbcInference.js +28 -15
  123. package/lib/core/inference/arkts/ArkTsInference.d.ts +9 -3
  124. package/lib/core/inference/arkts/ArkTsInference.d.ts.map +1 -1
  125. package/lib/core/inference/arkts/ArkTsInference.js +54 -16
  126. package/lib/core/model/ArkClass.d.ts +192 -18
  127. package/lib/core/model/ArkClass.d.ts.map +1 -1
  128. package/lib/core/model/ArkClass.js +852 -122
  129. package/lib/core/model/ArkExport.d.ts.map +1 -1
  130. package/lib/core/model/ArkExport.js +1 -2
  131. package/lib/core/model/ArkField.d.ts +34 -2
  132. package/lib/core/model/ArkField.d.ts.map +1 -1
  133. package/lib/core/model/ArkField.js +89 -14
  134. package/lib/core/model/ArkFile.d.ts +72 -12
  135. package/lib/core/model/ArkFile.d.ts.map +1 -1
  136. package/lib/core/model/ArkFile.js +275 -65
  137. package/lib/core/model/ArkImport.d.ts.map +1 -1
  138. package/lib/core/model/ArkImport.js +1 -2
  139. package/lib/core/model/ArkMethod.d.ts +101 -15
  140. package/lib/core/model/ArkMethod.d.ts.map +1 -1
  141. package/lib/core/model/ArkMethod.js +252 -39
  142. package/lib/core/model/ArkModule.d.ts +1 -1
  143. package/lib/core/model/ArkModule.js +1 -1
  144. package/lib/core/model/ArkNamespace.d.ts +80 -10
  145. package/lib/core/model/ArkNamespace.d.ts.map +1 -1
  146. package/lib/core/model/ArkNamespace.js +309 -76
  147. package/lib/core/model/ArkSignature.d.ts +242 -18
  148. package/lib/core/model/ArkSignature.d.ts.map +1 -1
  149. package/lib/core/model/ArkSignature.js +725 -95
  150. package/lib/core/model/builder/ArkClassBuilder.d.ts +6 -3
  151. package/lib/core/model/builder/ArkClassBuilder.d.ts.map +1 -1
  152. package/lib/core/model/builder/ArkClassBuilder.js +116 -71
  153. package/lib/core/model/builder/ArkExportBuilder.d.ts +1 -1
  154. package/lib/core/model/builder/ArkExportBuilder.d.ts.map +1 -1
  155. package/lib/core/model/builder/ArkExportBuilder.js +1 -1
  156. package/lib/core/model/builder/ArkFieldBuilder.d.ts +0 -2
  157. package/lib/core/model/builder/ArkFieldBuilder.d.ts.map +1 -1
  158. package/lib/core/model/builder/ArkFieldBuilder.js +9 -43
  159. package/lib/core/model/builder/ArkFileBuilder.d.ts.map +1 -1
  160. package/lib/core/model/builder/ArkFileBuilder.js +32 -33
  161. package/lib/core/model/builder/ArkMethodBuilder.d.ts +10 -3
  162. package/lib/core/model/builder/ArkMethodBuilder.d.ts.map +1 -1
  163. package/lib/core/model/builder/ArkMethodBuilder.js +40 -26
  164. package/lib/core/model/builder/ArkNamespaceBuilder.d.ts +3 -2
  165. package/lib/core/model/builder/ArkNamespaceBuilder.d.ts.map +1 -1
  166. package/lib/core/model/builder/ArkNamespaceBuilder.js +45 -77
  167. package/lib/core/model/builder/ArkSignatureBuilder.d.ts +9 -0
  168. package/lib/core/model/builder/ArkSignatureBuilder.d.ts.map +1 -1
  169. package/lib/core/model/builder/ArkSignatureBuilder.js +26 -3
  170. package/lib/core/model/builder/BodyBuilder.d.ts +1 -0
  171. package/lib/core/model/builder/BodyBuilder.d.ts.map +1 -1
  172. package/lib/core/model/builder/BodyBuilder.js +37 -11
  173. package/lib/core/model/builder/builderUtils.d.ts +11 -1
  174. package/lib/core/model/builder/builderUtils.d.ts.map +1 -1
  175. package/lib/core/model/builder/builderUtils.js +124 -90
  176. package/lib/frontend/FrontendBuilder.d.ts +10 -6
  177. package/lib/frontend/FrontendBuilder.d.ts.map +1 -1
  178. package/lib/frontend/FrontendBuilder.js +19 -45
  179. package/lib/frontend/ModuleScene.d.ts +43 -0
  180. package/lib/frontend/ModuleScene.d.ts.map +1 -0
  181. package/lib/frontend/ModuleScene.js +143 -0
  182. package/lib/frontend/SceneBuildStage.d.ts +15 -0
  183. package/lib/frontend/SceneBuildStage.d.ts.map +1 -0
  184. package/lib/frontend/SceneBuildStage.js +32 -0
  185. package/lib/frontend/SceneBuilder.d.ts +153 -0
  186. package/lib/frontend/SceneBuilder.d.ts.map +1 -0
  187. package/lib/frontend/SceneBuilder.js +859 -0
  188. package/lib/frontend/arktsFrontend/ArktsFrontend.d.ts +0 -2
  189. package/lib/frontend/arktsFrontend/ArktsFrontend.d.ts.map +1 -1
  190. package/lib/frontend/arktsFrontend/ArktsFrontend.js +0 -18
  191. package/lib/frontend/arktsFrontend/FileBodyRemount.d.ts +17 -0
  192. package/lib/frontend/arktsFrontend/FileBodyRemount.d.ts.map +1 -0
  193. package/lib/frontend/arktsFrontend/FileBodyRemount.js +187 -0
  194. package/lib/frontend/common/ModuleBuilder.d.ts +4 -2
  195. package/lib/frontend/common/ModuleBuilder.d.ts.map +1 -1
  196. package/lib/frontend/common/ModuleBuilder.js +19 -9
  197. package/lib/frontend/cppFrontend/CppFrontend.d.ts +0 -6
  198. package/lib/frontend/cppFrontend/CppFrontend.d.ts.map +1 -1
  199. package/lib/frontend/cppFrontend/CppFrontend.js +0 -56
  200. package/lib/frontend/cppFrontend/base/Type.d.ts +7 -0
  201. package/lib/frontend/cppFrontend/base/Type.d.ts.map +1 -1
  202. package/lib/frontend/cppFrontend/base/Type.js +29 -0
  203. package/lib/frontend/cppFrontend/common/ArkIRTransformer.d.ts.map +1 -1
  204. package/lib/frontend/cppFrontend/common/ArkIRTransformer.js +56 -56
  205. package/lib/frontend/cppFrontend/common/ArkValueTransformer.d.ts +1 -1
  206. package/lib/frontend/cppFrontend/common/ArkValueTransformer.d.ts.map +1 -1
  207. package/lib/frontend/cppFrontend/common/ArkValueTransformer.js +124 -113
  208. package/lib/frontend/cppFrontend/common/Builtin.d.ts +29 -19
  209. package/lib/frontend/cppFrontend/common/Builtin.d.ts.map +1 -1
  210. package/lib/frontend/cppFrontend/common/Builtin.js +56 -35
  211. package/lib/frontend/cppFrontend/common/IRInference.d.ts +7 -2
  212. package/lib/frontend/cppFrontend/common/IRInference.d.ts.map +1 -1
  213. package/lib/frontend/cppFrontend/common/IRInference.js +61 -28
  214. package/lib/frontend/cppFrontend/common/IRUtils.d.ts +1 -0
  215. package/lib/frontend/cppFrontend/common/IRUtils.d.ts.map +1 -1
  216. package/lib/frontend/cppFrontend/common/IRUtils.js +22 -10
  217. package/lib/frontend/cppFrontend/common/ModelUtils.d.ts +19 -0
  218. package/lib/frontend/cppFrontend/common/ModelUtils.d.ts.map +1 -1
  219. package/lib/frontend/cppFrontend/common/ModelUtils.js +84 -3
  220. package/lib/frontend/cppFrontend/common/TypeInference.d.ts.map +1 -1
  221. package/lib/frontend/cppFrontend/common/TypeInference.js +44 -54
  222. package/lib/frontend/cppFrontend/graph/builder/CfgBuilder.d.ts.map +1 -1
  223. package/lib/frontend/cppFrontend/graph/builder/CfgBuilder.js +2 -1
  224. package/lib/frontend/cppFrontend/inference/CxxModelInference.d.ts +1 -1
  225. package/lib/frontend/cppFrontend/inference/CxxModelInference.d.ts.map +1 -1
  226. package/lib/frontend/cppFrontend/inference/CxxValueInference.d.ts.map +1 -1
  227. package/lib/frontend/cppFrontend/inference/CxxValueInference.js +41 -5
  228. package/lib/frontend/cppFrontend/model/builder/ArkClassBuilder.d.ts.map +1 -1
  229. package/lib/frontend/cppFrontend/model/builder/ArkClassBuilder.js +18 -28
  230. package/lib/frontend/cppFrontend/model/builder/ArkFieldBuilder.d.ts.map +1 -1
  231. package/lib/frontend/cppFrontend/model/builder/ArkFieldBuilder.js +2 -3
  232. package/lib/frontend/cppFrontend/model/builder/ArkFileBuilder.d.ts +2 -2
  233. package/lib/frontend/cppFrontend/model/builder/ArkFileBuilder.d.ts.map +1 -1
  234. package/lib/frontend/cppFrontend/model/builder/ArkFileBuilder.js +31 -24
  235. package/lib/frontend/cppFrontend/model/builder/ArkMethodBuilder.d.ts.map +1 -1
  236. package/lib/frontend/cppFrontend/model/builder/ArkMethodBuilder.js +10 -16
  237. package/lib/frontend/cppFrontend/model/builder/ArkNamespaceBuilder.d.ts +0 -2
  238. package/lib/frontend/cppFrontend/model/builder/ArkNamespaceBuilder.d.ts.map +1 -1
  239. package/lib/frontend/cppFrontend/model/builder/ArkNamespaceBuilder.js +19 -37
  240. package/lib/frontend/cppFrontend/model/builder/BodyBuilder.d.ts +1 -0
  241. package/lib/frontend/cppFrontend/model/builder/BodyBuilder.d.ts.map +1 -1
  242. package/lib/frontend/cppFrontend/model/builder/BodyBuilder.js +30 -3
  243. package/lib/frontend/cppFrontend/model/builder/builderUtils.d.ts.map +1 -1
  244. package/lib/frontend/cppFrontend/model/builder/builderUtils.js +8 -4
  245. package/lib/index.d.ts +3 -0
  246. package/lib/index.d.ts.map +1 -1
  247. package/lib/index.js +10 -2
  248. package/lib/save/json/JsonSerialization.js +2 -2
  249. package/lib/save/source/SourceStmt.js +1 -1
  250. package/lib/save/source/SourceTransformer.d.ts.map +1 -1
  251. package/lib/save/source/SourceTransformer.js +0 -9
  252. package/lib/statistics/StageStatistics.d.ts +195 -0
  253. package/lib/statistics/StageStatistics.d.ts.map +1 -0
  254. package/lib/statistics/StageStatistics.js +346 -0
  255. package/lib/statistics/StageStatisticsReporter.d.ts +58 -0
  256. package/lib/statistics/StageStatisticsReporter.d.ts.map +1 -0
  257. package/lib/statistics/StageStatisticsReporter.js +255 -0
  258. package/lib/utils/Canonicalizer.d.ts +9 -2
  259. package/lib/utils/Canonicalizer.d.ts.map +1 -1
  260. package/lib/utils/Canonicalizer.js +19 -2
  261. package/lib/utils/CxxSceneUtils.d.ts +7 -0
  262. package/lib/utils/CxxSceneUtils.d.ts.map +1 -1
  263. package/lib/utils/CxxSceneUtils.js +10 -1
  264. package/lib/utils/FileUtils.d.ts +0 -1
  265. package/lib/utils/FileUtils.d.ts.map +1 -1
  266. package/lib/utils/FileUtils.js +1 -9
  267. package/lib/utils/HashUtils.d.ts +9 -0
  268. package/lib/utils/HashUtils.d.ts.map +1 -0
  269. package/lib/utils/HashUtils.js +65 -0
  270. package/lib/utils/ModuleUtils.d.ts.map +1 -1
  271. package/lib/utils/ModuleUtils.js +24 -5
  272. package/lib/utils/VisitedSegment.d.ts +23 -0
  273. package/lib/utils/VisitedSegment.d.ts.map +1 -0
  274. package/lib/utils/VisitedSegment.js +64 -0
  275. package/lib/utils/callGraphUtils.d.ts.map +1 -1
  276. package/lib/utils/callGraphUtils.js +7 -7
  277. package/lib/utils/getAllFiles.d.ts.map +1 -1
  278. package/lib/utils/getAllFiles.js +11 -8
  279. package/lib/utils/logger.d.ts +4 -0
  280. package/lib/utils/logger.d.ts.map +1 -1
  281. package/lib/utils/logger.js +16 -0
  282. package/lib/utils/parseArkSourceFile.d.ts +33 -0
  283. package/lib/utils/parseArkSourceFile.d.ts.map +1 -0
  284. package/lib/utils/parseArkSourceFile.js +131 -0
  285. package/package.json +1 -1
  286. package/lib/utils/DependenciesSort.d.ts +0 -3
  287. package/lib/utils/DependenciesSort.d.ts.map +0 -1
  288. package/lib/utils/DependenciesSort.js +0 -72
  289. package/lib/utils/crypto_utils.d.ts +0 -6
  290. package/lib/utils/crypto_utils.d.ts.map +0 -1
  291. package/lib/utils/crypto_utils.js +0 -57
@@ -0,0 +1,109 @@
1
+ "use strict";
2
+ /*
3
+ * Copyright (c) 2026 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
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ exports.SignatureModelCanonicalizer = void 0;
18
+ const SignatureCanonicalizer_1 = require("./SignatureCanonicalizer");
19
+ /**
20
+ * A canonicalizer that stores both signature instances and model instances,
21
+ * unified by the same dense integer ID space.
22
+ *
23
+ * Extends {@link SignatureCanonicalizer} with a `models` array that maps
24
+ * ID → model object. This eliminates the need for a separate `Map<number, Model>`
25
+ * — the canonicalizer itself serves as both the signature registry and the model store.
26
+ *
27
+ * ID 0 is reserved for DEFAULT signatures and does not correspond to any model
28
+ * (`models[0]` remains `undefined`).
29
+ *
30
+ * @template S - The signature type, must implement {@link Canonicalizable}
31
+ * @template M - The model type associated with the signature
32
+ */
33
+ class SignatureModelCanonicalizer extends SignatureCanonicalizer_1.SignatureCanonicalizer {
34
+ constructor() {
35
+ super(...arguments);
36
+ this.models = [];
37
+ }
38
+ /**
39
+ * Register a model at the given ID.
40
+ *
41
+ * The ID must have been allocated by `getId(sig)` or `intern(sig)` first.
42
+ * Typically called right after `getId(sig)` returns a new or existing ID:
43
+ * ```
44
+ * const id = canonicalizer.getId(sig);
45
+ * canonicalizer.setModel(id, model);
46
+ * ```
47
+ *
48
+ * @param id - The integer ID (>= 0)
49
+ * @param model - The model to associate with this ID
50
+ */
51
+ setModel(id, model) {
52
+ this.models[id] = model;
53
+ }
54
+ /**
55
+ * Get the model associated with an integer ID.
56
+ *
57
+ * @param id - The integer ID
58
+ * @returns The model, or `undefined` if no model is registered at this ID
59
+ * (including ID 0 which is reserved for DEFAULT signatures)
60
+ */
61
+ getModel(id) {
62
+ return this.models[id];
63
+ }
64
+ /**
65
+ * Remove the model at the given ID.
66
+ *
67
+ * Sets `models[id]` to `undefined`. The ID itself is not recycled —
68
+ * the signature entry in the canonicalizer remains, but the model is no
69
+ * longer accessible via `getModel(id)`.
70
+ *
71
+ * @param id - The integer ID
72
+ */
73
+ removeModel(id) {
74
+ this.models[id] = undefined;
75
+ }
76
+ /**
77
+ * Get all registered models (excluding `undefined` entries).
78
+ *
79
+ * @returns An array of all models currently registered
80
+ */
81
+ getModels() {
82
+ const result = [];
83
+ for (let i = 0; i < this.models.length; i++) {
84
+ const m = this.models[i];
85
+ if (m !== undefined) {
86
+ result.push(m);
87
+ }
88
+ }
89
+ return result;
90
+ }
91
+ /**
92
+ * Clear all registered models, keeping the signature table intact.
93
+ *
94
+ * Used when models need to be rebuilt (e.g., after type inference modifies
95
+ * method signatures) but the signature ID mappings should remain stable.
96
+ * Unlike {@link clear}, the signature canonicalizer entries are preserved.
97
+ */
98
+ clearModels() {
99
+ this.models = [];
100
+ }
101
+ /**
102
+ * Clear all signatures, models, and reset the canonicalizer.
103
+ */
104
+ clear() {
105
+ super.clear();
106
+ this.models = [];
107
+ }
108
+ }
109
+ exports.SignatureModelCanonicalizer = SignatureModelCanonicalizer;
@@ -8,6 +8,7 @@ export declare class StmtUseReplacer {
8
8
  private newUse;
9
9
  constructor(oldUse: Value, newUse: Value);
10
10
  caseStmt(stmt: Stmt): void;
11
+ private transferInvokeFullPosition;
11
12
  private caseAssignStmt;
12
13
  private caseInvokeStmt;
13
14
  private caseReturnStmt;
@@ -1 +1 @@
1
- {"version":3,"file":"StmtUseReplacer.d.ts","sourceRoot":"","sources":["../../../src/core/common/StmtUseReplacer.ts"],"names":[],"mappings":"AAiBA,OAAO,EAAwE,IAAI,EAAE,MAAM,cAAc,CAAC;AAC1G,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAKtC;;GAEG;AACH,qBAAa,eAAe;IACxB,OAAO,CAAC,MAAM,CAAQ;IACtB,OAAO,CAAC,MAAM,CAAQ;gBAEV,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK;IAKjC,QAAQ,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI;IAcjC,OAAO,CAAC,cAAc;IAoBtB,OAAO,CAAC,cAAc;IAatB,OAAO,CAAC,cAAc;IAOtB,OAAO,CAAC,UAAU;IAalB,OAAO,CAAC,aAAa;CAMxB"}
1
+ {"version":3,"file":"StmtUseReplacer.d.ts","sourceRoot":"","sources":["../../../src/core/common/StmtUseReplacer.ts"],"names":[],"mappings":"AAiBA,OAAO,EAAwE,IAAI,EAAE,MAAM,cAAc,CAAC;AAC1G,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAMtC;;GAEG;AACH,qBAAa,eAAe;IACxB,OAAO,CAAC,MAAM,CAAQ;IACtB,OAAO,CAAC,MAAM,CAAQ;gBAEV,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK;IAKjC,QAAQ,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI;IAejC,OAAO,CAAC,0BAA0B;IASlC,OAAO,CAAC,cAAc;IAoBtB,OAAO,CAAC,cAAc;IAatB,OAAO,CAAC,cAAc;IAOtB,OAAO,CAAC,UAAU;IAalB,OAAO,CAAC,aAAa;CAMxB"}
@@ -30,6 +30,7 @@ class StmtUseReplacer {
30
30
  this.newUse = newUse;
31
31
  }
32
32
  caseStmt(stmt) {
33
+ this.transferInvokeFullPosition();
33
34
  if (stmt instanceof Stmt_1.ArkAssignStmt) {
34
35
  this.caseAssignStmt(stmt);
35
36
  }
@@ -46,6 +47,14 @@ class StmtUseReplacer {
46
47
  this.caseThrowStmt(stmt);
47
48
  }
48
49
  }
50
+ transferInvokeFullPosition() {
51
+ if (this.oldUse instanceof Expr_1.AbstractInvokeExpr && this.newUse instanceof Expr_1.AbstractInvokeExpr) {
52
+ const pos = this.oldUse.getInvokeFullPosition();
53
+ if (pos) {
54
+ this.newUse.setInvokeFullPosition(pos);
55
+ }
56
+ }
57
+ }
49
58
  caseAssignStmt(stmt) {
50
59
  const lValue = stmt.getLeftOp();
51
60
  if (lValue instanceof Ref_1.AbstractRef) {
@@ -2,17 +2,28 @@ import { FullPosition } from '../base/Position';
2
2
  /**
3
3
  * Deep copy a string to avoid sharing the original text reference from TypeScript AST nodes.
4
4
  * This ensures that model objects do not implicitly depend on AST node lifecycles.
5
+ * Strings shorter than V8's kMinSlicedStringLength can never be sliced strings,
6
+ * so they cannot retain a larger parent and are returned as-is.
5
7
  */
6
8
  export declare function cloneText(text: string): string;
9
+ /**
10
+ * Builds an array of absolute offsets of each line start in `sourceText`.
11
+ * Index 0 is always 0. Handles `\n` and `\r\n` the same way as position extraction.
12
+ * @param maxLineCount - When set, stop once this many line starts are collected
13
+ * (used by one-shot extract to avoid scanning the whole file).
14
+ */
15
+ export declare function buildLineStarts(sourceText: string, maxLineCount?: number): number[];
7
16
  /**
8
17
  * Extracts source text from the given source code using the specified full position.
9
18
  * @param sourceText - The source code text, or undefined if not available.
10
19
  * @param position - The full position (start/end line/col) specifying the range to extract.
20
+ * @param lineStarts - Optional precomputed line-start offsets (e.g. from {@link buildLineStarts}
21
+ * or `ArkFile.getLineStarts()`). When omitted, builds offsets only up to `endLine`.
11
22
  * @returns The extracted source text, or undefined if:
12
23
  * - sourceText is undefined or empty
13
24
  * - position is undefined or FullPosition.DEFAULT
14
25
  * - position has invalid line/col values (<=0)
15
26
  * - position exceeds the source text boundaries
16
27
  */
17
- export declare function extractSourceTextByFullPosition(sourceText: string | undefined, position: FullPosition | undefined): string | undefined;
28
+ export declare function extractSourceTextByFullPosition(sourceText: string | undefined, position: FullPosition | undefined, lineStarts?: readonly number[]): string | undefined;
18
29
  //# sourceMappingURL=StringUtils.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"StringUtils.d.ts","sourceRoot":"","sources":["../../../src/core/common/StringUtils.ts"],"names":[],"mappings":"AAeA,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAEhD;;;GAGG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAE9C;AAED;;;;;;;;;GASG;AACH,wBAAgB,+BAA+B,CAAC,UAAU,EAAE,MAAM,GAAG,SAAS,EAAE,QAAQ,EAAE,YAAY,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAsCtI"}
1
+ {"version":3,"file":"StringUtils.d.ts","sourceRoot":"","sources":["../../../src/core/common/StringUtils.ts"],"names":[],"mappings":"AAeA,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAIhD;;;;;GAKG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAK9C;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,UAAU,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAYnF;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,+BAA+B,CAC3C,UAAU,EAAE,MAAM,GAAG,SAAS,EAC9B,QAAQ,EAAE,YAAY,GAAG,SAAS,EAClC,UAAU,CAAC,EAAE,SAAS,MAAM,EAAE,GAC/B,MAAM,GAAG,SAAS,CA6BpB"}
@@ -14,27 +14,56 @@
14
14
  * limitations under the License.
15
15
  */
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- exports.extractSourceTextByFullPosition = exports.cloneText = void 0;
17
+ exports.extractSourceTextByFullPosition = exports.buildLineStarts = exports.cloneText = void 0;
18
18
  const Position_1 = require("../base/Position");
19
+ const MIN_SLICED_STRING_LENGTH = 13;
19
20
  /**
20
21
  * Deep copy a string to avoid sharing the original text reference from TypeScript AST nodes.
21
22
  * This ensures that model objects do not implicitly depend on AST node lifecycles.
23
+ * Strings shorter than V8's kMinSlicedStringLength can never be sliced strings,
24
+ * so they cannot retain a larger parent and are returned as-is.
22
25
  */
23
26
  function cloneText(text) {
24
- return text.length > 0 ? Buffer.from(text, 'utf8').toString('utf8') : '';
27
+ if (text.length < MIN_SLICED_STRING_LENGTH) {
28
+ return text;
29
+ }
30
+ return Buffer.from(text, 'utf8').toString('utf8');
25
31
  }
26
32
  exports.cloneText = cloneText;
33
+ /**
34
+ * Builds an array of absolute offsets of each line start in `sourceText`.
35
+ * Index 0 is always 0. Handles `\n` and `\r\n` the same way as position extraction.
36
+ * @param maxLineCount - When set, stop once this many line starts are collected
37
+ * (used by one-shot extract to avoid scanning the whole file).
38
+ */
39
+ function buildLineStarts(sourceText, maxLineCount) {
40
+ const lineStarts = [0];
41
+ const len = sourceText.length;
42
+ for (let i = 0; i < len && (maxLineCount === undefined || lineStarts.length < maxLineCount); i++) {
43
+ if (sourceText[i] === '\n') {
44
+ lineStarts.push(i + 1);
45
+ }
46
+ else if (sourceText[i] === '\r' && i + 1 < len && sourceText[i + 1] === '\n') {
47
+ lineStarts.push(i + 2);
48
+ i++;
49
+ }
50
+ }
51
+ return lineStarts;
52
+ }
53
+ exports.buildLineStarts = buildLineStarts;
27
54
  /**
28
55
  * Extracts source text from the given source code using the specified full position.
29
56
  * @param sourceText - The source code text, or undefined if not available.
30
57
  * @param position - The full position (start/end line/col) specifying the range to extract.
58
+ * @param lineStarts - Optional precomputed line-start offsets (e.g. from {@link buildLineStarts}
59
+ * or `ArkFile.getLineStarts()`). When omitted, builds offsets only up to `endLine`.
31
60
  * @returns The extracted source text, or undefined if:
32
61
  * - sourceText is undefined or empty
33
62
  * - position is undefined or FullPosition.DEFAULT
34
63
  * - position has invalid line/col values (<=0)
35
64
  * - position exceeds the source text boundaries
36
65
  */
37
- function extractSourceTextByFullPosition(sourceText, position) {
66
+ function extractSourceTextByFullPosition(sourceText, position, lineStarts) {
38
67
  if (!sourceText || !position || position === Position_1.FullPosition.DEFAULT) {
39
68
  return undefined;
40
69
  }
@@ -46,23 +75,13 @@ function extractSourceTextByFullPosition(sourceText, position) {
46
75
  return undefined;
47
76
  }
48
77
  const len = sourceText.length;
49
- const lineStarts = [0];
50
- // Only iterate up to endLine to avoid traversing the entire file
51
- for (let i = 0; i < len && lineStarts.length < endLine; i++) {
52
- if (sourceText[i] === '\n') {
53
- lineStarts.push(i + 1);
54
- }
55
- else if (sourceText[i] === '\r' && i + 1 < len && sourceText[i + 1] === '\n') {
56
- lineStarts.push(i + 2);
57
- i++;
58
- }
59
- }
78
+ const starts = lineStarts !== null && lineStarts !== void 0 ? lineStarts : buildLineStarts(sourceText, endLine);
60
79
  // Check if there are enough lines
61
- if (startLine > lineStarts.length || endLine > lineStarts.length) {
80
+ if (startLine > starts.length || endLine > starts.length) {
62
81
  return undefined;
63
82
  }
64
- const startIdx = lineStarts[startLine - 1] + startCol - 1;
65
- const endIdx = lineStarts[endLine - 1] + endCol - 1;
83
+ const startIdx = starts[startLine - 1] + startCol - 1;
84
+ const endIdx = starts[endLine - 1] + endCol - 1;
66
85
  if (startIdx >= len || endIdx > len || startIdx >= endIdx) {
67
86
  return undefined;
68
87
  }
@@ -0,0 +1,82 @@
1
+ /**
2
+ * 临时签名的索引表(组合 Canonicalizer.objectIdentity 策略)。
3
+ *
4
+ * 组合设计:注册/查ID/get/clear 委托 inner Canonicalizer(objectIdentity——Symbol 幂等
5
+ * + 稠密 ID + 数组存储);本类仅追加 temp 空间独有的 retire(迁移置空)与替换记录。
6
+ *
7
+ * retire 状态与归宿记录合并存储在单个三态槽表 {@link retireSlots}(4B/ID):
8
+ * 0 = live;-1 = 已迁移无归宿;>0 = 已迁移且值为 formal 归宿(formalId ≥ 1,
9
+ * 0 为 DEFAULT 不可作归宿)。读写判定共用一次数组读,两份状态由单写点保证同步。
10
+ *
11
+ * 生命周期(全保留):未 retire 的条目永不清——完整注册审计表。"推导中间垃圾"
12
+ * 钉活到 Registry.dispose——知情权衡(JS 无法感知强可达对象的持有者消亡)。
13
+ * 三数自洽:totalRegistered(inner.size)= liveCount + retiredCount。
14
+ */
15
+ export declare class TempSignatureCanonicalizer<S extends object> {
16
+ /** objectIdentity 策略的注册/查ID/get/clear 核心(Symbol 幂等 + 稠密 ID + list 数组)。 */
17
+ private readonly inner;
18
+ /**
19
+ * 三态槽表(下标 = temp SigID):0 = live;-1 = 已迁移无归宿;>0 = 已迁移,
20
+ * 值为 formal 归宿。get/getReplacement 的判定共用此一次数组读。
21
+ */
22
+ private retireSlots;
23
+ /** 注册签名对象:同一实例重复注册复用同一 ID;新实例分配新 ID。扩容保证槽表覆盖全部已分配 ID。 */
24
+ register(sig: S): number;
25
+ /**
26
+ * 按 ID 取签名对象。已迁移(三态槽非 0)返回 undefined——消费方应查
27
+ * {@link getReplacement} 获得 formal 归宿(三级查的 fallback)。
28
+ * register 的同步扩容保证已分配 ID 均在槽表界内;越界(未注册)与负 ID
29
+ * 经 inner.get 返回 undefined。
30
+ */
31
+ get(id: number): S | undefined;
32
+ /** 查询签名对象的 tempSigID,不注册。未注册返回 -1。Symbol 在 retire 后不清(审计追溯保留)。 */
33
+ getExistingTempId(sig: S): number;
34
+ /**
35
+ * 迁移置空(幂等)。合法性以 inner.size() 为权威上界(register 分配保证 id <
36
+ * inner.size(),且 inner.size 只增不减)+ inner 槽有值才迁移。槽表覆盖全部已分配
37
+ * ID 的不变式由 register 维护(分配即扩容),此处三态读界内安全。
38
+ */
39
+ retire(id: number): void;
40
+ /**
41
+ * 迁移置空 + 记录 formal 归宿(幂等;重复调用以首次记录为准——槽为 -1 才写入,
42
+ * 已 >0 不覆盖)。live 时先经 {@link retire} 迁移;从未注册的 ID 不记录归宿
43
+ * (live 态写归宿会污染 get 判定)。
44
+ */
45
+ retireWithReplacement(id: number, formalId: number): void;
46
+ /** 查询迁移记录的 formal 归宿。-1 = 无记录(未迁移 / 已迁移无归宿)。 */
47
+ getReplacement(id: number): number;
48
+ /**
49
+ * 未迁移量(去洞活数)= totalRegistered() - retiredCount()。
50
+ * Named liveCount (not size) on purpose: the composed Canonicalizer.size() returns the
51
+ * dense extent (holes included) — same name, opposite semantics silently breaks any
52
+ * loop bound or capacity check that treats the two as interchangeable containers.
53
+ * 三数自洽:totalRegistered = liveCount + retired。
54
+ */
55
+ liveCount(): number;
56
+ /** 累计注册总量 = inner.size()(含已置空)。 */
57
+ totalRegistered(): number;
58
+ /** 已迁移总量 = 三态槽表非零槽数。三数自洽:totalRegistered = liveCount + retired。 */
59
+ retired(): number;
60
+ /** 全区间审计视图:[0, totalRegistered) 的全部 ID(含已置空——可经 getReplacement 追溯归宿)。 */
61
+ registeredIds(): number[];
62
+ /** 未迁移(非空 slot)的 ID 集视图。 */
63
+ liveIds(): number[];
64
+ /** 索引表统计(同步即精确;计数为遍历槽表,仅 statistics 低频调用)。 */
65
+ getStats(): {
66
+ liveCount: number;
67
+ totalRegistered: number;
68
+ retiredCount: number;
69
+ replacedCount: number;
70
+ };
71
+ /** 清空:委托 inner.clear(Symbol 清理 + 换新 Symbol + 重置),追加本层状态重置。 */
72
+ clear(): void;
73
+ private retiredCount;
74
+ private replacedCount;
75
+ /**
76
+ * 扩容。唯一调用点是 register(分配即扩容)——维护"槽表覆盖全部已分配 ID"
77
+ * 的不变式,所有读点的三态判定由此界内安全。快速路径一次下标比较;慢路径按
78
+ * inner.size ×1.1 前瞻扩容(推导期约 5% 的注册增长被余量直接吸收,全程零再扩容)。
79
+ */
80
+ private ensureCapacity;
81
+ }
82
+ //# sourceMappingURL=TempSignatureCanonicalizer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TempSignatureCanonicalizer.d.ts","sourceRoot":"","sources":["../../../src/core/common/TempSignatureCanonicalizer.ts"],"names":[],"mappings":"AAiBA;;;;;;;;;;;;;GAaG;AACH,qBAAa,0BAA0B,CAAC,CAAC,SAAS,MAAM;IACpD,0EAA0E;IAC1E,OAAO,CAAC,QAAQ,CAAC,KAAK,CAA4C;IAElE;;;OAGG;IACH,OAAO,CAAC,WAAW,CAAwB;IAE3C,yDAAyD;IAClD,QAAQ,CAAC,GAAG,EAAE,CAAC,GAAG,MAAM;IAM/B;;;;;OAKG;IACI,GAAG,CAAC,EAAE,EAAE,MAAM,GAAG,CAAC,GAAG,SAAS;IAOrC,kEAAkE;IAC3D,iBAAiB,CAAC,GAAG,EAAE,CAAC,GAAG,MAAM;IAIxC;;;;OAIG;IACI,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI;IAU/B;;;;OAIG;IACI,qBAAqB,CAAC,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI;IAOhE,gDAAgD;IACzC,cAAc,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM;IAIzC;;;;;;OAMG;IACI,SAAS,IAAI,MAAM;IAI1B,mCAAmC;IAC5B,eAAe,IAAI,MAAM;IAIhC,mEAAmE;IAC5D,OAAO,IAAI,MAAM;IAIxB,yEAAyE;IAClE,aAAa,IAAI,MAAM,EAAE;IAQhC,4BAA4B;IACrB,OAAO,IAAI,MAAM,EAAE;IAU1B,8CAA8C;IACvC,QAAQ,IAAI;QAAE,SAAS,EAAE,MAAM,CAAC;QAAC,eAAe,EAAE,MAAM,CAAC;QAAC,YAAY,EAAE,MAAM,CAAC;QAAC,aAAa,EAAE,MAAM,CAAA;KAAE;IAS9G,8DAA8D;IACvD,KAAK,IAAI,IAAI;IAKpB,OAAO,CAAC,YAAY;IAUpB,OAAO,CAAC,aAAa;IAUrB;;;;OAIG;IACH,OAAO,CAAC,cAAc;CASzB"}
@@ -0,0 +1,177 @@
1
+ "use strict";
2
+ /*
3
+ * Copyright (c) 2026 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
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ exports.TempSignatureCanonicalizer = void 0;
18
+ const Canonicalizer_1 = require("../../utils/Canonicalizer");
19
+ /**
20
+ * 临时签名的索引表(组合 Canonicalizer.objectIdentity 策略)。
21
+ *
22
+ * 组合设计:注册/查ID/get/clear 委托 inner Canonicalizer(objectIdentity——Symbol 幂等
23
+ * + 稠密 ID + 数组存储);本类仅追加 temp 空间独有的 retire(迁移置空)与替换记录。
24
+ *
25
+ * retire 状态与归宿记录合并存储在单个三态槽表 {@link retireSlots}(4B/ID):
26
+ * 0 = live;-1 = 已迁移无归宿;>0 = 已迁移且值为 formal 归宿(formalId ≥ 1,
27
+ * 0 为 DEFAULT 不可作归宿)。读写判定共用一次数组读,两份状态由单写点保证同步。
28
+ *
29
+ * 生命周期(全保留):未 retire 的条目永不清——完整注册审计表。"推导中间垃圾"
30
+ * 钉活到 Registry.dispose——知情权衡(JS 无法感知强可达对象的持有者消亡)。
31
+ * 三数自洽:totalRegistered(inner.size)= liveCount + retiredCount。
32
+ */
33
+ class TempSignatureCanonicalizer {
34
+ constructor() {
35
+ /** objectIdentity 策略的注册/查ID/get/clear 核心(Symbol 幂等 + 稠密 ID + list 数组)。 */
36
+ this.inner = new Canonicalizer_1.Canonicalizer();
37
+ /**
38
+ * 三态槽表(下标 = temp SigID):0 = live;-1 = 已迁移无归宿;>0 = 已迁移,
39
+ * 值为 formal 归宿。get/getReplacement 的判定共用此一次数组读。
40
+ */
41
+ this.retireSlots = new Int32Array(1024);
42
+ }
43
+ /** 注册签名对象:同一实例重复注册复用同一 ID;新实例分配新 ID。扩容保证槽表覆盖全部已分配 ID。 */
44
+ register(sig) {
45
+ const id = this.inner.getId(sig);
46
+ this.ensureCapacity(id);
47
+ return id;
48
+ }
49
+ /**
50
+ * 按 ID 取签名对象。已迁移(三态槽非 0)返回 undefined——消费方应查
51
+ * {@link getReplacement} 获得 formal 归宿(三级查的 fallback)。
52
+ * register 的同步扩容保证已分配 ID 均在槽表界内;越界(未注册)与负 ID
53
+ * 经 inner.get 返回 undefined。
54
+ */
55
+ get(id) {
56
+ if (this.retireSlots[id] !== 0) {
57
+ return undefined;
58
+ }
59
+ return this.inner.get(id);
60
+ }
61
+ /** 查询签名对象的 tempSigID,不注册。未注册返回 -1。Symbol 在 retire 后不清(审计追溯保留)。 */
62
+ getExistingTempId(sig) {
63
+ return this.inner.getExistingId(sig);
64
+ }
65
+ /**
66
+ * 迁移置空(幂等)。合法性以 inner.size() 为权威上界(register 分配保证 id <
67
+ * inner.size(),且 inner.size 只增不减)+ inner 槽有值才迁移。槽表覆盖全部已分配
68
+ * ID 的不变式由 register 维护(分配即扩容),此处三态读界内安全。
69
+ */
70
+ retire(id) {
71
+ if (id < 0 || id >= this.inner.size() || this.inner.get(id) === undefined) {
72
+ return;
73
+ }
74
+ if (this.retireSlots[id] === 0) {
75
+ this.retireSlots[id] = -1;
76
+ this.inner.removeAt(id);
77
+ }
78
+ }
79
+ /**
80
+ * 迁移置空 + 记录 formal 归宿(幂等;重复调用以首次记录为准——槽为 -1 才写入,
81
+ * 已 >0 不覆盖)。live 时先经 {@link retire} 迁移;从未注册的 ID 不记录归宿
82
+ * (live 态写归宿会污染 get 判定)。
83
+ */
84
+ retireWithReplacement(id, formalId) {
85
+ this.retire(id);
86
+ if (this.retireSlots[id] === -1) {
87
+ this.retireSlots[id] = formalId;
88
+ }
89
+ }
90
+ /** 查询迁移记录的 formal 归宿。-1 = 无记录(未迁移 / 已迁移无归宿)。 */
91
+ getReplacement(id) {
92
+ return this.retireSlots[id] > 0 ? this.retireSlots[id] : -1;
93
+ }
94
+ /**
95
+ * 未迁移量(去洞活数)= totalRegistered() - retiredCount()。
96
+ * Named liveCount (not size) on purpose: the composed Canonicalizer.size() returns the
97
+ * dense extent (holes included) — same name, opposite semantics silently breaks any
98
+ * loop bound or capacity check that treats the two as interchangeable containers.
99
+ * 三数自洽:totalRegistered = liveCount + retired。
100
+ */
101
+ liveCount() {
102
+ return this.totalRegistered() - this.retiredCount();
103
+ }
104
+ /** 累计注册总量 = inner.size()(含已置空)。 */
105
+ totalRegistered() {
106
+ return this.inner.size();
107
+ }
108
+ /** 已迁移总量 = 三态槽表非零槽数。三数自洽:totalRegistered = liveCount + retired。 */
109
+ retired() {
110
+ return this.retiredCount();
111
+ }
112
+ /** 全区间审计视图:[0, totalRegistered) 的全部 ID(含已置空——可经 getReplacement 追溯归宿)。 */
113
+ registeredIds() {
114
+ const ids = [];
115
+ for (let i = 0; i < this.inner.size(); i++) {
116
+ ids.push(i);
117
+ }
118
+ return ids;
119
+ }
120
+ /** 未迁移(非空 slot)的 ID 集视图。 */
121
+ liveIds() {
122
+ const ids = [];
123
+ for (let i = 0; i < this.inner.size(); i++) {
124
+ if (this.retireSlots[i] === 0 && this.inner.get(i) !== undefined) {
125
+ ids.push(i);
126
+ }
127
+ }
128
+ return ids;
129
+ }
130
+ /** 索引表统计(同步即精确;计数为遍历槽表,仅 statistics 低频调用)。 */
131
+ getStats() {
132
+ return {
133
+ liveCount: this.liveCount(),
134
+ totalRegistered: this.totalRegistered(),
135
+ retiredCount: this.retiredCount(),
136
+ replacedCount: this.replacedCount(),
137
+ };
138
+ }
139
+ /** 清空:委托 inner.clear(Symbol 清理 + 换新 Symbol + 重置),追加本层状态重置。 */
140
+ clear() {
141
+ this.inner.clear();
142
+ this.retireSlots = new Int32Array(1024);
143
+ }
144
+ retiredCount() {
145
+ let count = 0;
146
+ for (let i = 0; i < this.retireSlots.length; i++) {
147
+ if (this.retireSlots[i] !== 0) {
148
+ count++;
149
+ }
150
+ }
151
+ return count;
152
+ }
153
+ replacedCount() {
154
+ let count = 0;
155
+ for (let i = 0; i < this.retireSlots.length; i++) {
156
+ if (this.retireSlots[i] > 0) {
157
+ count++;
158
+ }
159
+ }
160
+ return count;
161
+ }
162
+ /**
163
+ * 扩容。唯一调用点是 register(分配即扩容)——维护"槽表覆盖全部已分配 ID"
164
+ * 的不变式,所有读点的三态判定由此界内安全。快速路径一次下标比较;慢路径按
165
+ * inner.size ×1.1 前瞻扩容(推导期约 5% 的注册增长被余量直接吸收,全程零再扩容)。
166
+ */
167
+ ensureCapacity(requiredIdx) {
168
+ if (requiredIdx < this.retireSlots.length) {
169
+ return;
170
+ }
171
+ const newLength = Math.ceil(this.inner.size() * 1.1);
172
+ const next = new Int32Array(newLength);
173
+ next.set(this.retireSlots);
174
+ this.retireSlots = next;
175
+ }
176
+ }
177
+ exports.TempSignatureCanonicalizer = TempSignatureCanonicalizer;
@@ -1,6 +1,6 @@
1
1
  import { Local } from '../base/Local';
2
2
  import { Stmt } from '../base/Stmt';
3
- import { EnumValueType, FunctionType, GenericType, Type, UnclearReferenceType } from '../base/Type';
3
+ import { EnumValueType, FunctionType, GenericType, Type, UnclearReferenceType, UnclearVisited } from '../base/Type';
4
4
  import { ArkMethod } from '../model/ArkMethod';
5
5
  import { ArkExport } from '../model/ArkExport';
6
6
  import { ArkClass } from '../model/ArkClass';
@@ -19,9 +19,12 @@ export declare class TypeInference {
19
19
  * @param leftOpType
20
20
  * @param declaringArkClass
21
21
  * @param visited
22
+ * @param arkMethod - optional; propagated to unclear-name resolution so classes declared
23
+ * inside the method scope chain resolve deterministically (local-class lookup).
22
24
  * @returns
23
25
  */
24
- static inferUnclearedType(leftOpType: Type, declaringArkClass: ArkClass, visited?: Set<Type>): Type | null | undefined;
26
+ static inferUnclearedType(leftOpType: Type, declaringArkClass: ArkClass, visited?: UnclearVisited, arkMethod?: ArkMethod): Type | null | undefined;
27
+ private static inferUnclearedTypeWithVisited;
25
28
  private static inferUnclearComplexType;
26
29
  static inferTypeInMethod(arkMethod: ArkMethod): void;
27
30
  private static resolveStmt;
@@ -56,7 +59,8 @@ export declare class TypeInference {
56
59
  private static inferLeftOpType;
57
60
  static setValueType(value: Value, type: Type): void;
58
61
  static isUnclearType(type: Type | null | undefined): boolean;
59
- static checkType(type: Type, check: (t: Type) => boolean, visited?: Set<Type>): boolean;
62
+ static checkType(type: Type, check: (t: Type) => boolean, visited?: UnclearVisited): boolean;
63
+ private static checkTypeRecursion;
60
64
  static inferSimpleTypeInStmt(stmt: Stmt): void;
61
65
  static buildTypeFromStr(typeStr: string): Type;
62
66
  static inferValueType(value: Value, arkMethod: ArkMethod): Type | null;
@@ -72,16 +76,21 @@ export declare class TypeInference {
72
76
  * @param arkClass
73
77
  * @returns
74
78
  */
75
- static inferUnclearRefType(urType: UnclearReferenceType, arkClass: ArkClass): Type | null;
79
+ static inferUnclearRefType(urType: UnclearReferenceType, arkClass: ArkClass, arkMethod?: ArkMethod): Type | null;
76
80
  /**
77
81
  * Find out the original object and type for a given unclear reference type name.
78
82
  * It returns original type.
79
83
  * The original type is null if it failed to infer the type.
80
84
  * @param refName
81
85
  * @param arkClass
86
+ * @param arkMethod - optional; when provided, classes declared inside the method
87
+ * scope chain are resolved first (deterministic local-class lookup) before
88
+ * the generic file-level name search.
82
89
  * @returns
83
90
  */
84
- static inferUnclearRefName(refName: string, arkClass: ArkClass): Type | null;
91
+ static inferUnclearRefName(refName: string, arkClass: ArkClass, arkMethod?: ArkMethod): Type | null;
92
+ /** 首段名解析:方法作用域链局部类优先(确定性查找),未命中回落限定名/单名的通用解析。 */
93
+ private static inferFirstNameType;
85
94
  /**
86
95
  * Find out the original object and type for a given base type and the field name.
87
96
  * It returns an array with 2 items, original object and original type.
@@ -106,6 +115,16 @@ export declare class TypeInference {
106
115
  * @returns
107
116
  */
108
117
  static inferBaseType(baseName: string, arkClass: ArkClass): Type | null;
118
+ /**
119
+ * Multi-candidate variant of {@link inferBaseType}: expands the SDK-global tier
120
+ * into ALL entities registered under the name (same-name multi-declaration, e.g.
121
+ * `interface Object` + `declare var Object: ObjectConstructor`, or an interface
122
+ * augmented across lib.es20XX files). Member resolution should probe each
123
+ * candidate until a member is found — the hit entity's signature carries the
124
+ * real declaring file. The file-local / import tiers stay single-valued (they
125
+ * resolve to one symbol by scope semantics).
126
+ */
127
+ static inferBaseTypes(baseName: string, arkClass: ArkClass): Type[];
109
128
  static inferTypeByName(typeName: string, arkClass: ArkClass): Type | null;
110
129
  static getTypeByGlobalName(globalName: string, arkMethod: ArkMethod): Type | null;
111
130
  static inferRealGenericTypes(realTypes: Type[] | undefined, arkClass: ArkClass): void;
@@ -116,7 +135,6 @@ export declare class TypeInference {
116
135
  static inferFunctionType(argType: FunctionType, paramSubSignature: MethodSubSignature | undefined, realTypes: Type[] | undefined): void;
117
136
  private static resolveArkReturnStmt;
118
137
  static isAnonType(argType: Type, projectName: string): boolean;
119
- static isDummyClassType(rightType: Type): boolean;
120
138
  static isTypeCanBeOverride(type: Type): boolean;
121
139
  static union(type1: Type, type2: Type): Type;
122
140
  static isSameType(type1: Type, type2: Type): boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"TypeInference.d.ts","sourceRoot":"","sources":["../../../src/core/common/TypeInference.ts"],"names":[],"mappings":"AAiBA,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAUtC,OAAO,EAAwD,IAAI,EAAE,MAAM,cAAc,CAAC;AAC1F,OAAO,EAQH,aAAa,EACb,YAAY,EACZ,WAAW,EAQX,IAAI,EACJ,oBAAoB,EAKvB,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAiB,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,QAAQ,EAAiB,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAuBtC,OAAO,EAAE,eAAe,EAAE,kBAAkB,EAAsB,MAAM,uBAA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