/developtools/ace_ets2bundle/compiler/src/fast_build/ark_compiler/ |
D | process_mock.ts | 16 import ts from 'typescript'; 20 export function disableMockDecorator(node: ts.Decorator): boolean { 25 let parent: ts.Node = node.parent; 27 case ts.SyntaxKind.Parameter: { 28 ts.factory.updateParameterDeclaration(<ts.ParameterDeclaration>parent, 29 ts.getModifiers((<ts.ParameterDeclaration>parent)), 30 (<ts.ParameterDeclaration>parent).dotDotDotToken, 31 (<ts.ParameterDeclaration>parent).name, 32 (<ts.ParameterDeclaration>parent).questionToken, 33 (<ts.ParameterDeclaration>parent).type, [all …]
|
/developtools/ace_ets2bundle/compiler/src/ |
D | process_component_class.ts | 16 import ts from 'typescript'; 149 export function processComponentClass(node: ts.StructDeclaration, context: ts.TransformationContext, 150 log: LogInfo[], program: ts.Program): ts.ClassDeclaration { 151 const decoratorNode: readonly ts.Decorator[] = ts.getAllDecorators(node); constant 152 const memberNode: ts.ClassElement[] = 154 return ts.factory.createClassDeclaration(ts.getModifiers(node), node.name, 158 function checkPreview(node: ts.StructDeclaration): boolean { 160 const decorators: readonly ts.Decorator[] = ts.getAllDecorators(node); constant 177 componentFreezeParam: ts.Expression; 179 function processMembers(members: ts.NodeArray<ts.ClassElement>, parentComponentName: ts.Identifier, [all …]
|
D | process_component_constructor.ts | 16 import ts from 'typescript'; 39 export function getInitConstructor(members: ts.NodeArray<ts.Node>, parentComponentName: ts.Identifi… 40 ): ts.ConstructorDeclaration { 42 return ts.isConstructorDeclaration(item); 50 export function updateConstructor(ctorNode: ts.ConstructorDeclaration, para: ts.ParameterDeclaratio… 51 …addStatements: ts.Statement[], decoratorComponentParent: ts.IfStatement[], isSuper: boolean = fals… 52 isAdd: boolean = false, parentComponentName?: ts.Identifier): ts.ConstructorDeclaration { 53 let modifyPara: ts.ParameterDeclaration[]; 60 let modifyBody: ts.Statement[]; 75 let ctorPara: ts.ParameterDeclaration[] | ts.NodeArray<ts.ParameterDeclaration> = [all …]
|
D | process_component_build.ts | 16 import ts from 'typescript'; 193 export function processComponentBuild(node: ts.MethodDeclaration, 194 log: LogInfo[]): ts.MethodDeclaration { 195 let newNode: ts.MethodDeclaration; 196 let renderNode: ts.Identifier; 198 renderNode = ts.factory.createIdentifier(COMPONENT_RENDER_FUNCTION); 200 renderNode = ts.factory.createIdentifier(COMPONENT_INITIAL_RENDER_FUNCTION); 204 newNode = ts.factory.updateMethodDeclaration(node, ts.getModifiers(node), 208 newNode = ts.factory.updateMethodDeclaration(node, ts.getModifiers(node), 215 function createLazyForEachBlockNode(newStatements: ts.Statement[]): ts.IfStatement { [all …]
|
D | process_custom_component.ts | 16 import ts from 'typescript'; 122 export function processCustomComponent(node: ts.ExpressionStatement, newStatements: ts.Statement[], 124 idName: ts.Expression = undefined, builderParamsResult: BuilderParamsResult = null): void { 132 const componentNode: ts.CallExpression = getCustomComponentNode(node); 136 ts.isPropertyAccessExpression(componentNode.parent); 138 let customComponentNewExpression: ts.NewExpression = createCustomComponentNewExpression( 140 let argumentsArray: ts.PropertyAssignment[]; 145 argumentsArray.forEach((item: ts.PropertyAssignment, index: number) => { 148 const propertyAssignmentNode: ts.PropertyAssignment = ts.factory.updatePropertyAssignment( 149 item, item.name, changeNodeFromCallToArrow(item.initializer as ts.CallExpression)); [all …]
|
D | process_component_member.ts | 16 import ts from 'typescript'; 152 export const simpleTypes: Set<ts.SyntaxKind> = new Set([ts.SyntaxKind.StringKeyword, 153 ts.SyntaxKind.NumberKeyword, ts.SyntaxKind.BooleanKeyword, ts.SyntaxKind.EnumDeclaration]); 162 private properity: ts.PropertyDeclaration; 163 private ctor: ts.ConstructorDeclaration; 164 private variableGet: ts.GetAccessorDeclaration; 165 private variableSet: ts.SetAccessorDeclaration; 166 private updateParams: ts.Statement; 168 private controllerSet: ts.MethodDeclaration; 169 private purgeVariableDepStatement: ts.Statement; [all …]
|
D | process_struct_componentV2.ts | 16 import ts from 'typescript'; 49 initializer: ts.Expression; 67 propertiesMap: Map<string, ts.Expression> = new Map(); 86 function getAliasStructInfo(node: ts.CallExpression): StructInfo { 94 function processStructComponentV2(node: ts.StructDeclaration, log: LogInfo[], 95 context: ts.TransformationContext): ts.ClassDeclaration { 96 return ts.factory.createClassDeclaration(ts.getModifiers(node), node.name, 101 function processStructMembersV2(node: ts.StructDeclaration, context: ts.TransformationContext, 102 log: LogInfo[]): ts.ClassElement[] { 104 const newMembers: ts.ClassElement[] = []; [all …]
|
D | process_ui_syntax.ts | 16 import ts from 'typescript'; 156 export let contextGlobal: ts.TransformationContext; 160 export function processUISyntax(program: ts.Program, ut = false, 162 let entryNodeKey: ts.Expression; 164 return (context: ts.TransformationContext) => { 168 return (node: ts.SourceFile) => { 182 node = ts.visitEachChild(node, processResourceNode, context); 185 … const processedNode: ts.SourceFile = ts.getTypeExportImportAndConstEnumTransformer(context)(node); 189 return ts.visitEachChild(node, visitor, context); 192 node = ts.visitEachChild(node, processAllNodes, context); [all …]
|
D | process_kit_import.ts | 16 import * as ts from 'typescript'; 56 return (context: ts.TransformationContext) => { 57 const visitor: ts.Visitor = node => { 59 if (ts.isImportDeclaration(node) || (ts.isExportDeclaration(node) && node.moduleSpecifier)) { 60 … const moduleRequest: string = (node.moduleSpecifier as ts.StringLiteral).text.replace(/'|"/g, ''); 80 return (node: ts.SourceFile) => { 92 if (ts.hasTsNoCheckOrTsIgnoreFlag(node) && !hasKeepTs) { 95 return ts.visitEachChild(node, visitor, context); // this node used for [writeFile] 98 const processedNode: ts.SourceFile = 99 … ts.visitEachChild(ts.getTypeExportImportAndConstEnumTransformer(context)(node), visitor, context); [all …]
|
D | create_ast_node_utils.ts | 16 import ts from 'typescript'; 23 function createParameterDeclaration(name: string): ts.ParameterDeclaration { 24 let initializer: ts.Expression; 26 initializer = ts.factory.createPrefixUnaryExpression( 27 ts.SyntaxKind.MinusToken, ts.factory.createNumericLiteral('1')); 29 return ts.factory.createParameterDeclaration(undefined, undefined, 30 ts.factory.createIdentifier(name), undefined, undefined, initializer); 33 function createFinalizeConstruction(): ts.Statement { 34 return ts.factory.createExpressionStatement(ts.factory.createCallExpression( 35 ts.factory.createPropertyAccessExpression( [all …]
|
D | validate_ui_syntax.ts | 16 import ts from 'typescript'; 105 localStorageNode: ts.Identifier | ts.ObjectLiteralExpression = null; 106 localSharedStorage: ts.Node = null; 171 fileQuery: string, sourceFile: ts.SourceFile = null): LogInfo[] { 194 fileQuery: string, sourceFile: ts.SourceFile | null): LogInfo[] | null { 197 …sourceFile = ts.createSourceFile(filePath, source, ts.ScriptTarget.Latest, true, ts.ScriptKind.ETS… 209 if (ts.isEnumDeclaration(item) && item.name) { 212 if (ts.isStructDeclaration(item)) { 215 if (ts.isMissingDeclaration(item)) { 216 const decorators = ts.getAllDecorators(item); [all …]
|
D | ets_checker.ts | 18 import * as ts from 'typescript'; 99 service?: ts.LanguageService; 101 targetESVersion?: ts.ScriptTarget; 104 export const SOURCE_FILES: Map<string, ts.SourceFile> = new Map(); 118 const buildInfoWriteFile: ts.WriteFileCallback = (fileName: string, data: string) => { 128 export const compilerOptions: ts.CompilerOptions = ts.readConfigFile( 129 path.resolve(__dirname, '../tsconfig.json'), ts.sys.readFile).config.compilerOptions; 155 'importsNotUsedAsValues': ts.ImportsNotUsedAsValues.Preserve, 156 'module': ts.ModuleKind.CommonJS, 157 'moduleResolution': ts.ModuleResolutionKind.NodeJs, [all …]
|
D | do_arkTS_linter.ts | 18 import * as ts from 'typescript'; 45 messageText: string | ts.DiagnosticMessageChain; 59 export type ProcessDiagnosticsFunc = (diagnostics: ts.Diagnostic) => void; 66 …builderProgram: ts.BuilderProgram, printDiagnostic: ProcessDiagnosticsFunc, shouldWriteFile: boole… 67 buildInfoWriteFile?: ts.WriteFileCallback): ts.Diagnostic[] { 72 let diagnostics: ts.Diagnostic[] = []; 75 …diagnostics = ts.ArkTSLinter_1_0.runArkTSLinter(builderProgram, /*srcFile*/ undefined, buildInfoWr… 78 …diagnostics = ts.ArkTSLinter_1_1.runArkTSLinter(builderProgram, /*srcFile*/ undefined, buildInfoWr… 96 function processArkTSLinterReportAsError(diagnostics: ts.Diagnostic[], printDiagnostic: ProcessDiag… 97 diagnostics.forEach((diagnostic: ts.Diagnostic) => { [all …]
|
D | process_module_files.ts | 17 import ts from 'typescript'; 43 export async function writeFileSyncByNode(node: ts.SourceFile, projectConfig: Object, moduleId?: st… 47 …const mixedInfo: { content: string, sourceMapJson: ts.RawSourceMap } = genContentAndSourceMapInfo(… 86 function genContentAndSourceMapInfo(node: ts.SourceFile, moduleId: string | undefined, projectConfi… 87 const printer: ts.Printer = ts.createPrinter({ newLine: ts.NewLineKind.LineFeed }); 88 const options: ts.CompilerOptions = { 99 const host: ts.CompilerHost = ts.createCompilerHost(options); 102 const sourceMapGenerator: ts.SourceMapGenerator = ts.createSourceMapGenerator( 105 ts.getBaseFileName(fileName), 111 const writer: ts.EmitTextWriter = ts.createTextWriter( [all …]
|
D | process_import.ts | 16 import ts from 'typescript'; 91 const IMPORT_FILE_ASTCACHE: Map<string, ts.SourceFile> = 94 export default function processImport(node: ts.ImportDeclaration | ts.ImportEqualsDeclaration | 95 ts.ExportDeclaration, pagesDir: string, log: LogInfo[], asName: Map<string, string> = new Map(), 99 if (ts.isImportDeclaration(node) || ts.isExportDeclaration(node)) { 101 if (ts.isImportDeclaration(node) && node.importClause && node.importClause.name && 102 ts.isIdentifier(node.importClause.name)) { 108 if (ts.isImportDeclaration(node) && node.importClause && node.importClause.namedBindings && 109 ts.isNamedImports(node.importClause.namedBindings) && 113 if (item.name && ts.isIdentifier(item.name)) { [all …]
|
/developtools/smartperf_host/trace_streamer/test/unittest/query/ |
D | query_metrics_test.cpp | 42 void ParseTraceFile(TraceStreamerSelector &ts) in ParseTraceFile() argument 55 if (!ts.ParseTraceDataSegment(std::move(buf), rsize, 0, 1)) { in ParseTraceFile() 60 ts.WaitForParserEnd(); in ParseTraceFile() 63 void ExecuteMetricsTest(TraceStreamerSelector &ts, std::string metricName) in ExecuteMetricsTest() argument 65 ts.EnableMetaTable(false); in ExecuteMetricsTest() 66 ts.SetCleanMode(false); in ExecuteMetricsTest() 67 ParseTraceFile(ts); in ExecuteMetricsTest() 68 bool result = ts.ParserAndPrintMetrics(metricName); in ExecuteMetricsTest() 80 TraceStreamerSelector ts; variable 81 ExecuteMetricsTest(ts, TRACE_MEM); [all …]
|
D | query_file_test.cpp | 47 TraceStreamerSelector ts; variable 48 ts.EnableMetaTable(false); 49 ts.SetCleanMode(false); 50 EXPECT_EQ(ts.ReadSqlFileAndPrintResult(sqlOperatorFilePath), true); 63 TraceStreamerSelector ts; variable 64 ts.EnableMetaTable(false); 65 ts.SetCleanMode(false); 66 EXPECT_EQ(ts.ReadSqlFileAndPrintResult(sqlOperatorFilePath), true); 79 TraceStreamerSelector ts; variable 80 ts.EnableMetaTable(false); [all …]
|
/developtools/ace_ets2bundle/compiler/ |
D | build_declarations_file.js | 16 const ts = require('typescript'); constant 111 …let sourceFile = ts.createSourceFile(fileName, content, ts.ScriptTarget.Latest, true, ts.ScriptKin… 116 if (!ts.isImportDeclaration(node)) { 117 let modifiers = ts.canHaveModifiers(node) ? ts.getModifiers(node) : undefined; 118 if (modifiers && modifiers.length && modifiers[0].kind === ts.SyntaxKind.ExportKeyword) { 125 … const declarationNode = ts.factory.updateVariableDeclaration(node.declarationList.declarations[0], 126 … ts.factory.createIdentifier(type), node.declarationList.declarations[0].exclamationToken, 128 …node.declarationList = ts.factory.updateVariableDeclarationList(node.declarationList, [declaration… 140 sourceFile = ts.factory.updateSourceFile(sourceFile, newStatements); 141 const printer = ts.createPrinter({ removeComments: false, newLine: ts.NewLineKind.LineFeed }); [all …]
|
/developtools/smartperf_host/ide/test/trace/component/trace/sheet/energy/ |
D | TabPaneSystemDetails.test.ts | 49 ts: 0, 55 ts: 1005938319, 61 ts: 3005938319, 67 ts: 3005938319, 73 ts: 5005938319, 79 ts: 5005938319, 90 ts: 1005938319, 96 ts: 1005938319, 102 ts: 3005933657, 108 ts: 3005933657, [all …]
|
/developtools/ace_ets2bundle/compiler/test/ark_compiler_ut/common/ |
D | process_kit_import.test.ts | 18 import * as ts from 'typescript'; 110 const compilerOptions = ts.readConfigFile( 111 path.resolve(__dirname, '../../../tsconfig.json'), ts.sys.readFile).config.compilerOptions; 118 const result: ts.TranspileOutput = ts.transpileModule(KIT_IMPORT_CODE, { 127 const result: ts.TranspileOutput = ts.transpileModule(KIT_EXPORT_CODE, { 136 const result: ts.TranspileOutput = ts.transpileModule(KIT_STAR_EXPORT_CODE, { 145 const result: ts.TranspileOutput = ts.transpileModule(KIT_UNUSED_TYPE_IMPROT_CODE, { 154 const result: ts.TranspileOutput = ts.transpileModule(KIT_USED_TYPE_IMPROT_CODE, { 163 const result: ts.TranspileOutput = ts.transpileModule(KIT_UNUSED_VALUE_IMPORT_CODE, { 172 const result: ts.TranspileOutput = ts.transpileModule(KIT_USED_VALUE_IMPORT_CODE, { [all …]
|
/developtools/profiler/device/services/ipc/src/ |
D | service_entry.cpp | 62 struct timespec ts; in GetTimeMS() local 63 clock_gettime(CLOCK_BOOTTIME, &ts); in GetTimeMS() 64 return ts.tv_sec * MS_PER_S + ts.tv_nsec / NS_PER_MS; in GetTimeMS() 69 struct timespec ts; in GetTimeUS() local 70 clock_gettime(CLOCK_BOOTTIME, &ts); in GetTimeUS() 71 return ts.tv_sec * US_PER_S + ts.tv_nsec / NS_PER_US; in GetTimeUS() 76 struct timespec ts; in GetTimeNS() local 77 clock_gettime(CLOCK_BOOTTIME, &ts); in GetTimeNS() 78 return ts.tv_sec * NS_PER_S + ts.tv_nsec; in GetTimeNS()
|
/developtools/profiler/device/services/ipc/test/unittest/ |
D | service_entry_test.cpp | 69 struct timespec ts; variable 70 clock_gettime(CLOCK_BOOTTIME, &ts); 71 long t1 = ts.tv_sec * MS_PER_S + ts.tv_nsec / NS_PER_MS; 84 struct timespec ts; variable 85 clock_gettime(CLOCK_BOOTTIME, &ts); 86 long t1= ts.tv_sec * US_PER_S + ts.tv_nsec / NS_PER_US; 99 struct timespec ts; variable 100 clock_gettime(CLOCK_BOOTTIME, &ts); 101 long t1 = ts.tv_sec * NS_PER_S + ts.tv_nsec;
|
/developtools/ace_ets2bundle/compiler/src/fast_build/system_api/ |
D | api_check_utils.ts | 16 import ts from 'typescript'; 86 (jsDocTag: ts.JSDocTag, config: ts.JsDocNodeCheckConfigItem): boolean; 90 (jsDocTags: readonly ts.JSDocTag[], config: ts.JsDocNodeCheckConfigItem): boolean; 212 export function checkTypeReference(node: ts.TypeReferenceNode, transformLog: FileLog): void { 216 const checker: ts.TypeChecker = globalProgram.checker; 220 const type: ts.Type = checker.getTypeAtLocation(node); 221 let sourceFile: ts.SourceFile | undefined; 223 sourceFile = ts.getSourceFileOfNode(type.aliasSymbol.declarations[0]); 225 sourceFile = ts.getSourceFileOfNode(type.symbol.declarations[0]); 264 type: ts.DiagnosticCategory, specifyCheckConditionFuncName: string, [all …]
|
/developtools/smartperf_host/ide/src/trace/database/sql/ |
D | SqlLite.sql.ts | 105 export const queryAllSoInitNames = (): //@ts-ignore 114 export const queryAllSrcSlices = (): //@ts-ignore 204 ): //@ts-ignore 215 ts: string; 315 export const queryNetWorkMaxData = (): //@ts-ignore 327 export const queryDiskIoMaxData = (): //@ts-ignore 338 export const queryStartTime = (): //@ts-ignore 342 ): //@ts-ignore 358 ts: number 359 ): //@ts-ignore [all …]
|
D | Memory.sql.ts | 138 export const queryNativeMemoryRealTime = (): //@ts-ignore 146 export const queryJsMemoryData = (): //@ts-ignore 151 ): //@ts-ignore 170 ): //@ts-ignore 200 ): //@ts-ignore 236 export const queryVirtualMemory = (): //@ts-ignore 241 ): //@ts-ignore 315 ts: string; 344 ): //@ts-ignore 359 ): //@ts-ignore [all …]
|