Home
last modified time | relevance | path

Searched refs:ts (Results 1 – 25 of 286) sorted by relevance

12345678910>>...12

/developtools/ace_ets2bundle/compiler/src/fast_build/ark_compiler/
Dprocess_mock.ts16 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/
Dprocess_custom_component.ts16 import ts from 'typescript';
113 export function processCustomComponent(node: ts.ExpressionStatement, newStatements: ts.Statement[],
115 idName: ts.Expression = undefined, builderParamsResult: BuilderParamsResult = null): void {
123 const componentNode: ts.CallExpression = getCustomComponentNode(node);
127 ts.isPropertyAccessExpression(componentNode.parent);
129 let customComponentNewExpression: ts.NewExpression = createCustomComponentNewExpression(
131 let argumentsArray: ts.PropertyAssignment[];
136 argumentsArray.forEach((item: ts.PropertyAssignment, index: number) => {
139 const propertyAssignmentNode: ts.PropertyAssignment = ts.factory.updatePropertyAssignment(
140 item, item.name, changeNodeFromCallToArrow(item.initializer as ts.CallExpression));
[all …]
Dprocess_component_class.ts16 import ts from 'typescript';
143 export function processComponentClass(node: ts.StructDeclaration, context: ts.TransformationContext,
144 log: LogInfo[], program: ts.Program): ts.ClassDeclaration {
145 const decoratorNode: readonly ts.Decorator[] = ts.getAllDecorators(node); constant
146 const memberNode: ts.ClassElement[] =
148 return ts.factory.createClassDeclaration(ts.getModifiers(node), node.name,
152 function checkPreview(node: ts.StructDeclaration): boolean {
154 const decorators: readonly ts.Decorator[] = ts.getAllDecorators(node); constant
171 componentFreezeParam: ts.Expression;
173 function processMembers(members: ts.NodeArray<ts.ClassElement>, parentComponentName: ts.Identifier,
[all …]
Dprocess_component_constructor.ts16 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 …]
Dprocess_component_build.ts16 import ts from 'typescript';
185 export function processComponentBuild(node: ts.MethodDeclaration,
186 log: LogInfo[]): ts.MethodDeclaration {
187 let newNode: ts.MethodDeclaration;
188 let renderNode: ts.Identifier;
190 renderNode = ts.factory.createIdentifier(COMPONENT_RENDER_FUNCTION);
192 renderNode = ts.factory.createIdentifier(COMPONENT_INITIAl_RENDER_FUNCTION);
196 newNode = ts.factory.updateMethodDeclaration(node, ts.getModifiers(node),
200 newNode = ts.factory.updateMethodDeclaration(node, ts.getModifiers(node),
207 function createLazyForEachBlockNode(newStatements: ts.Statement[]): ts.IfStatement {
[all …]
Dprocess_ui_syntax.ts16 import ts from 'typescript';
141 export let contextGlobal: ts.TransformationContext;
145 export function processUISyntax(program: ts.Program, ut = false,
147 let entryNodeKey: ts.Expression;
148 return (context: ts.TransformationContext) => {
152 return (node: ts.SourceFile) => {
166 node = ts.visitEachChild(node, processResourceNode, context);
169 … const processedNode: ts.SourceFile = ts.getTypeExportImportAndConstEnumTransformer(context)(node);
176 node = ts.visitEachChild(node, processAllNodes, context);
182 const statements: ts.Statement[] = Array.from(node.statements);
[all …]
Dprocess_component_member.ts16 import ts from 'typescript';
150 export const simpleTypes: Set<ts.SyntaxKind> = new Set([ts.SyntaxKind.StringKeyword,
151 ts.SyntaxKind.NumberKeyword, ts.SyntaxKind.BooleanKeyword, ts.SyntaxKind.EnumDeclaration]);
160 private properity: ts.PropertyDeclaration;
161 private ctor: ts.ConstructorDeclaration;
162 private variableGet: ts.GetAccessorDeclaration;
163 private variableSet: ts.SetAccessorDeclaration;
164 private updateParams: ts.Statement;
166 private controllerSet: ts.MethodDeclaration;
167 private purgeVariableDepStatement: ts.Statement;
[all …]
Dprocess_kit_import.ts16 import * as ts from 'typescript';
55 return (context: ts.TransformationContext) => {
56 const visitor: ts.Visitor = node => {
58 if (ts.isImportDeclaration(node) || (ts.isExportDeclaration(node) && node.moduleSpecifier)) {
59 … const moduleRequest: string = (node.moduleSpecifier as ts.StringLiteral).text.replace(/'|"/g, '');
78 return (node: ts.SourceFile) => {
84 if (ts.hasTsNoCheckOrTsIgnoreFlag(node)) {
87 return ts.visitEachChild(node, visitor, context); // this node used for [writeFile]
90 const processedNode: ts.SourceFile =
91ts.visitEachChild(ts.getTypeExportImportAndConstEnumTransformer(context)(node), visitor, context);
[all …]
Dvalidate_ui_syntax.ts16 import ts from 'typescript';
97 localStorageNode: ts.Identifier | ts.ObjectLiteralExpression;
163 fileQuery: string, sourceFile: ts.SourceFile = null): LogInfo[] {
181 fileQuery: string, sourceFile: ts.SourceFile | null): LogInfo[] | null {
184 …sourceFile = ts.createSourceFile(filePath, source, ts.ScriptTarget.Latest, true, ts.ScriptKind.ETS…
196 if (ts.isEnumDeclaration(item) && item.name) {
199 if (ts.isStructDeclaration(item)) {
200 if (item.name && ts.isIdentifier(item.name)) {
201 const decorators: readonly ts.Decorator[] = ts.getAllDecorators(item); constant
213 if (ts.isMissingDeclaration(item)) {
[all …]
Ddo_arkTS_linter.ts18 import * as ts from 'typescript';
42 messageText: string | ts.DiagnosticMessageChain;
57 builderProgram: ts.BuilderProgram,
61 export type ProcessDiagnosticsFunc = (diagnostics: ts.Diagnostic) => void;
66 buildInfoWriteFile?: ts.WriteFileCallback): ts.Diagnostic[] {
71 let diagnostics: ts.Diagnostic[] = [];
74 diagnostics = ts.ArkTSLinter_1_0.runArkTSLinter(builderProgram, reverseStrictProgram,
77 diagnostics = ts.ArkTSLinter_1_1.runArkTSLinter(builderProgram, reverseStrictProgram,
95 function processArkTSLinterReportAsError(diagnostics: ts.Diagnostic[], printDiagnostic: ProcessDiag…
96 diagnostics.forEach((diagnostic: ts.Diagnostic) => {
[all …]
Dets_checker.ts18 import * as ts from 'typescript';
113 service?: ts.LanguageService;
117 export const SOURCE_FILES: Map<string, ts.SourceFile> = new Map();
119 function collectSourceFilesMap(program: ts.Program): void {
120 program.getSourceFiles().forEach((sourceFile: ts.SourceFile) => {
136 const buildInfoWriteFile: ts.WriteFileCallback = (fileName: string, data: string) => {
146 export const compilerOptions: ts.CompilerOptions = ts.readConfigFile(
147 path.resolve(__dirname, '../tsconfig.json'), ts.sys.readFile).config.compilerOptions;
171 'importsNotUsedAsValues': ts.ImportsNotUsedAsValues.Preserve,
172 'module': ts.ModuleKind.CommonJS,
[all …]
Dprocess_module_files.ts17 import ts from 'typescript';
45 export async function writeFileSyncByNode(node: ts.SourceFile, projectConfig: Object, parentEvent?:…
48 …const mixedInfo: {content: string, sourceMapJson: ts.RawSourceMap} = genContentAndSourceMapInfo(no…
80 function genContentAndSourceMapInfo(node: ts.SourceFile, projectConfig: Object): Object {
81 const printer: ts.Printer = ts.createPrinter({ newLine: ts.NewLineKind.LineFeed });
82 const options: ts.CompilerOptions = {
93 const host: ts.CompilerHost = ts.createCompilerHost(options);
96 const sourceMapGenerator: ts.SourceMapGenerator = ts.createSourceMapGenerator(
99 ts.getBaseFileName(fileName),
105 const writer: ts.EmitTextWriter = ts.createTextWriter(
[all …]
Dprocess_import.ts16 import ts from 'typescript';
80 const IMPORT_FILE_ASTCACHE: Map<string, ts.SourceFile> =
83 export default function processImport(node: ts.ImportDeclaration | ts.ImportEqualsDeclaration |
84 ts.ExportDeclaration, pagesDir: string, log: LogInfo[], asName: Map<string, string> = new Map(),
88 if (ts.isImportDeclaration(node) || ts.isExportDeclaration(node)) {
90 if (ts.isImportDeclaration(node) && node.importClause && node.importClause.name &&
91 ts.isIdentifier(node.importClause.name)) {
97 if (ts.isImportDeclaration(node) && node.importClause && node.importClause.namedBindings &&
98 ts.isNamedImports(node.importClause.namedBindings) &&
102 if (item.name && ts.isIdentifier(item.name)) {
[all …]
/developtools/smartperf_host/trace_streamer/test/unittest/query/
Dquery_metrics_test.cpp43 void ParseTraceFile(TraceStreamerSelector& ts) in ParseTraceFile() argument
59 if (!ts.ParseTraceDataSegment(std::move(buf), rsize, 0, 1)) { in ParseTraceFile()
65 ts.WaitForParserEnd(); in ParseTraceFile()
68 void ExecuteMetricsTest(TraceStreamerSelector& ts, std::string metricName) in ExecuteMetricsTest() argument
70 ts.EnableMetaTable(false); in ExecuteMetricsTest()
71 ts.SetCleanMode(false); in ExecuteMetricsTest()
72 ParseTraceFile(ts); in ExecuteMetricsTest()
73 bool result = ts.ParserAndPrintMetrics(metricName); in ExecuteMetricsTest()
85 TraceStreamerSelector ts; variable
86 ExecuteMetricsTest(ts, TRACE_MEM);
[all …]
Dquery_file_test.cpp47 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/
Dbuild_declarations_file.js16 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],
126ts.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/
DTabPaneSystemDetails.test.ts47 ts: 0,
53 ts: 1005938319,
59 ts: 3005938319,
65 ts: 3005938319,
71 ts: 5005938319,
77 ts: 5005938319,
88 ts: 1005938319,
94 ts: 1005938319,
100 ts: 3005933657,
106 ts: 3005933657,
[all …]
/developtools/profiler/device/services/ipc/src/
Dservice_entry.cpp62 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/
Dservice_entry_test.cpp69 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/smartperf_host/trace_streamer/src/parser/htrace_pbreader_parser/
Dhtrace_disk_io_parser.cpp33 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()
62 itor->ts = streamFilters_->clockFilter_->ToPrimaryTraceTime(TS_CLOCK_REALTIME, itor->ts); in Finish()
63 UpdatePluginTimeRange(TS_CLOCK_REALTIME, itor->ts, itor->ts); in Finish()
65 lastTs = itor->ts; in Finish()
69 auto dur = itor->ts - lastTs; in Finish()
72 itor->ts, itor->ts - lastTs, itor->rdSectorsKb, itor->wrSectorsKb, in Finish()
76 lastTs = itor->ts; in Finish()
/developtools/ace_ets2bundle/compiler/test/ark_compiler_ut/common/
Dprocess_kit_import.test.ts18 import * as ts from 'typescript';
62 const compilerOptions = ts.readConfigFile(
63 path.resolve(__dirname, '../../../tsconfig.json'), ts.sys.readFile).config.compilerOptions;
70 const result: ts.TranspileOutput = ts.transpileModule(KIT_IMPORT_CODE, {
79 const result: ts.TranspileOutput = ts.transpileModule(KIT_EXPORT_CODE, {
88 const result: ts.TranspileOutput = ts.transpileModule(KIT_STAR_EXPORT_CODE, {
/developtools/profiler/device/base/src/
Dposix_semaphore.cpp45 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/ide/src/trace/database/
DStateBusyTimeWorker.ts26 let includeData = initFreqResult.findIndex((a) => a.ts >= leftStartNs);
33 let startNS = includeData === 0 ? initFreqResult[0].ts : leftStartNs;
35 let includeStateData = initStateResult.findIndex((a) => a.ts >= startNS);
42 if (initStateResult[0].ts < startNS && includeStateData !== 0 && includeStateData !== -1)
43 initStateResult[0].ts = startNS;
45 if (initFreqResult[initFreqResult.length - 1].ts !== rightEndNs) {
47 ts: rightEndNs,
53 if (initStateResult[initStateResult.length - 1].ts !== rightEndNs) {
55 ts: rightEndNs,
78 if (initFreqResult[freqIndex].ts < initStateResult[stateIndex].ts) {
[all …]
/developtools/smartperf_host/trace_streamer/src/filter/
Dirq_filter.cpp30 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 …]
Dbinder_filter.cpp54 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 …]

12345678910>>...12