Skip to content

Commit

Permalink
merge upstream
Browse files Browse the repository at this point in the history
  • Loading branch information
develar authored and Pavel V. Talanov committed Dec 18, 2012
1 parent 4862816 commit 6e042d6
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@
import org.jetbrains.jet.lang.resolve.DescriptorUtils;
import org.jetbrains.jet.lang.resolve.calls.autocasts.AutoCastReceiver;
import org.jetbrains.jet.lang.resolve.calls.model.*;
import org.jetbrains.jet.lang.resolve.calls.util.CallMaker;
import org.jetbrains.jet.lang.resolve.calls.util.ExpressionAsFunctionDescriptor;
import org.jetbrains.jet.lang.resolve.constants.CompileTimeConstant;
import org.jetbrains.jet.lang.resolve.java.AsmTypeConstants;
Expand All @@ -59,7 +58,6 @@
import org.jetbrains.jet.lang.types.checker.JetTypeChecker;
import org.jetbrains.jet.lang.types.lang.KotlinBuiltIns;
import org.jetbrains.jet.lexer.JetTokens;
import org.jetbrains.jet.renderer.DescriptorRenderer;

import java.util.*;

Expand Down Expand Up @@ -358,6 +356,10 @@ public StackValue visitIfExpression(JetIfExpression expression, StackValue recei
return generateIfExpression(expression, false);
}

/* package */ StackValue generateIfExpression(JetIfExpression expression, boolean isStatement) {
Type asmType = isStatement ? Type.VOID_TYPE : expressionType(expression);
StackValue condition = gen(expression.getCondition());

/* package */ StackValue generateIfExpression(JetIfExpression expression, boolean isStatement) {
Type asmType = isStatement ? Type.VOID_TYPE : expressionType(expression);
StackValue condition = gen(expression.getCondition());
Expand Down Expand Up @@ -984,12 +986,16 @@ private StackValue generateSingleBranchIf(

gen(expression, targetType);

Label end = new Label();
v.goTo(end);
Label end = new Label();
v.goTo(end);

markLineNumber(ifExpression);
v.mark(elseLabel);
StackValue.putTuple0Instance(v);
v.mark(elseLabel);
StackValue.putTuple0Instance(v);

v.mark(end);
return StackValue.onStack(targetType);
Expand Down Expand Up @@ -3250,6 +3256,8 @@ public StackValue generateTryExpression(JetTryExpression expression, boolean isS
if (!isStatement) {
v.store(savedValue, expectedAsmType);
}
v.store(savedValue, expectedAsmType);
}

myFrameMap.leave(descriptor);

Expand Down Expand Up @@ -3292,6 +3300,9 @@ public StackValue generateTryExpression(JetTryExpression expression, boolean isS
v.load(savedValue, expectedAsmType);
myFrameMap.leaveTemp(expectedAsmType);
}
v.load(savedValue, expectedAsmType);
myFrameMap.leaveTemp(expectedAsmType);
}

if (finallyBlock != null) {
blockStackElements.pop();
Expand Down
2 changes: 1 addition & 1 deletion idea/src/META-INF/plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<version>@snapshot@</version>
<vendor url="http://www.jetbrains.com">JetBrains Inc.</vendor>

<idea-version since-build="122.813" until-build="123.9999" />
<idea-version since-build="123.4" until-build="123.9999" />

<depends optional="true">JUnit</depends>
<depends optional="true" config-file="javaScriptDebug.xml">JavaScriptDebugger</depends>
Expand Down

0 comments on commit 6e042d6

Please sign in to comment.