arkanalyzer 1.0.6 → 1.0.8

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 (224) hide show
  1. package/config/arkanalyzer.json +8 -0
  2. package/docs/IR2ts-stmt.md +81 -0
  3. package/docs/IR2ts.md +82 -0
  4. package/lib/Config.d.ts +29 -1
  5. package/lib/Config.d.ts.map +1 -1
  6. package/lib/Config.js +44 -11
  7. package/lib/Scene.d.ts +152 -9
  8. package/lib/Scene.d.ts.map +1 -1
  9. package/lib/Scene.js +233 -66
  10. package/lib/callgraph/algorithm/AbstractAnalysis.d.ts +2 -1
  11. package/lib/callgraph/algorithm/AbstractAnalysis.d.ts.map +1 -1
  12. package/lib/callgraph/algorithm/AbstractAnalysis.js +14 -7
  13. package/lib/callgraph/algorithm/ClassHierarchyAnalysis.d.ts.map +1 -1
  14. package/lib/callgraph/algorithm/ClassHierarchyAnalysis.js +2 -4
  15. package/lib/callgraph/algorithm/RapidTypeAnalysis.d.ts.map +1 -1
  16. package/lib/callgraph/algorithm/RapidTypeAnalysis.js +2 -3
  17. package/lib/callgraph/common/Statistics.js +1 -1
  18. package/lib/callgraph/model/BaseGraph.js +2 -2
  19. package/lib/callgraph/model/CallGraph.d.ts +3 -2
  20. package/lib/callgraph/model/CallGraph.d.ts.map +1 -1
  21. package/lib/callgraph/model/CallGraph.js +23 -14
  22. package/lib/callgraph/model/builder/CallGraphBuilder.d.ts +2 -2
  23. package/lib/callgraph/model/builder/CallGraphBuilder.js +3 -3
  24. package/lib/callgraph/pointerAnalysis/Context.d.ts.map +1 -1
  25. package/lib/callgraph/pointerAnalysis/Context.js +0 -1
  26. package/lib/callgraph/pointerAnalysis/Pag.d.ts +36 -9
  27. package/lib/callgraph/pointerAnalysis/Pag.d.ts.map +1 -1
  28. package/lib/callgraph/pointerAnalysis/Pag.js +130 -37
  29. package/lib/callgraph/pointerAnalysis/PagBuilder.d.ts +34 -5
  30. package/lib/callgraph/pointerAnalysis/PagBuilder.d.ts.map +1 -1
  31. package/lib/callgraph/pointerAnalysis/PagBuilder.js +479 -126
  32. package/lib/callgraph/pointerAnalysis/PointerAnalysis.d.ts +6 -0
  33. package/lib/callgraph/pointerAnalysis/PointerAnalysis.d.ts.map +1 -1
  34. package/lib/callgraph/pointerAnalysis/PointerAnalysis.js +107 -45
  35. package/lib/callgraph/pointerAnalysis/PtsDS.d.ts.map +1 -1
  36. package/lib/callgraph/pointerAnalysis/PtsDS.js +0 -2
  37. package/lib/core/base/Constant.d.ts +37 -5
  38. package/lib/core/base/Constant.d.ts.map +1 -1
  39. package/lib/core/base/Constant.js +58 -8
  40. package/lib/core/base/Expr.d.ts +98 -13
  41. package/lib/core/base/Expr.d.ts.map +1 -1
  42. package/lib/core/base/Expr.js +295 -127
  43. package/lib/core/base/Local.d.ts +70 -5
  44. package/lib/core/base/Local.d.ts.map +1 -1
  45. package/lib/core/base/Local.js +77 -4
  46. package/lib/core/base/Ref.d.ts +79 -5
  47. package/lib/core/base/Ref.d.ts.map +1 -1
  48. package/lib/core/base/Ref.js +143 -38
  49. package/lib/core/base/Stmt.d.ts +126 -12
  50. package/lib/core/base/Stmt.d.ts.map +1 -1
  51. package/lib/core/base/Stmt.js +135 -28
  52. package/lib/core/base/Type.d.ts +11 -2
  53. package/lib/core/base/Type.d.ts.map +1 -1
  54. package/lib/core/base/Type.js +47 -42
  55. package/lib/core/base/Value.d.ts +24 -2
  56. package/lib/core/base/Value.d.ts.map +1 -1
  57. package/lib/core/common/ArkError.d.ts +15 -0
  58. package/lib/core/common/ArkError.d.ts.map +1 -0
  59. package/lib/core/common/ArkError.js +28 -0
  60. package/lib/core/common/ArkIRTransformer.d.ts +12 -5
  61. package/lib/core/common/ArkIRTransformer.d.ts.map +1 -1
  62. package/lib/core/common/ArkIRTransformer.js +90 -45
  63. package/lib/core/common/BodyBuilder.d.ts +2 -0
  64. package/lib/core/common/BodyBuilder.d.ts.map +1 -1
  65. package/lib/core/common/BodyBuilder.js +5 -2
  66. package/lib/core/common/Builtin.js +1 -1
  67. package/lib/core/common/CfgBuilder.d.ts +12 -7
  68. package/lib/core/common/CfgBuilder.d.ts.map +1 -1
  69. package/lib/core/common/CfgBuilder.js +336 -140
  70. package/lib/core/common/Const.d.ts +15 -10
  71. package/lib/core/common/Const.d.ts.map +1 -1
  72. package/lib/core/common/Const.js +18 -11
  73. package/lib/core/common/DummyMainCreater.d.ts +5 -4
  74. package/lib/core/common/DummyMainCreater.d.ts.map +1 -1
  75. package/lib/core/common/DummyMainCreater.js +43 -28
  76. package/lib/core/common/EtsConst.d.ts +1 -0
  77. package/lib/core/common/EtsConst.d.ts.map +1 -1
  78. package/lib/core/common/EtsConst.js +2 -1
  79. package/lib/core/common/ExprUseReplacer.js +8 -8
  80. package/lib/core/common/IRUtils.d.ts +7 -0
  81. package/lib/core/common/IRUtils.d.ts.map +1 -1
  82. package/lib/core/common/IRUtils.js +34 -2
  83. package/lib/core/common/ModelUtils.d.ts +1 -0
  84. package/lib/core/common/ModelUtils.d.ts.map +1 -1
  85. package/lib/core/common/ModelUtils.js +39 -36
  86. package/lib/core/common/RefUseReplacer.js +3 -3
  87. package/lib/core/common/StmtUseReplacer.js +4 -4
  88. package/lib/core/common/TSConst.d.ts +10 -3
  89. package/lib/core/common/TSConst.d.ts.map +1 -1
  90. package/lib/core/common/TSConst.js +11 -4
  91. package/lib/core/common/TypeInference.d.ts +8 -2
  92. package/lib/core/common/TypeInference.d.ts.map +1 -1
  93. package/lib/core/common/TypeInference.js +222 -90
  94. package/lib/core/common/ValueUtil.d.ts +0 -4
  95. package/lib/core/common/ValueUtil.d.ts.map +1 -1
  96. package/lib/core/common/ValueUtil.js +10 -27
  97. package/lib/core/common/VisibleValue.js +1 -1
  98. package/lib/core/dataflow/DataflowProblem.d.ts +1 -0
  99. package/lib/core/dataflow/DataflowProblem.d.ts.map +1 -1
  100. package/lib/core/dataflow/DataflowProblem.js +4 -4
  101. package/lib/core/dataflow/DataflowSolver.d.ts +20 -16
  102. package/lib/core/dataflow/DataflowSolver.d.ts.map +1 -1
  103. package/lib/core/dataflow/DataflowSolver.js +67 -78
  104. package/lib/core/dataflow/TiantAnalysis.d.ts +1 -0
  105. package/lib/core/dataflow/TiantAnalysis.d.ts.map +1 -1
  106. package/lib/core/dataflow/TiantAnalysis.js +42 -28
  107. package/lib/core/dataflow/UndefinedVariable.d.ts +15 -1
  108. package/lib/core/dataflow/UndefinedVariable.d.ts.map +1 -1
  109. package/lib/core/dataflow/UndefinedVariable.js +122 -76
  110. package/lib/core/dataflow/Util.d.ts +5 -1
  111. package/lib/core/dataflow/Util.d.ts.map +1 -1
  112. package/lib/core/dataflow/Util.js +43 -22
  113. package/lib/core/graph/BasicBlock.d.ts +72 -0
  114. package/lib/core/graph/BasicBlock.d.ts.map +1 -1
  115. package/lib/core/graph/BasicBlock.js +165 -3
  116. package/lib/core/graph/Cfg.d.ts +30 -1
  117. package/lib/core/graph/Cfg.d.ts.map +1 -1
  118. package/lib/core/graph/Cfg.js +131 -11
  119. package/lib/core/graph/DominanceFinder.js +7 -7
  120. package/lib/core/graph/DominanceTree.js +4 -4
  121. package/lib/core/graph/builder/ViewTreeBuilder.d.ts.map +1 -1
  122. package/lib/core/graph/builder/ViewTreeBuilder.js +6 -5
  123. package/lib/core/model/ArkBaseModel.d.ts +59 -0
  124. package/lib/core/model/ArkBaseModel.d.ts.map +1 -0
  125. package/lib/core/model/ArkBaseModel.js +271 -0
  126. package/lib/core/model/ArkBody.d.ts +3 -9
  127. package/lib/core/model/ArkBody.d.ts.map +1 -1
  128. package/lib/core/model/ArkBody.js +3 -14
  129. package/lib/core/model/ArkClass.d.ts +107 -13
  130. package/lib/core/model/ArkClass.d.ts.map +1 -1
  131. package/lib/core/model/ArkClass.js +152 -54
  132. package/lib/core/model/ArkExport.d.ts +8 -7
  133. package/lib/core/model/ArkExport.d.ts.map +1 -1
  134. package/lib/core/model/ArkExport.js +16 -18
  135. package/lib/core/model/ArkField.d.ts +16 -13
  136. package/lib/core/model/ArkField.d.ts.map +1 -1
  137. package/lib/core/model/ArkField.js +18 -62
  138. package/lib/core/model/ArkFile.d.ts +42 -0
  139. package/lib/core/model/ArkFile.d.ts.map +1 -1
  140. package/lib/core/model/ArkFile.js +58 -0
  141. package/lib/core/model/ArkImport.d.ts +9 -7
  142. package/lib/core/model/ArkImport.d.ts.map +1 -1
  143. package/lib/core/model/ArkImport.js +11 -12
  144. package/lib/core/model/ArkMetadata.d.ts +20 -0
  145. package/lib/core/model/ArkMetadata.d.ts.map +1 -0
  146. package/lib/core/model/ArkMetadata.js +44 -0
  147. package/lib/core/model/ArkMethod.d.ts +195 -17
  148. package/lib/core/model/ArkMethod.d.ts.map +1 -1
  149. package/lib/core/model/ArkMethod.js +363 -46
  150. package/lib/core/model/ArkNamespace.d.ts +6 -8
  151. package/lib/core/model/ArkNamespace.d.ts.map +1 -1
  152. package/lib/core/model/ArkNamespace.js +16 -20
  153. package/lib/core/model/ArkSignature.d.ts +41 -0
  154. package/lib/core/model/ArkSignature.d.ts.map +1 -1
  155. package/lib/core/model/ArkSignature.js +76 -19
  156. package/lib/core/model/builder/ArkClassBuilder.d.ts.map +1 -1
  157. package/lib/core/model/builder/ArkClassBuilder.js +60 -49
  158. package/lib/core/model/builder/ArkExportBuilder.d.ts.map +1 -1
  159. package/lib/core/model/builder/ArkExportBuilder.js +12 -6
  160. package/lib/core/model/builder/ArkFieldBuilder.d.ts.map +1 -1
  161. package/lib/core/model/builder/ArkFieldBuilder.js +13 -9
  162. package/lib/core/model/builder/ArkFileBuilder.js +1 -3
  163. package/lib/core/model/builder/ArkImportBuilder.d.ts +2 -1
  164. package/lib/core/model/builder/ArkImportBuilder.d.ts.map +1 -1
  165. package/lib/core/model/builder/ArkImportBuilder.js +16 -13
  166. package/lib/core/model/builder/ArkMethodBuilder.d.ts +3 -1
  167. package/lib/core/model/builder/ArkMethodBuilder.d.ts.map +1 -1
  168. package/lib/core/model/builder/ArkMethodBuilder.js +105 -45
  169. package/lib/core/model/builder/ArkNamespaceBuilder.d.ts.map +1 -1
  170. package/lib/core/model/builder/ArkNamespaceBuilder.js +4 -5
  171. package/lib/core/model/builder/builderUtils.d.ts +2 -1
  172. package/lib/core/model/builder/builderUtils.d.ts.map +1 -1
  173. package/lib/core/model/builder/builderUtils.js +63 -43
  174. package/lib/index.d.ts +2 -1
  175. package/lib/index.d.ts.map +1 -1
  176. package/lib/index.js +4 -3
  177. package/lib/save/ArkStream.js +1 -1
  178. package/lib/save/DotPrinter.d.ts.map +1 -1
  179. package/lib/save/DotPrinter.js +1 -15
  180. package/lib/save/GraphPrinter.d.ts.map +1 -1
  181. package/lib/save/GraphPrinter.js +4 -2
  182. package/lib/save/JsonPrinter.js +5 -5
  183. package/lib/save/ViewTreePrinter.d.ts +16 -0
  184. package/lib/save/ViewTreePrinter.d.ts.map +1 -0
  185. package/lib/save/ViewTreePrinter.js +130 -0
  186. package/lib/save/source/SourceBase.d.ts +2 -2
  187. package/lib/save/source/SourceBase.d.ts.map +1 -1
  188. package/lib/save/source/SourceBase.js +6 -13
  189. package/lib/save/source/SourceBody.d.ts.map +1 -1
  190. package/lib/save/source/SourceBody.js +27 -14
  191. package/lib/save/source/SourceClass.d.ts.map +1 -1
  192. package/lib/save/source/SourceClass.js +12 -8
  193. package/lib/save/source/SourceField.d.ts.map +1 -1
  194. package/lib/save/source/SourceField.js +6 -2
  195. package/lib/save/source/SourceMethod.d.ts.map +1 -1
  196. package/lib/save/source/SourceMethod.js +10 -3
  197. package/lib/save/source/SourceModule.d.ts.map +1 -1
  198. package/lib/save/source/SourceModule.js +16 -10
  199. package/lib/save/source/SourceNamespace.d.ts.map +1 -1
  200. package/lib/save/source/SourceNamespace.js +4 -0
  201. package/lib/save/source/SourceStmt.d.ts +1 -1
  202. package/lib/save/source/SourceStmt.d.ts.map +1 -1
  203. package/lib/save/source/SourceStmt.js +37 -25
  204. package/lib/save/source/SourceTransformer.d.ts +6 -0
  205. package/lib/save/source/SourceTransformer.d.ts.map +1 -1
  206. package/lib/save/source/SourceTransformer.js +82 -51
  207. package/lib/save/source/SourceUtils.d.ts.map +1 -1
  208. package/lib/save/source/SourceUtils.js +12 -11
  209. package/lib/transformer/StaticSingleAssignmentFormer.js +3 -3
  210. package/lib/utils/CfgStructualAnalysis.d.ts +1 -0
  211. package/lib/utils/CfgStructualAnalysis.d.ts.map +1 -1
  212. package/lib/utils/CfgStructualAnalysis.js +103 -72
  213. package/lib/utils/callGraphUtils.d.ts.map +1 -1
  214. package/lib/utils/callGraphUtils.js +7 -10
  215. package/lib/utils/crypto_utils.d.ts +6 -0
  216. package/lib/utils/crypto_utils.d.ts.map +1 -0
  217. package/lib/utils/crypto_utils.js +57 -0
  218. package/lib/utils/entryMethodUtils.d.ts.map +1 -1
  219. package/lib/utils/entryMethodUtils.js +27 -26
  220. package/lib/utils/getAllFiles.d.ts +1 -1
  221. package/lib/utils/getAllFiles.d.ts.map +1 -1
  222. package/lib/utils/getAllFiles.js +4 -5
  223. package/lib/utils/logger.js +2 -2
  224. package/package.json +3 -2
