/developtools/ace_ets2bundle/compiler/src/ |
D | process_component_class.ts | 16 import ts from 'typescript'; 139 export function processComponentClass(node: ts.StructDeclaration, context: ts.TransformationContext, 140 log: LogInfo[], program: ts.Program): ts.ClassDeclaration { 141 const memberNode: ts.ClassElement[] = 143 return ts.factory.createClassDeclaration(undefined, node.modifiers, node.name, 147 function checkPreview(node: ts.ClassDeclaration) { 165 function processMembers(members: ts.NodeArray<ts.ClassElement>, parentComponentName: ts.Identifier, 166 …context: ts.TransformationContext, log: LogInfo[], program: ts.Program, hasPreview: boolean): ts.C… 169 const newMembers: ts.ClassElement[] = []; 170 const watchMap: Map<string, ts.Node> = new Map(); [all …]
|
D | process_component_constructor.ts | 16 import ts from 'typescript'; 38 export function getInitConstructor(members: ts.NodeArray<ts.Node>, parentComponentName: ts.Identifi… 39 ): ts.ConstructorDeclaration { 41 return ts.isConstructorDeclaration(item); 49 export function updateConstructor(ctorNode: ts.ConstructorDeclaration, para: ts.ParameterDeclaratio… 50 addStatements: ts.Statement[], isSuper: boolean = false, isAdd: boolean = false, 51 parentComponentName?: ts.Identifier): ts.ConstructorDeclaration { 52 let modifyPara: ts.ParameterDeclaration[]; 59 let modifyBody: ts.Statement[]; 71 let ctorPara: ts.ParameterDeclaration[] | ts.NodeArray<ts.ParameterDeclaration> = [all …]
|
D | process_custom_component.ts | 16 import ts from 'typescript'; 115 export function processCustomComponent(node: ts.ExpressionStatement, newStatements: ts.Statement[], 117 idName: ts.Expression = undefined): void { 125 const componentNode: ts.CallExpression = getCustomComponentNode(node); 129 ts.isPropertyAccessExpression(componentNode.parent); 131 let customComponentNewExpression: ts.NewExpression = createCustomComponentNewExpression( 133 let argumentsArray: ts.PropertyAssignment[]; 138 argumentsArray.forEach((item: ts.PropertyAssignment, index: number) => { 141 const propertyAssignmentNode: ts.PropertyAssignment = ts.factory.updatePropertyAssignment( 142 item, item.name, changeNodeFromCallToArrow(item.initializer as ts.CallExpression)); [all …]
|
D | process_component_build.ts | 16 import ts from 'typescript'; 171 export function processComponentBuild(node: ts.MethodDeclaration, 172 log: LogInfo[]): ts.MethodDeclaration { 173 let newNode: ts.MethodDeclaration; 174 let renderNode: ts.Identifier; 176 renderNode = ts.factory.createIdentifier(COMPONENT_RENDER_FUNCTION); 178 renderNode = ts.factory.createIdentifier(COMPONENT_INITIAl_RENDER_FUNCTION); 182 newNode = ts.factory.updateMethodDeclaration(node, node.decorators, node.modifiers, 186 newNode = ts.factory.updateMethodDeclaration(node, node.decorators, node.modifiers, 193 export function processComponentBlock(node: ts.Block, isLazy: boolean, log: LogInfo[], [all …]
|
D | process_component_member.ts | 16 import ts from 'typescript'; 146 export const simpleTypes: Set<ts.SyntaxKind> = new Set([ts.SyntaxKind.StringKeyword, 147 ts.SyntaxKind.NumberKeyword, ts.SyntaxKind.BooleanKeyword, ts.SyntaxKind.EnumDeclaration]); 156 private properity: ts.PropertyDeclaration; 157 private ctor: ts.ConstructorDeclaration; 158 private variableGet: ts.GetAccessorDeclaration; 159 private variableSet: ts.SetAccessorDeclaration; 160 private updateParams: ts.Statement; 162 private controllerSet: ts.MethodDeclaration; 163 private purgeVariableDepStatement: ts.Statement; [all …]
|
D | process_ui_syntax.ts | 16 import ts from 'typescript'; 130 export let contextGlobal: ts.TransformationContext; 137 export function processUISyntax(program: ts.Program, ut = false): Function { 138 let entryNodeKey: ts.Expression; 139 return (context: ts.TransformationContext) => { 142 return (node: ts.SourceFile) => { 143 const hasTsNoCheckOrTsIgnore = ts.hasTsNoCheckOrTsIgnoreFlag(node); 153 node = ts.visitEachChild(node, processResourceNode, context); 156 … const processedNode: ts.SourceFile = ts.getTypeExportImportAndConstEnumTransformer(context)(node); 168 node = ts.visitEachChild(node, processAllNodes, context); [all …]
|
D | validate_ui_syntax.ts | 16 import ts from 'typescript'; 101 localStorageNode: ts.Identifier | ts.ObjectLiteralExpression; 167 fileQuery: string, sourceFile: ts.SourceFile = null): LogInfo[] { 185 fileQuery: string, sourceFile: ts.SourceFile | null): LogInfo[] | null { 188 …sourceFile = ts.createSourceFile(filePath, source, ts.ScriptTarget.Latest, true, ts.ScriptKind.ETS… 200 if (ts.isEnumDeclaration(item) && item.name) { 203 if (ts.isStructDeclaration(item)) { 204 if (item.name && ts.isIdentifier(item.name)) { 216 if (ts.isMissingDeclaration(item)) { 217 const decorators: ts.NodeArray<ts.Decorator> = item.decorators; [all …]
|
D | ets_checker.ts | 18 import * as ts from 'typescript'; 67 export const SOURCE_FILES: Map<string, ts.SourceFile> = new Map(); 69 function collectSourceFilesMap(program: ts.Program): void { 70 program.getSourceFiles().forEach((sourceFile: ts.SourceFile) => { 86 export const compilerOptions: ts.CompilerOptions = ts.readConfigFile( 87 path.resolve(__dirname, '../tsconfig.json'), ts.sys.readFile).config.compilerOptions; 111 'importsNotUsedAsValues': ts.ImportsNotUsedAsValues.Preserve, 112 'module': ts.ModuleKind.CommonJS, 113 'moduleResolution': ts.ModuleResolutionKind.NodeJs, 115 'target': ts.ScriptTarget.ES2017, [all …]
|
D | do_arkTS_linter.ts | 18 import * as ts from 'typescript'; 35 messageText: string | ts.DiagnosticMessageChain; 44 export type ProcessDiagnosticsFunc = (diagnostics: ts.Diagnostic) => void; 46 export function doArkTSLinter(program: ts.Program, arkTSMode: ArkTSLinterMode, printDiagnostic: Pro… 47 shouldWriteFile: boolean = true): ts.Diagnostic[] { 52 const compilerHost: ts.CompilerHost = ts.createCompilerHost(program.getCompilerOptions()); 55 compilerHost.getDefaultLibFileName = options => ts.getDefaultLibFilePath(options); 58 let diagnostics: ts.Diagnostic[] = ts.runArkTSLinter(program, compilerHost); 74 function processArkTSLinterReportAsError(diagnostics: ts.Diagnostic[], printDiagnostic: ProcessDiag… 75 diagnostics.forEach((diagnostic: ts.Diagnostic) => { [all …]
|
D | process_module_files.ts | 17 import ts from 'typescript'; 41 export async function writeFileSyncByNode(node: ts.SourceFile, projectConfig: any, logger?: any): P… 70 function genContentAndSourceMapInfo(node: ts.SourceFile, projectConfig: any): any { 71 const printer: ts.Printer = ts.createPrinter({ newLine: ts.NewLineKind.LineFeed }); 72 const options: ts.CompilerOptions = { 83 const host: ts.CompilerHost = ts.createCompilerHost(options); 86 const sourceMapGenerator: any = ts.createSourceMapGenerator( 89 ts.getBaseFileName(fileName), 95 const writer: any = ts.createTextWriter( 97 ts.getNewLineCharacter({newLine: ts.NewLineKind.LineFeed, removeComments: false}));
|
D | process_import.ts | 16 import ts from 'typescript'; 82 const IMPORT_FILE_ASTCACHE: Map<string, ts.SourceFile> = process.env.watchMode === 'true' ? new Map… 84 export default function processImport(node: ts.ImportDeclaration | ts.ImportEqualsDeclaration | 85 ts.ExportDeclaration, pagesDir: string, log: LogInfo[], asName: Map<string, string> = new Map(), 89 if (ts.isImportDeclaration(node) || ts.isExportDeclaration(node)) { 91 if (ts.isImportDeclaration(node) && node.importClause && node.importClause.name && 92 ts.isIdentifier(node.importClause.name)) { 98 if (ts.isImportDeclaration(node) && node.importClause && node.importClause.namedBindings && 99 ts.isNamedImports(node.importClause.namedBindings) && 102 if (item.name && ts.isIdentifier(item.name)) { [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/ |
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 …if (node.modifiers && node.modifiers.length && node.modifiers[0].kind === ts.SyntaxKind.ExportKeyw… 124 … const declarationNode = ts.factory.updateVariableDeclaration(node.declarationList.declarations[0], 125 … ts.factory.createIdentifier(type), node.declarationList.declarations[0].exclamationToken, 127 …node.declarationList = ts.factory.updateVariableDeclarationList(node.declarationList, [declaration… 139 sourceFile = ts.factory.updateSourceFile(sourceFile, newStatements); 140 const printer = ts.createPrinter({ removeComments: false, newLine: ts.NewLineKind.LineFeed }); 141 const result = printer.printNode(ts.EmitHint.Unspecified, sourceFile, sourceFile); [all …]
|
/developtools/ace_ets2bundle/compiler/src/fast_build/ark_compiler/module/ |
D | module_source_file.ts | 16 import * as ts from 'typescript'; 49 private source: string | ts.SourceFile; 54 constructor(moduleId: string, source: string | ts.SourceFile) { 62 static newSourceFile(moduleId: string, source: string | ts.SourceFile) { 95 …await writeFileSyncByNode(<ts.SourceFile>this.source, ModuleSourceFile.projectConfig, ModuleSource… 186 const moduleNodeTransformer: ts.TransformerFactory<ts.SourceFile> = context => { 187 const visitor: ts.Visitor = node => { 188 node = ts.visitEachChild(node, visitor, context); 190 … if (ts.isImportDeclaration(node) || (ts.isExportDeclaration(node) && node.moduleSpecifier)) { 196 if (ts.isImportDeclaration(node)) { [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/profiler/host/smartperf/trace_streamer/src/parser/htrace_pbreader_parser/ |
D | htrace_disk_io_parser.cpp | 33 void HtraceDiskIOParser::Parse(ProtoReader::BytesView tracePacket, uint64_t ts) in Parse() argument 51 diskIOData_.push_back(TsDiskIOData{ts, diskioData.rd_sectors_kb(), diskioData.wr_sectors_kb(), in Parse() 57 auto cmp = [](const TsDiskIOData& a, const TsDiskIOData& b) { return a.ts < b.ts; }; in Finish() 66 itor->ts = streamFilters_->clockFilter_->ToPrimaryTraceTime(TS_CLOCK_REALTIME, itor->ts); in Finish() 67 UpdatePluginTimeRange(TS_CLOCK_REALTIME, itor->ts, itor->ts); in Finish() 69 lastTs = itor->ts; in Finish() 73 auto dur = itor->ts - lastTs; in Finish() 76 itor->ts, itor->ts - lastTs, itor->rdSectorsKb, itor->wrSectorsKb, in Finish() 80 lastTs = itor->ts; in Finish()
|
/developtools/smartperf_host/trace_streamer/src/parser/htrace_pbreader_parser/ |
D | htrace_disk_io_parser.cpp | 33 void HtraceDiskIOParser::Parse(ProtoReader::BytesView tracePacket, uint64_t ts) in Parse() argument 51 diskIOData_.push_back(TsDiskIOData{ts, diskioData.rd_sectors_kb(), diskioData.wr_sectors_kb(), in Parse() 57 auto cmp = [](const TsDiskIOData& a, const TsDiskIOData& b) { return a.ts < b.ts; }; in Finish() 66 itor->ts = streamFilters_->clockFilter_->ToPrimaryTraceTime(TS_CLOCK_REALTIME, itor->ts); in Finish() 67 UpdatePluginTimeRange(TS_CLOCK_REALTIME, itor->ts, itor->ts); in Finish() 69 lastTs = itor->ts; in Finish() 73 auto dur = itor->ts - lastTs; in Finish() 76 itor->ts, itor->ts - lastTs, itor->rdSectorsKb, itor->wrSectorsKb, in Finish() 80 lastTs = itor->ts; in Finish()
|
/developtools/profiler/device/base/src/ |
D | posix_semaphore.cpp | 45 struct timespec ts = { 0, 0 }; in TimedWait() local 46 clock_gettime(CLOCK_REALTIME, &ts); in TimedWait() 47 ts.tv_sec += seconds; in TimedWait() 48 ts.tv_nsec += nanoSeconds; in TimedWait() 49 ts.tv_sec += ts.tv_nsec / NS_PER_SEC; in TimedWait() 50 ts.tv_nsec %= NS_PER_SEC; in TimedWait() 51 return sem_timedwait(&sem_, &ts) == 0; in TimedWait()
|
/developtools/smartperf_host/trace_streamer/src/filter/ |
D | irq_filter.cpp | 30 void IrqFilter::IrqHandlerEntry(int64_t ts, uint32_t cpu, DataIndex nameId) in IrqHandlerEntry() argument 32 streamFilters_->sliceFilter_->IrqHandlerEntry(ts, cpu, irqCatalog_, nameId); in IrqHandlerEntry() 34 void IrqFilter::IrqHandlerExit(int64_t ts, uint32_t cpu, uint32_t irq, uint32_t ret) in IrqHandlerExit() argument 45 streamFilters_->sliceFilter_->IrqHandlerExit(ts, cpu, args); in IrqHandlerExit() 48 void IrqFilter::IpiHandlerEntry(int64_t ts, uint32_t cpu, DataIndex nameId) in IpiHandlerEntry() argument 50 streamFilters_->sliceFilter_->IpiHandlerEntry(ts, cpu, ipiCatalog_, nameId); in IpiHandlerEntry() 52 void IrqFilter::IpiHandlerExit(int64_t ts, uint32_t cpu) in IpiHandlerExit() argument 54 streamFilters_->sliceFilter_->IpiHandlerExit(ts, cpu); in IpiHandlerExit() 56 void IrqFilter::SoftIrqEntry(int64_t ts, uint32_t cpu, uint32_t vec) in SoftIrqEntry() argument 61 streamFilters_->sliceFilter_->SoftIrqEntry(ts, cpu, softIrqCatalog_, irqActionNameIds_[vec]); in SoftIrqEntry() [all …]
|
D | binder_filter.cpp | 54 void BinderFilter::SendTraction(int64_t ts, in SendTraction() argument 81 InternalTid dstItid = streamFilters_->processFilter_->UpdateOrCreateThread(ts, destTid); in SendTraction() 90 … (void)streamFilters_->sliceFilter_->EndBinder(ts, tid, INVALID_UINT64, INVALID_UINT64, argsSend); in SendTraction() 97 …(void)streamFilters_->sliceFilter_->BeginBinder(ts, tid, binderCatalogId_, transSliceId_, argsSend… in SendTraction() 103 …(void)streamFilters_->sliceFilter_->AsyncBinder(ts, tid, binderCatalogId_, transAsyncId_, argsSend… in SendTraction() 108 void BinderFilter::ReceiveTraction(int64_t ts, uint32_t pid, uint64_t transactionId) in ReceiveTraction() argument 110 InternalTid internalTid = streamFilters_->processFilter_->UpdateOrCreateThread(ts, pid); in ReceiveTraction() 113 (void)streamFilters_->sliceFilter_->EndBinder(ts, pid); in ReceiveTraction() 120 …auto replySliceid = streamFilters_->sliceFilter_->BeginBinder(ts, pid, binderCatalogId_, replyId_); in ReceiveTraction() 150 … (void)streamFilters_->sliceFilter_->AsyncBinder(ts, pid, binderCatalogId_, asyncRcvId_, args); in ReceiveTraction() [all …]
|
D | frame_filter.cpp | 27 void FrameFilter::BeginVsyncEvent(uint64_t ts, in BeginVsyncEvent() argument 36 frame->startTs_ = ts; in BeginVsyncEvent() 43 … traceDataCache_->GetFrameSliceData()->AppendFrame(ts, ipid, itid, vsyncId, callStackSliceId); in BeginVsyncEvent() 55 bool FrameFilter::MarkRSOnvsyncEvent(uint64_t ts, uint32_t itid) in MarkRSOnvsyncEvent() argument 59 TS_LOGW("BeginOnvsyncEvent find for itid:%u failed, ts:%" PRIu64 "", itid, ts); in MarkRSOnvsyncEvent() 70 bool FrameFilter::EndOnVsyncEvent(uint64_t ts, uint32_t itid) in EndOnVsyncEvent() argument 92 bool FrameFilter::BeginRSTransactionData(uint64_t ts, uint32_t itid, uint32_t franeNum) in BeginRSTransactionData() argument 113 bool FrameFilter::BeginProcessCommandUni(uint64_t ts, in BeginProcessCommandUni() argument 173 bool FrameFilter::EndVsyncEvent(uint64_t ts, uint32_t itid) in EndVsyncEvent() argument 177 TS_LOGW("EndVsyncEvent find for itid:%u ts:%" PRIu64 " failed", itid, ts); in EndVsyncEvent() [all …]
|
/developtools/profiler/host/smartperf/trace_streamer/src/filter/ |
D | irq_filter.cpp | 30 void IrqFilter::IrqHandlerEntry(int64_t ts, uint32_t cpu, DataIndex nameId) in IrqHandlerEntry() argument 32 streamFilters_->sliceFilter_->IrqHandlerEntry(ts, cpu, irqCatalog_, nameId); in IrqHandlerEntry() 34 void IrqFilter::IrqHandlerExit(int64_t ts, uint32_t cpu, uint32_t irq, uint32_t ret) in IrqHandlerExit() argument 45 streamFilters_->sliceFilter_->IrqHandlerExit(ts, cpu, args); in IrqHandlerExit() 48 void IrqFilter::IpiHandlerEntry(int64_t ts, uint32_t cpu, DataIndex nameId) in IpiHandlerEntry() argument 50 streamFilters_->sliceFilter_->IpiHandlerEntry(ts, cpu, ipiCatalog_, nameId); in IpiHandlerEntry() 52 void IrqFilter::IpiHandlerExit(int64_t ts, uint32_t cpu) in IpiHandlerExit() argument 54 streamFilters_->sliceFilter_->IpiHandlerExit(ts, cpu); in IpiHandlerExit() 56 void IrqFilter::SoftIrqEntry(int64_t ts, uint32_t cpu, uint32_t vec) in SoftIrqEntry() argument 61 streamFilters_->sliceFilter_->SoftIrqEntry(ts, cpu, softIrqCatalog_, irqActionNameIds_[vec]); in SoftIrqEntry() [all …]
|
D | binder_filter.cpp | 54 void BinderFilter::SendTraction(int64_t ts, in SendTraction() argument 81 InternalTid dstItid = streamFilters_->processFilter_->UpdateOrCreateThread(ts, destTid); in SendTraction() 90 … (void)streamFilters_->sliceFilter_->EndBinder(ts, tid, INVALID_UINT64, INVALID_UINT64, argsSend); in SendTraction() 97 …(void)streamFilters_->sliceFilter_->BeginBinder(ts, tid, binderCatalogId_, transSliceId_, argsSend… in SendTraction() 103 …(void)streamFilters_->sliceFilter_->AsyncBinder(ts, tid, binderCatalogId_, transAsyncId_, argsSend… in SendTraction() 108 void BinderFilter::ReceiveTraction(int64_t ts, uint32_t pid, uint64_t transactionId) in ReceiveTraction() argument 110 InternalTid internalTid = streamFilters_->processFilter_->UpdateOrCreateThread(ts, pid); in ReceiveTraction() 113 (void)streamFilters_->sliceFilter_->EndBinder(ts, pid); in ReceiveTraction() 120 …auto replySliceid = streamFilters_->sliceFilter_->BeginBinder(ts, pid, binderCatalogId_, replyId_); in ReceiveTraction() 150 … (void)streamFilters_->sliceFilter_->AsyncBinder(ts, pid, binderCatalogId_, asyncRcvId_, args); in ReceiveTraction() [all …]
|
D | frame_filter.cpp | 26 void FrameFilter::BeginVsyncEvent(uint64_t ts, in BeginVsyncEvent() argument 35 frame->startTs_ = ts; in BeginVsyncEvent() 42 … traceDataCache_->GetFrameSliceData()->AppendFrame(ts, ipid, itid, vsyncId, callStackSliceId); in BeginVsyncEvent() 54 bool FrameFilter::MarkRSOnvsyncEvent(uint64_t ts, uint32_t itid) in MarkRSOnvsyncEvent() argument 58 TS_LOGW("BeginOnvsyncEvent find for itid:%u failed, ts:%llu", itid, ts); in MarkRSOnvsyncEvent() 69 bool FrameFilter::EndOnVsyncEvent(uint64_t ts, uint32_t itid) in EndOnVsyncEvent() argument 91 bool FrameFilter::BeginRSTransactionData(uint64_t ts, uint32_t itid, uint32_t franeNum) in BeginRSTransactionData() argument 112 bool FrameFilter::BeginProcessCommandUni(uint64_t ts, in BeginProcessCommandUni() argument 172 bool FrameFilter::EndVsyncEvent(uint64_t ts, uint32_t itid) in EndVsyncEvent() argument 176 TS_LOGW("EndVsyncEvent find for itid:%u ts:%llu failed", itid, ts); in EndVsyncEvent() [all …]
|