Removed redundant dupReceiver: local and expression stack value don't have it

This commit is contained in:
mikhael.bogdanov
2014-04-24 12:22:58 +04:00
committed by Mikhael Bogdanov
parent ae9f6fa5fc
commit f57bcbb411
@@ -3589,7 +3589,6 @@ The "returned" value of try expression with no finally is either the last expres
private StackValue generateExpressionMatch(StackValue expressionToMatch, JetExpression patternExpression) {
if (expressionToMatch != null) {
Type subjectType = expressionToMatch.type;
expressionToMatch.dupReceiver(v);
expressionToMatch.put(subjectType, v);
JetType condJetType = bindingContext.get(BindingContext.EXPRESSION_TYPE, patternExpression);
Type condType;
@@ -3614,7 +3613,6 @@ The "returned" value of try expression with no finally is either the last expres
private StackValue generateIsCheck(StackValue expressionToMatch, JetTypeReference typeReference, boolean negated) {
JetType jetType = bindingContext.get(BindingContext.TYPE, typeReference);
expressionToMatch.dupReceiver(v);
generateInstanceOf(expressionToMatch, jetType, false);
StackValue value = StackValue.onStack(Type.BOOLEAN_TYPE);
return negated ? StackValue.not(value) : value;