提交 7227f1ac 编写于 作者: S Skylot

fix: don't skip method instructions in fallback mode (#1063)

上级 23f08810
......@@ -291,13 +291,15 @@ public class MethodGen {
code.startLine("// Can't load method instructions.");
return;
}
long insnCountEstimate = Stream.of(insnArr)
.filter(Objects::nonNull)
.filter(insn -> insn.getType() != InsnType.NOP)
.count();
if (insnCountEstimate > 100) {
code.startLine("// Method dump skipped, instructions count: " + insnArr.length);
return;
if (fallbackOption == COMMENTED_DUMP) {
long insnCountEstimate = Stream.of(insnArr)
.filter(Objects::nonNull)
.filter(insn -> insn.getType() != InsnType.NOP)
.count();
if (insnCountEstimate > 100) {
code.startLine("// Method dump skipped, instructions count: " + insnArr.length);
return;
}
}
code.incIndent();
if (mth.getThisArg() != null) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册