arkanalyzer 1.0.39 → 1.0.40
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/config/arkanalyzer.json +6 -2
- package/lib/Config.d.ts +1 -0
- package/lib/Config.d.ts.map +1 -1
- package/lib/Scene.d.ts +6 -5
- package/lib/Scene.d.ts.map +1 -1
- package/lib/Scene.js +36 -18
- package/lib/callgraph/pointerAnalysis/PagBuilder.js +5 -5
- package/lib/callgraph/pointerAnalysis/PointerAnalysisConfig.d.ts +1 -0
- package/lib/callgraph/pointerAnalysis/PointerAnalysisConfig.d.ts.map +1 -1
- package/lib/callgraph/pointerAnalysis/PointerAnalysisConfig.js +8 -0
- package/lib/core/base/Expr.d.ts.map +1 -1
- package/lib/core/base/Expr.js +11 -1
- package/lib/core/base/Local.js +1 -1
- package/lib/core/common/ArkIRTransformer.d.ts +1 -0
- package/lib/core/common/ArkIRTransformer.d.ts.map +1 -1
- package/lib/core/common/ArkIRTransformer.js +34 -0
- package/lib/core/common/ArkValueTransformer.d.ts.map +1 -1
- package/lib/core/common/ArkValueTransformer.js +48 -33
- package/lib/core/common/Builtin.d.ts.map +1 -1
- package/lib/core/common/Builtin.js +2 -2
- package/lib/core/common/DummyMainCreater.js +1 -1
- package/lib/core/common/IRInference.d.ts +1 -0
- package/lib/core/common/IRInference.d.ts.map +1 -1
- package/lib/core/common/IRInference.js +60 -44
- package/lib/core/common/ModelUtils.d.ts +1 -0
- package/lib/core/common/ModelUtils.d.ts.map +1 -1
- package/lib/core/common/ModelUtils.js +7 -0
- package/lib/core/common/SdkUtils.d.ts +14 -1
- package/lib/core/common/SdkUtils.d.ts.map +1 -1
- package/lib/core/common/SdkUtils.js +108 -24
- package/lib/core/common/TypeInference.d.ts +2 -1
- package/lib/core/common/TypeInference.d.ts.map +1 -1
- package/lib/core/common/TypeInference.js +21 -12
- package/lib/core/common/ValueUtil.d.ts +1 -0
- package/lib/core/common/ValueUtil.d.ts.map +1 -1
- package/lib/core/common/ValueUtil.js +7 -0
- package/lib/core/graph/Scc.js +1 -1
- package/lib/core/graph/builder/CfgBuilder.d.ts +1 -0
- package/lib/core/graph/builder/CfgBuilder.d.ts.map +1 -1
- package/lib/core/graph/builder/CfgBuilder.js +15 -7
- package/lib/core/model/ArkImport.js +1 -1
- package/lib/core/model/ArkMethod.d.ts.map +1 -1
- package/lib/core/model/ArkMethod.js +8 -2
- package/lib/core/model/builder/ArkClassBuilder.js +3 -0
- package/lib/core/model/builder/ArkMethodBuilder.d.ts.map +1 -1
- package/lib/core/model/builder/ArkMethodBuilder.js +2 -2
- package/lib/save/JsonPrinter.d.ts +1 -0
- package/lib/save/JsonPrinter.d.ts.map +1 -1
- package/lib/save/JsonPrinter.js +15 -5
- package/lib/save/source/SourceBody.d.ts +1 -1
- package/lib/save/source/SourceBody.d.ts.map +1 -1
- package/lib/save/source/SourceBody.js +3 -2
- package/lib/save/source/SourceStmt.d.ts.map +1 -1
- package/lib/save/source/SourceStmt.js +3 -3
- package/lib/save/source/SourceTransformer.d.ts +3 -3
- package/lib/save/source/SourceTransformer.d.ts.map +1 -1
- package/lib/save/source/SourceTransformer.js +11 -10
- package/lib/transformer/StaticSingleAssignmentFormer.js +1 -1
- package/package.json +7 -7
|
@@ -163,7 +163,7 @@ class DummyMainCreater {
|
|
|
163
163
|
let superCls = method.getDeclaringArkClass().getSuperClass();
|
|
164
164
|
let methodInSuperCls = superCls === null || superCls === void 0 ? void 0 : superCls.getMethodWithName(method.getName());
|
|
165
165
|
if (methodInSuperCls) {
|
|
166
|
-
paramType = (_a = methodInSuperCls.getParameters()
|
|
166
|
+
paramType = (_a = methodInSuperCls.getParameters()[paramIdx]) === null || _a === void 0 ? void 0 : _a.getType();
|
|
167
167
|
method = methodInSuperCls;
|
|
168
168
|
}
|
|
169
169
|
}
|
|
@@ -38,6 +38,7 @@ export declare class IRInference {
|
|
|
38
38
|
private static processForEach;
|
|
39
39
|
static inferLocal(base: Local, arkMethod: ArkMethod): void;
|
|
40
40
|
private static generateNewFieldSignature;
|
|
41
|
+
private static repairType;
|
|
41
42
|
static inferAnonymousClass(anon: ArkClass | null, declaredSignature: ClassSignature, set?: Set<string>): void;
|
|
42
43
|
private static assignAnonMethod;
|
|
43
44
|
private static assignAnonField;
|
|
@@ -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,eAAe,EAElB,MAAM,uBAAuB,CAAC;AAK/B,OAAO,EAEH,WAAW,EAEX,mBAAmB,EACnB,eAAe,EAElB,MAAM,aAAa,CAAC;AAYrB,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAC3C,OAAO,EAAoB,aAAa,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAKlF,qBAAa,WAAW;IACpB,OAAO,CAAC,MAAM,CAAC,gBAAgB;IAqB/B,OAAO,CAAC,MAAM,CAAC,gBAAgB;WAMjB,SAAS,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI;WAyB9B,qBAAqB,CAAC,IAAI,EAAE,mBAAmB,EAAE,SAAS,EAAE,SAAS,GAAG,kBAAkB;
|
|
1
|
+
{"version":3,"file":"IRInference.d.ts","sourceRoot":"","sources":["../../../src/core/common/IRInference.ts"],"names":[],"mappings":"AAcA,OA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}
|
|
@@ -111,6 +111,10 @@ class IRInference {
|
|
|
111
111
|
this.inferExportInfos(file);
|
|
112
112
|
}
|
|
113
113
|
static inferStaticInvokeExpr(expr, arkMethod) {
|
|
114
|
+
const fileSignature = expr.getMethodSignature().getDeclaringClassSignature().getDeclaringFileSignature();
|
|
115
|
+
if (fileSignature !== ArkSignature_1.FileSignature.DEFAULT && fileSignature !== Builtin_1.Builtin.BUILT_IN_CLASSES_FILE_SIGNATURE) {
|
|
116
|
+
return expr;
|
|
117
|
+
}
|
|
114
118
|
const arkClass = arkMethod.getDeclaringArkClass();
|
|
115
119
|
const methodName = expr.getMethodSignature().getMethodSubSignature().getMethodName();
|
|
116
120
|
expr.getArgs().forEach(arg => TypeInference_1.TypeInference.inferValueType(arg, arkMethod));
|
|
@@ -227,10 +231,12 @@ class IRInference {
|
|
|
227
231
|
if (type instanceof Type_1.FunctionType) {
|
|
228
232
|
const methodSignature = type.getMethodSignature();
|
|
229
233
|
// because of last stmt is ArkReturnVoidStmt, the ArkInvokeStmt at -2 before ArkReturnVoidStmt.
|
|
230
|
-
const
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
+
const stmts = (_b = (_a = arkMethod.getDeclaringArkFile().getScene().getMethod(methodSignature)) === null || _a === void 0 ? void 0 : _a.getCfg()) === null || _b === void 0 ? void 0 : _b.getStmts();
|
|
235
|
+
if (stmts) {
|
|
236
|
+
const endStmt = stmts[stmts.length - 2];
|
|
237
|
+
if (endStmt instanceof Stmt_1.ArkInvokeStmt) {
|
|
238
|
+
methodSignature.getMethodSubSignature().setReturnType(endStmt.getInvokeExpr().getType());
|
|
239
|
+
}
|
|
234
240
|
}
|
|
235
241
|
expr.setMethodSignature(methodSignature);
|
|
236
242
|
return expr;
|
|
@@ -424,18 +430,14 @@ class IRInference {
|
|
|
424
430
|
return null;
|
|
425
431
|
}
|
|
426
432
|
static inferInvokeExprWithArray(methodName, expr, baseType, scene) {
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
expr.setRealGenericTypes([baseType.getBaseType()]);
|
|
431
|
-
return expr;
|
|
432
|
-
}
|
|
433
|
+
const arrayInterface = scene.getSdkGlobal(Builtin_1.Builtin.ARRAY);
|
|
434
|
+
if (arrayInterface instanceof ArkClass_1.ArkClass) {
|
|
435
|
+
return this.inferInvokeExpr(expr, new Type_1.ClassType(arrayInterface.getSignature(), [baseType.getBaseType()]), methodName, scene);
|
|
433
436
|
}
|
|
434
|
-
else {
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
}
|
|
437
|
+
else if (methodName === Builtin_1.Builtin.ITERATOR_FUNCTION) {
|
|
438
|
+
expr.getMethodSignature().getMethodSubSignature().setReturnType(Builtin_1.Builtin.ITERATOR_CLASS_TYPE);
|
|
439
|
+
expr.setRealGenericTypes([baseType.getBaseType()]);
|
|
440
|
+
return expr;
|
|
439
441
|
}
|
|
440
442
|
return null;
|
|
441
443
|
}
|
|
@@ -472,7 +474,7 @@ class IRInference {
|
|
|
472
474
|
const methodSignature = method.matchMethodSignature(expr.getArgs());
|
|
473
475
|
TypeInference_1.TypeInference.inferSignatureReturnType(methodSignature, method);
|
|
474
476
|
expr.setMethodSignature(this.replaceMethodSignature(expr.getMethodSignature(), methodSignature));
|
|
475
|
-
expr.setRealGenericTypes(IRInference.getRealTypes(
|
|
477
|
+
expr.setRealGenericTypes(IRInference.getRealTypes(expr, declaredClass, baseType, method));
|
|
476
478
|
if (method.isStatic() && expr instanceof Expr_1.ArkInstanceInvokeExpr) {
|
|
477
479
|
return new Expr_1.ArkStaticInvokeExpr(methodSignature, expr.getArgs(), expr.getRealGenericTypes());
|
|
478
480
|
}
|
|
@@ -504,27 +506,36 @@ class IRInference {
|
|
|
504
506
|
expr.setMethodSignature(new ArkSignature_1.MethodSignature(baseType.getClassSignature(), subSignature));
|
|
505
507
|
return expr;
|
|
506
508
|
}
|
|
507
|
-
else if (methodName === Builtin_1.Builtin.ITERATOR_NEXT
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
return expr;
|
|
513
|
-
}
|
|
509
|
+
else if (methodName === Builtin_1.Builtin.ITERATOR_NEXT &&
|
|
510
|
+
baseType.getClassSignature().getDeclaringFileSignature().getProjectName() === Builtin_1.Builtin.DUMMY_PROJECT_NAME) {
|
|
511
|
+
expr.getMethodSignature().getMethodSubSignature().setReturnType(Builtin_1.Builtin.ITERATOR_RESULT_CLASS_TYPE);
|
|
512
|
+
expr.setRealGenericTypes(baseType.getRealGenericTypes());
|
|
513
|
+
return expr;
|
|
514
514
|
}
|
|
515
515
|
return null;
|
|
516
516
|
}
|
|
517
|
-
static getRealTypes(
|
|
517
|
+
static getRealTypes(expr, declaredClass, baseType, method) {
|
|
518
|
+
var _a;
|
|
518
519
|
let realTypes;
|
|
519
|
-
|
|
520
|
-
|
|
520
|
+
const tmp = [];
|
|
521
|
+
if (method.getGenericTypes()) {
|
|
522
|
+
expr.getMethodSignature().getMethodSubSignature().getParameters()
|
|
523
|
+
.filter(p => !p.getName().startsWith(Const_1.LEXICAL_ENV_NAME_PREFIX))
|
|
524
|
+
.forEach((p, i) => {
|
|
525
|
+
if (TypeInference_1.TypeInference.checkType(p.getType(), t => t instanceof Type_1.GenericType)) {
|
|
526
|
+
tmp.push(expr.getArg(i).getType());
|
|
527
|
+
}
|
|
528
|
+
});
|
|
521
529
|
}
|
|
522
|
-
|
|
523
|
-
realTypes =
|
|
530
|
+
if (tmp.length > 0) {
|
|
531
|
+
realTypes = tmp;
|
|
524
532
|
}
|
|
525
533
|
else if (declaredClass === null || declaredClass === void 0 ? void 0 : declaredClass.hasComponentDecorator()) {
|
|
526
534
|
realTypes = [new Type_1.ClassType(declaredClass === null || declaredClass === void 0 ? void 0 : declaredClass.getSignature())];
|
|
527
535
|
}
|
|
536
|
+
else {
|
|
537
|
+
realTypes = (_a = baseType.getRealGenericTypes()) !== null && _a !== void 0 ? _a : declaredClass === null || declaredClass === void 0 ? void 0 : declaredClass.getRealTypes();
|
|
538
|
+
}
|
|
528
539
|
return realTypes;
|
|
529
540
|
}
|
|
530
541
|
static replaceMethodSignature(init, declared) {
|
|
@@ -596,24 +607,13 @@ class IRInference {
|
|
|
596
607
|
}
|
|
597
608
|
const fieldName = ref.getFieldName().replace(/[\"|\']/g, '');
|
|
598
609
|
const propertyAndType = TypeInference_1.TypeInference.inferFieldType(baseType, fieldName, arkClass);
|
|
599
|
-
let propertyType = propertyAndType === null || propertyAndType === void 0 ? void 0 : propertyAndType[1];
|
|
600
|
-
if (!propertyType || propertyType instanceof Type_1.UnknownType) {
|
|
601
|
-
const newType = TypeInference_1.TypeInference.inferBaseType(fieldName, arkClass);
|
|
602
|
-
if (newType) {
|
|
603
|
-
propertyType = newType;
|
|
604
|
-
}
|
|
605
|
-
}
|
|
606
|
-
else if (TypeInference_1.TypeInference.isUnclearType(propertyType)) {
|
|
607
|
-
const newType = TypeInference_1.TypeInference.inferUnclearedType(propertyType, arkClass);
|
|
608
|
-
if (newType) {
|
|
609
|
-
propertyType = newType;
|
|
610
|
-
}
|
|
611
|
-
}
|
|
610
|
+
let propertyType = IRInference.repairType(propertyAndType === null || propertyAndType === void 0 ? void 0 : propertyAndType[1], fieldName, arkClass);
|
|
612
611
|
let staticFlag;
|
|
613
612
|
let signature;
|
|
614
613
|
if (baseType instanceof Type_1.ClassType) {
|
|
615
614
|
const property = propertyAndType === null || propertyAndType === void 0 ? void 0 : propertyAndType[0];
|
|
616
|
-
if (property instanceof ArkField_1.ArkField && property.getCategory() !== ArkField_1.FieldCategory.ENUM_MEMBER
|
|
615
|
+
if (property instanceof ArkField_1.ArkField && property.getCategory() !== ArkField_1.FieldCategory.ENUM_MEMBER &&
|
|
616
|
+
!(property.getType() instanceof Type_1.GenericType)) {
|
|
617
617
|
return property.getSignature();
|
|
618
618
|
}
|
|
619
619
|
staticFlag =
|
|
@@ -630,6 +630,21 @@ class IRInference {
|
|
|
630
630
|
}
|
|
631
631
|
return new ArkSignature_1.FieldSignature(fieldName, signature, propertyType !== null && propertyType !== void 0 ? propertyType : ref.getType(), staticFlag);
|
|
632
632
|
}
|
|
633
|
+
static repairType(propertyType, fieldName, arkClass) {
|
|
634
|
+
if (!propertyType || propertyType instanceof Type_1.UnknownType) {
|
|
635
|
+
const newType = TypeInference_1.TypeInference.inferBaseType(fieldName, arkClass);
|
|
636
|
+
if (newType) {
|
|
637
|
+
propertyType = newType;
|
|
638
|
+
}
|
|
639
|
+
}
|
|
640
|
+
else if (TypeInference_1.TypeInference.isUnclearType(propertyType)) {
|
|
641
|
+
const newType = TypeInference_1.TypeInference.inferUnclearedType(propertyType, arkClass);
|
|
642
|
+
if (newType) {
|
|
643
|
+
propertyType = newType;
|
|
644
|
+
}
|
|
645
|
+
}
|
|
646
|
+
return propertyType;
|
|
647
|
+
}
|
|
633
648
|
static inferAnonymousClass(anon, declaredSignature, set = new Set()) {
|
|
634
649
|
if (!anon) {
|
|
635
650
|
return;
|
|
@@ -675,7 +690,8 @@ class IRInference {
|
|
|
675
690
|
}
|
|
676
691
|
}
|
|
677
692
|
const type = property.getSignature().getType();
|
|
678
|
-
const
|
|
693
|
+
const fieldInitializer = anonField.getInitializer();
|
|
694
|
+
const lastStmt = fieldInitializer[fieldInitializer.length - 1];
|
|
679
695
|
if (lastStmt instanceof Stmt_1.ArkAssignStmt) {
|
|
680
696
|
const rightType = lastStmt.getRightOp().getType();
|
|
681
697
|
if (type instanceof Type_1.ClassType) {
|
|
@@ -798,7 +814,7 @@ class IRInference {
|
|
|
798
814
|
var _a, _b, _c;
|
|
799
815
|
const paramType = ref.getType();
|
|
800
816
|
if (paramType instanceof Type_1.UnknownType || paramType instanceof Type_1.UnclearReferenceType) {
|
|
801
|
-
const signature = (_b = (_a = arkMethod.getDeclareSignatures()) === null || _a === void 0 ? void 0 : _a
|
|
817
|
+
const signature = (_b = (_a = arkMethod.getDeclareSignatures()) === null || _a === void 0 ? void 0 : _a[0]) !== null && _b !== void 0 ? _b : arkMethod.getSignature();
|
|
802
818
|
const type1 = (_c = signature.getMethodSubSignature().getParameters()[ref.getIndex()]) === null || _c === void 0 ? void 0 : _c.getType();
|
|
803
819
|
if (!TypeInference_1.TypeInference.isUnclearType(type1)) {
|
|
804
820
|
ref.setType(type1);
|
|
@@ -11,6 +11,7 @@ import { Scene } from '../../Scene';
|
|
|
11
11
|
import { ArkBaseModel } from '../model/ArkBaseModel';
|
|
12
12
|
export declare class ModelUtils {
|
|
13
13
|
static implicitArkUIBuilderMethods: Set<ArkMethod>;
|
|
14
|
+
static dispose(): void;
|
|
14
15
|
static getMethodSignatureFromArkClass(arkClass: ArkClass, methodName: string): MethodSignature | null;
|
|
15
16
|
static getClassWithNameInNamespaceRecursively(className: string, ns: ArkNamespace): ArkClass | null;
|
|
16
17
|
static getClassWithNameFromClass(className: string, startFrom: ArkClass): ArkClass | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ModelUtils.d.ts","sourceRoot":"","sources":["../../../src/core/common/ModelUtils.ts"],"names":[],"mappings":"AAeA,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACtC,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAC3C,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,EAEH,cAAc,EAKd,eAAe,EAEf,SAAS,EACZ,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,SAAS,EAAE,UAAU,EAAc,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AACjF,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAO7C,OAAO,
|
|
1
|
+
{"version":3,"file":"ModelUtils.d.ts","sourceRoot":"","sources":["../../../src/core/common/ModelUtils.ts"],"names":[],"mappings":"AAeA,OAAO,EAAE,KAAK,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pE;AAED,wBAAgB,aAAa,CAAC,UAAU,EAAE,UAAU,GAAG,SAAS,GAAG,SAAS,GAAG,IAAI,CA+BlF;AAED,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,EAAE,gBAAgB,EAAE,OAAO,GAAG,SAAS,GAAG,IAAI,CAkB7F;AAmED,wBAAgB,iBAAiB,CAAC,eAAe,EAAE,GAAG,CAAC,MAAM,EAAE;IAAE,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;CAAE,CAAC,GAAG,IAAI,CAK9F"}
|
|
@@ -60,6 +60,13 @@ const Stmt_1 = require("../base/Stmt");
|
|
|
60
60
|
const Ref_1 = require("../base/Ref");
|
|
61
61
|
const SdkUtils_1 = require("./SdkUtils");
|
|
62
62
|
class ModelUtils {
|
|
63
|
+
/*
|
|
64
|
+
* Set static field to be null, then all related objects could be freed by GC.
|
|
65
|
+
* Static field implicitArkUIBuilderMethods is only used during method body building, the dispose method should be called after build all body.
|
|
66
|
+
*/
|
|
67
|
+
static dispose() {
|
|
68
|
+
this.implicitArkUIBuilderMethods.clear();
|
|
69
|
+
}
|
|
63
70
|
static getMethodSignatureFromArkClass(arkClass, methodName) {
|
|
64
71
|
for (const arkMethod of arkClass.getMethods()) {
|
|
65
72
|
if (arkMethod.getName() === methodName) {
|
|
@@ -2,11 +2,24 @@ import { ArkFile } from '../model/ArkFile';
|
|
|
2
2
|
import { ArkExport } from '../model/ArkExport';
|
|
3
3
|
import { ArkMethod } from '../model/ArkMethod';
|
|
4
4
|
import { AbstractFieldRef } from '../base/Ref';
|
|
5
|
+
import { Sdk } from '../../Config';
|
|
5
6
|
export declare class SdkUtils {
|
|
7
|
+
private static esVersion;
|
|
8
|
+
private static esVersionMap;
|
|
6
9
|
private static sdkImportMap;
|
|
10
|
+
static BUILT_IN_NAME: string;
|
|
11
|
+
private static BUILT_IN_PATH;
|
|
12
|
+
static BUILT_IN_SDK: Sdk;
|
|
13
|
+
static setEsVersion(buildProfile: any): void;
|
|
14
|
+
static fetchBuiltInFiles(): string[];
|
|
15
|
+
private static dfsFiles;
|
|
16
|
+
static dispose(): void;
|
|
7
17
|
static buildSdkImportMap(file: ArkFile): void;
|
|
8
18
|
static getImportSdkFile(from: string): ArkFile | undefined;
|
|
9
|
-
static
|
|
19
|
+
static loadGlobalAPI(file: ArkFile, globalMap: Map<string, ArkExport>): void;
|
|
20
|
+
static mergeGlobalAPI(file: ArkFile, globalMap: Map<string, ArkExport>): void;
|
|
21
|
+
static loadAPI(api: ArkExport, globalMap: Map<string, ArkExport>, override?: boolean): void;
|
|
22
|
+
static postInferredSdk(file: ArkFile, globalMap: Map<string, ArkExport>): void;
|
|
10
23
|
private static loadClass;
|
|
11
24
|
private static loadGlobalLocal;
|
|
12
25
|
private static copyMembers;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SdkUtils.d.ts","sourceRoot":"","sources":["../../../src/core/common/SdkUtils.ts"],"names":[],"mappings":"AAeA,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAC3C,OAAO,EAAE,SAAS,EAAc,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"SdkUtils.d.ts","sourceRoot":"","sources":["../../../src/core/common/SdkUtils.ts"],"names":[],"mappings":"AAeA,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAC3C,OAAO,EAAE,SAAS,EAAc,MAAM,oBAAoB,CAAC;AAO3D,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAG/C,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAG/C,OAAO,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AAMnC,qBAAa,QAAQ;IACjB,OAAO,CAAC,MAAM,CAAC,SAAS,CAAoB;IAC5C,OAAO,CAAC,MAAM,CAAC,YAAY,CAGxB;IAEH,OAAO,CAAC,MAAM,CAAC,YAAY,CAAoD;IAC/E,OAAc,aAAa,SAAc;IACzC,OAAO,CAAC,MAAM,CAAC,aAAa,CAAsC;IAClE,OAAc,YAAY,EAAE,GAAG,CAI7B;WAEY,YAAY,CAAC,YAAY,EAAE,GAAG,GAAG,IAAI;WAQrC,iBAAiB,IAAI,MAAM,EAAE;IAY3C,OAAO,CAAC,MAAM,CAAC,QAAQ;WAaT,OAAO,IAAI,IAAI;WAIf,iBAAiB,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI;WAOtC,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,GAAG,SAAS;WAInD,aAAa,CAAC,IAAI,EAAE,OAAO,EAAE,SAAS,EAAE,GAAG,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,IAAI;WAyBrE,cAAc,CAAC,IAAI,EAAE,OAAO,EAAE,SAAS,EAAE,GAAG,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,IAAI;WAetE,OAAO,CAAC,GAAG,EAAE,SAAS,EAAE,SAAS,EAAE,GAAG,CAAC,MAAM,EAAE,SAAS,CAAC,EAAE,QAAQ,GAAE,OAAe,GAAG,IAAI;WAY3F,eAAe,CAAC,IAAI,EAAE,OAAO,EAAE,SAAS,EAAE,GAAG,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,IAAI;IAoBrF,OAAO,CAAC,MAAM,CAAC,SAAS;IAiBxB,OAAO,CAAC,MAAM,CAAC,eAAe;IA0B9B,OAAO,CAAC,MAAM,CAAC,WAAW;WAkBZ,iBAAiB,CAAC,MAAM,EAAE,gBAAgB,EAAE,SAAS,EAAE,SAAS,GAAG,IAAI;CAUxF"}
|
|
@@ -47,15 +47,49 @@ const TSConst_1 = require("./TSConst");
|
|
|
47
47
|
const Const_1 = require("./Const");
|
|
48
48
|
const ArkClass_1 = require("../model/ArkClass");
|
|
49
49
|
const ArkSignature_1 = require("../model/ArkSignature");
|
|
50
|
-
const ModelUtils_1 = require("./ModelUtils");
|
|
51
50
|
const Local_1 = require("../base/Local");
|
|
52
51
|
const path_1 = __importDefault(require("path"));
|
|
53
52
|
const Type_1 = require("../base/Type");
|
|
54
53
|
const ArkNamespace_1 = require("../model/ArkNamespace");
|
|
55
|
-
const TypeInference_1 = require("./TypeInference");
|
|
56
54
|
const logger_1 = __importStar(require("../../utils/logger"));
|
|
55
|
+
const ohos_typescript_1 = __importDefault(require("ohos-typescript"));
|
|
56
|
+
const fs_1 = __importDefault(require("fs"));
|
|
57
57
|
const logger = logger_1.default.getLogger(logger_1.LOG_MODULE_TYPE.ARKANALYZER, 'SdkUtils');
|
|
58
58
|
class SdkUtils {
|
|
59
|
+
static setEsVersion(buildProfile) {
|
|
60
|
+
const accessChain = 'buildOption.arkOptions.tscConfig.targetESVersion';
|
|
61
|
+
const version = accessChain.split('.').reduce((acc, key) => acc === null || acc === void 0 ? void 0 : acc[key], buildProfile);
|
|
62
|
+
if (version && this.esVersionMap.has(version)) {
|
|
63
|
+
this.esVersion = version;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
static fetchBuiltInFiles() {
|
|
67
|
+
var _a;
|
|
68
|
+
const filePath = path_1.default.resolve(this.BUILT_IN_PATH, (_a = this.esVersionMap.get(this.esVersion)) !== null && _a !== void 0 ? _a : '');
|
|
69
|
+
this.BUILT_IN_SDK.path = path_1.default.resolve(this.BUILT_IN_PATH);
|
|
70
|
+
if (!fs_1.default.existsSync(filePath)) {
|
|
71
|
+
logger.error(`built in directory ${filePath} is not exist, please check!`);
|
|
72
|
+
return [];
|
|
73
|
+
}
|
|
74
|
+
const result = new Set();
|
|
75
|
+
this.dfsFiles(filePath, result);
|
|
76
|
+
return Array.from(result);
|
|
77
|
+
}
|
|
78
|
+
static dfsFiles(filePath, files) {
|
|
79
|
+
const sourceFile = ohos_typescript_1.default.createSourceFile(filePath, fs_1.default.readFileSync(filePath, 'utf8'), ohos_typescript_1.default.ScriptTarget.Latest);
|
|
80
|
+
const references = sourceFile.libReferenceDirectives;
|
|
81
|
+
references.forEach(ref => {
|
|
82
|
+
this.dfsFiles(path_1.default.join(path_1.default.dirname(filePath), `lib.${ref.fileName}.d.ts`), files);
|
|
83
|
+
});
|
|
84
|
+
files.add(filePath);
|
|
85
|
+
}
|
|
86
|
+
/*
|
|
87
|
+
* Set static field to be null, then all related objects could be freed by GC.
|
|
88
|
+
* Class SdkUtils is only internally used by ArkAnalyzer type inference, the dispose method should be called at the end of type inference.
|
|
89
|
+
*/
|
|
90
|
+
static dispose() {
|
|
91
|
+
this.sdkImportMap.clear();
|
|
92
|
+
}
|
|
59
93
|
static buildSdkImportMap(file) {
|
|
60
94
|
const fileName = path_1.default.basename(file.getName());
|
|
61
95
|
if (fileName.startsWith('@')) {
|
|
@@ -65,7 +99,7 @@ class SdkUtils {
|
|
|
65
99
|
static getImportSdkFile(from) {
|
|
66
100
|
return this.sdkImportMap.get(from);
|
|
67
101
|
}
|
|
68
|
-
static
|
|
102
|
+
static loadGlobalAPI(file, globalMap) {
|
|
69
103
|
var _a, _b, _c, _d;
|
|
70
104
|
const isGlobalPath = (_a = file
|
|
71
105
|
.getScene()
|
|
@@ -74,46 +108,81 @@ class SdkUtils {
|
|
|
74
108
|
if (!isGlobalPath) {
|
|
75
109
|
return;
|
|
76
110
|
}
|
|
77
|
-
|
|
111
|
+
file.getClasses().forEach(cls => {
|
|
78
112
|
if (!cls.isAnonymousClass() && !cls.isDefaultArkClass()) {
|
|
79
|
-
|
|
113
|
+
this.loadAPI(cls, globalMap);
|
|
80
114
|
}
|
|
81
115
|
if (cls.isDefaultArkClass()) {
|
|
82
116
|
cls.getMethods()
|
|
83
117
|
.filter(mtd => !mtd.isDefaultArkMethod() && !mtd.isAnonymousMethod())
|
|
84
|
-
.forEach(mtd =>
|
|
118
|
+
.forEach(mtd => this.loadAPI(mtd, globalMap));
|
|
85
119
|
}
|
|
86
120
|
});
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
121
|
+
(_d = (_c = (_b = file.getDefaultClass().getDefaultArkMethod()) === null || _b === void 0 ? void 0 : _b.getBody()) === null || _c === void 0 ? void 0 : _c.getAliasTypeMap()) === null || _d === void 0 ? void 0 : _d.forEach(a => this.loadAPI(a[0], globalMap, true));
|
|
122
|
+
file.getNamespaces().forEach(ns => this.loadAPI(ns, globalMap));
|
|
123
|
+
}
|
|
124
|
+
static mergeGlobalAPI(file, globalMap) {
|
|
125
|
+
var _a;
|
|
126
|
+
const isGlobalPath = (_a = file
|
|
127
|
+
.getScene()
|
|
128
|
+
.getOptions()
|
|
129
|
+
.sdkGlobalFolders) === null || _a === void 0 ? void 0 : _a.find(x => file.getFilePath().includes(path_1.default.sep + x + path_1.default.sep));
|
|
130
|
+
if (!isGlobalPath) {
|
|
131
|
+
return;
|
|
132
|
+
}
|
|
133
|
+
file.getClasses().forEach(cls => {
|
|
134
|
+
if (!cls.isAnonymousClass() && !cls.isDefaultArkClass()) {
|
|
135
|
+
this.loadClass(globalMap, cls);
|
|
136
|
+
}
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
static loadAPI(api, globalMap, override = false) {
|
|
140
|
+
const old = globalMap.get(api.getName());
|
|
141
|
+
if (!old) {
|
|
142
|
+
globalMap.set(api.getName(), api);
|
|
143
|
+
}
|
|
144
|
+
else if (override) {
|
|
145
|
+
logger.trace(`${old.getSignature()} is override`);
|
|
146
|
+
globalMap.set(api.getName(), api);
|
|
90
147
|
}
|
|
148
|
+
else {
|
|
149
|
+
logger.trace(`duplicated api: ${api.getSignature()}`);
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
static postInferredSdk(file, globalMap) {
|
|
153
|
+
var _a, _b;
|
|
154
|
+
const isGlobalPath = (_a = file
|
|
155
|
+
.getScene()
|
|
156
|
+
.getOptions()
|
|
157
|
+
.sdkGlobalFolders) === null || _a === void 0 ? void 0 : _a.find(x => file.getFilePath().includes(path_1.default.sep + x + path_1.default.sep));
|
|
158
|
+
if (!isGlobalPath) {
|
|
159
|
+
return;
|
|
160
|
+
}
|
|
161
|
+
const defaultArkMethod = file.getDefaultClass().getDefaultArkMethod();
|
|
91
162
|
(_b = defaultArkMethod === null || defaultArkMethod === void 0 ? void 0 : defaultArkMethod.getBody()) === null || _b === void 0 ? void 0 : _b.getLocals().forEach(local => {
|
|
92
163
|
const name = local.getName();
|
|
93
164
|
if (name !== TSConst_1.THIS_NAME && !name.startsWith(Const_1.TEMP_LOCAL_PREFIX)) {
|
|
94
165
|
this.loadGlobalLocal(local, defaultArkMethod, globalMap);
|
|
95
166
|
}
|
|
96
167
|
});
|
|
97
|
-
(_d = (_c = defaultArkMethod === null || defaultArkMethod === void 0 ? void 0 : defaultArkMethod.getBody()) === null || _c === void 0 ? void 0 : _c.getAliasTypeMap()) === null || _d === void 0 ? void 0 : _d.forEach(a => globalMap.set(a[0].getName(), a[0]));
|
|
98
|
-
ModelUtils_1.ModelUtils.getAllNamespacesInFile(file).forEach(ns => globalMap.set(ns.getName(), ns));
|
|
99
168
|
}
|
|
100
169
|
static loadClass(globalMap, cls) {
|
|
101
170
|
const old = globalMap.get(cls.getName());
|
|
102
|
-
if (
|
|
103
|
-
|
|
171
|
+
if (cls === old) {
|
|
172
|
+
return;
|
|
173
|
+
}
|
|
174
|
+
else if (old instanceof ArkClass_1.ArkClass && old.getDeclaringArkFile().getProjectName() === cls.getDeclaringArkFile().getProjectName()) {
|
|
175
|
+
if (old.getCategory() === ArkClass_1.ClassCategory.CLASS || old.getCategory() === ArkClass_1.ClassCategory.INTERFACE) {
|
|
104
176
|
this.copyMembers(cls, old);
|
|
105
177
|
}
|
|
106
178
|
else {
|
|
107
179
|
this.copyMembers(old, cls);
|
|
108
180
|
globalMap.delete(cls.getName());
|
|
109
|
-
|
|
181
|
+
this.loadAPI(cls, globalMap, true);
|
|
110
182
|
}
|
|
111
183
|
}
|
|
112
184
|
else {
|
|
113
|
-
|
|
114
|
-
logger.error(`${old.getSignature()} is override`);
|
|
115
|
-
}
|
|
116
|
-
globalMap.set(cls.getName(), cls);
|
|
185
|
+
this.loadAPI(cls, globalMap, true);
|
|
117
186
|
}
|
|
118
187
|
}
|
|
119
188
|
static loadGlobalLocal(local, defaultArkMethod, globalMap) {
|
|
@@ -130,14 +199,17 @@ class SdkUtils {
|
|
|
130
199
|
}
|
|
131
200
|
}
|
|
132
201
|
const old = globalMap.get(name);
|
|
133
|
-
if (
|
|
134
|
-
globalMap.
|
|
135
|
-
|
|
136
|
-
else if (old instanceof ArkClass_1.ArkClass && local.getType() instanceof Type_1.ClassType) {
|
|
137
|
-
const localConstructor = scene.getClass(local.getType().getClassSignature());
|
|
138
|
-
if (localConstructor) {
|
|
202
|
+
if (old instanceof ArkClass_1.ArkClass && local.getType() instanceof Type_1.ClassType) {
|
|
203
|
+
const localConstructor = globalMap.get(local.getType().getClassSignature().getClassName());
|
|
204
|
+
if (localConstructor instanceof ArkClass_1.ArkClass) {
|
|
139
205
|
this.copyMembers(localConstructor, old);
|
|
140
206
|
}
|
|
207
|
+
else {
|
|
208
|
+
this.loadAPI(local, globalMap, true);
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
else {
|
|
212
|
+
this.loadAPI(local, globalMap, true);
|
|
141
213
|
}
|
|
142
214
|
}
|
|
143
215
|
static copyMembers(from, to) {
|
|
@@ -171,4 +243,16 @@ class SdkUtils {
|
|
|
171
243
|
}
|
|
172
244
|
}
|
|
173
245
|
exports.SdkUtils = SdkUtils;
|
|
246
|
+
SdkUtils.esVersion = 'ES2017';
|
|
247
|
+
SdkUtils.esVersionMap = new Map([
|
|
248
|
+
['ES2017', 'lib.es2020.d.ts'],
|
|
249
|
+
['ES2021', 'lib.es2021.d.ts']
|
|
250
|
+
]);
|
|
174
251
|
SdkUtils.sdkImportMap = new Map();
|
|
252
|
+
SdkUtils.BUILT_IN_NAME = 'built-in';
|
|
253
|
+
SdkUtils.BUILT_IN_PATH = 'node_modules/ohos-typescript/lib';
|
|
254
|
+
SdkUtils.BUILT_IN_SDK = {
|
|
255
|
+
moduleName: '',
|
|
256
|
+
name: `${SdkUtils.BUILT_IN_NAME}`,
|
|
257
|
+
path: ''
|
|
258
|
+
};
|
|
@@ -51,7 +51,7 @@ export declare class TypeInference {
|
|
|
51
51
|
private static resolveLeftOp;
|
|
52
52
|
private static setValueType;
|
|
53
53
|
static isUnclearType(type: Type | null | undefined): boolean;
|
|
54
|
-
|
|
54
|
+
static checkType(type: Type, check: (t: Type) => boolean, visited?: Set<Type>): boolean;
|
|
55
55
|
static inferSimpleTypeInStmt(stmt: Stmt): void;
|
|
56
56
|
static buildTypeFromStr(typeStr: string): Type;
|
|
57
57
|
static inferValueType(value: Value, arkMethod: ArkMethod): Type | null;
|
|
@@ -99,6 +99,7 @@ export declare class TypeInference {
|
|
|
99
99
|
*/
|
|
100
100
|
static inferBaseType(baseName: string, arkClass: ArkClass): Type | null;
|
|
101
101
|
static inferTypeByName(typeName: string, arkClass: ArkClass): Type | null;
|
|
102
|
+
static getTypeByGlobalName(globalName: string, arkMethod: ArkMethod): Type | null;
|
|
102
103
|
static inferRealGenericTypes(realTypes: Type[] | undefined, arkClass: ArkClass): void;
|
|
103
104
|
static inferDynamicImportType(from: string, arkClass: ArkClass): Type | null;
|
|
104
105
|
static replaceTypeWithReal(type: Type, realTypes?: Type[], visited?: Set<Type>): Type;
|
|
@@ -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,EASH,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,EAAiB,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,KAAK,EAAE,MAAM,eA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Q,GAAG,IAAI,GAAG,IAAI;WAsBhE,eAAe,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,GAAG,IAAI,GAAG,IAAI;WAelE,mBAAmB,CAAC,UAAU,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,GAAG,IAAI,GAAG,IAAI;WAK1E,qBAAqB,CAAC,SAAS,EAAE,IAAI,EAAE,GAAG,SAAS,EAAE,QAAQ,EAAE,QAAQ,GAAG,IAAI;WAe9E,sBAAsB,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,GAAG,IAAI,GAAG,IAAI;WASrE,mBAAmB,CAAC,IAAI,EAAE,IAAI,EAAE,SAAS,CAAC,EAAE,IAAI,EAAE,EAAE,OAAO,GAAE,GAAG,CAAC,IAAI,CAAa,GAAG,IAAI;WAgBzF,oBAAoB,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,CAAC,IAAI,CAAC,EAAE,SAAS,CAAC,EAAE,IAAI,EAAE,GAAG,IAAI;WAkC9E,gBAAgB,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI;WAQlC,iBAAiB,CAAC,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,kBAAkB,GAAG,SAAS,EAAE,SAAS,EAAE,IAAI,EAAE,GAAG,SAAS,GAAG,IAAI;IA4B9I,OAAO,CAAC,MAAM,CAAC,oBAAoB;CAYtC"}
|
|
@@ -395,11 +395,11 @@ class TypeInference {
|
|
|
395
395
|
return true;
|
|
396
396
|
}
|
|
397
397
|
else if (type instanceof Type_1.UnionType || type instanceof Type_1.IntersectionType || type instanceof Type_1.TupleType) {
|
|
398
|
-
return !!type.getTypes().find(t => this.
|
|
398
|
+
return !!type.getTypes().find(t => this.checkType(t, e => e instanceof Type_1.UnclearReferenceType));
|
|
399
399
|
}
|
|
400
400
|
else if (type instanceof Type_1.ArrayType) {
|
|
401
401
|
const baseType = type.getBaseType();
|
|
402
|
-
return this.
|
|
402
|
+
return this.checkType(baseType, t => t instanceof Type_1.UnclearReferenceType) || baseType instanceof Type_1.GenericType;
|
|
403
403
|
}
|
|
404
404
|
else if (type instanceof Type_1.AliasType) {
|
|
405
405
|
return this.isUnclearType(type.getOriginalType());
|
|
@@ -412,31 +412,35 @@ class TypeInference {
|
|
|
412
412
|
}
|
|
413
413
|
return false;
|
|
414
414
|
}
|
|
415
|
-
// This is the temporal function to check
|
|
416
|
-
static
|
|
415
|
+
// This is the temporal function to check Type recursively and can be removed after typeInfer supports multiple candidate types.
|
|
416
|
+
static checkType(type, check, visited = new Set()) {
|
|
417
|
+
var _a;
|
|
417
418
|
if (visited.has(type)) {
|
|
418
419
|
return false;
|
|
419
420
|
}
|
|
420
421
|
else {
|
|
421
422
|
visited.add(type);
|
|
422
423
|
}
|
|
423
|
-
if (type
|
|
424
|
+
if (check(type)) {
|
|
424
425
|
return true;
|
|
425
426
|
}
|
|
427
|
+
else if (type instanceof Type_1.ClassType) {
|
|
428
|
+
return !!((_a = type.getRealGenericTypes()) === null || _a === void 0 ? void 0 : _a.find(t => this.checkType(t, check, visited)));
|
|
429
|
+
}
|
|
426
430
|
else if (type instanceof Type_1.UnionType || type instanceof Type_1.IntersectionType || type instanceof Type_1.TupleType) {
|
|
427
|
-
return !!type.getTypes().find(t => this.
|
|
431
|
+
return !!type.getTypes().find(t => this.checkType(t, check, visited));
|
|
428
432
|
}
|
|
429
433
|
else if (type instanceof Type_1.ArrayType) {
|
|
430
|
-
return this.
|
|
434
|
+
return this.checkType(type.getBaseType(), check, visited);
|
|
431
435
|
}
|
|
432
436
|
else if (type instanceof Type_1.AliasType) {
|
|
433
|
-
return this.
|
|
437
|
+
return this.checkType(type.getOriginalType(), check, visited);
|
|
434
438
|
}
|
|
435
439
|
else if (type instanceof TypeExpr_1.KeyofTypeExpr) {
|
|
436
|
-
return this.
|
|
440
|
+
return this.checkType(type.getOpType(), check, visited);
|
|
437
441
|
}
|
|
438
442
|
else if (type instanceof TypeExpr_1.TypeQueryExpr) {
|
|
439
|
-
return this.
|
|
443
|
+
return this.checkType(type.getType(), check, visited);
|
|
440
444
|
}
|
|
441
445
|
return false;
|
|
442
446
|
}
|
|
@@ -698,7 +702,8 @@ class TypeInference {
|
|
|
698
702
|
if (property instanceof ArkField_1.ArkField) {
|
|
699
703
|
if (arkClass.getCategory() === ArkClass_1.ClassCategory.ENUM) {
|
|
700
704
|
let constant;
|
|
701
|
-
const
|
|
705
|
+
const propertyInitializer = property.getInitializer();
|
|
706
|
+
const lastStmt = propertyInitializer[propertyInitializer.length - 1];
|
|
702
707
|
if (lastStmt instanceof Stmt_1.ArkAssignStmt && lastStmt.getRightOp() instanceof Constant_1.Constant) {
|
|
703
708
|
constant = lastStmt.getRightOp();
|
|
704
709
|
}
|
|
@@ -758,6 +763,10 @@ class TypeInference {
|
|
|
758
763
|
}
|
|
759
764
|
return null;
|
|
760
765
|
}
|
|
766
|
+
static getTypeByGlobalName(globalName, arkMethod) {
|
|
767
|
+
const arkExport = arkMethod.getDeclaringArkFile().getScene().getSdkGlobal(globalName);
|
|
768
|
+
return this.parseArkExport2Type(arkExport);
|
|
769
|
+
}
|
|
761
770
|
static inferRealGenericTypes(realTypes, arkClass) {
|
|
762
771
|
if (!realTypes) {
|
|
763
772
|
return;
|
|
@@ -881,7 +890,7 @@ class TypeInference {
|
|
|
881
890
|
}
|
|
882
891
|
let returnType = arkMethod.getSignature().getType();
|
|
883
892
|
if (returnType instanceof Type_1.ClassType && returnType.getClassSignature().getClassName() === TSConst_1.PROMISE) {
|
|
884
|
-
returnType = (_a = returnType.getRealGenericTypes()) === null || _a === void 0 ? void 0 : _a
|
|
893
|
+
returnType = (_a = returnType.getRealGenericTypes()) === null || _a === void 0 ? void 0 : _a[0];
|
|
885
894
|
}
|
|
886
895
|
if (returnType) {
|
|
887
896
|
IRInference_1.IRInference.inferRightWithSdkType(returnType, stmt.getOp().getType(), arkMethod.getDeclaringArkClass());
|
|
@@ -3,6 +3,7 @@ export declare const EMPTY_STRING = "";
|
|
|
3
3
|
export declare class ValueUtil {
|
|
4
4
|
private static readonly NumberConstantCache;
|
|
5
5
|
static readonly EMPTY_STRING_CONSTANT: StringConstant;
|
|
6
|
+
static dispose(): void;
|
|
6
7
|
static getOrCreateNumberConst(n: number): Constant;
|
|
7
8
|
static createBigIntConst(bigInt: bigint): BigIntConstant;
|
|
8
9
|
static createStringConst(str: string): Constant;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ValueUtil.d.ts","sourceRoot":"","sources":["../../../src/core/common/ValueUtil.ts"],"names":[],"mappings":"AAeA,OAAO,EAAE,cAAc,EAAmB,QAAQ,EAAgC,cAAc,EAAqB,MAAM,kBAAkB,CAAC;AAE9I,eAAO,MAAM,YAAY,KAAK,CAAC;AAE/B,qBAAa,SAAS;IAClB,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,mBAAmB,CAAoC;IAC/E,gBAAuB,qBAAqB,iBAAoC;
|
|
1
|
+
{"version":3,"file":"ValueUtil.d.ts","sourceRoot":"","sources":["../../../src/core/common/ValueUtil.ts"],"names":[],"mappings":"AAeA,OAAO,EAAE,cAAc,EAAmB,QAAQ,EAAgC,cAAc,EAAqB,MAAM,kBAAkB,CAAC;AAE9I,eAAO,MAAM,YAAY,KAAK,CAAC;AAE/B,qBAAa,SAAS;IAClB,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,mBAAmB,CAAoC;IAC/E,gBAAuB,qBAAqB,iBAAoC;WAMlE,OAAO,IAAI,IAAI;WAIf,sBAAsB,CAAC,CAAC,EAAE,MAAM,GAAG,QAAQ;WAS3C,iBAAiB,CAAC,MAAM,EAAE,MAAM,GAAG,cAAc;WAIjD,iBAAiB,CAAC,GAAG,EAAE,MAAM,GAAG,QAAQ;WAOxC,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,QAAQ;WAQlC,iBAAiB,IAAI,QAAQ;WAI7B,eAAe,IAAI,QAAQ;WAI3B,kBAAkB,CAAC,KAAK,EAAE,OAAO,GAAG,QAAQ;CAG7D"}
|