typedop代替op显示

Signed-off-by: chenxun <chenxun@kaihong.com>
This commit is contained in:
chenxun 2023-09-21 17:28:45 +08:00
parent 92cd95d3f7
commit a69340ebf8
3 changed files with 18 additions and 9 deletions

View File

@ -98,10 +98,16 @@ class IrToPicture {
if (type == 0) {//仅控制流
if (this.nodeType(ir) != "control") continue;
}
let name = ir.id + "," + ir.op;
let name;
if (XTools.CONFIG.OpTypeJsBytecode.indexOf(ir.op) >= 0) {
name = ir.id + "," + ir.bytecode;
}
else if (ir.typedop) {
name = ir.id + "," + ir.typedop;
}
else {
name = ir.id + "," + ir.op;
}
nodes[ir.id] = {
type: this.nodeType(ir),
mask: this.nodeTypeMask(ir),

View File

@ -866,15 +866,18 @@ class IrViewer {
this.selectPoint_ = [];
for (let i in nodes) {
let n = nodes[i];
let searchName;
if (XTools.CONFIG.OpTypeJsBytecode.indexOf(n.ir.op) >= 0) {
if (n.ir.id == v || n.ir.bytecode.indexOf(v) >= 0 || (isRegExp(v) && n.ir.bytecode.match(v))) {
this.searchInput.result.push(i);
}
searchName = n.ir.bytecode;
}
else if (n.ir.typedop) {
searchName = n.ir.typedop;
}
else {
if (n.ir.id == v || n.ir.op.indexOf(v) >= 0 || (isRegExp(v) && n.ir.op.match(v))) {
this.searchInput.result.push(i);
}
searchName = n.ir.op;
}
if (n.ir.id == v || searchName.indexOf(v) >= 0 || (isRegExp(v) && searchName.match(v))) {
this.searchInput.result.push(i);
}
}
if (this.searchInput.result.length > 0) {

View File

@ -78,9 +78,9 @@ class LogParser {
}
isStart(l) {
//========= After bytecode2circuit lowering [func_main_0@484@arkcompiler/ets_runtime/sd_test/ttabs.abc] ========
const regexStart = /=+ *After ([a-zA-Z0-9_ ]+) \[([#a-zA-Z0-9_@/.]+)\] *=+/g
const regexStart = /=+ *After ([a-zA-Z0-9_ ]+) \[([#a-zA-Z0-9_@/.-]+)\] *=+/g
//========= After inlining [OthreMath@test@arkcompiler/ets_runtime/sd_test/test.abc] Caller method [func_main_0@641@arkcompiler/ets_runtime/sd_test/test.abc]====================
const regexStart2 = /=+ *After ([a-zA-Z0-9_ ]+) \[([a-zA-Z0-9_@/.]+)\] *Caller method \[([#a-zA-Z0-9_@/.]+)\] *=+/g
const regexStart2 = /=+ *After ([a-zA-Z0-9_ ]+) \[([a-zA-Z0-9_@/.-]+)\] *Caller method \[([#a-zA-Z0-9_@/.]+)\] *=+/g
if (l[11] != '=') {
return;