mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
move constant
This commit is contained in:
@@ -224,8 +224,6 @@ abstract class Analysis<Res> {
|
||||
}
|
||||
};
|
||||
|
||||
protected static final BasicValue THROWABLE_VALUE = new BasicValue(Type.getType("java/lang/Throwable"));
|
||||
|
||||
public static final int STEPS_LIMIT = 30000;
|
||||
public static final int EQUATION_SIZE_LIMIT = 30;
|
||||
public static final int MERGE_LIMIT = 100000;
|
||||
|
||||
+2
-1
@@ -15,6 +15,7 @@
|
||||
*/
|
||||
package com.intellij.codeInspection.bytecodeAnalysis;
|
||||
|
||||
import com.intellij.codeInspection.bytecodeAnalysis.asm.ASMUtils;
|
||||
import com.intellij.codeInspection.bytecodeAnalysis.asm.ControlFlowGraph.Edge;
|
||||
import com.intellij.codeInspection.bytecodeAnalysis.asm.RichControlFlow;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
@@ -214,7 +215,7 @@ class InOutAnalysis extends Analysis<Result<Key, Value>> {
|
||||
if (controlFlow.errors[nextInsnIndex] && controlFlow.errorTransitions.contains(new Edge(insnIndex, nextInsnIndex))) {
|
||||
nextFrame1 = new Frame<BasicValue>(frame);
|
||||
nextFrame1.clearStack();
|
||||
nextFrame1.push(THROWABLE_VALUE);
|
||||
nextFrame1.push(ASMUtils.THROWABLE_VALUE);
|
||||
}
|
||||
pendingPush(new ProceedState<Result<Key, Value>>(
|
||||
new State(subIndices[i], new Conf(nextInsnIndex, nextFrame1), nextHistory, taken, false)));
|
||||
|
||||
+2
-1
@@ -15,6 +15,7 @@
|
||||
*/
|
||||
package com.intellij.codeInspection.bytecodeAnalysis;
|
||||
|
||||
import com.intellij.codeInspection.bytecodeAnalysis.asm.ASMUtils;
|
||||
import com.intellij.codeInspection.bytecodeAnalysis.asm.ControlFlowGraph.Edge;
|
||||
import com.intellij.codeInspection.bytecodeAnalysis.asm.RichControlFlow;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
@@ -283,7 +284,7 @@ class NonNullInAnalysis extends Analysis<PResult> {
|
||||
if (controlFlow.errors[nextInsnIndex] && controlFlow.errorTransitions.contains(new Edge(insnIndex, nextInsnIndex))) {
|
||||
nextFrame1 = new Frame<BasicValue>(frame);
|
||||
nextFrame1.clearStack();
|
||||
nextFrame1.push(THROWABLE_VALUE);
|
||||
nextFrame1.push(ASMUtils.THROWABLE_VALUE);
|
||||
}
|
||||
pendingPush(new ProceedState<PResult>(new State(subIndices[i], new Conf(nextInsnIndex, nextFrame1), nextHistory, taken, hasCompanions || notEmptySubResult)));
|
||||
}
|
||||
|
||||
+4
@@ -16,11 +16,15 @@
|
||||
package com.intellij.codeInspection.bytecodeAnalysis.asm;
|
||||
|
||||
import org.jetbrains.org.objectweb.asm.Type;
|
||||
import org.jetbrains.org.objectweb.asm.tree.analysis.BasicValue;
|
||||
|
||||
/**
|
||||
* @author lambdamix
|
||||
*/
|
||||
public class ASMUtils {
|
||||
public static final Type THROWABLE_TYPE = Type.getType("java/lang/Throwable");
|
||||
public static final BasicValue THROWABLE_VALUE = new BasicValue(THROWABLE_TYPE);
|
||||
|
||||
public static boolean isReferenceType(Type tp) {
|
||||
int sort = tp.getSort();
|
||||
return sort == Type.OBJECT || sort == Type.ARRAY;
|
||||
|
||||
Reference in New Issue
Block a user