Minor, fix typo
This commit is contained in:
@@ -1533,7 +1533,7 @@ public class ExpressionCodegen extends JetVisitor<StackValue, StackValue> implem
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean hasFinallyBLocks() {
|
public boolean hasFinallyBlocks() {
|
||||||
for (BlockStackElement element : blockStackElements) {
|
for (BlockStackElement element : blockStackElements) {
|
||||||
if (element instanceof FinallyBlockStackElement) {
|
if (element instanceof FinallyBlockStackElement) {
|
||||||
return true;
|
return true;
|
||||||
@@ -1546,7 +1546,6 @@ public class ExpressionCodegen extends JetVisitor<StackValue, StackValue> implem
|
|||||||
@Nullable FinallyBlockStackElement finallyBlockStackElement,
|
@Nullable FinallyBlockStackElement finallyBlockStackElement,
|
||||||
@Nullable Label tryCatchBlockEnd
|
@Nullable Label tryCatchBlockEnd
|
||||||
) {
|
) {
|
||||||
|
|
||||||
if (finallyBlockStackElement != null) {
|
if (finallyBlockStackElement != null) {
|
||||||
assert finallyBlockStackElement.gaps.size() % 2 == 0 : "Finally block gaps are inconsistent";
|
assert finallyBlockStackElement.gaps.size() % 2 == 0 : "Finally block gaps are inconsistent";
|
||||||
|
|
||||||
@@ -1601,7 +1600,7 @@ public class ExpressionCodegen extends JetVisitor<StackValue, StackValue> implem
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void generateFinallyBlocksIfNeeded(Type returnType) {
|
public void generateFinallyBlocksIfNeeded(Type returnType) {
|
||||||
if (hasFinallyBLocks()) {
|
if (hasFinallyBlocks()) {
|
||||||
if (!Type.VOID_TYPE.equals(returnType)) {
|
if (!Type.VOID_TYPE.equals(returnType)) {
|
||||||
int returnValIndex = myFrameMap.enterTemp(returnType);
|
int returnValIndex = myFrameMap.enterTemp(returnType);
|
||||||
StackValue.local(returnValIndex, returnType).store(returnType, v);
|
StackValue.local(returnValIndex, returnType).store(returnType, v);
|
||||||
|
|||||||
@@ -25,9 +25,6 @@ import org.jetbrains.jet.codegen.binding.CodegenBinding;
|
|||||||
import org.jetbrains.jet.codegen.context.CodegenContext;
|
import org.jetbrains.jet.codegen.context.CodegenContext;
|
||||||
import org.jetbrains.jet.codegen.context.MethodContext;
|
import org.jetbrains.jet.codegen.context.MethodContext;
|
||||||
import org.jetbrains.jet.codegen.context.PackageContext;
|
import org.jetbrains.jet.codegen.context.PackageContext;
|
||||||
import org.jetbrains.jet.lang.resolve.java.jvmSignature.JvmMethodParameterKind;
|
|
||||||
import org.jetbrains.jet.lang.resolve.java.jvmSignature.JvmMethodParameterSignature;
|
|
||||||
import org.jetbrains.jet.lang.resolve.java.jvmSignature.JvmMethodSignature;
|
|
||||||
import org.jetbrains.jet.codegen.state.GenerationState;
|
import org.jetbrains.jet.codegen.state.GenerationState;
|
||||||
import org.jetbrains.jet.codegen.state.JetTypeMapper;
|
import org.jetbrains.jet.codegen.state.JetTypeMapper;
|
||||||
import org.jetbrains.jet.descriptors.serialization.descriptors.DeserializedSimpleFunctionDescriptor;
|
import org.jetbrains.jet.descriptors.serialization.descriptors.DeserializedSimpleFunctionDescriptor;
|
||||||
@@ -39,6 +36,9 @@ import org.jetbrains.jet.lang.resolve.BindingContextUtils;
|
|||||||
import org.jetbrains.jet.lang.resolve.DescriptorUtils;
|
import org.jetbrains.jet.lang.resolve.DescriptorUtils;
|
||||||
import org.jetbrains.jet.lang.resolve.calls.model.ResolvedCall;
|
import org.jetbrains.jet.lang.resolve.calls.model.ResolvedCall;
|
||||||
import org.jetbrains.jet.lang.resolve.java.AsmTypeConstants;
|
import org.jetbrains.jet.lang.resolve.java.AsmTypeConstants;
|
||||||
|
import org.jetbrains.jet.lang.resolve.java.jvmSignature.JvmMethodParameterKind;
|
||||||
|
import org.jetbrains.jet.lang.resolve.java.jvmSignature.JvmMethodParameterSignature;
|
||||||
|
import org.jetbrains.jet.lang.resolve.java.jvmSignature.JvmMethodSignature;
|
||||||
import org.jetbrains.jet.lang.types.lang.InlineStrategy;
|
import org.jetbrains.jet.lang.types.lang.InlineStrategy;
|
||||||
import org.jetbrains.jet.lang.types.lang.InlineUtil;
|
import org.jetbrains.jet.lang.types.lang.InlineUtil;
|
||||||
import org.jetbrains.jet.renderer.DescriptorRenderer;
|
import org.jetbrains.jet.renderer.DescriptorRenderer;
|
||||||
@@ -53,11 +53,12 @@ import org.jetbrains.org.objectweb.asm.util.TraceMethodVisitor;
|
|||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.PrintWriter;
|
import java.io.PrintWriter;
|
||||||
import java.io.StringWriter;
|
import java.io.StringWriter;
|
||||||
import java.util.*;
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.ListIterator;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
import static org.jetbrains.jet.codegen.AsmUtil.getMethodAsmFlags;
|
import static org.jetbrains.jet.codegen.AsmUtil.*;
|
||||||
import static org.jetbrains.jet.codegen.AsmUtil.isPrimitive;
|
|
||||||
import static org.jetbrains.jet.codegen.AsmUtil.isStatic;
|
|
||||||
|
|
||||||
public class InlineCodegen implements CallGenerator {
|
public class InlineCodegen implements CallGenerator {
|
||||||
private final GenerationState state;
|
private final GenerationState state;
|
||||||
@@ -494,7 +495,7 @@ public class InlineCodegen implements CallGenerator {
|
|||||||
|
|
||||||
|
|
||||||
public void generateAndInsertFinallyBlocks(MethodNode intoNode, List<MethodInliner.FinallyBlockInfo> insertPoints) {
|
public void generateAndInsertFinallyBlocks(MethodNode intoNode, List<MethodInliner.FinallyBlockInfo> insertPoints) {
|
||||||
if (!codegen.hasFinallyBLocks()) return;
|
if (!codegen.hasFinallyBlocks()) return;
|
||||||
|
|
||||||
for (MethodInliner.FinallyBlockInfo insertPoint : insertPoints) {
|
for (MethodInliner.FinallyBlockInfo insertPoint : insertPoints) {
|
||||||
MethodNode finallyNode = InlineCodegenUtil.createEmptyMethodNode();
|
MethodNode finallyNode = InlineCodegenUtil.createEmptyMethodNode();
|
||||||
|
|||||||
Reference in New Issue
Block a user