| /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) { 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 | 75 export function setFuncFrame(node: ChartStruct, canvasFrame: Rect, total: number, mode: ChartMode):… 76 if (!node.frame) { 77 node.frame = new Rect(0, 0, 0, 0); 80 if (node.parent) { 81 let idx = node.parent.children.indexOf(node); 83 node.frame!.x = node.parent.frame!.x; 86 …node.frame.x = node.parent.children[idx - 1].frame!.x + node.parent.children[idx - 1].frame!.width; 88 if (node.parent?.isChartSelect && !node.isChartSelect) { 89 node.frame!.width = 0; 93 … 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/ace_ets2bundle/compiler/src/ |
| D | process_ui_syntax.ts | 152 return (node: ts.SourceFile) => { 153 pagesDir = path.resolve(path.dirname(node.fileName)); 154 resourceFileName = path.resolve(node.fileName); 155 pageFile = node.fileName; 157 storedFileInfo.transformCacheFiles[node.fileName] = { 158 mtimeMs: fs.existsSync(node.fileName) ? fs.statSync(node.fileName).mtimeMs : 0, 161 transformLog.sourceFile = node; 162 preprocessIdAttrs(node.fileName); 164 path.resolve(node.fileName) === path.resolve(projectConfig.projectPath, 'app.ets') || 165 /\.ts$/.test(node.fileName))) { [all …]
|
| D | validate_ui_syntax.ts | 273 export function isObservedClass(node: ts.Node): boolean { 274 if (ts.isClassDeclaration(node) && hasDecorator(node, COMPONENT_OBSERVED_DECORATOR)) { 280 export function isCustomDialogClass(node: ts.Node): boolean { 281 if (ts.isStructDeclaration(node) && hasDecorator(node, COMPONENT_DECORATOR_CUSTOM_DIALOG)) { 293 …component: ts.Identifier, log: LogInfo[], sourceFile: ts.SourceFile, node: ts.StructDeclaration): … 305 checkEntryComponent(node, log, sourceFile); 308 componentCollection.entryComponentPos = node.getStart(); 349 function checkConcurrentDecorator(node: ts.FunctionDeclaration | ts.MethodDeclaration, log: LogInfo… 351 const decorators: readonly ts.Decorator[] = ts.getAllDecorators(node); 356 if (ts.isMethodDeclaration(node)) { [all …]
|
| D | process_component_build.ts | 185 export function processComponentBuild(node: ts.MethodDeclaration, 194 if (node.body && node.body.statements && node.body.statements.length && 195 validateRootNode(node, log)) { 196 newNode = ts.factory.updateMethodDeclaration(node, ts.getModifiers(node), 197 node.asteriskToken, renderNode, node.questionToken, node.typeParameters, node.parameters, 198 node.type, processComponentBlock(node.body, false, log)); 200 newNode = ts.factory.updateMethodDeclaration(node, ts.getModifiers(node), 201 node.asteriskToken, renderNode, node.questionToken, node.typeParameters, node.parameters, 202 node.type, node.body); 245 export function processComponentBlock(node: ts.Block, isLazy: boolean, log: LogInfo[], [all …]
|
| D | process_import.ts | 83 export default function processImport(node: ts.ImportDeclaration | ts.ImportEqualsDeclaration | 88 if (ts.isImportDeclaration(node) || ts.isExportDeclaration(node)) { 89 filePath = node.moduleSpecifier.getText().replace(/'|"/g, ''); 90 if (ts.isImportDeclaration(node) && node.importClause && node.importClause.name && 91 ts.isIdentifier(node.importClause.name)) { 92 defaultName = node.importClause.name.escapedText.toString(); 97 if (ts.isImportDeclaration(node) && node.importClause && node.importClause.namedBindings && 98 ts.isNamedImports(node.importClause.namedBindings) && 99 node.importClause.namedBindings.elements && isEntryPage) { 100 validateModuleSpecifier(node.moduleSpecifier, log); [all …]
|
| D | process_component_class.ts | 143 export function processComponentClass(node: ts.StructDeclaration, context: ts.TransformationContext, 145 const decoratorNode: readonly ts.Decorator[] = ts.getAllDecorators(node); 147 … processMembers(node.members, node.name, context, decoratorNode, log, program, checkPreview(node)); 148 return ts.factory.createClassDeclaration(ts.getModifiers(node), node.name, 149 node.typeParameters, updateHeritageClauses(node, log), memberNode); 152 function checkPreview(node: ts.StructDeclaration): boolean { 154 const decorators: readonly ts.Decorator[] = ts.getAllDecorators(node); 155 if (node && decorators) { 478 function createLocalStroageCallExpression(node: ts.PropertyDeclaration, name: string, 480 const decorators: readonly ts.Decorator[] = ts.getAllDecorators(node); [all …]
|
| D | process_custom_component.ts | 113 export function processCustomComponent(node: ts.ExpressionStatement, newStatements: ts.Statement[], 123 const componentNode: ts.CallExpression = getCustomComponentNode(node); 145 const newNode: ts.ExpressionStatement = ts.factory.updateExpressionStatement(node, 163 bindComponentAttr(node, ts.factory.createIdentifier(COMPONENT_COMMON), commomComponentNode, 175 bindComponentAttr(node, ts.factory.createIdentifier(COMPONENT_COMMON), newStatements, log); 181 addCustomComponent(node, newStatements, customComponentNewExpression, log, name, componentNode, 220 function isHasChild(node: ts.CallExpression): boolean { 221 return node.arguments && node.arguments[0] && ts.isObjectLiteralExpression(node.arguments[0]) && 222 node.arguments[0].properties && node.arguments[0].properties.length > 0; 235 function changeNodeFromCallToArrow(node: ts.CallExpression): ts.ConditionalExpression { [all …]
|
| D | process_kit_import.ts | 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, ''); 63 KitInfo.processKitInfo(moduleRequest, kitDefs.symbols as KitSymbols, node); 70 pos: node.getStart() 75 return node; 78 return (node: ts.SourceFile) => { 79 compilingEtsOrTsFiles.push(path.normalize(node.fileName)); 81 KitInfo.init(node, context); 84 if (ts.hasTsNoCheckOrTsIgnoreFlag(node)) { [all …]
|
| D | process_component_member.ts | 317 function createControllerSet(node: ts.PropertyDeclaration, componentName: ts.Identifier, 319 if (componentCollection.customDialogs.has(componentName.getText()) && node.type && 320 node.type.getText() === SET_CONTROLLER_CTR_TYPE) { 335 function processPropertyNodeDecorator(parentName: ts.Identifier, node: ts.PropertyDeclaration, 340 const decorators: readonly ts.Decorator[] = ts.getAllDecorators(node); 350 if (decoratorName !== COMPONENT_WATCH_DECORATOR && isForbiddenUseStateType(node.type)) { 352 validateForbiddenUseStateType(name, decoratorName, node.type.typeName.getText(), log); 359 if (node.initializer && forbiddenSpecifyDefaultValueDecorators.has(decoratorName)) { 362 } else if (!node.initializer && mandatorySpecifyDefaultValueDecorators.has(decoratorName)) { 366 …if (node.questionToken && mandatoryToInitViaParamDecorators.has(decoratorName) && !(decoratorName … [all …]
|
| /developtools/smartperf_host/ide/src/trace/component/chart/ |
| D | FrameChart.ts | 93 private getNodeValue(node: ChartStruct): number { 96 return node.drawSize || node.size; 98 return node.drawCount || node.count; 100 return node.drawDur || node.dur; 102 return node.drawEventCount || node.eventCount; 134 for (const node of this.currentData!) { constant 135 this.rootNode.children.push(node); 136 this.rootNode.count += node.drawCount || node.count; 137 this.rootNode.size += node.drawSize || node.size; 138 this.rootNode.dur += node.drawDur || node.dur; [all …]
|
| /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/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/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 | 153 this.importCache.forEach(node => { 154 if (node.type === IMPORT_NODE) { 155 if (!nodeByType.has(node.type)) { 156 nodeByType.set(node.type, []); 158 nodeByType.get(node.type).push(node); 161 if (node.type === DYNAMICIMPORT_NODE) { 162 if (!nodeByType.has(node.type)) { 163 nodeByType.set(node.type, []); 165 nodeByType.get(node.type).push(node);
|
| /developtools/smartperf_host/ide/src/base-ui/tree/ |
| D | LitTree.ts | 182 let node: LitTreeNode = document.createElement('lit-tree-node') as LitTreeNode; variable 183 node.title = a.title; 184 node.setAttribute('key', a.key); 185 node.topDepth = topDepth; 186 this.treeNodeDragable(node,a); 189 li.append(node); 195 this.addEvent(a,node,li,ul); 197 node.oncontextmenu = (ev): void => { 199 this.selectedNode(node); 200 this.currentSelectedNode = node; [all …]
|
| /developtools/smartperf_host/ide/src/js-heap/ |
| D | HeapDataInterface.ts | 137 public getParentFunction(node: AllocationFunction) { 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/ace_ets2bundle/compiler/src/fast_build/ark_compiler/module/ |
| D | module_source_file.ts | 333 moduleInfo.ast.program.body.forEach((node) => { 334 if (!hasDynamicImport && node.type === ROLLUP_DYNAMICIMPORT_NODE) { 337 if ((node.type === ROLLUP_IMPORT_NODE || node.type === ROLLUP_EXPORTNAME_NODE || 338 node.type === ROLLUP_EXPORTALL_NODE) && node.source) { 340 this.getOhmUrl(rollupObject, node.source.value, importMap[node.source.value]); 342 code.update(node.source.start, node.source.end, `'${ohmUrl}'`); 348 nodeSet.forEach(node => { 349 if (!hasDynamicImport && node.type === ROLLUP_DYNAMICIMPORT_NODE) { 352 if (node.source) { 353 if (node.source.type === ROLLUP_LITERAL_NODE) { [all …]
|
| /developtools/global_resource_tool/src/ |
| D | cmd_list.cpp | 67 uint32_t CmdList::GetString(const Json::Value &node, int c, HandleBack callback) in GetString() argument 69 if (!node.isString()) { in GetString() 73 if (callback(c, node.asString()) != RESTOOL_SUCCESS) { in GetString() 79 uint32_t CmdList::GetArray(const Json::Value &node, int c, HandleBack callback) in GetArray() argument 81 if (!node.isArray()) { in GetArray() 85 for (Json::ArrayIndex i = 0; i < node.size(); i++) { in GetArray() 86 if (!node[i].isString()) { in GetArray() 89 if (callback(c, node[i].asString()) != RESTOOL_SUCCESS) { in GetArray() 96 uint32_t CmdList::GetModuleNames(const Json::Value &node, int c, HandleBack callback) in GetModuleNames() argument 99 if (node.isString()) { 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() 96 tableNode->value = node.value; in PutIpInSlot() 101 if (tableNode->value == node.value) { in PutIpInSlot() 179 Node *node = GetFrame(tailIdx); in GetIpsByStackId() local 180 while (node != nullptr && nr > 0) { in GetIpsByStackId() 182 node->section.inKernel ? (node->section.ip | KERNEL_PREFIX) : node->section.ip); in GetIpsByStackId() 183 if (node->section.prevIdx == HEAD_NODE_INDEX) { in GetIpsByStackId() [all …]
|
| /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;
|
| /developtools/smartperf_host/ide/src/trace/database/logic-worker/ |
| D | ProcedureLogicWorkerCommon.ts | 134 …recursionChargeInitTree(splitMapData: any, node: MerageBean, symbolName: string, isSymbol: boolean… 135 if ((isSymbol && node.symbolName == symbolName) || (!isSymbol && node.libName == symbolName)) { 136 (splitMapData[symbolName] = splitMapData[symbolName] || []).push(node); 137 node.isStore++; 139 if (node.initChildren.length > 0) { 140 node.initChildren.forEach((child) => { 146 …recursionPruneInitTree(splitMapData: any, node: MerageBean, symbolName: string, isSymbol: boolean)… 147 if ((isSymbol && node.symbolName == symbolName) || (!isSymbol && node.libName == symbolName)) { 148 (splitMapData[symbolName] = splitMapData[symbolName] || []).push(node); 149 node.isStore++; [all …]
|