arkanalyzer 1.0.26 → 1.0.28

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 (49) hide show
  1. package/config/arkanalyzer.json +1 -0
  2. package/lib/VFG/DVFG.d.ts +43 -0
  3. package/lib/VFG/DVFG.d.ts.map +1 -0
  4. package/lib/VFG/DVFG.js +109 -0
  5. package/lib/VFG/builder/DVFGBuilder.d.ts +17 -0
  6. package/lib/VFG/builder/DVFGBuilder.d.ts.map +1 -0
  7. package/lib/VFG/builder/DVFGBuilder.js +111 -0
  8. package/lib/callgraph/algorithm/AbstractAnalysis.d.ts.map +1 -1
  9. package/lib/callgraph/algorithm/AbstractAnalysis.js +1 -0
  10. package/lib/callgraph/model/CallGraph.d.ts +4 -0
  11. package/lib/callgraph/model/CallGraph.d.ts.map +1 -1
  12. package/lib/callgraph/model/CallGraph.js +29 -0
  13. package/lib/callgraph/pointerAnalysis/Pag.js +3 -3
  14. package/lib/callgraph/pointerAnalysis/PagBuilder.d.ts +10 -3
  15. package/lib/callgraph/pointerAnalysis/PagBuilder.d.ts.map +1 -1
  16. package/lib/callgraph/pointerAnalysis/PagBuilder.js +141 -62
  17. package/lib/callgraph/pointerAnalysis/PointerAnalysis.d.ts +2 -0
  18. package/lib/callgraph/pointerAnalysis/PointerAnalysis.d.ts.map +1 -1
  19. package/lib/callgraph/pointerAnalysis/PointerAnalysis.js +33 -7
  20. package/lib/callgraph/pointerAnalysis/PointerAnalysisConfig.d.ts +7 -2
  21. package/lib/callgraph/pointerAnalysis/PointerAnalysisConfig.d.ts.map +1 -1
  22. package/lib/callgraph/pointerAnalysis/PointerAnalysisConfig.js +10 -4
  23. package/lib/core/base/Ref.d.ts +0 -1
  24. package/lib/core/base/Ref.d.ts.map +1 -1
  25. package/lib/core/base/Ref.js +0 -11
  26. package/lib/core/base/Type.d.ts.map +1 -1
  27. package/lib/core/common/ArkValueTransformer.d.ts.map +1 -1
  28. package/lib/core/common/ArkValueTransformer.js +43 -17
  29. package/lib/core/common/Builtin.d.ts +2 -0
  30. package/lib/core/common/Builtin.d.ts.map +1 -1
  31. package/lib/core/common/Builtin.js +4 -0
  32. package/lib/core/common/IRInference.d.ts +3 -0
  33. package/lib/core/common/IRInference.d.ts.map +1 -1
  34. package/lib/core/common/IRInference.js +67 -27
  35. package/lib/core/common/SdkUtils.js +1 -1
  36. package/lib/core/common/TypeInference.d.ts +5 -3
  37. package/lib/core/common/TypeInference.d.ts.map +1 -1
  38. package/lib/core/common/TypeInference.js +92 -59
  39. package/lib/core/dataflow/ReachingDef.d.ts.map +1 -1
  40. package/lib/core/dataflow/ReachingDef.js +1 -0
  41. package/lib/core/graph/BaseImplicitGraph.d.ts +1 -0
  42. package/lib/core/graph/BaseImplicitGraph.d.ts.map +1 -1
  43. package/lib/core/graph/BaseImplicitGraph.js +6 -0
  44. package/lib/core/model/builder/builderUtils.d.ts.map +1 -1
  45. package/lib/core/model/builder/builderUtils.js +5 -1
  46. package/lib/index.d.ts +2 -0
  47. package/lib/index.d.ts.map +1 -1
  48. package/lib/index.js +6 -2
  49. package/package.json +2 -2
@@ -490,9 +490,22 @@ class ArkValueTransformer {
490
490
  this.arkIRTransformer.generateAssignStmtForValue(baseValue, basePositions));
491
491
  baseStmts.forEach(stmt => stmts.push(stmt));
492
492
  }
493
- const fieldSignature = ArkSignatureBuilder_1.ArkSignatureBuilder.buildFieldSignatureFromFieldName(propertyAccessExpression.name.getText(this.sourceFile));
494
- const fieldRef = new Ref_1.ArkInstanceFieldRef(baseValue, fieldSignature);
495
493
  const fieldRefPositions = [Position_1.FullPosition.buildFromNode(propertyAccessExpression, this.sourceFile), ...basePositions];
