Minor. Rename MandatoryMethodTransformer -> FixStackWithLabelNormalizationMethodTransformer
It's necessary because some usages suppose that it's only purpose is fixing stack
This commit is contained in:
+2
-2
@@ -18,7 +18,7 @@ package org.jetbrains.kotlin.codegen.coroutines
|
||||
|
||||
import org.jetbrains.kotlin.codegen.*
|
||||
import org.jetbrains.kotlin.codegen.optimization.DeadCodeEliminationMethodTransformer
|
||||
import org.jetbrains.kotlin.codegen.optimization.MandatoryMethodTransformer
|
||||
import org.jetbrains.kotlin.codegen.optimization.FixStackWithLabelNormalizationMethodTransformer
|
||||
import org.jetbrains.kotlin.codegen.optimization.common.OptimizationBasicInterpreter
|
||||
import org.jetbrains.kotlin.codegen.optimization.common.asSequence
|
||||
import org.jetbrains.kotlin.codegen.optimization.common.insnListOf
|
||||
@@ -74,7 +74,7 @@ class CoroutineTransformerMethodVisitor(
|
||||
}
|
||||
|
||||
// Spill stack to variables before suspension points, try/catch blocks
|
||||
MandatoryMethodTransformer().transform("fake", methodNode)
|
||||
FixStackWithLabelNormalizationMethodTransformer().transform("fake", methodNode)
|
||||
|
||||
// Remove unreachable suspension points
|
||||
// If we don't do this, then relevant frames will not be analyzed, that is unexpected from point of view of next steps (e.g. variable spilling)
|
||||
|
||||
@@ -23,7 +23,7 @@ import org.jetbrains.annotations.Nullable;
|
||||
import org.jetbrains.kotlin.codegen.ClosureCodegen;
|
||||
import org.jetbrains.kotlin.codegen.StackValue;
|
||||
import org.jetbrains.kotlin.codegen.intrinsics.IntrinsicMethods;
|
||||
import org.jetbrains.kotlin.codegen.optimization.MandatoryMethodTransformer;
|
||||
import org.jetbrains.kotlin.codegen.optimization.FixStackWithLabelNormalizationMethodTransformer;
|
||||
import org.jetbrains.kotlin.codegen.state.KotlinTypeMapper;
|
||||
import org.jetbrains.kotlin.utils.SmartList;
|
||||
import org.jetbrains.kotlin.utils.SmartSet;
|
||||
@@ -520,7 +520,7 @@ public class MethodInliner {
|
||||
@NotNull
|
||||
private Frame<SourceValue>[] analyzeMethodNodeBeforeInline(@NotNull MethodNode node) {
|
||||
try {
|
||||
new MandatoryMethodTransformer().transform("fake", node);
|
||||
new FixStackWithLabelNormalizationMethodTransformer().transform("fake", node);
|
||||
}
|
||||
catch (Throwable e) {
|
||||
throw wrapException(e, node, "couldn't inline method call");
|
||||
|
||||
+1
-1
@@ -20,7 +20,7 @@ import org.jetbrains.kotlin.codegen.optimization.fixStack.FixStackMethodTransfor
|
||||
import org.jetbrains.kotlin.codegen.optimization.transformer.MethodTransformer
|
||||
import org.jetbrains.org.objectweb.asm.tree.MethodNode
|
||||
|
||||
class MandatoryMethodTransformer : MethodTransformer() {
|
||||
class FixStackWithLabelNormalizationMethodTransformer : MethodTransformer() {
|
||||
private val labelNormalization = LabelNormalizationMethodTransformer()
|
||||
private val fixStack = FixStackMethodTransformer()
|
||||
|
||||
|
||||
+1
-1
@@ -30,7 +30,7 @@ import org.jetbrains.org.objectweb.asm.tree.MethodNode;
|
||||
public class OptimizationMethodVisitor extends TransformationMethodVisitor {
|
||||
private static final int MEMORY_LIMIT_BY_METHOD_MB = 50;
|
||||
|
||||
private static final MethodTransformer MANDATORY_METHOD_TRANSFORMER = new MandatoryMethodTransformer();
|
||||
private static final MethodTransformer MANDATORY_METHOD_TRANSFORMER = new FixStackWithLabelNormalizationMethodTransformer();
|
||||
|
||||
private static final MethodTransformer[] OPTIMIZATION_TRANSFORMERS = new MethodTransformer[] {
|
||||
new RedundantNullCheckMethodTransformer(),
|
||||
|
||||
Reference in New Issue
Block a user