| /developtools/smartperf_host/ide/src/js-heap/logic/ |
| D | Allocation.ts | 33 for (let node of this.traceNodes) { 34 if (node.parentsId.length > 1) { 35 node.hasParent = true; 36 } else if (node.parentsId.length === 0) { 37 node.hasParent = false; 39 if (node.parentsId[0] === -1) { 40 node.hasParent = false; 42 node.hasParent = true; 46 if (keyMap.has(node.name + node.functionIndex)) { 47 let uniqueNode = keyMap.get(node.name + node.functionIndex); [all …]
|
| D | HeapLoader.ts | 102 loadAllocationParent(node: AllocationFunction): void { 103 this.allocationLogic.getParent(node); 132 for (let node of this.nodes) { variable 133 for (let i = 0; i < node.edgeCount; i++) { 134 let edgeIndex = node.firstEdgeIndex + i; 136 node.addEdge(this.edges[edgeIndex]); 152 for (let node of this.nodes) { variable 153 let retainCount = this.firstRetainerIndex[node.nodeIndex]; variable 154 this.firstRetainerIndex[node.nodeIndex] = firstUnusedRetainerSlot; 161 for (let node of this.nodes) { variable [all …]
|
| /developtools/smartperf_host/ide/src/trace/bean/ |
| D | FrameChartStruct.ts | 89 export function setFuncFrame(node: ChartStruct, canvasFrame: Rect, total: number, mode: ChartMode):… 90 if (!node.frame) { 91 node.frame = new Rect(0, 0, 0, 0); 94 if (node.parent) { 95 let idx = node.parent.children.indexOf(node); 97 node.frame!.x = node.parent.frame!.x; 100 …node.frame.x = node.parent.children[idx - 1].frame!.x + node.parent.children[idx - 1].frame!.width; 102 if (node.parent?.isChartSelect && !node.isChartSelect) { 103 node.frame!.width = 0; 107 … node.frame!.width = Math.floor(((node.drawSize || node.size) / total) * canvasFrame.width); [all …]
|
| /developtools/ace_ets2bundle/compiler/ |
| D | build_declarations_file.js | 115 sourceFile.statements.forEach((node) => { 116 if (!ts.isImportDeclaration(node)) { 117 let modifiers = ts.canHaveModifiers(node) ? ts.getModifiers(node) : undefined; 121 if (isVariable(node)) { 122 const name = node.declarationList.declarations[0].name.getText(); 123 const type = node.declarationList.declarations[0].type.getText(); 125 … const declarationNode = ts.factory.updateVariableDeclaration(node.declarationList.declarations[0], 126 … ts.factory.createIdentifier(type), node.declarationList.declarations[0].exclamationToken, 127 … node.declarationList.declarations[0].type, node.declarationList.declarations[0].initializer); 128 …node.declarationList = ts.factory.updateVariableDeclarationList(node.declarationList, [declaration… [all …]
|
| /developtools/smartperf_host/ide/src/trace/component/chart/ |
| D | FrameChart.ts | 106 private getNodeValue(node: ChartStruct): number { 110 result = node.drawSize || node.size; 113 result = node.drawCount || node.count; 116 result = node.drawDur || node.dur; 119 result = node.drawEventCount || node.eventCount; 153 for (const node of this.currentData!) { constant 154 this.rootNode.children.push(node); 155 this.rootNode.count += node.drawCount || node.count; 156 this.rootNode.size += node.drawSize || node.size; 157 this.rootNode.dur += node.drawDur || node.dur; [all …]
|
| /developtools/ace_ets2bundle/compiler/src/ |
| D | process_sendable.ts | 19 function transformOptionalMemberForSendable(node: ts.PropertyDeclaration): ts.PropertyDeclaration { 20 let updatedTypeNode: ts.TypeNode = node.type; 37 node.modifiers, 38 node.name, 41 node.initializer ? node.initializer : ts.factory.createIdentifier('undefined') 105 export function processSendableClass(node: ts.ClassDeclaration): ts.ClassDeclaration { 107 let updatedMembers: ts.NodeArray<ts.ClassElement> = node.members; 108 let updatedModifiers: ts.NodeArray<ts.ModifierLike> = removeSendableDecorator(node.modifiers); 110 node.heritageClauses?.some(clause => clause.token === ts.SyntaxKind.ExtendsKeyword) || false; 112 for (const member of node.members) { [all …]
|
| D | process_ui_syntax.ts | 187 return (node: ts.SourceFile) => { 189 pagesDir = path.resolve(path.dirname(node.fileName)); 190 resourceFileName = path.resolve(node.fileName); 191 pageFile = path.resolve(filePath !== '' ? filePath : node.fileName); 197 transformLog.sourceFile = node; 198 preprocessIdAttrs(node.fileName); 200 path.resolve(node.fileName) === path.resolve(projectConfig.projectPath, 'app.ets') || 201 /\.ts$/.test(node.fileName))) { 202 node = ts.visitEachChild(node, processResourceNode, context); 203 node = ts.factory.updateSourceFile(node, [all …]
|
| D | validate_ui_syntax.ts | 303 export function isObservedClass(node: ts.Node): boolean { 304 if (ts.isClassDeclaration(node) && hasDecorator(node, COMPONENT_OBSERVED_DECORATOR)) { 310 export function isCustomDialogClass(node: ts.Node): boolean { 311 if (ts.isStructDeclaration(node) && hasDecorator(node, COMPONENT_DECORATOR_CUSTOM_DIALOG)) { 323 …component: ts.Identifier, log: LogInfo[], sourceFile: ts.SourceFile, node: ts.StructDeclaration): … 336 checkEntryComponent(node, log, sourceFile); 339 componentCollection.entryComponentPos = node.getStart(); 397 function checkConcurrentDecorator(node: ts.FunctionDeclaration | ts.MethodDeclaration, log: LogInfo… 399 const decorators: readonly ts.Decorator[] = ts.getAllDecorators(node); 404 if (ts.isMethodDeclaration(node)) { [all …]
|
| D | process_component_build.ts | 191 export function processComponentBuild(node: ts.MethodDeclaration, 200 if (node.body && node.body.statements && node.body.statements.length && 201 validateRootNode(node, log)) { 202 const componentBlock: ts.Block = processComponentBlock(node.body, false, log); 203 newNode = ts.factory.updateMethodDeclaration(node, ts.getModifiers(node), 204 node.asteriskToken, renderNode, node.questionToken, node.typeParameters, node.parameters, 205 node.type, componentBlock); 211 newNode = ts.factory.updateMethodDeclaration(node, ts.getModifiers(node), 212 node.asteriskToken, renderNode, node.questionToken, node.typeParameters, node.parameters, 213 node.type, node.body); [all …]
|
| D | process_import.ts | 94 export default function processImport(node: ts.ImportDeclaration | ts.ImportEqualsDeclaration | 99 if (ts.isImportDeclaration(node) || ts.isExportDeclaration(node)) { 100 filePath = node.moduleSpecifier.getText().replace(/'|"/g, ''); 101 if (ts.isImportDeclaration(node) && node.importClause && node.importClause.name && 102 ts.isIdentifier(node.importClause.name)) { 103 defaultName = node.importClause.name.escapedText.toString(); 108 if (ts.isImportDeclaration(node) && node.importClause && node.importClause.namedBindings && 109 ts.isNamedImports(node.importClause.namedBindings) && 110 node.importClause.namedBindings.elements && isEntryPage) { 111 validateModuleSpecifier(node.moduleSpecifier, log); [all …]
|
| D | process_component_class.ts | 158 export function processComponentClass(node: ts.StructDeclaration, context: ts.TransformationContext, 160 const decoratorNode: readonly ts.Decorator[] = ts.getAllDecorators(node); 162 … processMembers(node.members, node.name, context, decoratorNode, log, program, checkPreview(node)); 163 return ts.factory.createClassDeclaration(ts.getModifiers(node), node.name, 164 node.typeParameters, updateHeritageClauses(node, log), memberNode); 167 function checkPreview(node: ts.StructDeclaration): boolean { 169 const decorators: readonly ts.Decorator[] = ts.getAllDecorators(node); 170 if (node && decorators) { 503 function createLocalStroageCallExpression(node: ts.PropertyDeclaration, name: string, 505 const decorators: readonly ts.Decorator[] = ts.getAllDecorators(node); [all …]
|
| D | process_component_member.ts | 322 function createControllerSet(node: ts.PropertyDeclaration, componentName: ts.Identifier, 324 if (componentCollection.customDialogs.has(componentName.getText()) && node.type && 325 node.type.getText() === SET_CONTROLLER_CTR_TYPE) { 341 function processPropertyNodeDecorator(parentName: ts.Identifier, node: ts.PropertyDeclaration, 345 const decorators: readonly ts.Decorator[] = ts.getAllDecorators(node); 357 if (!includeWatchAndRequire && isForbiddenUseStateType(node.type)) { 359 validateForbiddenUseStateType(name, decoratorName, node.type.typeName.getText(), log); 366 if (node.initializer && forbiddenSpecifyDefaultValueDecorators.has(decoratorName)) { 369 } else if (!node.initializer && mandatorySpecifyDefaultValueDecorators.has(decoratorName)) { 373 …if (node.questionToken && mandatoryToInitViaParamDecorators.has(decoratorName) && !(decoratorName … [all …]
|
| D | process_kit_import.ts | 63 const visitor: ts.Visitor = node => { 65 if (ts.isImportDeclaration(node) || (ts.isExportDeclaration(node) && node.moduleSpecifier)) { 66 … const moduleRequest: string = (node.moduleSpecifier as ts.StringLiteral).text.replace(/'|"/g, ''); 70 KitInfo.processKitInfo(moduleRequest, kitDefs.symbols as KitSymbols, node); 79 pos: node.getStart() 84 return node; 87 return (node: ts.SourceFile) => { 89 compilingEtsOrTsFiles.push(path.normalize(node.fileName)); 90 interceptLazyImportWithKitImport(node); 92 KitInfo.init(node, context, id); [all …]
|
| D | process_custom_component.ts | 124 export function processCustomComponent(node: ts.ExpressionStatement, newStatements: ts.Statement[], 134 const componentNode: ts.CallExpression = getCustomComponentNode(node); 156 const newNode: ts.ExpressionStatement = ts.factory.updateExpressionStatement(node, 174 bindComponentAttr(node, ts.factory.createIdentifier(COMPONENT_COMMON), commomComponentNode, 189 bindComponentAttr(node, ts.factory.createIdentifier(COMPONENT_COMMON), newStatements, log); 195 addCustomComponent(node, newStatements, customComponentNewExpression, log, name, componentNode, 242 function isHasChild(node: ts.CallExpression): boolean { 243 return node.arguments && node.arguments[0] && ts.isObjectLiteralExpression(node.arguments[0]) && 244 node.arguments[0].properties && node.arguments[0].properties.length > 0; 257 function changeNodeFromCallToArrow(node: ts.CallExpression): ts.ConditionalExpression { [all …]
|
| /developtools/smartperf_host/ide/src/js-heap/utils/ |
| D | Utils.ts | 19 export function HeapNodeToConstructorItem(node: HeapNode): ConstructorComparison { 21 constructor.fileId = node.fileId; 22 constructor.id = node.id; 23 constructor.index = node.nodeIndex; 24 constructor.nodeName = node.nodeName(); 25 constructor.edgeCount = node.edgeCount; 26 constructor.distance = node.distance; 27 constructor.shallowSize = node.selfSize; 28 constructor.retainedSize = node.retainedSize; 29 constructor.nodeType = node.type;
|
| /developtools/ace_js2bundle/ace-loader/src/lite/ |
| D | lite-transform-template.js | 58 [AST_KEY.ATTR]: function(dataContent, node, key) { argument 59 if (Object.keys(node.attr).length !== 0) { 60 dataContent += `'${ATTRBUTES}' : ${transformProps(node.attr)},`; 64 [AST_KEY.CLASSLIST]: function(dataContent, node, key) { argument 65 dataContent += sortClass(node[key]); 68 [AST_KEY.STYLE]: function(dataContent, node, key) { argument 69 dataContent += sortStyle(node[key]); 72 [AST_KEY.EVENTS]: function(dataContent, node, key) { argument 73 dataContent += `'${EVENTS_ON_FUNC}' : ${transformEvents(node.events)},`; 76 [AST_KEY.KEY]: function(dataContent, node, key) { argument [all …]
|
| /developtools/ace_js2bundle/ace-loader/plugin/templater/ |
| D | content.js | 36 if (path.parent && path.node.type === "Identifier") { 39 path.parent.type === 'CallExpression' && path.parent.callee === path.node) { 42 …ath.parent.type === "ObjectProperty" && !path.parent.computed && path.parent.value === path.node) { 46 flag = addPrefix(path.node, path.parent) 48 if (flag && !keyWordsReg.test(path.node.name)) { 49 path.node.name = 'this.' + path.node.name 66 function addPrefix(node, parent) { argument 72 if (parent[attrArr1[i]] === node || ['expressions', 'elements'].includes(attrArr1[i]) && 73 parent[attrArr1[i]].includes(node)) { 83 if (parent.computed && parent[attrArr2[i]] === node) { [all …]
|
| D | index.js | 134 function generate(node, filePath, preNode, relativePath) { argument 135 componentValidator.validateTagName(node, compileResult, relativePath) 136 if (node.attrs && node.attrs.length !== 0) { 137 checkNodeAttrs(node, filePath, preNode, relativePath) 139 if (node.childNodes && node.childNodes.length !== 0) { 140 checkNodeChildren(node, filePath, relativePath) 150 function checkNodeAttrs(node, filePath, preNode, relativePath) { argument 151 const attributes = node.attrs 153 line: node.sourceCodeLocation.startLine, 154 col: node.sourceCodeLocation.endLine, [all …]
|
| /developtools/ace_ets2bundle/compiler/test/ark_compiler_ut/mock/rollup_mock/ |
| D | module_info.ts | 166 this.importCache.forEach(node => { 167 if (node.type === IMPORT_NODE) { 168 if (!nodeByType.has(node.type)) { 169 nodeByType.set(node.type, []); 171 nodeByType.get(node.type).push(node); 174 if (node.type === DYNAMICIMPORT_NODE) { 175 if (!nodeByType.has(node.type)) { 176 nodeByType.set(node.type, []); 178 nodeByType.get(node.type).push(node);
|
| /developtools/smartperf_host/ide/src/base-ui/tree/ |
| D | LitTree.ts | 203 let node: LitTreeNode = document.createElement('lit-tree-node') as LitTreeNode; variable 204 node.title = a.title; 205 node.setAttribute('key', a.key); 206 node.topDepth = topDepth; 207 this.treeNodeDragable(node, a); 210 li.append(node); //@ts-ignore 216 this.addEvent(a, node, li, ul); 218 node.oncontextmenu = (ev): void => { 220 this.selectedNode(node); 221 this.currentSelectedNode = node; [all …]
|
| /developtools/smartperf_host/ide/src/js-heap/ |
| D | HeapDataInterface.ts | 137 public getParentFunction(node: AllocationFunction): void { 138 let filStruct = this.baseFileStruct ? this.baseFileStruct : this.getFileStructById(node.fileId); 142 filStruct.heapLoader.loadAllocationParent(node); 150 public getNextForConstructor(node: ConstructorItem): Array<ConstructorItem> { 151 let filStruct = this.baseFileStruct ? this.baseFileStruct : this.getFileStructById(node.fileId); 153 switch (node.type) { 155 children = node.classChildren; 159 children = filStruct!.heapLoader.getNextNode(node); 174 let node = baseFileStruct.heapLoader.getNodes()[idx]; variable 175 let compareNode = HeapNodeToConstructorItem(node); [all …]
|
| /developtools/global_resource_tool/src/ |
| D | resconfig_parser.cpp | 97 uint32_t ResConfigParser::GetString(const cJSON *node, int c, HandleBack callback) in GetString() argument 99 if (!node || !cJSON_IsString(node)) { in GetString() 104 if (callback(c, node->valuestring) != RESTOOL_SUCCESS) { in GetString() 110 uint32_t ResConfigParser::GetArray(const cJSON *node, int c, HandleBack callback) in GetArray() argument 112 if (!node || !cJSON_IsArray(node)) { in GetArray() 117 for (cJSON *item = node->child; item; item = item->next) { in GetArray() 128 uint32_t ResConfigParser::GetModuleNames(const cJSON *node, int c, HandleBack callback) in GetModuleNames() argument 130 if (!node) { in GetModuleNames() 134 if (cJSON_IsString(node)) { in GetModuleNames() 135 return GetString(node, c, callback); in GetModuleNames() [all …]
|
| /developtools/hiperf/src/ |
| D | unique_stack_table.cpp | 87 Node node; in PutIpInSlot() local 88 node.section.ip = thisIp; in PutIpInSlot() 89 node.section.prevIdx = prevIdx; in PutIpInSlot() 90 node.section.inKernel = !!(thisIp & IP_IN_KERNEL); in PutIpInSlot() 98 tableNode->value = node.value; in PutIpInSlot() 103 if (tableNode->value == node.value) { in PutIpInSlot() 170 Node *node = GetFrame(tailIdx); in GetIpsByStackId() local 171 while (node != nullptr && nr > 0) { in GetIpsByStackId() 173 node->section.inKernel ? (node->section.ip | KERNEL_PREFIX) : node->section.ip); in GetIpsByStackId() 174 if (node->section.prevIdx == HEAD_NODE_INDEX) { in GetIpsByStackId() [all …]
|
| /developtools/ace_ets2bundle/compiler/test/ark_compiler_ut/common/ |
| D | process_sendable.test.ts | 208 const visitor: ts.Visitor = node => { 209 if (ts.isClassDeclaration(node) && hasDecorator(node, COMPONENT_SENDABLE_DECORATOR)) { 210 return processSendableClass(node); 212 if (ts.isFunctionDeclaration(node) && hasArkDecorator(node, COMPONENT_SENDABLE_DECORATOR)) { 213 return processSendableFunction(node); 215 if (ts.isTypeAliasDeclaration(node) && hasArkDecorator(node, COMPONENT_SENDABLE_DECORATOR)) { 216 return processSendableType(node); 218 return node; 221 return (node: ts.SourceFile) => { 222 return ts.visitEachChild(node, visitor, context);
|
| /developtools/ace_ets2bundle/compiler/src/fast_build/ark_compiler/ |
| D | process_decorator.ts | 22 export function processDecorator(node: ts.Decorator): ts.Node { 23 if (isMockDecorator(node)) { 24 let disabled: boolean = disableMockDecorator(node); 25 return disabled ? undefined : node; 28 return node;
|