Minor: Formatting changed
This commit is contained in:
@@ -555,16 +555,12 @@ public class JetControlFlowProcessor {
|
||||
@NotNull AccessTarget target,
|
||||
@Nullable PseudoValue rightValue,
|
||||
@NotNull Map<PseudoValue, ReceiverValue> receiverValues,
|
||||
@NotNull JetExpression parentExpression) {
|
||||
@NotNull JetExpression parentExpression
|
||||
) {
|
||||
VariableDescriptor descriptor = BindingContextUtils.extractVariableDescriptorIfAny(trace.getBindingContext(), left, false);
|
||||
if (descriptor != null) {
|
||||
builder.write(
|
||||
parentExpression,
|
||||
left,
|
||||
rightValue != null ? rightValue : createSyntheticValue(parentExpression),
|
||||
target,
|
||||
receiverValues
|
||||
);
|
||||
PseudoValue rValue = rightValue != null ? rightValue : createSyntheticValue(parentExpression);
|
||||
builder.write(parentExpression, left, rValue, target, receiverValues);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1142,15 +1138,21 @@ public class JetControlFlowProcessor {
|
||||
builder.declareVariable(entry);
|
||||
|
||||
ResolvedCall<FunctionDescriptor> resolvedCall = trace.get(BindingContext.COMPONENT_RESOLVED_CALL, entry);
|
||||
PseudoValue writtenValue = resolvedCall != null
|
||||
? builder.call(
|
||||
entry,
|
||||
entry,
|
||||
resolvedCall,
|
||||
getReceiverValues(initializer, resolvedCall, false),
|
||||
Collections.<PseudoValue, ValueParameterDescriptor>emptyMap()
|
||||
).getOutputValue()
|
||||
: createSyntheticValue(entry, initializer);
|
||||
|
||||
PseudoValue writtenValue;
|
||||
if (resolvedCall != null) {
|
||||
writtenValue = builder.call(
|
||||
entry,
|
||||
entry,
|
||||
resolvedCall,
|
||||
getReceiverValues(initializer, resolvedCall, false),
|
||||
Collections.<PseudoValue, ValueParameterDescriptor>emptyMap()
|
||||
).getOutputValue();
|
||||
}
|
||||
else {
|
||||
writtenValue = createSyntheticValue(entry, initializer);
|
||||
}
|
||||
|
||||
if (generateWriteForEntries) {
|
||||
generateInitializer(entry, writtenValue != null ? writtenValue : createSyntheticValue(entry));
|
||||
}
|
||||
|
||||
+6
-16
@@ -107,16 +107,11 @@ public class MagicInstruction(
|
||||
inputValues: List<PseudoValue>,
|
||||
val expectedTypes: Map<PseudoValue, TypePredicate>
|
||||
) : OperationInstruction(element, lexicalScope, inputValues), StrictlyValuedOperationInstruction {
|
||||
override fun accept(visitor: InstructionVisitor) {
|
||||
visitor.visitMagic(this)
|
||||
}
|
||||
override fun accept(visitor: InstructionVisitor) = visitor.visitMagic(this)
|
||||
|
||||
override fun <R> accept(visitor: InstructionVisitorWithResult<R>): R {
|
||||
return visitor.visitMagic(this)
|
||||
}
|
||||
override fun <R> accept(visitor: InstructionVisitorWithResult<R>): R = visitor.visitMagic(this)
|
||||
|
||||
override fun createCopy() =
|
||||
MagicInstruction(element, lexicalScope, synthetic, inputValues, expectedTypes).setResult(resultValue)
|
||||
override fun createCopy() = MagicInstruction(element, lexicalScope, synthetic, inputValues, expectedTypes).setResult(resultValue)
|
||||
|
||||
override fun toString() = renderInstruction("magic", render(element))
|
||||
|
||||
@@ -141,16 +136,11 @@ class MergeInstruction private(
|
||||
lexicalScope: LexicalScope,
|
||||
inputValues: List<PseudoValue>
|
||||
): OperationInstruction(element, lexicalScope, inputValues), StrictlyValuedOperationInstruction {
|
||||
override fun accept(visitor: InstructionVisitor) {
|
||||
visitor.visitMerge(this)
|
||||
}
|
||||
override fun accept(visitor: InstructionVisitor) = visitor.visitMerge(this)
|
||||
|
||||
override fun <R> accept(visitor: InstructionVisitorWithResult<R>): R {
|
||||
return visitor.visitMerge(this)
|
||||
}
|
||||
override fun <R> accept(visitor: InstructionVisitorWithResult<R>): R = visitor.visitMerge(this)
|
||||
|
||||
override fun createCopy() =
|
||||
MergeInstruction(element, lexicalScope, inputValues).setResult(resultValue)
|
||||
override fun createCopy() = MergeInstruction(element, lexicalScope, inputValues).setResult(resultValue)
|
||||
|
||||
override fun toString() = renderInstruction("merge", render(element))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user