494
+ // this if for the case: const obj: Object = Object.create(Object.prototype);
495
+ if (baseValue instanceof Local_1.Local && baseValue.getName() === Builtin_1.Builtin.OBJECT) {
496
+ this.locals.delete(baseValue.getName());
497
+ const fieldSignature = new ArkSignature_1.FieldSignature(propertyAccessExpression.name.getText(this.sourceFile), Builtin_1.Builtin.OBJECT_CLASS_SIGNATURE, Type_1.UnknownType.getInstance(), true);
498
+ const fieldRef = new Ref_1.ArkStaticFieldRef(fieldSignature);
499
+ return { value: fieldRef, valueOriginalPositions: fieldRefPositions, stmts: stmts };
500
+ }
501
+ let fieldSignature;
502
+ if (baseValue instanceof Local_1.Local && baseValue.getType() instanceof Type_1.ClassType) {
503
+ fieldSignature = new ArkSignature_1.FieldSignature(propertyAccessExpression.name.getText(this.sourceFile), baseValue.getType().getClassSignature(), Type_1.UnknownType.getInstance());
504
+ }
505
+ else {
506
+ fieldSignature = ArkSignatureBuilder_1.ArkSignatureBuilder.buildFieldSignatureFromFieldName(propertyAccessExpression.name.getText(this.sourceFile));
507
+ }
508
+ const fieldRef = new Ref_1.ArkInstanceFieldRef(baseValue, fieldSignature);
496
509
  return { value: fieldRef, valueOriginalPositions: fieldRefPositions, stmts: stmts };
497
510
  }
