Lines Matching refs:nodes

82   static isLoopBack(l, nodes) {
83 if (XTools.CONFIG.OpTypeLoopBegin.indexOf(nodes[l.toId].ir.op) >= 0 && l.fromId === nodes[l.toId].ir.in[0][1]) {
86 if (XTools.CONFIG.OpTypeDependSelector.indexOf(nodes[l.toId].ir.op) >= 0 && l.fromId === nodes[l.toId].ir.in[1][1]) {
89 if (XTools.CONFIG.OpTypeValueSelector.indexOf(nodes[l.toId].ir.op) >= 0 && l.fromId === nodes[l.toId].ir.in[2][1]) {
95 let nodes = {};
113 nodes[ir.id] = {
136 this.generateLine(nodes, lines, lid);
137 this.resetPicture(nodes, isBlock);
140 nodes: nodes,
144 static generateLine(nodes, lines, lid) {
145 for (let i in nodes) { //生成连接线
147 for (let inP1 = 0; inP1 < nodes[inId].ir.in.length; inP1++) {
148 for (let inP2 = 0; inP2 < nodes[inId].ir.in[inP1].length; inP2++) {
149 let outId = nodes[inId].ir.in[inP1][inP2];
150 if (outId in nodes) {
154 inNum: nodes[inId].inCount,
155 outNum: nodes[outId].outCount,
160 outP: nodes[outId].ir.out.indexOf(inId),
163 nodes[inId].inCount++;
164 nodes[inId].in.push(line);
165 nodes[outId].outCount++;
166 nodes[outId].out.push(line);
174 static deepTest(n, nodes, isBlock, stack, dist) {
181 if (stack.length > Object.keys(nodes).length * 2) {
188 let nout = nodes[n.out[i].toId];
192 if (this.deepTest(nout, nodes, isBlock, stack, dist)) {
197 if (!this.isLoopBack(n.out[i], nodes) && !isBlock) {
199 if (this.deepTest(nout, nodes, isBlock, stack, dist)) {
223 static resetPicture(nodes, isBlock) {
224 if (this.TEST_LOOP && Object.keys(nodes).length > 0) {
225 for (let k in nodes) {
227 nodes[k].deep = 0;
230 nodes[k].deep = this.INVALID_DEEP;
234 this.deepTest(nodes[0], nodes, isBlock, testResult, 0);
242 for (let k in nodes) {
243 let n = nodes[k];
263 let n = nodes[k];
268 let nout = nodes[n.out[i].toId];
275 if (!this.isLoopBack(n.out[i], nodes) && !isBlock) {
283 let nin = nodes[n.in[i].fromId];
290 if (!this.isLoopBack(n.in[i], nodes) && !isBlock) {
304 for (let k in nodes) { //节点分层
305 let n = nodes[k];
315 for (let k in nodes) {
316 let n = nodes[k];