Home
last modified time | relevance | path

Searched refs:node (Results 1 – 25 of 157) sorted by relevance

1234567

/developtools/smartperf_host/ide/src/js-heap/logic/
DAllocation.ts33 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 …]
DHeapLoader.ts102 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/profiler/host/smartperf/ide/src/js-heap/logic/
DAllocation.ts33 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 …]
DHeapLoader.ts102 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/ace_ets2bundle/compiler/
Dbuild_declarations_file.js115 sourceFile.statements.forEach((node) => {
116 if (!ts.isImportDeclaration(node)) {
117 …if (node.modifiers && node.modifiers.length && node.modifiers[0].kind === ts.SyntaxKind.ExportKeyw…
118 node.modifiers.splice(0, 1);
120 if (isVariable(node)) {
121 const name = node.declarationList.declarations[0].name.getText();
122 const type = node.declarationList.declarations[0].type.getText();
124 … const declarationNode = ts.factory.updateVariableDeclaration(node.declarationList.declarations[0],
125 … ts.factory.createIdentifier(type), node.declarationList.declarations[0].exclamationToken,
126node.declarationList.declarations[0].type, node.declarationList.declarations[0].initializer);
[all …]
/developtools/ace_ets2bundle/compiler/src/
Dprocess_ui_syntax.ts142 return (node: ts.SourceFile) => {
143 const hasTsNoCheckOrTsIgnore = ts.hasTsNoCheckOrTsIgnoreFlag(node);
144 compilingEtsOrTsFiles.push(path.normalize(node.fileName));
145 pagesDir = path.resolve(path.dirname(node.fileName));
146 resourceFileName = path.resolve(node.fileName);
148 storedFileInfo.transformCacheFiles[node.fileName] = {
149 mtimeMs: fs.existsSync(node.fileName) ? fs.statSync(node.fileName).mtimeMs : 0,
152 transformLog.sourceFile = node;
153 preprocessIdAttrs(node.fileName);
155 path.resolve(node.fileName) === path.resolve(projectConfig.projectPath, 'app.ets') ||
[all …]
Dprocess_import.ts84 export default function processImport(node: ts.ImportDeclaration | ts.ImportEqualsDeclaration |
89 if (ts.isImportDeclaration(node) || ts.isExportDeclaration(node)) {
90 filePath = node.moduleSpecifier.getText().replace(/'|"/g, '');
91 if (ts.isImportDeclaration(node) && node.importClause && node.importClause.name &&
92 ts.isIdentifier(node.importClause.name)) {
93 defaultName = node.importClause.name.escapedText.toString();
98 if (ts.isImportDeclaration(node) && node.importClause && node.importClause.namedBindings &&
99 ts.isNamedImports(node.importClause.namedBindings) &&
100 node.importClause.namedBindings.elements && isEntryPage) {
101 node.importClause.namedBindings.elements.forEach(item => {
[all …]
Dprocess_component_class.ts139 export function processComponentClass(node: ts.StructDeclaration, context: ts.TransformationContext,
142 processMembers(node.members, node.name, context, log, program, checkPreview(node));
143 return ts.factory.createClassDeclaration(undefined, node.modifiers, node.name,
144 node.typeParameters, updateHeritageClauses(node, log), memberNode);
147 function checkPreview(node: ts.ClassDeclaration) {
149 if (node && node.decorators) {
150 for (let i = 0; i < node.decorators.length; i++) {
151 const name: string = node.decorators[i].getText().replace(/\([^\(\)]*\)/, '').trim();
375 function createLocalStroageCallExpression(node: ts.PropertyDeclaration, name: string,
384node.initializer ? node.initializer : ts.factory.createNumericLiteral(COMPONENT_CONSTRUCTOR_UNDEFI…
[all …]
Dvalidate_ui_syntax.ts276 export function isObservedClass(node: ts.Node): boolean {
277 if (ts.isClassDeclaration(node) && hasDecorator(node, COMPONENT_OBSERVED_DECORATOR)) {
283 export function isCustomDialogClass(node: ts.Node): boolean {
284 if (ts.isStructDeclaration(node) && hasDecorator(node, COMPONENT_DECORATOR_CUSTOM_DIALOG)) {
296 …component: ts.Identifier, log: LogInfo[], sourceFile: ts.SourceFile, node: ts.StructDeclaration): …
308 checkEntryComponent(node, log, sourceFile);
311 componentCollection.entryComponentPos = node.getStart();
352 function checkConcurrentDecorator(node: ts.FunctionDeclaration | ts.MethodDeclaration, log: LogInfo…
356 addLog(LogType.ERROR, message, node.decorators!.pos, log, sourceFile);
358 if (ts.isMethodDeclaration(node)) {
[all …]
Dprocess_component_build.ts171 export function processComponentBuild(node: ts.MethodDeclaration,
180 if (node.body && node.body.statements && node.body.statements.length &&
181 validateRootNode(node, log)) {
182 newNode = ts.factory.updateMethodDeclaration(node, node.decorators, node.modifiers,
183 node.asteriskToken, renderNode, node.questionToken, node.typeParameters, node.parameters,
184 node.type, processComponentBlock(node.body, false, log));
186 newNode = ts.factory.updateMethodDeclaration(node, node.decorators, node.modifiers,
187 node.asteriskToken, renderNode, node.questionToken, node.typeParameters, node.parameters,
188 node.type, node.body);
193 export function processComponentBlock(node: ts.Block, isLazy: boolean, log: LogInfo[],
[all …]
Dprocess_custom_component.ts115 export function processCustomComponent(node: ts.ExpressionStatement, newStatements: ts.Statement[],
125 const componentNode: ts.CallExpression = getCustomComponentNode(node);
147 const newNode: ts.ExpressionStatement = ts.factory.updateExpressionStatement(node,
164 bindComponentAttr(node, ts.factory.createIdentifier(COMPONENT_COMMON), commomComponentNode,
172 bindComponentAttr(node, ts.factory.createIdentifier(COMPONENT_COMMON), newStatements, log);
178 addCustomComponent(node, newStatements, customComponentNewExpression, log, name, componentNode,
217 function isHasChild(node: ts.CallExpression): boolean {
218 return node.arguments && node.arguments[0] && ts.isObjectLiteralExpression(node.arguments[0]) &&
219 node.arguments[0].properties && node.arguments[0].properties.length > 0;
232 function changeNodeFromCallToArrow(node: ts.CallExpression): ts.ArrowFunction {
[all …]
/developtools/smartperf_host/ide/src/trace/component/chart/
DFrameChart.ts144 …private calMaxDepth(node: ChartStruct, depth: number, isCalRoot: boolean, isCalDisplay: boolean): …
145 node.depth = depth;
146 this.clearDisplayInfo(node);
147 if (node.isSearch && isCalDisplay) {
149 module.count = node.drawCount = node.count;
150 module.dur = node.drawDur = node.dur;
151 module.size = node.drawSize = node.size;
152 this.setParentDisplayInfo(node, module);
157 if (node.children && node.children.length > 0) {
160 for (let children of node.children) {
[all …]
/developtools/profiler/host/smartperf/ide/src/trace/component/chart/
DFrameChart.ts144 …private calMaxDepth(node: ChartStruct, depth: number, isCalRoot: boolean, isCalDisplay: boolean): …
145 node.depth = depth;
146 this.clearDisplayInfo(node);
147 if (node.isSearch && isCalDisplay) {
149 module.count = node.drawCount = node.count;
150 module.dur = node.drawDur = node.dur;
151 module.size = node.drawSize = node.size;
152 this.setParentDisplayInfo(node, module);
157 if (node.children && node.children.length > 0) {
160 for (let children of node.children) {
[all …]
/developtools/ace_ets2bundle/compiler/src/fast_build/ark_compiler/module/
Dmodule_source_file.ts146 nodeSet.forEach(node => {
147 if (!hasDynamicImport && node.type === ROLLUP_DYNAMICIMPORT_NODE) {
150 if (node.source) {
151 if (node.source.type === ROLLUP_LITERAL_NODE) {
153 this.getOhmUrl(rollupObject, node.source.value, importMap[node.source.value]);
155 code.update(node.source.start, node.source.end, `'${ohmUrl}'`);
187 const visitor: ts.Visitor = node => {
188 node = ts.visitEachChild(node, visitor, context);
190 … if (ts.isImportDeclaration(node) || (ts.isExportDeclaration(node) && node.moduleSpecifier)) {
193 const moduleRequest: string = node.moduleSpecifier.getText().replace(/'|"/g, '');
[all …]
/developtools/smartperf_host/ide/src/trace/bean/
DFrameChartStruct.ts59 export function setFuncFrame(node: ChartStruct, canvas_frame: Rect, total: number, mode: ChartMode)…
60 if (!node.frame) {
61 node.frame = new Rect(0, 0, 0, 0);
64 if (node.parent) {
65 let idx = node.parent.children.indexOf(node);
67 node.frame!.x = node.parent.frame!.x;
70node.frame.x = node.parent.children[idx - 1].frame!.x + node.parent.children[idx - 1].frame!.width;
74 node.frame!.width = Math.floor(((node.drawSize || node.size) / total) * canvas_frame.width);
77node.frame!.width = Math.floor(((node.drawCount || node.count) / total) * canvas_frame.width);
80 node.frame!.width = Math.floor(((node.drawDur || node.dur) / total) * canvas_frame.width);
[all …]
/developtools/profiler/host/smartperf/ide/src/trace/bean/
DFrameChartStruct.ts59 export function setFuncFrame(node: ChartStruct, canvas_frame: Rect, total: number, mode: ChartMode)…
60 if (!node.frame) {
61 node.frame = new Rect(0, 0, 0, 0);
64 if (node.parent) {
65 let idx = node.parent.children.indexOf(node);
67 node.frame!.x = node.parent.frame!.x;
70node.frame.x = node.parent.children[idx - 1].frame!.x + node.parent.children[idx - 1].frame!.width;
74 node.frame!.width = Math.floor(((node.drawSize || node.size) / total) * canvas_frame.width);
77node.frame!.width = Math.floor(((node.drawCount || node.count) / total) * canvas_frame.width);
80 node.frame!.width = Math.floor(((node.drawDur || node.dur) / total) * canvas_frame.width);
[all …]
/developtools/ace_js2bundle/ace-loader/src/lite/
Dlite-transform-template.js58 [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/profiler/host/smartperf/ide/src/js-heap/utils/
DUtils.ts19 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/smartperf_host/ide/src/js-heap/utils/
DUtils.ts19 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/
Dcontent.js36 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 …]
/developtools/profiler/host/smartperf/ide/src/trace/database/logic-worker/
DProcedureLogicWorkerCommon.ts104 …recursionChargeInitTree(splitMapData: any, node: MerageBean, symbolName: string, isSymbol: boolean…
105 if ((isSymbol && node.symbolName == symbolName) || (!isSymbol && node.libName == symbolName)) {
106 (splitMapData[symbolName] = splitMapData[symbolName] || []).push(node);
107 node.isStore++;
109 if (node.initChildren.length > 0) {
110 node.initChildren.forEach((child) => {
116 …recursionPruneInitTree(splitMapData: any, node: MerageBean, symbolName: string, isSymbol: boolean)…
117 if ((isSymbol && node.symbolName == symbolName) || (!isSymbol && node.libName == symbolName)) {
118 (splitMapData[symbolName] = splitMapData[symbolName] || []).push(node);
119 node.isStore++;
[all …]
/developtools/smartperf_host/ide/src/trace/database/logic-worker/
DProcedureLogicWorkerCommon.ts104 …recursionChargeInitTree(splitMapData: any, node: MerageBean, symbolName: string, isSymbol: boolean…
105 if ((isSymbol && node.symbolName == symbolName) || (!isSymbol && node.libName == symbolName)) {
106 (splitMapData[symbolName] = splitMapData[symbolName] || []).push(node);
107 node.isStore++;
109 if (node.initChildren.length > 0) {
110 node.initChildren.forEach((child) => {
116 …recursionPruneInitTree(splitMapData: any, node: MerageBean, symbolName: string, isSymbol: boolean)…
117 if ((isSymbol && node.symbolName == symbolName) || (!isSymbol && node.libName == symbolName)) {
118 (splitMapData[symbolName] = splitMapData[symbolName] || []).push(node);
119 node.isStore++;
[all …]
/developtools/smartperf_host/ide/src/base-ui/tree/
DLitTree.ts177 let node: LitTreeNode = document.createElement('lit-tree-node') as LitTreeNode; variable
178 node.title = a.title;
179 node.setAttribute('key', a.key);
180 node.topDepth = topDepth;
182 node.draggable = true;
187 node.ondrag = ev => this.onDrag(ev);//元素正在拖动时触发
188 node.ondragstart = ev => this.onDragStart(ev);//用户开始拖动元素时触发
189 node.ondragend = ev => this.onDragEnd(ev);// 用户完成元素拖动后触发
191 node.ondragenter = ev => this.onDragEnter(ev);//当被鼠标拖动的对象进入其容器范围内时触发此事件
192 node.ondragover = ev => this.onDragOver(ev);//当某被拖动的对象在另一对象容器范围内拖动时触发此事件
[all …]
/developtools/profiler/host/smartperf/ide/src/js-heap/
DHeapDataInterface.ts138 public getParentFunction(node: AllocationFunction) {
139 let filStruct = this.baseFileStruct ? this.baseFileStruct : this.getFileStructById(node.fileId);
143 filStruct.heapLoader.loadAllocationParent(node);
151 public getNextForConstructor(node: ConstructorItem): Array<ConstructorItem> {
152 let filStruct = this.baseFileStruct ? this.baseFileStruct : this.getFileStructById(node.fileId);
154 switch (node.type) {
156 children = node.classChildren;
160 children = filStruct!.heapLoader.getNextNode(node);
175 let node = baseFileStruct.heapLoader.getNodes()[idx]; variable
176 let compareNode = HeapNodeToConstructorItem(node);
[all …]
/developtools/smartperf_host/ide/src/js-heap/
DHeapDataInterface.ts137 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 …]

1234567