498
511
  elementAccessExpressionToValueAndStmts(elementAccessExpression) {
@@ -537,15 +550,22 @@ class ArkValueTransformer {
537
550
  let invokeValue;
538
551
  let invokeValuePositions = [Position_1.FullPosition.buildFromNode(callExpression, this.sourceFile)];
539
552
  const { args, argPositions, realGenericTypes } = argus;
540
- if (callerValue instanceof Ref_1.ArkInstanceFieldRef) {
541
- const methodSignature = ArkSignatureBuilder_1.ArkSignatureBuilder.buildMethodSignatureFromMethodName(callerValue.getFieldName());
542
- invokeValue = new Expr_1.ArkInstanceInvokeExpr(callerValue.getBase(), methodSignature, args, realGenericTypes);
543
- invokeValuePositions.push(...callerPositions.slice(1), ...argPositions);
544
- }
545
- else if (callerValue instanceof Ref_1.ArkStaticFieldRef) {
546
- const methodSignature = ArkSignatureBuilder_1.ArkSignatureBuilder.buildMethodSignatureFromMethodName(callerValue.getFieldName());
547
- invokeValue = new Expr_1.ArkStaticInvokeExpr(methodSignature, args, realGenericTypes);
548
- invokeValuePositions.push(...argPositions);
553
+ if (callerValue instanceof Ref_1.AbstractFieldRef) {
554
+ let methodSignature;
555
+ const declareSignature = callerValue.getFieldSignature().getDeclaringSignature();
556
+ if (declareSignature instanceof ArkSignature_1.ClassSignature) {
557
+ methodSignature = new ArkSignature_1.MethodSignature(declareSignature, ArkSignatureBuilder_1.ArkSignatureBuilder.buildMethodSubSignatureFromMethodName(callerValue.getFieldName()));
558
+ }
559
+ else {
560
+ methodSignature = ArkSignatureBuilder_1.ArkSignatureBuilder.buildMethodSignatureFromMethodName(callerValue.getFieldName());
561
+ }
562
+ if (callerValue instanceof Ref_1.ArkInstanceFieldRef) {
563
+ invokeValue = new Expr_1.ArkInstanceInvokeExpr(callerValue.getBase(), methodSignature, args, realGenericTypes);
564
+ invokeValuePositions.push(...callerPositions.slice(1));
565
+ }
566
+ else {
567
+ invokeValue = new Expr_1.ArkStaticInvokeExpr(methodSignature, args, realGenericTypes);
568
+ }
549
569
  }
550
570
  else if (callerValue instanceof Local_1.Local) {
551
571
  const callerName = callerValue.getName();
@@ -554,8 +574,8 @@ class ArkValueTransformer {
554
574
  if ((cls === null || cls === void 0 ? void 0 : cls.hasComponentDecorator()) && ts.isCallExpression(callExpression)) {
555
575
  return this.generateCustomViewStmt(callerName, args, argPositions, callExpression, stmts);
556
576
  }
557
- else if ((callerName === EtsConst_1.COMPONENT_FOR_EACH || callerName === EtsConst_1.COMPONENT_LAZY_FOR_EACH) &&
558
- ts.isCallExpression(callExpression)) { // foreach/lazyforeach will be parsed as ts.callExpression
577
+ else if ((callerName === EtsConst_1.COMPONENT_FOR_EACH || callerName === EtsConst_1.COMPONENT_LAZY_FOR_EACH) && ts.isCallExpression(callExpression)) {
578
+ // foreach/lazyforeach will be parsed as ts.callExpression
559
579
  return this.generateSystemComponentStmt(callerName, args, argPositions, callExpression, stmts);
560
580
  }
561
581
  const methodSignature = ArkSignatureBuilder_1.ArkSignatureBuilder.buildMethodSignatureFromMethodName(callerName);
@@ -565,7 +585,6 @@ class ArkValueTransformer {
565
585
  else {
566
586
  invokeValue = new Expr_1.ArkStaticInvokeExpr(methodSignature, args, realGenericTypes);
567
587
  }
568
- invokeValuePositions.push(...argPositions);
569
588
  }
570
589
  else {
571
590
  ({ value: callerValue, valueOriginalPositions: callerPositions, stmts: callerStmts } =
@@ -573,8 +592,8 @@ class ArkValueTransformer {
573
592
  callerStmts.forEach(stmt => stmts.push(stmt));
574
593
  const methodSignature = ArkSignatureBuilder_1.ArkSignatureBuilder.buildMethodSignatureFromMethodName(callerValue.getName());
575
594
  invokeValue = new Expr_1.ArkStaticInvokeExpr(methodSignature, args, realGenericTypes);
576
- invokeValuePositions.push(...argPositions);
577
595
  }
596
+ invokeValuePositions.push(...argPositions);
578
597
  return { value: invokeValue, valueOriginalPositions: invokeValuePositions, stmts: stmts };
579
598
  }
580
599
  parseArgumentsOfCallExpression(currStmts, callExpression) {
@@ -655,8 +674,12 @@ class ArkValueTransformer {
655
674
  realGenericTypes.push(this.resolveTypeNode(typeArgument));
656
675
  });
657
676
  }
658
- const classSignature = ArkSignatureBuilder_1.ArkSignatureBuilder.buildClassSignatureFromClassName(className);
659
- const classType = new Type_1.ClassType(classSignature, realGenericTypes);
677
+ let classSignature = ArkSignatureBuilder_1.ArkSignatureBuilder.buildClassSignatureFromClassName(className);
678
+ let classType = new Type_1.ClassType(classSignature, realGenericTypes);
679
+ if (className === Builtin_1.Builtin.OBJECT) {
680
+ classSignature = Builtin_1.Builtin.OBJECT_CLASS_SIGNATURE;
681
+ classType = Builtin_1.Builtin.OBJECT_CLASS_TYPE;
682
+ }
660
683
  const newExpr = new Expr_1.ArkNewExpr(classType);
661
684
  const { value: newLocal, valueOriginalPositions: newLocalPositions, stmts: newExprStmts, } = this.arkIRTransformer.generateAssignStmtForValue(newExpr, [Position_1.FullPosition.buildFromNode(newExpression, this.sourceFile)]);
662
685
  newExprStmts.forEach(stmt => stmts.push(stmt));
@@ -1413,6 +1436,9 @@ class ArkValueTransformer {
1413
1436
  }
1414
1437
  resolveTypeReferenceNode(typeReferenceNode) {
1415
1438
  const typeReferenceFullName = typeReferenceNode.typeName.getText(this.sourceFile);
1439
+ if (typeReferenceFullName === Builtin_1.Builtin.OBJECT) {
1440
+ return Builtin_1.Builtin.OBJECT_CLASS_TYPE;
1441
+ }
1416
1442
  const aliasTypeAndStmt = this.aliasTypeMap.get(typeReferenceFullName);
1417
1443
  const genericTypes = [];
1418
1444
  if (typeReferenceNode.typeArguments) {
@@ -11,6 +11,7 @@ export declare class Builtin {
11
11
  static DUMMY_FILE_NAME: string;
12
12
  static BUILT_IN_CLASSES_FILE_SIGNATURE: FileSignature;
13
13
  static OBJECT_CLASS_SIGNATURE: ClassSignature;
14
+ static OBJECT_CLASS_TYPE: ClassType;
14
15
  static ARRAY_CLASS_SIGNATURE: ClassSignature;
15
16
  static SET_CLASS_SIGNATURE: ClassSignature;
16
17
  static MAP_CLASS_SIGNATURE: ClassSignature;
@@ -33,5 +34,6 @@ export declare class Builtin {
33
34
  private static buildBuiltInClassesFileSignature;
34
35
  static buildBuiltInClassSignature(className: string): ClassSignature;
35
36
  private static buildBuiltInClassSignatureMap;
37
+ static isBuiltinClass(className: string): boolean;
36
38
  }
37
39
  //# sourceMappingURL=Builtin.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Builtin.d.ts","sourceRoot":"","sources":["../../../src/core/common/Builtin.ts"],"names":[],"mappings":"AAeA,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,eAAe,EAAsB,MAAM,uBAAuB,CAAC;AAC3G,OAAO,EAAE,SAAS,EAA2B,MAAM,cAAc,CAAC;AAElE,qBAAa,OAAO;IAGhB,OAAc,MAAM,SAAY;IAChC,OAAc,KAAK,SAAW;IAC9B,OAAc,GAAG,SAAS;IAC1B,OAAc,GAAG,SAAS;IAC1B,OAAc,MAAM,SAAY;IAEhC,OAAc,gBAAgB,cAA8B;IAG5D,OAAc,kBAAkB,SAAY;IAC5C,OAAc,eAAe,SAAkB;IAE/C,OAAc,+BAA+B,gBAA8C;IAC3F,OAAc,sBAAsB,iBAAgD;IACpF,OAAc,qBAA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mB,iBAA6C;IAC9E,OAAc,mBAAmB,iBAA6C;IAC9E,OAAc,sBAAsB,iBAAgD;IACpF,OAAc,iBAAiB,YAA8C;IAC7E,OAAc,4BAA4B,8BAAwC;IAGlF,OAAc,iBAAiB,SAAc;IAC7C,OAAc,QAAQ,SAAc;IACpC,OAAc,aAAa,SAAU;IACrC,OAAc,eAAe,SAAoB;IACjD,OAAc,oBAAoB,SAAU;IAC5C,OAAc,qBAAqB,SAAW;IAE9C,OAAc,wBAAwB,iBAAkD;IACxF,OAAc,+BAA+B,iBAAyD;IACtG,OAAc,mBAAmB,YAAwE;IACzG,OAAc,0BAA0B,YAA+E;IAGvH,OAAc,SAAS,SAAc;IACrC,OAAc,0BAA0B,kBACyC;IAEjF,OAAO,CAAC,MAAM,CAAC,mBAAmB;IAUlC,OAAO,CAAC,MAAM,CAAC,gCAAgC;WAIjC,0BAA0B,CAAC,SAAS,EAAE,MAAM,GAAG,cAAc;IAI3E,OAAO,CAAC,MAAM,CAAC,6BAA6B;WAU9B,cAAc,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO;CAG3D"}
@@ -43,6 +43,9 @@ class Builtin {
43
43
  builtInClassSignatureMap.set(this.REGEXP, this.REGEXP_CLASS_SIGNATURE);
44
44
  return builtInClassSignatureMap;
45
45
  }
46
+ static isBuiltinClass(className) {
47
+ return this.BUILT_IN_CLASSES.has(className);
48
+ }
46
49
  }
47
50
  exports.Builtin = Builtin;
48
51
  _a = Builtin;
@@ -59,6 +62,7 @@ Builtin.DUMMY_PROJECT_NAME = 'ES2015';
59
62
  Builtin.DUMMY_FILE_NAME = 'BuiltinClass';
60
63
  Builtin.BUILT_IN_CLASSES_FILE_SIGNATURE = Builtin.buildBuiltInClassesFileSignature();
61
64
  Builtin.OBJECT_CLASS_SIGNATURE = _a.buildBuiltInClassSignature(_a.OBJECT);
65
+ Builtin.OBJECT_CLASS_TYPE = new Type_1.ClassType(_a.OBJECT_CLASS_SIGNATURE);
62
66
  Builtin.ARRAY_CLASS_SIGNATURE = _a.buildBuiltInClassSignature(_a.ARRAY);
63
67
  Builtin.SET_CLASS_SIGNATURE = _a.buildBuiltInClassSignature(_a.SET);
64
68
  Builtin.MAP_CLASS_SIGNATURE = _a.buildBuiltInClassSignature(_a.MAP);
@@ -23,6 +23,8 @@ export declare class IRInference {
23
23
  */
24
24
  private static processExtendFunc;
25
25
  static inferFieldRef(ref: ArkInstanceFieldRef, arkMethod: ArkMethod): AbstractRef;
26
+ private static inferBase;
27
+ static inferThisLocal(arkMethod: ArkMethod): Local | null;
26
28
  private static inferArgs;
27
29
  private static inferArg;
28
30
  static inferRightWithSdkType(leftType: Type, rightType: Type, ackClass: ArkClass): void;
@@ -37,6 +39,7 @@ export declare class IRInference {
37
39
  static inferLocal(base: Local, arkMethod: ArkMethod): void;
38
40
  private static generateNewFieldSignature;
39
41
  static inferAnonymousClass(anon: ArkClass | null, declaredSignature: ClassSignature, set?: Set<string>): void;
42
+ private static assignAnonMethod;
40
43
  private static assignAnonField;
41
44
  static inferAliasTypeExpr(expr: AliasTypeExpr, arkMethod: ArkMethod): AbstractExpr;
42
45
  static inferTypeQueryExpr(expr: TypeQueryExpr, arkMethod: ArkMethod): void;
@@ -1 +1 @@
1
- {"version":3,"file":"IRInference.d.ts","sourceRoot":"","sources":["../../../src/core/common/IRInference.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAKH,SAAS,EAKT,IAAI,EAKP,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAEtC,OAAO,EACH,YAAY,EACZ,kBAAkB,EAClB,aAAa,EACb,qBAAqB,EAErB,mBAAmB,EACtB,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACpC,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAI7C,OAAO,EAGH,cAAc,EAEd,e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,EAAE,eAAe,EAAE,QAAQ,EAAE,eAAe,GAAG,eAAe;IAcvG,OAAO,CAAC,MAAM,CAAC,cAAc;WAsBf,UAAU,CAAC,IAAI,EAAE,KAAK,EAAE,SAAS,EAAE,SAAS,GAAG,IAAI;IAgBjE,OAAO,CAAC,MAAM,CAAC,yBAAyB;WAiD1B,mBAAmB,CAAC,IAAI,EAAE,QAAQ,GAAG,IAAI,EAAE,iBAAiB,EAAE,cAAc,EAAE,GAAG,GAAE,GAAG,CAAC,MAAM,CAAa,GAAG,IAAI;IAkC/H,OAAO,CAAC,MAAM,CAAC,gBAAgB;IAM/B,OAAO,CAAC,MAAM,CAAC,eAAe;WAiChB,kBAAkB,CAAC,IAAI,EAAE,aAAa,EAAE,SAAS,EAAE,SAAS,GAAG,YAAY;WAiC3E,kBAAkB,CAAC,IAAI,EAAE,aAAa,EAAE,SAAS,EAAE,SAAS,GAAG,IAAI;WA2CnE,kBAAkB,CAAC,IAAI,EAAE,aAAa,EAAE,SAAS,EAAE,SAAS,GAAG,IAAI;WAcnE,iBAAiB,CAAC,GAAG,EAAE,eAAe,EAAE,SAAS,EAAE,SAAS,GAAG,WAAW;CAmB3F"}
@@ -114,6 +114,7 @@ class IRInference {
114
114
  }
115
115
  return expr;
116
116
  }
117
+ expr.getArgs().forEach(arg => TypeInference_1.TypeInference.inferValueType(arg, arkMethod));
117
118
  if (methodName === TSConst_1.SUPER_NAME) {
118
119
  const superClass = arkClass.getSuperClass();
119
120
  if (superClass !== null) {
@@ -180,7 +181,7 @@ class IRInference {
180
181
  var _a, _b, _c;
181
182
  const arkClass = arkMethod.getDeclaringArkClass();
182
183
  TypeInference_1.TypeInference.inferRealGenericTypes(expr.getRealGenericTypes(), arkClass);
183
- this.inferLocal(expr.getBase(), arkMethod);
184
+ this.inferBase(expr, arkMethod);
184
185
  const baseType = TypeInference_1.TypeInference.replaceAliasType(expr.getBase().getType());
185
186
  let methodName = expr.getMethodSignature().getMethodSubSignature().getMethodName();
186
187
  if (methodName.startsWith(Const_1.NAME_PREFIX)) {
@@ -195,6 +196,7 @@ class IRInference {
195
196
  this.processForEach(expr.getArg(0), baseType, scene);
196
197
  return expr;
197
198
  }
199
+ expr.getArgs().forEach(arg => TypeInference_1.TypeInference.inferValueType(arg, arkMethod));
198
200
  let result = (_c = this.inferInvokeExpr(expr, baseType, methodName, scene)) !== null && _c !== void 0 ? _c : this.processExtendFunc(expr, arkMethod, methodName);
199
201
  if (result) {
200
202
  this.inferArgs(result, arkMethod);
@@ -226,13 +228,12 @@ class IRInference {
226
228
  return null;
227
229
  }
228
230
  static inferFieldRef(ref, arkMethod) {
229
- this.inferLocal(ref.getBase(), arkMethod);
231
+ this.inferBase(ref, arkMethod);
230
232
  const baseType = TypeInference_1.TypeInference.replaceAliasType(ref.getBase().getType());
231
233
  if (baseType instanceof Type_1.ArrayType && ref.getFieldName() !== 'length') {
232
234
  return new Ref_1.ArkArrayRef(ref.getBase(), ValueUtil_1.ValueUtil.createConst(ref.getFieldName()));
233
235
  }
234
- const arkClass = arkMethod.getDeclaringArkClass();
235
- let newFieldSignature = this.generateNewFieldSignature(ref, arkClass, baseType);
236
+ let newFieldSignature = this.generateNewFieldSignature(ref, arkMethod.getDeclaringArkClass(), baseType);
236
237
  if (newFieldSignature) {
237
238
  if (newFieldSignature.isStatic()) {
238
239
  return new Ref_1.ArkStaticFieldRef(newFieldSignature);
@@ -241,6 +242,43 @@ class IRInference {
241
242
  }
242
243
  return ref;
243
244
  }
245
+ static inferBase(instance, arkMethod) {
246
+ const base = instance.getBase();
247
+ if (base.getName() === TSConst_1.THIS_NAME) {
248
+ let newBase = this.inferThisLocal(arkMethod);
249
+ if (newBase) {
250
+ instance.setBase(newBase);
251
+ }
252
+ }
253
+ else {
254
+ this.inferLocal(instance.getBase(), arkMethod);
255
+ }
256
+ }
257
+ static inferThisLocal(arkMethod) {
258
+ var _a, _b, _c, _d;
259
+ const arkClass = arkMethod.getDeclaringArkClass();
260
+ if (!arkClass.isAnonymousClass()) {
261
+ return null;
262
+ }
263
+ const value = (_b = (_a = arkMethod.getBody()) === null || _a === void 0 ? void 0 : _a.getUsedGlobals()) === null || _b === void 0 ? void 0 : _b.get(TSConst_1.THIS_NAME);
264
+ if (value instanceof Local_1.Local) {
265
+ return value;
266
+ }
267
+ else {
268
+ const thisType = TypeInference_1.TypeInference.inferBaseType(arkClass.getSignature().getDeclaringClassName(), arkClass);
269
+ if (thisType instanceof Type_1.ClassType) {
270
+ const newBase = new Local_1.Local(TSConst_1.THIS_NAME, thisType);
271
+ let usedGlobals = (_c = arkMethod.getBody()) === null || _c === void 0 ? void 0 : _c.getUsedGlobals();
272
+ if (!usedGlobals) {
273
+ usedGlobals = new Map();
274
+ (_d = arkMethod.getBody()) === null || _d === void 0 ? void 0 : _d.setUsedGlobals(usedGlobals);
275
+ }
276
+ usedGlobals.set(TSConst_1.THIS_NAME, newBase);
277
+ return newBase;
278
+ }
279
+ }
280
+ return null;
281
+ }
244
282
  static inferArgs(expr, arkMethod) {
245
283
  const scene = arkMethod.getDeclaringArkFile().getScene();
246
284
  const parameters = expr.getMethodSignature().getMethodSubSignature().getParameters();
@@ -248,7 +286,6 @@ class IRInference {
248
286
  const len = expr.getArgs().length;
249
287
  for (let index = 0; index < len; index++) {
250
288
  const arg = expr.getArg(index);
251
- TypeInference_1.TypeInference.inferValueType(arg, arkMethod);
252
289
  if (index >= parameters.length) {
253
290
  break;
254
291
  }
@@ -399,6 +436,9 @@ class IRInference {
399
436
  }
400
437
  static inferInvokeExprWithDeclaredClass(expr, baseType, methodName, scene) {
401
438
  var _a;
439
+ if (Builtin_1.Builtin.isBuiltinClass(baseType.getClassSignature().getClassName())) {
440
+ expr.setMethodSignature(new ArkSignature_1.MethodSignature(baseType.getClassSignature(), expr.getMethodSignature().getMethodSubSignature()));
441
+ }
402
442
  let declaredClass = scene.getClass(baseType.getClassSignature());
403
443
  if (!declaredClass) {
404
444
  const globalClass = scene.getSdkGlobal(baseType.getClassSignature().getClassName());
@@ -438,14 +478,12 @@ class IRInference {
438
478
  }
439
479
  else if (methodName === TSConst_1.CONSTRUCTOR_NAME) { //sdk隐式构造
440
480
  const subSignature = new ArkSignature_1.MethodSubSignature(methodName, [], new Type_1.ClassType(baseType.getClassSignature()));
441
- const signature = new ArkSignature_1.MethodSignature(baseType.getClassSignature(), subSignature);
442
- expr.setMethodSignature(signature);
481
+ expr.setMethodSignature(new ArkSignature_1.MethodSignature(baseType.getClassSignature(), subSignature));
443
482
  return expr;
444
483
  }
445
484
  else if (methodName === Builtin_1.Builtin.ITERATOR_NEXT) { //sdk隐式构造
446
485
  const returnType = expr.getMethodSignature().getMethodSubSignature().getReturnType();
447
- if (returnType instanceof Type_1.ClassType && returnType.getClassSignature().getDeclaringFileSignature()
448
- .getProjectName() === Builtin_1.Builtin.DUMMY_PROJECT_NAME) {
486
+ if (returnType instanceof Type_1.ClassType && returnType.getClassSignature().getDeclaringFileSignature().getProjectName() === Builtin_1.Builtin.DUMMY_PROJECT_NAME) {
449
487
  returnType.setRealGenericTypes(baseType.getRealGenericTypes());
450
488
  return expr;
451
489
  }
@@ -502,18 +540,6 @@ class IRInference {
502
540
  static inferLocal(base, arkMethod) {
503
541
  var _a, _b, _c;
504
542
  const arkClass = arkMethod.getDeclaringArkClass();
505
- if (base.getName() === TSConst_1.THIS_NAME) {
506
- if (arkClass.isAnonymousClass()) {
507
- const thisType = TypeInference_1.TypeInference.inferBaseType(arkClass.getSignature().getDeclaringClassName(), arkClass);
508
- if (thisType instanceof Type_1.ClassType) {
509
- base.setType(thisType);
510
- }
511
- }
512
- else {
513
- base.setType(new Type_1.ClassType(arkClass.getSignature(), arkClass.getGenericsTypes()));
514
- }
515
- return;
516
- }
517
543
  let baseType = base.getType();
518
544
  if (baseType instanceof Type_1.UnclearReferenceType) {
519
545
  baseType = TypeInference_1.TypeInference.inferUnclearRefName(baseType.getName(), arkClass);
@@ -547,7 +573,13 @@ class IRInference {
547
573
  const fieldName = ref.getFieldName().replace(/[\"|\']/g, '');
548
574
  const propertyAndType = TypeInference_1.TypeInference.inferFieldType(baseType, fieldName, arkClass);
549
575
  let propertyType = propertyAndType === null || propertyAndType === void 0 ? void 0 : propertyAndType[1];
550
- if (propertyType && TypeInference_1.TypeInference.isUnclearType(propertyType)) {
576
+ if (!propertyType) {
577
+ const newType = TypeInference_1.TypeInference.inferUnclearRefName(fieldName, arkClass);
578
+ if (newType) {
579
+ propertyType = newType;
580
+ }
581
+ }
582
+ else if (TypeInference_1.TypeInference.isUnclearType(propertyType)) {
551
583
  const newType = TypeInference_1.TypeInference.inferUnclearedType(propertyType, arkClass);
552
584
  if (newType) {
553
585
  propertyType = newType;
@@ -574,7 +606,6 @@ class IRInference {
574
606
  return new ArkSignature_1.FieldSignature(fieldName, signature, propertyType !== null && propertyType !== void 0 ? propertyType : ref.getType(), staticFlag);
575
607
  }
576
608
  static inferAnonymousClass(anon, declaredSignature, set = new Set()) {
577
- var _a;
578
609
  if (!anon) {
579
610
  return;
580
611
  }
@@ -595,12 +626,21 @@ class IRInference {
595
626
  if (property instanceof ArkField_1.ArkField) {
596
627
  this.assignAnonField(property, anonField, scene, set);
597
628
  }
629
+ else if (property instanceof ArkMethod_1.ArkMethod) {
630
+ const type = anonField.getType();
631
+ if (type instanceof Type_1.FunctionType) {
632
+ this.assignAnonMethod(scene.getMethod(type.getMethodSignature()), property);
633
+ }
634
+ anonField.setSignature(new ArkSignature_1.FieldSignature(anonField.getName(), property.getDeclaringArkClass().getSignature(), new Type_1.FunctionType(property.getSignature())));
635
+ }
598
636
  }
599
637
  for (const anonMethod of anon.getMethods()) {
600
- const methodSignature = (_a = declaredClass.getMethodWithName(anonMethod.getName())) === null || _a === void 0 ? void 0 : _a.matchMethodSignature(anonMethod.getSubSignature().getParameters());
601
- if (methodSignature) {
602
- anonMethod.setImplementationSignature(methodSignature);
603
- }
638
+ this.assignAnonMethod(anonMethod, declaredClass.getMethodWithName(anonMethod.getName()));
639
+ }
640
+ }
641
+ static assignAnonMethod(anonMethod, declaredMethod) {
642
+ if (declaredMethod && anonMethod) {
643
+ anonMethod.setImplementationSignature(declaredMethod.matchMethodSignature(anonMethod.getSubSignature().getParameters()));
604
644
  }
605
645
  }
606
646
  static assignAnonField(property, anonField, scene, set) {
@@ -86,7 +86,7 @@ class SdkUtils {
86
86
  const instance = globalMap.get(name + 'Interface');
87
87
  const attr = globalMap.get(name + EtsConst_1.COMPONENT_ATTRIBUTE);
88
88
  if (attr instanceof ArkClass_1.ArkClass && instance instanceof ArkClass_1.ArkClass) {
89
- instance.getMethods().filter(m => !instance.getMethodWithName(m.getName())).forEach(m => attr.addMethod(m));
89
+ instance.getMethods().filter(m => !attr.getMethodWithName(m.getName())).forEach(m => attr.addMethod(m));
90
90
  globalMap.set(name, attr);
91
91
  return;
92
92
  }
@@ -15,10 +15,10 @@ export declare class TypeInference {
15
15
  * The original type is null if failed to infer the type.
16
16
  * @param leftOpType
17
17
  * @param declaringArkClass
18
- * @param [rightType]
18
+ * @param visited
19
19
  * @returns
20
20
  */
21
- static inferUnclearedType(leftOpType: Type, declaringArkClass: ArkClass, rightType?: Type): Type | null | undefined;
21
+ static inferUnclearedType(leftOpType: Type, declaringArkClass: ArkClass, visited?: Set<Type>): Type | null | undefined;
22
22
  static inferTypeInMethod(arkMethod: ArkMethod): void;
23
23
  private static resolveStmt;
24
24
  /**
@@ -87,6 +87,7 @@ export declare class TypeInference {
87
87
  * @returns
88
88
  */
89
89
  static inferFieldType(baseType: Type, fieldName: string, declareClass: ArkClass): [any, Type] | null;
90
+ private static inferClassFieldType;
90
91
  /**
91
92
  * Find out the original object and type for a given base name.
92
93
  * It returns original type.
@@ -98,7 +99,8 @@ export declare class TypeInference {
98
99
  static inferBaseType(baseName: string, arkClass: ArkClass): Type | null;
99
100
  static inferRealGenericTypes(realTypes: Type[] | undefined, arkClass: ArkClass): void;
100
101
  static inferDynamicImportType(from: string, arkClass: ArkClass): Type | null;
101
- static replaceTypeWithReal(type: Type, realTypes?: Type[]): Type;
102
+ static replaceTypeWithReal(type: Type, realTypes?: Type[], visited?: Set<Type>): Type;
103
+ static replaceRecursiveType(type: Type, visited: Set<Type>, realTypes?: Type[]): Type;
102
104
  static replaceAliasType(type: Type): Type;
103
105
  static inferFunctionType(argType: FunctionType, paramSubSignature: MethodSubSignature | undefined, realTypes: Type[] | undefined): void;
104
106
  private static resolveArkReturnStmt;
@@ -1 +1 @@
1
- {"version":3,"file":"TypeInference.d.ts","sourceRoot":"","sources":["../../../src/core/common/TypeInference.ts"],"names":[],"mappings":"AA0BA,OAAO,EAAwD,IAAI,EAAE,MAAM,cAAc,CAAC;AAC1F,OAAO,EAOH,YAAY,EACZ,WAAW,EAOX,IAAI,EACJ,oBAAoB,EAKvB,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAgBtC,OAAO,EAAE,eAAe,EAAE,kBAAkB,EAAsB,MAAM,uBAAuB,CAAC;AAahG,qBAAa,aAAa;WAER,mBAAmB,CAAC,QAAQ,EAAE,QAAQ,GAAG,IAAI;IAoC3D;;;;;;;;;OASG;WACW,kBAAkB,CAAC,UAAU,EAAE,IAAI,EAAE,iBAAiB,EAAE,QAAQ,EAAE,SAAS,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,SAAS;WAkC5G,iBAAiB,CAAC,SAAS,EAAE,SAAS,GAAG,IAAI;IA4B3D,OAAO,CAAC,MAAM,CAAC,WAAW;IAY1B;;;OAGG;WACW,uBAAuB,CAAC,SAAS,EAAE,SAAS,GAAG,IAAI;IAcjE;;;OAGG;IACH,OAAO,CAAC,MAAM,CAAC,kBAAkB;IAajC;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