From 21d5785986b870bbe0dca8ef078b1dc524900a73 Mon Sep 17 00:00:00 2001 From: Michael Bogdanov Date: Wed, 19 Nov 2014 17:10:22 +0300 Subject: [PATCH] Inline StackValueWithSimpleReceiver utility constructor --- .../org/jetbrains/jet/codegen/StackValue.java | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/compiler/backend/src/org/jetbrains/jet/codegen/StackValue.java b/compiler/backend/src/org/jetbrains/jet/codegen/StackValue.java index d1b4a3b0f66..7fac9873bec 100644 --- a/compiler/backend/src/org/jetbrains/jet/codegen/StackValue.java +++ b/compiler/backend/src/org/jetbrains/jet/codegen/StackValue.java @@ -748,7 +748,7 @@ public abstract class StackValue { private final Type type; public ArrayElement(Type type, StackValue array, StackValue index) { - super(type, false, false, new Receiver(Type.LONG_TYPE, array, index)); + super(type, false, false, new Receiver(Type.LONG_TYPE, array, index), true); this.type = type; } @@ -984,7 +984,7 @@ public abstract class StackValue { ExpressionCodegen codegen, GenerationState state ) { - super(type, false, false, collectionElementReceiver); + super(type, false, false, collectionElementReceiver, true); this.resolvedGetCall = resolvedGetCall; this.resolvedSetCall = resolvedSetCall; this.state = state; @@ -1115,7 +1115,7 @@ public abstract class StackValue { @Nullable String fieldName, @NotNull Type type, @NotNull GenerationState state, @NotNull StackValue receiver ) { - super(type, isStatic(isStaticBackingField, getter), isStatic(isStaticBackingField, setter), receiver); + super(type, isStatic(isStaticBackingField, getter), isStatic(isStaticBackingField, setter), receiver, true); this.backingFieldOwner = backingFieldOwner; this.getter = getter; this.setter = setter; @@ -1462,15 +1462,6 @@ public abstract class StackValue { this.isStaticStore = isStaticStore; } - public StackValueWithSimpleReceiver( - @NotNull Type type, - boolean isStaticPut, - boolean isStaticStore, - @NotNull StackValue receiver - ) { - this(type, isStaticPut, isStaticStore, receiver, true); - } - @Override public void putReceiver(@NotNull InstructionAdapter v, boolean isRead) { boolean hasReceiver = isNonStaticAccess(isRead); @@ -1536,7 +1527,7 @@ public abstract class StackValue { } } - static class ComplexReceiver extends StackValue { + private static class ComplexReceiver extends StackValue { private final StackValueWithSimpleReceiver originalValueWithReceiver; private final boolean[] isReadOperations; @@ -1671,7 +1662,7 @@ public abstract class StackValue { @Nullable private final Label ifNull; public SafeFallback(@NotNull Type type, @Nullable Label ifNull, StackValue receiver) { - super(type, false, false, receiver); + super(type, false, false, receiver, true); this.ifNull = ifNull; }