@@ -37,7 +37,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
37
37
  return result;
38
38
  };
39
39
  Object.defineProperty(exports, "__esModule", { value: true });
40
- exports.ArkIRTransformer = exports.DUMMY_INITIALIZER_STMT = void 0;
40
+ exports.ArkIRTransformer = exports.DummyStmt = void 0;
41
41
  const Expr_1 = require("../base/Expr");
42
42
  const Ref_1 = require("../base/Ref");
43
43
  const ts = __importStar(require("ohos-typescript"));
@@ -59,16 +59,27 @@ const Position_1 = require("../base/Position");
59
59
  const ModelUtils_1 = require("./ModelUtils");
60
60
  const Builtin_1 = require("./Builtin");
61
61
  const TSConst_1 = require("./TSConst");
62
+ const builderUtils_1 = require("../model/builder/builderUtils");
63
+ const Const_1 = require("./Const");
62
64
  const logger = logger_1.default.getLogger(logger_1.LOG_MODULE_TYPE.ARKANALYZER, 'ArkIRTransformer');
63
- exports.DUMMY_INITIALIZER_STMT = 'dummyInitializerStmt';
65
+ class DummyStmt extends Stmt_1.Stmt {
66
+ constructor(text) {
67
+ super();
68
+ this.text = text;
69
+ }
70
+ toString() {
71
+ return this.text;
72
+ }
73
+ }
74
+ exports.DummyStmt = DummyStmt;
64
75
  class ArkIRTransformer {
65
76
  constructor(sourceFile, declaringMethod) {
66
- this.tempLocalPrefix = '$temp';
67
- this.tempLocalIndex = 0;
77
+ this.conditionalOperatorNo = 0;
78
+ this.tempLocalNo = 0;
68
79
  this.locals = new Map();
69
80
  this.inBuilderMethod = false;
70
- this.stmtToOriginalStmt = new Map();
71
81
  this.aliasTypeMap = new Map();
82
+ this.stmtsHaveOriginalText = new Set();
72
83
  this.builderMethodContextFlag = false;
73
84
  this.sourceFile = sourceFile;
74
85
  this.declaringMethod = declaringMethod;
@@ -82,9 +93,6 @@ class ArkIRTransformer {
82
93
  getThisLocal() {
83
94
  return this.thisLocal;
84
95
  }
85
- getStmtToOriginalStmt() {
86
- return this.stmtToOriginalStmt;
87
- }
88
96
  getAliasTypeMap() {
89
97
  return this.aliasTypeMap;
90
98
  }
@@ -147,9 +155,24 @@ class ArkIRTransformer {
147
155
  else if (ts.isReturnStatement(node)) {
148
156
  stmts = this.returnStatementToStmts(node);
149
157
  }
158
+ else if (ts.isFunctionDeclaration(node)) {
159
+ stmts = this.functionDeclarationToStmts(node);
160
+ }
150
161
  this.mapStmtsToTsStmt(stmts, node);
162
+ if (stmts.length > 0) {
163
+ IRUtils_1.IRUtils.setLeadingComments(stmts[0], node, this.sourceFile, this.declaringMethod.getDeclaringArkFile().getScene().getOptions());
164
+ }
151
165
  return stmts;
152
166
  }
167
+ functionDeclarationToStmts(functionDeclarationNode) {
168
+ const declaringClass = this.declaringMethod.getDeclaringArkClass();
169
+ const arkMethod = new ArkMethod_1.ArkMethod();
170
+ if (this.builderMethodContextFlag) {
171
+ ModelUtils_1.ModelUtils.implicitArkUIBuilderMethods.add(arkMethod);
172
+ }
173
+ (0, ArkMethodBuilder_1.buildArkMethodFromArkClass)(functionDeclarationNode, declaringClass, arkMethod, this.sourceFile, this.declaringMethod);
174
+ return [];
175
+ }
153
176
  returnStatementToStmts(returnStatement) {
154
177
  const stmts = [];
155
178
  if (returnStatement.expression) {
@@ -217,6 +240,8 @@ class ArkIRTransformer {
217
240
  const aliasName = typeAliasDeclaration.name.text;
218
241
  const originalType = this.resolveTypeNode(typeAliasDeclaration.type);
219
242
  const aliasType = new Type_1.AliasType(aliasName, originalType, new ArkSignature_1.LocalSignature(aliasName, this.declaringMethod.getSignature()));
243
+ const modifiers = typeAliasDeclaration.modifiers ? (0, builderUtils_1.buildModifiers)(typeAliasDeclaration) : 0;
244
+ aliasType.setModifiers(modifiers);
220
245
  const sourceCode = typeAliasDeclaration.getText(this.sourceFile);
221
246
  const aliasTypePosition = Position_1.LineColPosition.buildFromNode(typeAliasDeclaration, this.sourceFile);
222
247
  const aliasTypeDeclaration = new Type_1.AliasTypeDeclaration(sourceCode, aliasTypePosition);
@@ -252,7 +277,7 @@ class ArkIRTransformer {
252
277
  if (forStatement.initializer) {
253
278
  stmts.push(...this.tsNodeToValueAndStmts(forStatement.initializer).stmts);
254
279
  }
255
- const dummyInitializerStmt = new Stmt_1.OriginalStmt(exports.DUMMY_INITIALIZER_STMT, Position_1.LineColPosition.DEFAULT);
280
+ const dummyInitializerStmt = new DummyStmt(ArkIRTransformer.DUMMY_LOOP_INITIALIZER_STMT);
256
281
  stmts.push(dummyInitializerStmt);
257
282
  if (forStatement.condition) {
258
283
  const { value: conditionValue, stmts: conditionStmts, } = this.conditionToValueAndStmts(forStatement.condition);
@@ -308,7 +333,7 @@ class ArkIRTransformer {
308
333
  const castExprPositions = [yieldValuePositions[0], ...yieldValuePositions];
309
334
  if (ts.isVariableDeclarationList(forOfStatement.initializer)) {
310
335
  const variableDeclarationList = forOfStatement.initializer;
311
- const isConst = (variableDeclarationList.flags & ts.NodeFlags.Const) != 0;
336
+ const isConst = (variableDeclarationList.flags & ts.NodeFlags.Const) !== 0;
312
337
  const variableDeclaration = variableDeclarationList.declarations[0];
313
338
  if (ts.isArrayBindingPattern(variableDeclaration.name)) {
314
339
  const { value: arrayItem, valueOriginalPositions: arrayItemPositions, stmts: arrayItemStmts, } = this.generateAssignStmtForValue(castExpr, castExprPositions);
@@ -317,7 +342,7 @@ class ArkIRTransformer {
317
342
  const elements = variableDeclaration.name.elements;
318
343
  let index = 0;
319
344
  for (const element of elements) {
320
- const arrayRef = new Ref_1.ArkArrayRef(arrayItem, new Constant_1.Constant(index.toString(), Type_1.NumberType.getInstance()));
345
+ const arrayRef = new Ref_1.ArkArrayRef(arrayItem, ValueUtil_1.ValueUtil.getOrCreateNumberConst(index));
321
346
  const arrayRefPositions = [arrayItemPositions[0], ...arrayItemPositions, Position_1.FullPosition.DEFAULT];
322
347
  const item = new Local_1.Local(element.getText(this.sourceFile));
323
348
  const itemPosition = Position_1.FullPosition.buildFromNode(element, this.sourceFile);
@@ -362,7 +387,7 @@ class ArkIRTransformer {
362
387
  }
363
388
  whileStatementToStmts(whileStatement) {
364
389
  const stmts = [];
365
- const dummyInitializerStmt = new Stmt_1.OriginalStmt(exports.DUMMY_INITIALIZER_STMT, Position_1.LineColPosition.DEFAULT);
390
+ const dummyInitializerStmt = new DummyStmt(ArkIRTransformer.DUMMY_LOOP_INITIALIZER_STMT);
366
391
  stmts.push(dummyInitializerStmt);
367
392
  const { value: conditionExpr, stmts: conditionStmts, } = this.conditionToValueAndStmts(whileStatement.expression);
368
393
  stmts.push(...conditionStmts);
@@ -544,23 +569,29 @@ class ArkIRTransformer {
544
569
  };
545
570
  }
546
571
  conditionalExpressionToValueAndStmts(conditionalExpression) {
547
- // TODO: separated by blocks
548
572
  const stmts = [];
573
+ const currConditionalOperatorIndex = this.conditionalOperatorNo++;
549
574
  const { value: conditionValue, valueOriginalPositions: conditionPositions, stmts: conditionStmts, } = this.conditionToValueAndStmts(conditionalExpression.condition);
550
575
  stmts.push(...conditionStmts);
551
576
  const ifStmt = new Stmt_1.ArkIfStmt(conditionValue);
552
577
  ifStmt.setOperandOriginalPositions(conditionPositions);
553
578
  stmts.push(ifStmt);
579
+ stmts.push(new DummyStmt(ArkIRTransformer.DUMMY_CONDITIONAL_OPERATOR_IF_TRUE_STMT + currConditionalOperatorIndex));
554
580
  const { value: whenTrueValue, valueOriginalPositions: whenTruePositions, stmts: whenTrueStmts } = this.tsNodeToValueAndStmts(conditionalExpression.whenTrue);
555
581
  stmts.push(...whenTrueStmts);
556
- const { value: resultValue, valueOriginalPositions: resultPositions, stmts: tempStmts, } = this.generateAssignStmtForValue(whenTrueValue, whenTruePositions);
557
- stmts.push(...tempStmts);
582
+ const resultLocal = this.generateTempLocal();
583
+ const assignStmtWhenTrue = new Stmt_1.ArkAssignStmt(resultLocal, whenTrueValue);
584
+ const resultLocalPosition = [whenTruePositions[0]];
585
+ assignStmtWhenTrue.setOperandOriginalPositions([...resultLocalPosition, ...whenTruePositions]);
586
+ stmts.push(assignStmtWhenTrue);
587
+ stmts.push(new DummyStmt(ArkIRTransformer.DUMMY_CONDITIONAL_OPERATOR_IF_FALSE_STMT + currConditionalOperatorIndex));
558
588
  const { value: whenFalseValue, valueOriginalPositions: whenFalsePositions, stmts: whenFalseStmts, } = this.tsNodeToValueAndStmts(conditionalExpression.whenFalse);
559
589
  stmts.push(...whenFalseStmts);
560
- const assignStmt = new Stmt_1.ArkAssignStmt(resultValue, whenFalseValue);
561
- assignStmt.setOperandOriginalPositions([...resultPositions, ...whenFalsePositions]);
590
+ const assignStmt = new Stmt_1.ArkAssignStmt(resultLocal, whenFalseValue);
591
+ assignStmt.setOperandOriginalPositions([...resultLocalPosition, ...whenFalsePositions]);
562
592
  stmts.push(assignStmt);
563
- return { value: resultValue, valueOriginalPositions: resultPositions, stmts: stmts };
593
+ stmts.push(new DummyStmt(ArkIRTransformer.DUMMY_CONDITIONAL_OPERATOR_END_STMT + currConditionalOperatorIndex));
594
+ return { value: resultLocal, valueOriginalPositions: resultLocalPosition, stmts: stmts };
564
595
  }
565
596
  objectLiteralExpresionToValueAndStmts(objectLiteralExpression) {
566
597
  const declaringArkClass = this.declaringMethod.getDeclaringArkClass();
@@ -611,9 +642,9 @@ class ArkIRTransformer {
611
642
  const createViewArgPositionsAll = [newExprPositions];
612
643
  if (ts.isEtsComponentExpression(componentExpression) && componentExpression.body) {
613
644
  const anonymous = ts.factory.createArrowFunction([], [], [], undefined, undefined, componentExpression.body);
614
- // @ts-ignore
645
+ // @ts-expect-error: add pos info for the created ArrowFunction
615
646
  anonymous.pos = componentExpression.body.pos;
616
- // @ts-ignore
647
+ // @ts-expect-error: add end info for the created ArrowFunction
617
648
  anonymous.end = componentExpression.body.end;
618
649
  const { value: builderMethod, valueOriginalPositions: builderMethodPositions, } = this.callableNodeToValueAndStmts(anonymous);
619
650
  createViewArgs.push(builderMethod);
@@ -635,7 +666,7 @@ class ArkIRTransformer {
635
666
  etsComponentExpressionToValueAndStmts(etsComponentExpression) {
636
667
  const stmts = [];
637
668
  const componentName = etsComponentExpression.expression.text;
638
- let builderMethodIndexes = undefined;
669
+ let builderMethodIndexes;
639
670
  if (componentName === EtsConst_1.COMPONENT_FOR_EACH || componentName === EtsConst_1.COMPONENT_LAZY_FOR_EACH) {
640
671
  builderMethodIndexes = new Set([1]);
641
672
  }
@@ -730,7 +761,7 @@ class ArkIRTransformer {
730
761
  // TODO: handle global variable
731
762
  let identifierValue;
732
763
  let identifierPositions = [Position_1.FullPosition.buildFromNode(identifier, this.sourceFile)];
733
- if (identifier.text == Type_1.UndefinedType.getInstance().getName()) {
764
+ if (identifier.text === Type_1.UndefinedType.getInstance().getName()) {
734
765
  identifierValue = ValueUtil_1.ValueUtil.getUndefinedConst();
735
766
  }
736
767
  else {
@@ -787,11 +818,10 @@ class ArkIRTransformer {
787
818
  return { value: elementAccessExpr, valueOriginalPositions: exprPositions, stmts: stmts };
788
819
  }
789
820
  callExpressionToValueAndStmts(callExpression) {
790
- let realGenericTypes = undefined;
821
+ let realGenericTypes;
791
822
  if (callExpression.typeArguments) {
792
823
  realGenericTypes = [];
793
824
  callExpression.typeArguments.forEach(typeArgument => {
794
- // @ts-ignore
795
825
  realGenericTypes.push(this.resolveTypeNode(typeArgument));
796
826
  });
797
827
  }
@@ -869,7 +899,6 @@ class ArkIRTransformer {
869
899
  ModelUtils_1.ModelUtils.implicitArkUIBuilderMethods.add(arrowArkMethod);
870
900
  }
871
901
  (0, ArkMethodBuilder_1.buildArkMethodFromArkClass)(callableNode, declaringClass, arrowArkMethod, this.sourceFile, this.declaringMethod);
872
- declaringClass.addMethod(arrowArkMethod);
873
902
  const callableType = new Type_1.FunctionType(arrowArkMethod.getSignature());
874
903
  const callableValue = this.getOrCreatLocal(arrowArkMethod.getName(), callableType);
875
904
  return {
@@ -884,11 +913,10 @@ class ArkIRTransformer {
884
913
  return this.newArrayExpressionToValueAndStmts(newExpression);
885
914
  }
886
915
  const stmts = [];
887
- let realGenericTypes = undefined;
916
+ let realGenericTypes;
888
917
  if (newExpression.typeArguments) {
889
918
  realGenericTypes = [];
890
919
  newExpression.typeArguments.forEach(typeArgument => {
891
- // @ts-ignore
892
920
  realGenericTypes.push(this.resolveTypeNode(typeArgument));
893
921
  });
894
922
  }
@@ -969,7 +997,7 @@ class ArkIRTransformer {
969
997
  elementPositonsAll.push(elementPosition);
970
998
  }
971
999
  let baseType = Type_1.AnyType.getInstance();
972
- if (elementTypes.size == 1) {
1000
+ if (elementTypes.size === 1) {
973
1001
  baseType = elementTypes.keys().next().value;
974
1002
  }
975
1003
  else if (elementTypes.size > 1) {
@@ -1148,7 +1176,7 @@ class ArkIRTransformer {
1148
1176
  rightValue = tempRightValue;
1149
1177
  rightPositions = tempRightPositions;
1150
1178
  }
1151
- const isConst = (nodeFlag & ts.NodeFlags.Const) != 0;
1179
+ const isConst = (nodeFlag & ts.NodeFlags.Const) !== 0;
1152
1180
  if (leftValue instanceof Local_1.Local) {
1153
1181
  leftValue.setConstFlag(isConst);
1154
1182
  if (variableDeclaration.type) {
@@ -1166,7 +1194,7 @@ class ArkIRTransformer {
1166
1194
  const elements = leftOpNode.elements;
1167
1195
  let index = 0;
1168
1196
  for (const element of elements) {
1169
- const arrayRef = new Ref_1.ArkArrayRef(leftValue, new Constant_1.Constant(index.toString(), Type_1.NumberType.getInstance()));
1197
+ const arrayRef = new Ref_1.ArkArrayRef(leftValue, ValueUtil_1.ValueUtil.getOrCreateNumberConst(index));
1170
1198
  const arrayRefPositions = [leftPositions[0], ...leftPositions, Position_1.FullPosition.DEFAULT];
1171
1199
  const item = new Local_1.Local(element.getText(this.sourceFile));
1172
1200
  const itemPosition = Position_1.FullPosition.buildFromNode(element, this.sourceFile);
@@ -1346,6 +1374,8 @@ class ArkIRTransformer {
1346
1374
  return Expr_1.NormalBinaryOperator.LogicalAnd;
1347
1375
  case ts.SyntaxKind.BarBarEqualsToken:
1348
1376
  return Expr_1.NormalBinaryOperator.LogicalOr;
1377
+ default:
1378
+ ;
1349
1379
  }
1350
1380
  return null;
1351
1381
  }
@@ -1424,8 +1454,8 @@ class ArkIRTransformer {
1424
1454
  return local;
1425
1455
  }
1426
1456
  generateTempLocal(localType = Type_1.UnknownType.getInstance()) {
1427
- const tempLocalName = this.tempLocalPrefix + this.tempLocalIndex;
1428
- this.tempLocalIndex++;
1457
+ const tempLocalName = Const_1.TEMP_LOCAL_PREFIX + this.tempLocalNo;
1458
+ this.tempLocalNo++;
1429
1459
  const tempLocal = new Local_1.Local(tempLocalName, localType);
1430
1460
  this.locals.set(tempLocalName, tempLocal);
1431
1461
  return tempLocal;
@@ -1438,14 +1468,14 @@ class ArkIRTransformer {
1438
1468
  return { value: leftOp, valueOriginalPositions: [leftOpPosition], stmts: [assignStmt] };
1439
1469
  }
1440
1470
  isRelationalOperator(operator) {
1441
- return operator == Expr_1.RelationalBinaryOperator.LessThan ||
1442
- operator == Expr_1.RelationalBinaryOperator.LessThanOrEqual ||
1443
- operator == Expr_1.RelationalBinaryOperator.GreaterThan ||
1444
- operator == Expr_1.RelationalBinaryOperator.GreaterThanOrEqual ||
1445
- operator == Expr_1.RelationalBinaryOperator.Equality ||
1446
- operator == Expr_1.RelationalBinaryOperator.InEquality ||
1447
- operator == Expr_1.RelationalBinaryOperator.StrictEquality ||
1448
- operator == Expr_1.RelationalBinaryOperator.StrictInequality;
1471
+ return operator === Expr_1.RelationalBinaryOperator.LessThan ||
1472
+ operator === Expr_1.RelationalBinaryOperator.LessThanOrEqual ||
1473
+ operator === Expr_1.RelationalBinaryOperator.GreaterThan ||
1474
+ operator === Expr_1.RelationalBinaryOperator.GreaterThanOrEqual ||
1475
+ operator === Expr_1.RelationalBinaryOperator.Equality ||
1476
+ operator === Expr_1.RelationalBinaryOperator.InEquality ||
1477
+ operator === Expr_1.RelationalBinaryOperator.StrictEquality ||
1478
+ operator === Expr_1.RelationalBinaryOperator.StrictInequality;
1449
1479
  }
1450
1480
  resolveTypeNode(type) {
1451
1481
  const kind = type.kind;
@@ -1468,17 +1498,19 @@ class ArkIRTransformer {
1468
1498
  return this.resolveTypeReferenceNode(type);
1469
1499
  case ts.SyntaxKind.ArrayType:
1470
1500
  return new Type_1.ArrayType(this.resolveTypeNode(type.elementType), 1);
1471
- case ts.SyntaxKind.UnionType:
1501
+ case ts.SyntaxKind.UnionType: {
1472
1502
  const cur = type;
1473
1503
  const mayTypes = [];
1474
1504
  cur.types.forEach(t => mayTypes.push(this.resolveTypeNode(t)));
1475
1505
  return new Type_1.UnionType(mayTypes);
1476
- case ts.SyntaxKind.TupleType:
1506
+ }
1507
+ case ts.SyntaxKind.TupleType: {
1477
1508
  const types = [];
1478
1509
  type.elements.forEach(element => {
1479
1510
  types.push(this.resolveTypeNode(element));
1480
1511
  });
1481
1512
  return new Type_1.TupleType(types);
1513
+ }
1482
1514
  case ts.SyntaxKind.NamedTupleMember:
1483
1515
  return this.resolveTypeNode(type.type);
1484
1516
  case ts.SyntaxKind.LiteralType:
@@ -1489,6 +1521,8 @@ class ArkIRTransformer {
1489
1521
  return this.resolveTypeLiteralNode(type);
1490
1522
  case ts.SyntaxKind.FunctionType:
1491
1523
  return this.resolveFunctionTypeNode(type);
1524
+ default:
1525
+ ;
1492
1526
  }
1493
1527
  return Type_1.UnknownType.getInstance();
1494
1528
  }
@@ -1506,6 +1540,8 @@ class ArkIRTransformer {
1506
1540
  return new Type_1.LiteralType(parseFloat(literal.text));
1507
1541
  case ts.SyntaxKind.PrefixUnaryExpression:
1508
1542
  return new Type_1.LiteralType(parseFloat(literal.getText(this.sourceFile)));
1543
+ default:
1544
+ ;
1509
1545
  }
1510
1546
  return new Type_1.LiteralType(literal.getText(this.sourceFile));
1511
1547
  }
@@ -1601,10 +1637,11 @@ class ArkIRTransformer {
1601
1637
  return false;
1602
1638
  }
1603
1639
  mapStmtsToTsStmt(stmts, node) {
1604
- const originalStmt = new Stmt_1.OriginalStmt(node.getText(this.sourceFile), Position_1.LineColPosition.buildFromNode(node, this.sourceFile));
1605
1640
  for (const stmt of stmts) {
1606
- if (!this.stmtToOriginalStmt.has(stmt)) {
1607
- this.stmtToOriginalStmt.set(stmt, originalStmt);
1641
+ if (!this.stmtsHaveOriginalText.has(stmt)) {
1642
+ this.stmtsHaveOriginalText.add(stmt);
1643
+ stmt.setOriginPositionInfo(Position_1.LineColPosition.buildFromNode(node, this.sourceFile));
1644
+ stmt.setOriginalText(node.getText(this.sourceFile));
1608
1645
  }
1609
1646
  }
1610
1647
  }
@@ -1616,6 +1653,8 @@ class ArkIRTransformer {
1616
1653
  return Expr_1.UnaryOperator.BitwiseNot;
1617
1654
  case ts.SyntaxKind.ExclamationToken:
1618
1655
  return Expr_1.UnaryOperator.LogicalNot;
1656
+ default:
1657
+ ;
1619
1658
  }
1620
1659
  return null;
1621
1660
  }
@@ -1667,8 +1706,14 @@ class ArkIRTransformer {
1667
1706
  return Expr_1.RelationalBinaryOperator.StrictEquality;
1668
1707
  case ts.SyntaxKind.ExclamationEqualsEqualsToken:
1669
1708
  return Expr_1.RelationalBinaryOperator.StrictInequality;
1709
+ default:
1710
+ ;
1670
1711
  }
1671
1712
  return null;
1672
1713
  }
1673
1714
  }
1674
1715
  exports.ArkIRTransformer = ArkIRTransformer;
1716
+ ArkIRTransformer.DUMMY_LOOP_INITIALIZER_STMT = 'LoopInitializer';
1717
+ ArkIRTransformer.DUMMY_CONDITIONAL_OPERATOR_IF_TRUE_STMT = 'ConditionalOperatorIfTrue';
1718
+ ArkIRTransformer.DUMMY_CONDITIONAL_OPERATOR_IF_FALSE_STMT = 'ConditionalOperatorIfFalse';
1719
+ ArkIRTransformer.DUMMY_CONDITIONAL_OPERATOR_END_STMT = 'ConditionalOperatorEnd';
@@ -1,10 +1,12 @@
1
1
  import { ArkBody } from '../model/ArkBody';
2
2
  import { ArkMethod } from '../model/ArkMethod';
3
3
  import { MethodSignature } from '../model/ArkSignature';
4
+ import { CfgBuilder } from './CfgBuilder';
4
5
  import * as ts from 'ohos-typescript';
5
6
  export declare class BodyBuilder {
6
7
  private cfgBuilder;
7
8
  constructor(methodSignature: MethodSignature, sourceAstNode: ts.Node, declaringMethod: ArkMethod, sourceFile: ts.SourceFile);
8
9
  build(): ArkBody | null;
10
+ getCfgBuilder(): CfgBuilder;
9
11
  }
10
12
  //# sourceMappingURL=BodyBuilder.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"BodyBuilder.d.ts","sourceRoot":"","sources":["../../../src/core/common/BodyBuilder.ts"],"names":[],"mappings":"AAeA,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAC3C,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAExD,OAAO,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAEtC,qBAAa,WAAW;IACpB,OAAO,CAAC,UAAU,CAAa;gBAEnB,eAAe,EAAE,eAAe,EAAE,aAAa,EAAE,EAAE,CAAC,IAAI,EAAE,eAAe,EAAE,SAAS,EAAE,UAAU,EAAE,EAAE,CAAC,UAAU;IAIpH,KAAK,IAAI,OAAO,GAAG,IAAI;CAUjC"}
1
+ {"version":3,"file":"BodyBuilder.d.ts","sourceRoot":"","sources":["../../../src/core/common/BodyBuilder.ts"],"names":[],"mappings":"AAeA,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAC3C,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAEtC,qBAAa,WAAW;IACpB,OAAO,CAAC,UAAU,CAAa;gBAEnB,eAAe,EAAE,eAAe,EAAE,aAAa,EAAE,EAAE,CAAC,IAAI,EAAE,eAAe,EAAE,SAAS,EAAE,UAAU,EAAE,EAAE,CAAC,UAAU;IAIpH,KAAK,IAAI,OAAO,GAAG,IAAI;IAWvB,aAAa,IAAI,UAAU;CAGrC"}
@@ -24,11 +24,14 @@ class BodyBuilder {
24
24
  build() {
25
25
  this.cfgBuilder.buildCfgBuilder();
26
26
  if (!this.cfgBuilder.isBodyEmpty()) {
27
- const { cfg, originalCfg, stmtToOriginalStmt, locals, aliasTypeMap } = this.cfgBuilder.buildCfgAndOriginalCfg();
27
+ const { cfg, locals, aliasTypeMap } = this.cfgBuilder.buildCfgAndOriginalCfg();
28
28
  cfg.buildDefUseStmt();
29
- return new ArkBody_1.ArkBody(locals, originalCfg, cfg, stmtToOriginalStmt, aliasTypeMap);
29
+ return new ArkBody_1.ArkBody(locals, cfg, aliasTypeMap);
30
30
  }
31
31
  return null;
32
32
  }
33
+ getCfgBuilder() {
34
+ return this.cfgBuilder;
35
+ }
33
36
  }
34
37
  exports.BodyBuilder = BodyBuilder;
@@ -57,7 +57,7 @@ Builtin.BUILT_IN_CLASSES = _a.buildBuiltInClasses();
57
57
  // signature for built-in class
58
58
  Builtin.DUMMY_PROJECT_NAME = 'ES2015';
59
59
  Builtin.DUMMY_FILE_NAME = 'BuiltinClass';
60
- Builtin.BUILT_IN_CLASSES_FILE_SIGNATURE = _a.buildBuiltInClassesFileSignature();
60
+ Builtin.BUILT_IN_CLASSES_FILE_SIGNATURE = Builtin.buildBuiltInClassesFileSignature();
61
61
  Builtin.OBJECT_CLASS_SIGNATURE = _a.buildBuiltInClassSignature(_a.OBJECT);
62
62
  Builtin.ARRAY_CLASS_SIGNATURE = _a.buildBuiltInClassSignature(_a.ARRAY);
63
63
  Builtin.SET_CLASS_SIGNATURE = _a.buildBuiltInClassSignature(_a.SET);
@@ -1,6 +1,5 @@
1
1
  import * as ts from 'ohos-typescript';
2
2
  import { Local } from '../base/Local';
3
- import { Stmt } from '../base/Stmt';
4
3
  import { Cfg } from '../graph/Cfg';
5
4
  import { ArkClass } from '../model/ArkClass';
6
5
  import { ArkMethod } from '../model/ArkMethod';
@@ -111,26 +110,32 @@ export declare class CfgBuilder {
111
110
  isBodyEmpty(): boolean;
112
111
  buildCfgAndOriginalCfg(): {
113
112
  cfg: Cfg;
114
- originalCfg: Cfg;
115
- stmtToOriginalStmt: Map<Stmt, Stmt>;
116
113
  locals: Set<Local>;
117
114
  aliasTypeMap: Map<string, [AliasType, AliasTypeDeclaration]>;
118
115
  };
119
116
  buildCfgAndOriginalCfgForSimpleArrowFunction(): {
120
117
  cfg: Cfg;
121
- originalCfg: Cfg;
122
- stmtToOriginalStmt: Map<Stmt, Stmt>;
123
118
  locals: Set<Local>;
124
119
  aliasTypeMap: Map<string, [AliasType, AliasTypeDeclaration]>;
125
120
  };
126
121
  buildNormalCfgAndOriginalCfg(): {
127
122
  cfg: Cfg;
128
- originalCfg: Cfg;
129
- stmtToOriginalStmt: Map<Stmt, Stmt>;
130
123
  locals: Set<Local>;
131
124
  aliasTypeMap: Map<string, [AliasType, AliasTypeDeclaration]>;
132
125
  };
126
+ private linkBasicBlocks;
127
+ private rebuildBlocksInConditionalOperator;
128
+ private traverseAndRebuildConditionalOperator;
129
+ private findConditionalOperator;
130
+ private adjustSuccessorOfConditionalOperator;
131
+ private removeUnnecessaryBlocksInConditionalOperator;
132
+ private replaceTempResultcursively;
133
+ private isNewDefLocal;
134
+ private rebuildBlocksInLoop;
135
+ private doesPrevBlockBuilderContainLoop;
133
136
  private insertBeforeConditionBlockBuilder;
137
+ private findIteratorIdx;
138
+ private adjustIncrementorStmts;
134
139
  }
135
140
  export {};
136
141
  //# sourceMappingURL=CfgBuilder.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"CfgBuilder.d.ts","sourceRoot":"","sources":["../../../src/core/common/CfgBuilder.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,MAAM,iBAAiB,CAAC;AACtC,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACtC,OAAO,EAA8D,IAAI,EAAE,MAAM,cAAc,CAAC;AAEhG,OAAO,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AACnC,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAM/C,OAAO,EAAE,SAAS,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AAE/D,cAAM,gBAAgB;IAClB,IAAI,EAAE,MAAM,CAAC;IAEb,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,gBAAgB,GAAG,IAAI,CAAC;IAC9B,KAAK,EAAE,GAAG,CAAC,gBAAgB,CAAC,CAAC;IAC7B,MAAM,EAAE,OAAO,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IAEd,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,EAAE,CAAC,IAAI,GAAG,IAAI,CAAC;IACxB,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,MAAM,EAAE,CAAM;IAC5B,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC;IACpB,UAAU,EAAE,OAAO,CAAC;IACpB,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