Removed redundant dupReceiver: local and expression stack value don't have it
This commit is contained in:
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) {
|
private StackValue generateExpressionMatch(StackValue expressionToMatch, JetExpression patternExpression) {
|
||||||
if (expressionToMatch != null) {
|
if (expressionToMatch != null) {
|
||||||
Type subjectType = expressionToMatch.type;
|
Type subjectType = expressionToMatch.type;
|
||||||
expressionToMatch.dupReceiver(v);
|
|
||||||
expressionToMatch.put(subjectType, v);
|
expressionToMatch.put(subjectType, v);
|
||||||
JetType condJetType = bindingContext.get(BindingContext.EXPRESSION_TYPE, patternExpression);
|
JetType condJetType = bindingContext.get(BindingContext.EXPRESSION_TYPE, patternExpression);
|
||||||
Type condType;
|
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) {
|
private StackValue generateIsCheck(StackValue expressionToMatch, JetTypeReference typeReference, boolean negated) {
|
||||||
JetType jetType = bindingContext.get(BindingContext.TYPE, typeReference);
|
JetType jetType = bindingContext.get(BindingContext.TYPE, typeReference);
|
||||||
expressionToMatch.dupReceiver(v);
|
|
||||||
generateInstanceOf(expressionToMatch, jetType, false);
|
generateInstanceOf(expressionToMatch, jetType, false);
|
||||||
StackValue value = StackValue.onStack(Type.BOOLEAN_TYPE);
|
StackValue value = StackValue.onStack(Type.BOOLEAN_TYPE);
|
||||||
return negated ? StackValue.not(value) : value;
|
return negated ? StackValue.not(value) : value;
|
||||||
|
|||||||
Reference in New Issue
Block a user