From 4707f4a5e960acbe691e0a1a8e34ad8ce192e1a1 Mon Sep 17 00:00:00 2001 From: Alexey Sedunov Date: Thu, 26 Jun 2014 13:06:28 +0400 Subject: [PATCH] Pseudocode: Add debug information to magic instructions --- .../jet/lang/cfg/JetControlFlowBuilder.java | 3 +- .../cfg/JetControlFlowBuilderAdapter.java | 5 +- .../jet/lang/cfg/JetControlFlowProcessor.java | 58 ++-- .../JetControlFlowInstructionsGenerator.java | 24 +- .../eval/operationInstructions.kt | 45 ++- .../basic/IfWithUninitialized.instructions | 14 +- .../basic/IfWithUninitialized.values | 22 +- .../basic/InitializedNotDeclared.instructions | 16 +- .../basic/InitializedNotDeclared.values | 2 +- .../basic/UsageInFunctionLiteral.instructions | 38 +-- .../basic/UsageInFunctionLiteral.values | 22 +- .../VariablesInitialization.instructions | 26 +- .../basic/VariablesInitialization.values | 24 +- .../basic/VariablesUsage.instructions | 14 +- .../cfg-variables/basic/VariablesUsage.values | 16 +- ...eferenceToPropertyInitializer.instructions | 38 +-- .../referenceToPropertyInitializer.values | 40 +-- .../bugs/varInitializationInIf.instructions | 2 +- .../bugs/varInitializationInIf.values | 18 +- .../varInitializationInIfInCycle.instructions | 18 +- .../bugs/varInitializationInIfInCycle.values | 26 +- .../lexicalScopes/forScope.instructions | 2 +- .../lexicalScopes/forScope.values | 4 +- .../functionLiteralScope.instructions | 24 +- .../lexicalScopes/functionLiteralScope.values | 4 +- .../lexicalScopes/localClass.instructions | 18 +- .../lexicalScopes/localClass.values | 8 +- .../localFunctionScope.instructions | 24 +- .../lexicalScopes/localFunctionScope.values | 4 +- ...localFunctionScopeWithoutBody.instructions | 16 +- .../localFunctionScopeWithoutBody.values | 16 +- .../propertyAccessorScope.instructions | 30 +- .../propertyAccessorScope.values | 8 +- .../lexicalScopes/tryScope.instructions | 2 +- .../lexicalScopes/tryScope.values | 4 +- .../cfg/arrays/ArrayOfFunctions.instructions | 8 +- .../cfg/arrays/ArrayOfFunctions.values | 14 +- .../arrays/arrayAccessExpression.instructions | 2 +- .../cfg/arrays/arrayAccessExpression.values | 14 +- .../testData/cfg/arrays/arrayInc.instructions | 8 +- compiler/testData/cfg/arrays/arrayInc.values | 12 +- .../testData/cfg/arrays/arraySet.instructions | 8 +- compiler/testData/cfg/arrays/arraySet.values | 2 +- .../arrays/arraySetPlusAssign.instructions | 8 +- .../cfg/arrays/arraySetPlusAssign.values | 14 +- .../testData/cfg/basic/Basic.instructions | 28 +- compiler/testData/cfg/basic/Basic.values | 64 ++--- .../cfg/bugs/jumpToOuterScope.instructions | 22 +- .../testData/cfg/bugs/jumpToOuterScope.values | 10 +- .../controlStructures/Finally.instructions | 46 +-- .../cfg/controlStructures/Finally.values | 242 ++++++++-------- .../FinallyTestCopy.instructions | 14 +- .../controlStructures/FinallyTestCopy.values | 78 +++--- .../cfg/controlStructures/For.instructions | 22 +- .../testData/cfg/controlStructures/For.values | 16 +- .../cfg/controlStructures/If.instructions | 14 +- .../testData/cfg/controlStructures/If.values | 38 +-- .../returnsInWhen.instructions | 4 +- .../controlStructures/returnsInWhen.values | 8 +- .../whenConditions.instructions | 8 +- .../controlStructures/whenConditions.values | 10 +- .../conventions/bothReceivers.instructions | 8 +- .../cfg/conventions/bothReceivers.values | 12 +- .../cfg/conventions/equals.instructions | 4 +- .../testData/cfg/conventions/equals.values | 8 +- .../cfg/conventions/invoke.instructions | 8 +- .../testData/cfg/conventions/invoke.values | 8 +- .../cfg/conventions/notEqual.instructions | 4 +- .../testData/cfg/conventions/notEqual.values | 8 +- .../cfg/deadCode/stringTemplate.instructions | 12 +- .../cfg/deadCode/stringTemplate.values | 8 +- .../AnonymousInitializers.instructions | 10 +- .../AnonymousInitializers.values | 12 +- .../delegationByExpression.instructions | 22 +- .../delegationByExpression.values | 10 +- .../delegationBySuperCall.instructions | 14 +- .../delegationBySuperCall.values | 20 +- .../functions/typeParameter.instructions | 8 +- .../functions/typeParameter.values | 4 +- .../local/LocalDeclarations.instructions | 54 ++-- .../local/LocalDeclarations.values | 28 +- .../local/ObjectExpression.instructions | 4 +- .../local/ObjectExpression.values | 14 +- .../multiDeclaration/MultiDecl.instructions | 8 +- .../multiDeclaration/MultiDecl.values | 10 +- .../multiDeclarationWithError.instructions | 12 +- .../multiDeclarationWithError.values | 14 +- .../properties/DelegatedProperty.instructions | 10 +- .../properties/DelegatedProperty.values | 4 +- .../backingFieldAccess.instructions | 8 +- .../properties/backingFieldAccess.values | 4 +- .../cfg/expressions/Assignments.instructions | 8 +- .../cfg/expressions/Assignments.values | 50 ++-- .../cfg/expressions/LazyBooleans.instructions | 12 +- .../cfg/expressions/LazyBooleans.values | 60 ++-- .../ReturnFromExpression.instructions | 12 +- .../expressions/ReturnFromExpression.values | 10 +- .../expressions/assignmentToThis.instructions | 2 +- .../cfg/expressions/assignmentToThis.values | 6 +- .../chainedQualifiedExpression.instructions | 4 +- .../chainedQualifiedExpression.values | 262 +++++++++--------- .../expressionAsFunction.instructions | 8 +- .../expressions/expressionAsFunction.values | 12 +- .../cfg/expressions/incdec.instructions | 10 +- .../testData/cfg/expressions/incdec.values | 4 +- .../cfg/expressions/nothingExpr.instructions | 2 +- .../cfg/expressions/nothingExpr.values | 16 +- .../expressions/propertySafeCall.instructions | 8 +- .../cfg/expressions/propertySafeCall.values | 12 +- ...fiedExpressionWithoutSelector.instructions | 10 +- .../qualifiedExpressionWithoutSelector.values | 10 +- .../expressions/unresolvedCall.instructions | 10 +- .../cfg/expressions/unresolvedCall.values | 12 +- .../unresolvedProperty.instructions | 10 +- .../cfg/expressions/unresolvedProperty.values | 12 +- .../unusedExpressionSimpleName.instructions | 10 +- .../unusedExpressionSimpleName.values | 6 +- .../DefaultValuesForArguments.instructions | 6 +- .../DefaultValuesForArguments.values | 16 +- .../testData/cfg/tailCalls/sum.instructions | 4 +- compiler/testData/cfg/tailCalls/sum.values | 30 +- .../testData/cfg/tailCalls/try.instructions | 2 +- compiler/testData/cfg/tailCalls/try.values | 6 +- .../tailCalls/tryCatchFinally.instructions | 2 +- .../cfg/tailCalls/tryCatchFinally.values | 18 +- 125 files changed, 1204 insertions(+), 1157 deletions(-) diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/cfg/JetControlFlowBuilder.java b/compiler/frontend/src/org/jetbrains/jet/lang/cfg/JetControlFlowBuilder.java index 6b7ebec6d1d..552084df28f 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/cfg/JetControlFlowBuilder.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/cfg/JetControlFlowBuilder.java @@ -115,7 +115,8 @@ public interface JetControlFlowBuilder { @NotNull JetElement instructionElement, @Nullable JetElement valueElement, @NotNull List inputValues, - @NotNull Map expectedTypes + @NotNull Map expectedTypes, + @NotNull MagicKind kind ); @NotNull diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/cfg/JetControlFlowBuilderAdapter.java b/compiler/frontend/src/org/jetbrains/jet/lang/cfg/JetControlFlowBuilderAdapter.java index b236f18e29c..ec87389ba6b 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/cfg/JetControlFlowBuilderAdapter.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/cfg/JetControlFlowBuilderAdapter.java @@ -71,9 +71,10 @@ public abstract class JetControlFlowBuilderAdapter implements JetControlFlowBuil @NotNull JetElement instructionElement, @Nullable JetElement valueElement, @NotNull List inputValues, - @NotNull Map expectedTypes + @NotNull Map expectedTypes, + @NotNull MagicKind kind ) { - return getDelegateBuilder().magic(instructionElement, valueElement, inputValues, expectedTypes); + return getDelegateBuilder().magic(instructionElement, valueElement, inputValues, expectedTypes, kind); } @NotNull diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/cfg/JetControlFlowProcessor.java b/compiler/frontend/src/org/jetbrains/jet/lang/cfg/JetControlFlowProcessor.java index d9f95ee1b29..6fb23c16a83 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/cfg/JetControlFlowProcessor.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/cfg/JetControlFlowProcessor.java @@ -30,6 +30,7 @@ import org.jetbrains.annotations.Nullable; import org.jetbrains.jet.lang.cfg.pseudocode.*; import org.jetbrains.jet.lang.cfg.pseudocode.instructions.eval.AccessTarget; import org.jetbrains.jet.lang.cfg.pseudocode.instructions.eval.InstructionWithValue; +import org.jetbrains.jet.lang.cfg.pseudocode.instructions.eval.MagicKind; import org.jetbrains.jet.lang.descriptors.*; import org.jetbrains.jet.lang.psi.*; import org.jetbrains.jet.lang.psi.psiUtil.PsiUtilPackage; @@ -130,14 +131,14 @@ public class JetControlFlowProcessor { if (!generateCall(condition.getOperationReference())) { JetExpression rangeExpression = condition.getRangeExpression(); generateInstructions(rangeExpression); - createNonSyntheticValue(condition, rangeExpression); + createNonSyntheticValue(condition, MagicKind.UNRESOLVED_CALL, rangeExpression); } } @Override public void visitWhenConditionIsPattern(@NotNull JetWhenConditionIsPattern condition) { mark(condition); - createNonSyntheticValue(condition, getSubjectExpression(condition)); + createNonSyntheticValue(condition, MagicKind.IS, getSubjectExpression(condition)); } @Override @@ -150,7 +151,7 @@ public class JetControlFlowProcessor { JetExpression subjectExpression = getSubjectExpression(condition); if (subjectExpression != null) { // todo: this can be replaced by equals() invocation (when corresponding resolved call is recorded) - createNonSyntheticValue(condition, subjectExpression, expression); + createNonSyntheticValue(condition, MagicKind.EQUALS_IN_WHEN_CONDITION, subjectExpression, expression); } else { copyValue(expression, condition); @@ -195,20 +196,22 @@ public class JetControlFlowProcessor { } @NotNull - private PseudoValue createSyntheticValue(@NotNull JetElement instructionElement, JetElement... from) { + private PseudoValue createSyntheticValue(@NotNull JetElement instructionElement, @NotNull MagicKind kind, JetElement... from) { List values = elementsToValues(from.length > 0 ? Arrays.asList(from) : Collections.emptyList()); - return builder.magic(instructionElement, null, values, defaultTypeMap(values)).getOutputValue(); + return builder.magic(instructionElement, null, values, defaultTypeMap(values), kind).getOutputValue(); } @NotNull - private PseudoValue createNonSyntheticValue(@NotNull JetElement to, @NotNull List from) { + private PseudoValue createNonSyntheticValue( + @NotNull JetElement to, @NotNull List from, @NotNull MagicKind kind + ) { List values = elementsToValues(from); - return builder.magic(to, to, values, defaultTypeMap(values)).getOutputValue(); + return builder.magic(to, to, values, defaultTypeMap(values), kind).getOutputValue(); } @NotNull - private PseudoValue createNonSyntheticValue(@NotNull JetElement to, JetElement... from) { - return createNonSyntheticValue(to, Arrays.asList(from)); + private PseudoValue createNonSyntheticValue(@NotNull JetElement to, @NotNull MagicKind kind, JetElement... from) { + return createNonSyntheticValue(to, Arrays.asList(from), kind); } @NotNull @@ -299,7 +302,7 @@ public class JetControlFlowProcessor { public void visitThisExpression(@NotNull JetThisExpression expression) { ResolvedCall resolvedCall = getResolvedCall(expression, trace.getBindingContext()); if (resolvedCall == null) { - createNonSyntheticValue(expression); + createNonSyntheticValue(expression, MagicKind.UNRESOLVED_CALL); return; } @@ -325,7 +328,7 @@ public class JetControlFlowProcessor { generateCall(variableAsFunctionResolvedCall.getVariableCall()); } else if (!generateCall(expression) && !(expression.getParent() instanceof JetCallExpression)) { - createNonSyntheticValue(expression, generateAndGetReceiverIfAny(expression)); + createNonSyntheticValue(expression, MagicKind.UNRESOLVED_CALL, generateAndGetReceiverIfAny(expression)); } } @@ -437,7 +440,7 @@ public class JetControlFlowProcessor { if (right != null) { generateInstructions(right); } - createNonSyntheticValue(expression, left, right); + createNonSyntheticValue(expression, MagicKind.UNRESOLVED_CALL, left, right); mark(expression); } @@ -557,7 +560,7 @@ public class JetControlFlowProcessor { ) { VariableDescriptor descriptor = BindingContextUtils.extractVariableDescriptorIfAny(trace.getBindingContext(), left, false); if (descriptor != null) { - PseudoValue rValue = rightValue != null ? rightValue : createSyntheticValue(parentExpression); + PseudoValue rValue = rightValue != null ? rightValue : createSyntheticValue(parentExpression, MagicKind.UNRECOGNIZED_WRITE_RHS); builder.write(parentExpression, left, rValue, target, receiverValues); } } @@ -570,7 +573,7 @@ public class JetControlFlowProcessor { } private void generateArrayAccessWithoutCall(JetArrayAccessExpression arrayAccessExpression) { - createNonSyntheticValue(arrayAccessExpression, generateArrayAccessArguments(arrayAccessExpression)); + createNonSyntheticValue(arrayAccessExpression, generateArrayAccessArguments(arrayAccessExpression), MagicKind.UNRESOLVED_CALL); } private List generateArrayAccessArguments(JetArrayAccessExpression arrayAccessExpression) { @@ -609,7 +612,7 @@ public class JetControlFlowProcessor { } else { generateInstructions(baseExpression); - rhsValue = createNonSyntheticValue(expression, baseExpression); + rhsValue = createNonSyntheticValue(expression, MagicKind.UNRESOLVED_CALL, baseExpression); } if (incrementOrDecrement) { @@ -775,7 +778,7 @@ public class JetControlFlowProcessor { JetParameter catchParameter = catchClause.getCatchParameter(); if (catchParameter != null) { builder.declareParameter(catchParameter); - generateInitializer(catchParameter, createSyntheticValue(catchParameter)); + generateInitializer(catchParameter, createSyntheticValue(catchParameter, MagicKind.FAKE_INITIALIZER)); } JetExpression catchBody = catchClause.getCatchBody(); if (catchBody != null) { @@ -903,7 +906,8 @@ public class JetControlFlowProcessor { loopRange != null ? loopRange : expression, null, Collections.singletonList(loopRangeValue), - Collections.singletonMap(loopRangeValue, loopRangeTypePredicate) + Collections.singletonMap(loopRangeValue, loopRangeTypePredicate), + MagicKind.LOOP_RANGE_ITERATION ).getOutputValue(); if (loopParameter != null) { @@ -1029,7 +1033,7 @@ public class JetControlFlowProcessor { @NotNull private PseudoValue computePseudoValueForParameter(@NotNull JetParameter parameter) { - PseudoValue syntheticValue = createSyntheticValue(parameter); + PseudoValue syntheticValue = createSyntheticValue(parameter, MagicKind.FAKE_INITIALIZER); PseudoValue defaultValue = builder.getBoundValue(parameter.getDefaultValue()); if (defaultValue == null) { return syntheticValue; @@ -1091,7 +1095,7 @@ public class JetControlFlowProcessor { } else { generateInstructions(receiverExpression); - createNonSyntheticValue(expression, receiverExpression); + createNonSyntheticValue(expression, MagicKind.UNSUPPORTED_OPERATION, receiverExpression); } } @@ -1116,7 +1120,7 @@ public class JetControlFlowProcessor { inputExpressions.add(generateAndGetReceiverIfAny(expression)); mark(expression); - createNonSyntheticValue(expression, inputExpressions); + createNonSyntheticValue(expression, inputExpressions, MagicKind.UNRESOLVED_CALL); } } @@ -1175,11 +1179,11 @@ public class JetControlFlowProcessor { ).getOutputValue(); } else { - writtenValue = createSyntheticValue(entry, initializer); + writtenValue = createSyntheticValue(entry, MagicKind.UNRESOLVED_CALL, initializer); } if (generateWriteForEntries) { - generateInitializer(entry, writtenValue != null ? writtenValue : createSyntheticValue(entry)); + generateInitializer(entry, writtenValue != null ? writtenValue : createSyntheticValue(entry, MagicKind.FAKE_INITIALIZER)); } } } @@ -1201,7 +1205,7 @@ public class JetControlFlowProcessor { } else { visitJetElement(expression); - createNonSyntheticValue(expression, left); + createNonSyntheticValue(expression, MagicKind.UNSUPPORTED_OPERATION, left); } } @@ -1234,7 +1238,7 @@ public class JetControlFlowProcessor { mark(expression); JetExpression left = expression.getLeftHandSide(); generateInstructions(left); - createNonSyntheticValue(expression, left); + createNonSyntheticValue(expression, MagicKind.IS, left); } @Override @@ -1384,7 +1388,7 @@ public class JetControlFlowProcessor { for (JetExpression argument : arguments) { generateInstructions(argument); } - createNonSyntheticValue(call, arguments); + createNonSyntheticValue(call, arguments, MagicKind.UNRESOLVED_CALL); } } @@ -1398,7 +1402,7 @@ public class JetControlFlowProcessor { if (expectedTypePredicate == null) { expectedTypePredicate = AllTypes.instance$; } - builder.magic(specifier, specifier, arguments, PseudocodePackage.expectedTypeFor(expectedTypePredicate, arguments)); + builder.magic(specifier, specifier, arguments, PseudocodePackage.expectedTypeFor(expectedTypePredicate, arguments), MagicKind.VALUE_CONSUMER); } @Override @@ -1483,7 +1487,7 @@ public class JetControlFlowProcessor { if (receiver instanceof ThisReceiver) { if (generateInstructions) { - receiverValues = receiverValues.plus(createSyntheticValue(callElement), receiver); + receiverValues = receiverValues.plus(createSyntheticValue(callElement, MagicKind.IMPLICIT_RECEIVER), receiver); } } else if (receiver instanceof ExpressionReceiver) { diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/cfg/pseudocode/JetControlFlowInstructionsGenerator.java b/compiler/frontend/src/org/jetbrains/jet/lang/cfg/pseudocode/JetControlFlowInstructionsGenerator.java index 0107e6f948b..2d4062b1d6a 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/cfg/pseudocode/JetControlFlowInstructionsGenerator.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/cfg/pseudocode/JetControlFlowInstructionsGenerator.java @@ -418,7 +418,8 @@ public class JetControlFlowInstructionsGenerator extends JetControlFlowBuilderAd @Override public InstructionWithValue loadStringTemplate(@NotNull JetStringTemplateExpression expression, @NotNull List inputValues) { if (inputValues.isEmpty()) return read(expression); - return magic(expression, expression, inputValues, PseudocodePackage.expectedTypeFor(AllTypes.instance$, inputValues)); + Map predicate = PseudocodePackage.expectedTypeFor(AllTypes.instance$, inputValues); + return magic(expression, expression, inputValues, predicate, MagicKind.STRING_TEMPLATE); } @NotNull @@ -427,10 +428,11 @@ public class JetControlFlowInstructionsGenerator extends JetControlFlowBuilderAd @NotNull JetElement instructionElement, @Nullable JetElement valueElement, @NotNull List inputValues, - @NotNull Map expectedTypes + @NotNull Map expectedTypes, + @NotNull MagicKind kind ) { MagicInstruction instruction = MagicInstruction.object$.create( - instructionElement, valueElement, getCurrentScope(), inputValues, expectedTypes, valueFactory + instructionElement, valueElement, getCurrentScope(), inputValues, expectedTypes, kind, valueFactory ); add(instruction); return instruction; @@ -496,7 +498,21 @@ public class JetControlFlowInstructionsGenerator extends JetControlFlowBuilderAd throw new IllegalArgumentException("Invalid operation: " + operation); } - return magic(expression, expression, inputValues, expectedTypes); + return magic(expression, expression, inputValues, expectedTypes, getMagicKind(operation)); + } + + @NotNull + private MagicKind getMagicKind(@NotNull PredefinedOperation operation) { + switch(operation) { + case AND: + return MagicKind.AND; + case OR: + return MagicKind.OR; + case NOT_NULL_ASSERTION: + return MagicKind.NOT_NULL_ASSERTION; + default: + throw new IllegalArgumentException("Invalid operation: " + operation); + } } @Override diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/cfg/pseudocode/instructions/eval/operationInstructions.kt b/compiler/frontend/src/org/jetbrains/jet/lang/cfg/pseudocode/instructions/eval/operationInstructions.kt index 642b6a0f988..e7a7d3ed444 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/cfg/pseudocode/instructions/eval/operationInstructions.kt +++ b/compiler/frontend/src/org/jetbrains/jet/lang/cfg/pseudocode/instructions/eval/operationInstructions.kt @@ -27,6 +27,7 @@ import org.jetbrains.jet.lang.cfg.pseudocode.instructions.InstructionVisitorWith import org.jetbrains.jet.lang.resolve.scopes.receivers.ReceiverValue import org.jetbrains.jet.lang.descriptors.ValueParameterDescriptor import org.jetbrains.jet.lang.cfg.pseudocode.TypePredicate +import org.jetbrains.jet.lang.cfg.pseudocode.instructions.eval.MagicKind public abstract class OperationInstruction protected( element: JetElement, @@ -101,7 +102,8 @@ public class MagicInstruction( element: JetElement, lexicalScope: LexicalScope, inputValues: List, - val expectedTypes: Map + val expectedTypes: Map, + val kind: MagicKind ) : OperationInstruction(element, lexicalScope, inputValues), StrictlyValuedOperationInstruction { public val synthetic: Boolean get() = outputValue.element == null @@ -109,22 +111,45 @@ public class MagicInstruction( override fun accept(visitor: InstructionVisitorWithResult): R = visitor.visitMagic(this) - override fun createCopy() = MagicInstruction(element, lexicalScope, inputValues, expectedTypes).setResult(resultValue) + override fun createCopy() = + MagicInstruction(element, lexicalScope, inputValues, expectedTypes, kind).setResult(resultValue) - override fun toString() = renderInstruction("magic", render(element)) + override fun toString() = renderInstruction("magic[$kind]", render(element)) class object { - fun create(element: JetElement, - valueElement: JetElement?, - lexicalScope: LexicalScope, - inputValues: List, - expectedTypes: Map, - factory: PseudoValueFactory): MagicInstruction = MagicInstruction( - element, lexicalScope, inputValues, expectedTypes + fun create( + element: JetElement, + valueElement: JetElement?, + lexicalScope: LexicalScope, + inputValues: List, + expectedTypes: Map, + kind: MagicKind, + factory: PseudoValueFactory + ): MagicInstruction = MagicInstruction( + element, lexicalScope, inputValues, expectedTypes, kind ).setResult(factory, valueElement) as MagicInstruction } } +public enum class MagicKind { + // builtin operations + STRING_TEMPLATE + AND + OR + NOT_NULL_ASSERTION + EQUALS_IN_WHEN_CONDITION + IS + // implicit operations + LOOP_RANGE_ITERATION + IMPLICIT_RECEIVER + VALUE_CONSUMER + // unrecognized operations + UNRESOLVED_CALL + UNSUPPORTED_OPERATION + UNRECOGNIZED_WRITE_RHS + FAKE_INITIALIZER +} + // Merges values produced by alternative control-flow paths (such as 'if' branches) class MergeInstruction private( element: JetElement, diff --git a/compiler/testData/cfg-variables/basic/IfWithUninitialized.instructions b/compiler/testData/cfg-variables/basic/IfWithUninitialized.instructions index 1f6f1853a74..d1872a64736 100644 --- a/compiler/testData/cfg-variables/basic/IfWithUninitialized.instructions +++ b/compiler/testData/cfg-variables/basic/IfWithUninitialized.instructions @@ -40,16 +40,16 @@ sink: fun use(vararg a: Any?) = a --------------------- L0: - 1 INIT: in: {} out: {} - v(vararg a: Any?) INIT: in: {} out: {a=D} - magic(vararg a: Any?) -> INIT: in: {a=D} out: {a=D} - w(a|) INIT: in: {a=D} out: {a=ID} USE: in: {a=READ} out: {a=READ} - r(a) -> INIT: in: {a=ID} out: {a=ID} USE: in: {} out: {a=READ} + 1 INIT: in: {} out: {} + v(vararg a: Any?) INIT: in: {} out: {a=D} + magic[FAKE_INITIALIZER](vararg a: Any?) -> INIT: in: {a=D} out: {a=D} + w(a|) INIT: in: {a=D} out: {a=ID} USE: in: {a=READ} out: {a=READ} + r(a) -> INIT: in: {a=ID} out: {a=ID} USE: in: {} out: {a=READ} ret(*|) L1 L1: error: - INIT: in: {} out: {} + INIT: in: {} out: {} sink: - INIT: in: {a=ID} out: {a=ID} USE: in: {} out: {} + INIT: in: {a=ID} out: {a=ID} USE: in: {} out: {} ===================== diff --git a/compiler/testData/cfg-variables/basic/IfWithUninitialized.values b/compiler/testData/cfg-variables/basic/IfWithUninitialized.values index 6961a1c7c86..e5dd9a40fe2 100644 --- a/compiler/testData/cfg-variables/basic/IfWithUninitialized.values +++ b/compiler/testData/cfg-variables/basic/IfWithUninitialized.values @@ -9,19 +9,19 @@ fun foo() { } } --------------------- -1 : {<: Comparable} NEW: r(1) -> -2 : Int NEW: r(2) -> +1 : {<: Comparable} NEW: r(1) -> +2 : Int NEW: r(2) -> 1 < 2 : Boolean NEW: call(1 < 2, compareTo|, ) -> -b : {<: Any?} NEW: r(b) -> -use(b) : * NEW: call(use(b), use|) -> -{ use(b) } : * COPY -true : Boolean NEW: r(true) -> -if (1 < 2) { use(b) } else { b = true } : * COPY -{ val b: Boolean if (1 < 2) { use(b) } else { b = true } } : * COPY +b : {<: Any?} NEW: r(b) -> +use(b) : * NEW: call(use(b), use|) -> +{ use(b) } : * COPY +true : Boolean NEW: r(true) -> +if (1 < 2) { use(b) } else { b = true } : * COPY +{ val b: Boolean if (1 < 2) { use(b) } else { b = true } } : * COPY ===================== == use == fun use(vararg a: Any?) = a --------------------- - : {<: Array} NEW: magic(vararg a: Any?) -> -a : {<: Array} NEW: r(a) -> -===================== \ No newline at end of file + : {<: Array} NEW: magic[FAKE_INITIALIZER](vararg a: Any?) -> +a : {<: Array} NEW: r(a) -> +===================== diff --git a/compiler/testData/cfg-variables/basic/InitializedNotDeclared.instructions b/compiler/testData/cfg-variables/basic/InitializedNotDeclared.instructions index ca968fe8fd0..a716a24cddd 100644 --- a/compiler/testData/cfg-variables/basic/InitializedNotDeclared.instructions +++ b/compiler/testData/cfg-variables/basic/InitializedNotDeclared.instructions @@ -7,16 +7,16 @@ class A { } --------------------- L0: - 1 INIT: in: {} out: {} + 1 INIT: in: {} out: {} 2 mark({ x = 1 }) - magic(x) -> - r(1) -> USE: in: {x=ONLY_WRITTEN_NEVER_READ} out: {x=ONLY_WRITTEN_NEVER_READ} - w(x|, ) INIT: in: {} out: {x=I} USE: in: {} out: {x=ONLY_WRITTEN_NEVER_READ} - 1 v(val x: Int) INIT: in: {x=I} out: {x=ID} + magic[IMPLICIT_RECEIVER](x) -> + r(1) -> USE: in: {x=ONLY_WRITTEN_NEVER_READ} out: {x=ONLY_WRITTEN_NEVER_READ} + w(x|, ) INIT: in: {} out: {x=I} USE: in: {} out: {x=ONLY_WRITTEN_NEVER_READ} + 1 v(val x: Int) INIT: in: {x=I} out: {x=ID} L1: - INIT: in: {x=ID} out: {x=ID} + INIT: in: {x=ID} out: {x=ID} error: - INIT: in: {} out: {} + INIT: in: {} out: {} sink: - INIT: in: {x=ID} out: {x=ID} USE: in: {} out: {} + INIT: in: {x=ID} out: {x=ID} USE: in: {} out: {} ===================== diff --git a/compiler/testData/cfg-variables/basic/InitializedNotDeclared.values b/compiler/testData/cfg-variables/basic/InitializedNotDeclared.values index f89bb34317c..179980fa687 100644 --- a/compiler/testData/cfg-variables/basic/InitializedNotDeclared.values +++ b/compiler/testData/cfg-variables/basic/InitializedNotDeclared.values @@ -6,6 +6,6 @@ class A { val x: Int } --------------------- - : A NEW: magic(x) -> + : A NEW: magic[IMPLICIT_RECEIVER](x) -> 1 : Int NEW: r(1) -> ===================== diff --git a/compiler/testData/cfg-variables/basic/UsageInFunctionLiteral.instructions b/compiler/testData/cfg-variables/basic/UsageInFunctionLiteral.instructions index bfc1f5b4ec8..832a5d179f0 100644 --- a/compiler/testData/cfg-variables/basic/UsageInFunctionLiteral.instructions +++ b/compiler/testData/cfg-variables/basic/UsageInFunctionLiteral.instructions @@ -34,42 +34,42 @@ sink: } --------------------- L3: - 3 INIT: in: {} out: {} - v(x: Int) INIT: in: {} out: {x=D} - magic(x: Int) -> INIT: in: {x=D} out: {x=D} - w(x|) INIT: in: {x=D} out: {x=ID} - 4 mark(val y = x + a use(a)) INIT: in: {x=ID} out: {x=ID} - v(val y = x + a) INIT: in: {x=ID} out: {x=ID, y=D} USE: in: {a=READ, x=READ} out: {a=READ, x=READ} - r(x) -> INIT: in: {x=ID, y=D} out: {x=ID, y=D} USE: in: {a=READ} out: {a=READ, x=READ} + 3 INIT: in: {} out: {} + v(x: Int) INIT: in: {} out: {x=D} + magic[FAKE_INITIALIZER](x: Int) -> INIT: in: {x=D} out: {x=D} + w(x|) INIT: in: {x=D} out: {x=ID} + 4 mark(val y = x + a use(a)) INIT: in: {x=ID} out: {x=ID} + v(val y = x + a) INIT: in: {x=ID} out: {x=ID, y=D} USE: in: {a=READ, x=READ} out: {a=READ, x=READ} + r(x) -> INIT: in: {x=ID, y=D} out: {x=ID, y=D} USE: in: {a=READ} out: {a=READ, x=READ} r(a) -> mark(x + a) call(x + a, plus|, ) -> - w(y|) INIT: in: {x=ID, y=D} out: {x=ID, y=ID} USE: in: {a=READ} out: {a=READ} - r(a) -> INIT: in: {x=ID, y=ID} out: {x=ID, y=ID} USE: in: {} out: {a=READ} + w(y|) INIT: in: {x=ID, y=D} out: {x=ID, y=ID} USE: in: {a=READ} out: {a=READ} + r(a) -> INIT: in: {x=ID, y=ID} out: {x=ID, y=ID} USE: in: {} out: {a=READ} mark(use(a)) call(use(a), use|) -> - 3 ret(*|) L4 INIT: in: {x=ID} out: {x=ID} + 3 ret(*|) L4 INIT: in: {x=ID} out: {x=ID} L4: error: - INIT: in: {} out: {} + INIT: in: {} out: {} sink: - INIT: in: {x=ID} out: {x=ID} USE: in: {} out: {} + INIT: in: {x=ID} out: {x=ID} USE: in: {} out: {} ===================== == use == fun use(vararg a: Any?) = a --------------------- L0: - 1 INIT: in: {} out: {} - v(vararg a: Any?) INIT: in: {} out: {a=D} - magic(vararg a: Any?) -> INIT: in: {a=D} out: {a=D} - w(a|) INIT: in: {a=D} out: {a=ID} USE: in: {a=READ} out: {a=READ} - r(a) -> INIT: in: {a=ID} out: {a=ID} USE: in: {} out: {a=READ} + 1 INIT: in: {} out: {} + v(vararg a: Any?) INIT: in: {} out: {a=D} + magic[FAKE_INITIALIZER](vararg a: Any?) -> INIT: in: {a=D} out: {a=D} + w(a|) INIT: in: {a=D} out: {a=ID} USE: in: {a=READ} out: {a=READ} + r(a) -> INIT: in: {a=ID} out: {a=ID} USE: in: {} out: {a=READ} ret(*|) L1 L1: error: - INIT: in: {} out: {} + INIT: in: {} out: {} sink: - INIT: in: {a=ID} out: {a=ID} USE: in: {} out: {} + INIT: in: {a=ID} out: {a=ID} USE: in: {} out: {} ===================== diff --git a/compiler/testData/cfg-variables/basic/UsageInFunctionLiteral.values b/compiler/testData/cfg-variables/basic/UsageInFunctionLiteral.values index c3cc3ce754e..ef53a6976f1 100644 --- a/compiler/testData/cfg-variables/basic/UsageInFunctionLiteral.values +++ b/compiler/testData/cfg-variables/basic/UsageInFunctionLiteral.values @@ -7,7 +7,7 @@ fun foo() { } } --------------------- -1 : Int NEW: r(1) -> +1 : Int NEW: r(1) -> { (x: Int) -> val y = x + a use(a) } : {<: (Int) -> Array} NEW: r({ (x: Int) -> val y = x + a use(a) }) -> ===================== == anonymous_0 == @@ -16,17 +16,17 @@ fun foo() { use(a) } --------------------- - : Int NEW: magic(x: Int) -> -x : Int NEW: r(x) -> -a : Int NEW: r(a) -> -x + a : Int NEW: call(x + a, plus|, ) -> -a : {<: Any?} NEW: r(a) -> -use(a) : {<: Array} NEW: call(use(a), use|) -> -val y = x + a use(a) : {<: Array} COPY + : Int NEW: magic[FAKE_INITIALIZER](x: Int) -> +x : Int NEW: r(x) -> +a : Int NEW: r(a) -> +x + a : Int NEW: call(x + a, plus|, ) -> +a : {<: Any?} NEW: r(a) -> +use(a) : {<: Array} NEW: call(use(a), use|) -> +val y = x + a use(a) : {<: Array} COPY ===================== == use == fun use(vararg a: Any?) = a --------------------- - : {<: Array} NEW: magic(vararg a: Any?) -> -a : {<: Array} NEW: r(a) -> -===================== \ No newline at end of file + : {<: Array} NEW: magic[FAKE_INITIALIZER](vararg a: Any?) -> +a : {<: Array} NEW: r(a) -> +===================== diff --git a/compiler/testData/cfg-variables/basic/VariablesInitialization.instructions b/compiler/testData/cfg-variables/basic/VariablesInitialization.instructions index fea98b67f7a..f30c28f4fe3 100644 --- a/compiler/testData/cfg-variables/basic/VariablesInitialization.instructions +++ b/compiler/testData/cfg-variables/basic/VariablesInitialization.instructions @@ -31,24 +31,24 @@ fun bar(foo: Foo) { } --------------------- L0: - 1 INIT: in: {} out: {} - v(foo: Foo) INIT: in: {} out: {foo=D} - magic(foo: Foo) -> INIT: in: {foo=D} out: {foo=D} - w(foo|) INIT: in: {foo=D} out: {foo=ID} - 2 mark({ foo.c foo.c = 2 42 }) INIT: in: {foo=ID} out: {foo=ID} + 1 INIT: in: {} out: {} + v(foo: Foo) INIT: in: {} out: {foo=D} + magic[FAKE_INITIALIZER](foo: Foo) -> INIT: in: {foo=D} out: {foo=D} + w(foo|) INIT: in: {foo=D} out: {foo=ID} + 2 mark({ foo.c foo.c = 2 42 }) INIT: in: {foo=ID} out: {foo=ID} mark(foo.c) - r(foo) -> USE: in: {c=READ, foo=READ} out: {c=READ, foo=READ} - r(c|) -> USE: in: {c=ONLY_WRITTEN_NEVER_READ, foo=READ} out: {c=READ, foo=READ} - r(foo) -> USE: in: {c=ONLY_WRITTEN_NEVER_READ} out: {c=ONLY_WRITTEN_NEVER_READ, foo=READ} - r(2) -> USE: in: {c=ONLY_WRITTEN_NEVER_READ} out: {c=ONLY_WRITTEN_NEVER_READ} - w(foo.c|, ) INIT: in: {foo=ID} out: {c=I, foo=ID} USE: in: {} out: {c=ONLY_WRITTEN_NEVER_READ} - r(42) -> INIT: in: {c=I, foo=ID} out: {c=I, foo=ID} + r(foo) -> USE: in: {c=READ, foo=READ} out: {c=READ, foo=READ} + r(c|) -> USE: in: {c=ONLY_WRITTEN_NEVER_READ, foo=READ} out: {c=READ, foo=READ} + r(foo) -> USE: in: {c=ONLY_WRITTEN_NEVER_READ} out: {c=ONLY_WRITTEN_NEVER_READ, foo=READ} + r(2) -> USE: in: {c=ONLY_WRITTEN_NEVER_READ} out: {c=ONLY_WRITTEN_NEVER_READ} + w(foo.c|, ) INIT: in: {foo=ID} out: {c=I, foo=ID} USE: in: {} out: {c=ONLY_WRITTEN_NEVER_READ} + r(42) -> INIT: in: {c=I, foo=ID} out: {c=I, foo=ID} L1: 1 error: - INIT: in: {} out: {} + INIT: in: {} out: {} sink: - INIT: in: {c=I, foo=ID} out: {c=I, foo=ID} USE: in: {} out: {} + INIT: in: {c=I, foo=ID} out: {c=I, foo=ID} USE: in: {} out: {} ===================== == Foo == trait Foo { diff --git a/compiler/testData/cfg-variables/basic/VariablesInitialization.values b/compiler/testData/cfg-variables/basic/VariablesInitialization.values index 30d59ee1152..9401bee010c 100644 --- a/compiler/testData/cfg-variables/basic/VariablesInitialization.values +++ b/compiler/testData/cfg-variables/basic/VariablesInitialization.values @@ -6,10 +6,10 @@ fun foo() { 42 } --------------------- -1 : Int NEW: r(1) -> -2 : Int NEW: r(2) -> +1 : Int NEW: r(1) -> +2 : Int NEW: r(2) -> 42 : * NEW: r(42) -> -{ val a = 1 val b: Int b = 2 42 } : * COPY +{ val a = 1 val b: Int b = 2 42 } : * COPY ===================== == bar == fun bar(foo: Foo) { @@ -18,18 +18,18 @@ fun bar(foo: Foo) { 42 } --------------------- - : {<: Foo} NEW: magic(foo: Foo) -> -foo : {<: Foo} NEW: r(foo) -> -c : * NEW: r(c|) -> -foo.c : * COPY -foo : {<: Foo} NEW: r(foo) -> -2 : Int NEW: r(2) -> -42 : * NEW: r(42) -> -{ foo.c foo.c = 2 42 } : * COPY + : {<: Foo} NEW: magic[FAKE_INITIALIZER](foo: Foo) -> +foo : {<: Foo} NEW: r(foo) -> +c : * NEW: r(c|) -> +foo.c : * COPY +foo : {<: Foo} NEW: r(foo) -> +2 : Int NEW: r(2) -> +42 : * NEW: r(42) -> +{ foo.c foo.c = 2 42 } : * COPY ===================== == Foo == trait Foo { var c: Int } --------------------- -===================== \ No newline at end of file +===================== diff --git a/compiler/testData/cfg-variables/basic/VariablesUsage.instructions b/compiler/testData/cfg-variables/basic/VariablesUsage.instructions index 28c106cf308..cf94aadd51c 100644 --- a/compiler/testData/cfg-variables/basic/VariablesUsage.instructions +++ b/compiler/testData/cfg-variables/basic/VariablesUsage.instructions @@ -50,16 +50,16 @@ sink: fun use(a: Int) = a --------------------- L0: - 1 INIT: in: {} out: {} - v(a: Int) INIT: in: {} out: {a=D} - magic(a: Int) -> INIT: in: {a=D} out: {a=D} - w(a|) INIT: in: {a=D} out: {a=ID} USE: in: {a=READ} out: {a=READ} - r(a) -> INIT: in: {a=ID} out: {a=ID} USE: in: {} out: {a=READ} + 1 INIT: in: {} out: {} + v(a: Int) INIT: in: {} out: {a=D} + magic[FAKE_INITIALIZER](a: Int) -> INIT: in: {a=D} out: {a=D} + w(a|) INIT: in: {a=D} out: {a=ID} USE: in: {a=READ} out: {a=READ} + r(a) -> INIT: in: {a=ID} out: {a=ID} USE: in: {} out: {a=READ} ret(*|) L1 L1: error: - INIT: in: {} out: {} + INIT: in: {} out: {} sink: - INIT: in: {a=ID} out: {a=ID} USE: in: {} out: {} + INIT: in: {a=ID} out: {a=ID} USE: in: {} out: {} ===================== diff --git a/compiler/testData/cfg-variables/basic/VariablesUsage.values b/compiler/testData/cfg-variables/basic/VariablesUsage.values index 776f53b1f0f..47262113ddc 100644 --- a/compiler/testData/cfg-variables/basic/VariablesUsage.values +++ b/compiler/testData/cfg-variables/basic/VariablesUsage.values @@ -6,13 +6,13 @@ fun foo() { use(a) } --------------------- -1 : Int NEW: r(1) -> -a : Int NEW: r(a) -> +1 : Int NEW: r(1) -> +a : Int NEW: r(a) -> use(a) : * NEW: call(use(a), use|) -> -2 : Int NEW: r(2) -> -a : Int NEW: r(a) -> +2 : Int NEW: r(2) -> +a : Int NEW: r(a) -> use(a) : * NEW: call(use(a), use|) -> -{ var a = 1 use(a) a = 2 use(a) } : * COPY +{ var a = 1 use(a) a = 2 use(a) } : * COPY ===================== == bar == fun bar() { @@ -25,6 +25,6 @@ fun bar() { == use == fun use(a: Int) = a --------------------- - : Int NEW: magic(a: Int) -> -a : Int NEW: r(a) -> -===================== \ No newline at end of file + : Int NEW: magic[FAKE_INITIALIZER](a: Int) -> +a : Int NEW: r(a) -> +===================== diff --git a/compiler/testData/cfg-variables/bugs/referenceToPropertyInitializer.instructions b/compiler/testData/cfg-variables/bugs/referenceToPropertyInitializer.instructions index 33292fc7480..d9e601d617a 100644 --- a/compiler/testData/cfg-variables/bugs/referenceToPropertyInitializer.instructions +++ b/compiler/testData/cfg-variables/bugs/referenceToPropertyInitializer.instructions @@ -29,10 +29,10 @@ sink: L3: 2 INIT: in: {} out: {} v(x: Int) INIT: in: {} out: {x=D} - magic(x: Int) -> INIT: in: {x=D} out: {x=D} + magic[FAKE_INITIALIZER](x: Int) -> INIT: in: {x=D} out: {x=D} w(x|) INIT: in: {x=D} out: {x=ID} 3 mark(sum(x - 1) + x) INIT: in: {x=ID} out: {x=ID} - magic(sum) -> USE: in: {sum=READ, x=READ} out: {sum=READ, x=READ} + magic[IMPLICIT_RECEIVER](sum) -> USE: in: {sum=READ, x=READ} out: {sum=READ, x=READ} r(sum|) -> USE: in: {x=READ} out: {sum=READ, x=READ} r(x) -> r(1) -> @@ -55,16 +55,16 @@ sink: open class A(val a: A) --------------------- L0: - 1 INIT: in: {} out: {} - v(val a: A) INIT: in: {} out: {a=D} - magic(val a: A) -> INIT: in: {a=D} out: {a=D} - w(a|) INIT: in: {a=D} out: {a=ID} + 1 INIT: in: {} out: {} + v(val a: A) INIT: in: {} out: {a=D} + magic[FAKE_INITIALIZER](val a: A) -> INIT: in: {a=D} out: {a=D} + w(a|) INIT: in: {a=D} out: {a=ID} L1: - INIT: in: {a=ID} out: {a=ID} + INIT: in: {a=ID} out: {a=ID} error: - INIT: in: {} out: {} + INIT: in: {} out: {} sink: - INIT: in: {a=ID} out: {a=ID} USE: in: {} out: {} + INIT: in: {a=ID} out: {a=ID} USE: in: {} out: {} ===================== == TestObjectLiteral == class TestObjectLiteral { @@ -82,13 +82,13 @@ L0: 1 INIT: in: {} out: {} v(val obj: A = object: A(obj) { { val x = obj } fun foo() { val y = obj } }) INIT: in: {} out: {obj=D} mark(object: A(obj) { { val x = obj } fun foo() { val y = obj } }) INIT: in: {obj=D} out: {obj=D} - magic(obj) -> + magic[IMPLICIT_RECEIVER](obj) -> r(obj|) -> mark(A(obj)) call(A(obj), |) -> 2 mark({ val x = obj }) v(val x = obj) INIT: in: {obj=D} out: {obj=D, x=D} - magic(obj) -> INIT: in: {obj=D, x=D} out: {obj=D, x=D} + magic[IMPLICIT_RECEIVER](obj) -> INIT: in: {obj=D, x=D} out: {obj=D, x=D} r(obj|) -> w(x|) INIT: in: {obj=D, x=D} out: {obj=D, x=ID} 1 jmp?(L2) INIT: in: {obj=D} out: {obj=D} @@ -109,18 +109,18 @@ fun foo() { } --------------------- L3: - 2 INIT: in: {} out: {} + 2 INIT: in: {} out: {} 3 mark({ val y = obj }) - v(val y = obj) INIT: in: {} out: {y=D} - magic(obj) -> INIT: in: {y=D} out: {y=D} USE: in: {obj=READ} out: {obj=READ} - r(obj|) -> USE: in: {} out: {obj=READ} - w(y|) INIT: in: {y=D} out: {y=ID} + v(val y = obj) INIT: in: {} out: {y=D} + magic[IMPLICIT_RECEIVER](obj) -> INIT: in: {y=D} out: {y=D} USE: in: {obj=READ} out: {obj=READ} + r(obj|) -> USE: in: {} out: {obj=READ} + w(y|) INIT: in: {y=D} out: {y=ID} L4: - 2 INIT: in: {} out: {} + 2 INIT: in: {} out: {} error: sink: - USE: in: {} out: {} + USE: in: {} out: {} ===================== == TestOther == class TestOther { @@ -130,7 +130,7 @@ class TestOther { L0: 1 INIT: in: {} out: {} v(val x: Int = x + 1) INIT: in: {} out: {x=D} - magic(x) -> INIT: in: {x=D} out: {x=D} USE: in: {x=READ} out: {x=READ} + magic[IMPLICIT_RECEIVER](x) -> INIT: in: {x=D} out: {x=D} USE: in: {x=READ} out: {x=READ} r(x|) -> USE: in: {} out: {x=READ} r(1) -> mark(x + 1) diff --git a/compiler/testData/cfg-variables/bugs/referenceToPropertyInitializer.values b/compiler/testData/cfg-variables/bugs/referenceToPropertyInitializer.values index 99694f22423..a143897cc2b 100644 --- a/compiler/testData/cfg-variables/bugs/referenceToPropertyInitializer.values +++ b/compiler/testData/cfg-variables/bugs/referenceToPropertyInitializer.values @@ -12,21 +12,21 @@ class TestFunctionLiteral { sum(x - 1) + x } --------------------- - : Int NEW: magic(x: Int) -> - : TestFunctionLiteral NEW: magic(sum) -> -sum : {<: (Int) -> Int} NEW: r(sum|) -> -x : Int NEW: r(x) -> -1 : Int NEW: r(1) -> -x - 1 : Int NEW: call(x - 1, minus|, ) -> -sum(x - 1) : Int NEW: call(sum(x - 1), invoke|, ) -> -x : Int NEW: r(x) -> + : Int NEW: magic[FAKE_INITIALIZER](x: Int) -> + : TestFunctionLiteral NEW: magic[IMPLICIT_RECEIVER](sum) -> +sum : {<: (Int) -> Int} NEW: r(sum|) -> +x : Int NEW: r(x) -> +1 : Int NEW: r(1) -> +x - 1 : Int NEW: call(x - 1, minus|, ) -> +sum(x - 1) : Int NEW: call(sum(x - 1), invoke|, ) -> +x : Int NEW: r(x) -> sum(x - 1) + x : Int NEW: call(sum(x - 1) + x, plus|, ) -> -sum(x - 1) + x : Int COPY +sum(x - 1) + x : Int COPY ===================== == A == open class A(val a: A) --------------------- - : {<: A} NEW: magic(val a: A) -> + : {<: A} NEW: magic[FAKE_INITIALIZER](val a: A) -> ===================== == TestObjectLiteral == class TestObjectLiteral { @@ -40,11 +40,11 @@ class TestObjectLiteral { } } --------------------- - : TestObjectLiteral NEW: magic(obj) -> - : TestObjectLiteral NEW: magic(obj) -> -obj : {<: A} NEW: r(obj|) -> -A(obj) : * NEW: call(A(obj), |) -> -obj : {<: A} NEW: r(obj|) -> + : TestObjectLiteral NEW: magic[IMPLICIT_RECEIVER](obj) -> + : TestObjectLiteral NEW: magic[IMPLICIT_RECEIVER](obj) -> +obj : {<: A} NEW: r(obj|) -> +A(obj) : * NEW: call(A(obj), |) -> +obj : {<: A} NEW: r(obj|) -> object: A(obj) { { val x = obj } fun foo() { val y = obj } } : {<: A} NEW: r(object: A(obj) { { val x = obj } fun foo() { val y = obj } }) -> ===================== == foo == @@ -52,16 +52,16 @@ fun foo() { val y = obj } --------------------- - : TestObjectLiteral NEW: magic(obj) -> -obj : {<: A} NEW: r(obj|) -> + : TestObjectLiteral NEW: magic[IMPLICIT_RECEIVER](obj) -> +obj : {<: A} NEW: r(obj|) -> ===================== == TestOther == class TestOther { val x: Int = x + 1 } --------------------- - : TestOther NEW: magic(x) -> -x : Int NEW: r(x|) -> -1 : Int NEW: r(1) -> + : TestOther NEW: magic[IMPLICIT_RECEIVER](x) -> +x : Int NEW: r(x|) -> +1 : Int NEW: r(1) -> x + 1 : Int NEW: call(x + 1, plus|, ) -> ===================== diff --git a/compiler/testData/cfg-variables/bugs/varInitializationInIf.instructions b/compiler/testData/cfg-variables/bugs/varInitializationInIf.instructions index 29d923ca79d..39cc786188f 100644 --- a/compiler/testData/cfg-variables/bugs/varInitializationInIf.instructions +++ b/compiler/testData/cfg-variables/bugs/varInitializationInIf.instructions @@ -33,7 +33,7 @@ L3: r(b) -> USE: in: {} out: {b=READ} error(use, No resolved call) mark(use(b)) - magic(use(b)|) -> + magic[UNRESOLVED_CALL](use(b)|) -> L1: 1 INIT: in: {} out: {} error: diff --git a/compiler/testData/cfg-variables/bugs/varInitializationInIf.values b/compiler/testData/cfg-variables/bugs/varInitializationInIf.values index 0498339c517..09bdf63c937 100644 --- a/compiler/testData/cfg-variables/bugs/varInitializationInIf.values +++ b/compiler/testData/cfg-variables/bugs/varInitializationInIf.values @@ -10,12 +10,12 @@ fun foo() { use(b) } --------------------- -1 : {<: Comparable} NEW: r(1) -> -2 : Int NEW: r(2) -> -1 < 2 : Boolean NEW: call(1 < 2, compareTo|, ) -> -false : Boolean NEW: r(false) -> -true : Boolean NEW: r(true) -> -b : * NEW: r(b) -> -use(b) : * NEW: magic(use(b)|) -> -{ val b: Boolean if (1 < 2) { b = false } else { b = true } use(b) } : * COPY -===================== \ No newline at end of file +1 : {<: Comparable} NEW: r(1) -> +2 : Int NEW: r(2) -> +1 < 2 : Boolean NEW: call(1 < 2, compareTo|, ) -> +false : Boolean NEW: r(false) -> +true : Boolean NEW: r(true) -> +b : * NEW: r(b) -> +use(b) : * NEW: magic[UNRESOLVED_CALL](use(b)|) -> +{ val b: Boolean if (1 < 2) { b = false } else { b = true } use(b) } : * COPY +===================== diff --git a/compiler/testData/cfg-variables/bugs/varInitializationInIfInCycle.instructions b/compiler/testData/cfg-variables/bugs/varInitializationInIfInCycle.instructions index a5030163820..c679f62e540 100644 --- a/compiler/testData/cfg-variables/bugs/varInitializationInIfInCycle.instructions +++ b/compiler/testData/cfg-variables/bugs/varInitializationInIfInCycle.instructions @@ -16,7 +16,7 @@ fun foo(numbers: Collection) { L0: 1 INIT: in: {} out: {} v(numbers: Collection) INIT: in: {} out: {numbers=D} - magic(numbers: Collection) -> INIT: in: {numbers=D} out: {numbers=D} + magic[FAKE_INITIALIZER](numbers: Collection) -> INIT: in: {numbers=D} out: {numbers=D} w(numbers|) INIT: in: {numbers=D} out: {numbers=ID} 2 mark({ for (i in numbers) { val b: Boolean if (1 < 2) { b = false } else { b = true } use(b) continue } }) INIT: in: {numbers=ID} out: {numbers=ID} USE: in: {numbers=READ} out: {numbers=READ} 3 r(numbers) -> USE: in: {} out: {numbers=READ} @@ -25,7 +25,7 @@ L3: jmp?(L2) INIT: in: {i=D, numbers=ID} out: {i=D, numbers=ID} L4 [loop entry point]: L5 [body entry point]: - magic(numbers|) -> + magic[LOOP_RANGE_ITERATION](numbers|) -> w(i|) INIT: in: {i=D, numbers=ID} out: {i=ID, numbers=ID} mark(for (i in numbers) { val b: Boolean if (1 < 2) { b = false } else { b = true } use(b) continue }) INIT: in: {i=ID, numbers=ID} out: {i=ID, numbers=ID} USE: in: {} out: {} 4 mark({ val b: Boolean if (1 < 2) { b = false } else { b = true } use(b) continue }) @@ -63,16 +63,16 @@ sink: fun use(vararg a: Any?) = a --------------------- L0: - 1 INIT: in: {} out: {} - v(vararg a: Any?) INIT: in: {} out: {a=D} - magic(vararg a: Any?) -> INIT: in: {a=D} out: {a=D} - w(a|) INIT: in: {a=D} out: {a=ID} USE: in: {a=READ} out: {a=READ} - r(a) -> INIT: in: {a=ID} out: {a=ID} USE: in: {} out: {a=READ} + 1 INIT: in: {} out: {} + v(vararg a: Any?) INIT: in: {} out: {a=D} + magic[FAKE_INITIALIZER](vararg a: Any?) -> INIT: in: {a=D} out: {a=D} + w(a|) INIT: in: {a=D} out: {a=ID} USE: in: {a=READ} out: {a=READ} + r(a) -> INIT: in: {a=ID} out: {a=ID} USE: in: {} out: {a=READ} ret(*|) L1 L1: error: - INIT: in: {} out: {} + INIT: in: {} out: {} sink: - INIT: in: {a=ID} out: {a=ID} USE: in: {} out: {} + INIT: in: {a=ID} out: {a=ID} USE: in: {} out: {} ===================== diff --git a/compiler/testData/cfg-variables/bugs/varInitializationInIfInCycle.values b/compiler/testData/cfg-variables/bugs/varInitializationInIfInCycle.values index 445fa4a735e..122f89e1e5f 100644 --- a/compiler/testData/cfg-variables/bugs/varInitializationInIfInCycle.values +++ b/compiler/testData/cfg-variables/bugs/varInitializationInIfInCycle.values @@ -13,20 +13,20 @@ fun foo(numbers: Collection) { } } --------------------- - : {<: Collection} NEW: magic(numbers: Collection) -> - : Int NEW: magic(numbers|) -> -numbers : {<: Iterable} NEW: r(numbers) -> -1 : {<: Comparable} NEW: r(1) -> -2 : Int NEW: r(2) -> -1 < 2 : Boolean NEW: call(1 < 2, compareTo|, ) -> -false : Boolean NEW: r(false) -> -true : Boolean NEW: r(true) -> -b : {<: Any?} NEW: r(b) -> -use(b) : * NEW: call(use(b), use|) -> + : {<: Collection} NEW: magic[FAKE_INITIALIZER](numbers: Collection) -> + : Int NEW: magic[LOOP_RANGE_ITERATION](numbers|) -> +numbers : {<: Iterable} NEW: r(numbers) -> +1 : {<: Comparable} NEW: r(1) -> +2 : Int NEW: r(2) -> +1 < 2 : Boolean NEW: call(1 < 2, compareTo|, ) -> +false : Boolean NEW: r(false) -> +true : Boolean NEW: r(true) -> +b : {<: Any?} NEW: r(b) -> +use(b) : * NEW: call(use(b), use|) -> ===================== == use == fun use(vararg a: Any?) = a --------------------- - : {<: Array} NEW: magic(vararg a: Any?) -> -a : {<: Array} NEW: r(a) -> -===================== \ No newline at end of file + : {<: Array} NEW: magic[FAKE_INITIALIZER](vararg a: Any?) -> +a : {<: Array} NEW: r(a) -> +===================== diff --git a/compiler/testData/cfg-variables/lexicalScopes/forScope.instructions b/compiler/testData/cfg-variables/lexicalScopes/forScope.instructions index 7fb24c1479a..a3f48f46987 100644 --- a/compiler/testData/cfg-variables/lexicalScopes/forScope.instructions +++ b/compiler/testData/cfg-variables/lexicalScopes/forScope.instructions @@ -21,7 +21,7 @@ L3: jmp?(L2) INIT: in: {i=D} out: {i=D} L4 [loop entry point]: L5 [body entry point]: - magic(1..10|) -> + magic[LOOP_RANGE_ITERATION](1..10|) -> w(i|) INIT: in: {i=D} out: {i=ID} mark(for (i in 1..10) { val a = i }) INIT: in: {i=ID} out: {i=ID} 4 mark({ val a = i }) diff --git a/compiler/testData/cfg-variables/lexicalScopes/forScope.values b/compiler/testData/cfg-variables/lexicalScopes/forScope.values index 72af443ef98..943aebfa307 100644 --- a/compiler/testData/cfg-variables/lexicalScopes/forScope.values +++ b/compiler/testData/cfg-variables/lexicalScopes/forScope.values @@ -7,7 +7,7 @@ fun foo() { "after" } --------------------- - : Int NEW: magic(1..10|) -> + : Int NEW: magic[LOOP_RANGE_ITERATION](1..10|) -> "before" : * NEW: r("before") -> 1 : Int NEW: r(1) -> 10 : Int NEW: r(10) -> @@ -15,4 +15,4 @@ fun foo() { i : Int NEW: r(i) -> "after" : * NEW: r("after") -> { "before" for (i in 1..10) { val a = i } "after" } : * COPY -===================== \ No newline at end of file +===================== diff --git a/compiler/testData/cfg-variables/lexicalScopes/functionLiteralScope.instructions b/compiler/testData/cfg-variables/lexicalScopes/functionLiteralScope.instructions index 8ddbfeb6801..3b41689f3d6 100644 --- a/compiler/testData/cfg-variables/lexicalScopes/functionLiteralScope.instructions +++ b/compiler/testData/cfg-variables/lexicalScopes/functionLiteralScope.instructions @@ -38,21 +38,21 @@ sink: } --------------------- L3: - 3 INIT: in: {} out: {} - v(x: Int) INIT: in: {} out: {x=D} - magic(x: Int) -> INIT: in: {x=D} out: {x=D} - w(x|) INIT: in: {x=D} out: {x=ID} - 4 mark(val a = x + b) INIT: in: {x=ID} out: {x=ID} - v(val a = x + b) INIT: in: {x=ID} out: {a=D, x=ID} USE: in: {b=READ, x=READ} out: {b=READ, x=READ} - r(x) -> INIT: in: {a=D, x=ID} out: {a=D, x=ID} USE: in: {b=READ} out: {b=READ, x=READ} - r(b) -> USE: in: {} out: {b=READ} + 3 INIT: in: {} out: {} + v(x: Int) INIT: in: {} out: {x=D} + magic[FAKE_INITIALIZER](x: Int) -> INIT: in: {x=D} out: {x=D} + w(x|) INIT: in: {x=D} out: {x=ID} + 4 mark(val a = x + b) INIT: in: {x=ID} out: {x=ID} + v(val a = x + b) INIT: in: {x=ID} out: {a=D, x=ID} USE: in: {b=READ, x=READ} out: {b=READ, x=READ} + r(x) -> INIT: in: {a=D, x=ID} out: {a=D, x=ID} USE: in: {b=READ} out: {b=READ, x=READ} + r(b) -> USE: in: {} out: {b=READ} mark(x + b) call(x + b, plus|, ) -> - w(a|) INIT: in: {a=D, x=ID} out: {a=ID, x=ID} + w(a|) INIT: in: {a=D, x=ID} out: {a=ID, x=ID} L4: - 3 INIT: in: {x=ID} out: {x=ID} + 3 INIT: in: {x=ID} out: {x=ID} error: - INIT: in: {} out: {} + INIT: in: {} out: {} sink: - INIT: in: {x=ID} out: {x=ID} USE: in: {} out: {} + INIT: in: {x=ID} out: {x=ID} USE: in: {} out: {} ===================== diff --git a/compiler/testData/cfg-variables/lexicalScopes/functionLiteralScope.values b/compiler/testData/cfg-variables/lexicalScopes/functionLiteralScope.values index a4ace108ae1..da85f01af2c 100644 --- a/compiler/testData/cfg-variables/lexicalScopes/functionLiteralScope.values +++ b/compiler/testData/cfg-variables/lexicalScopes/functionLiteralScope.values @@ -19,8 +19,8 @@ fun foo() { val a = x + b } --------------------- - : Int NEW: magic(x: Int) -> + : Int NEW: magic[FAKE_INITIALIZER](x: Int) -> x : Int NEW: r(x) -> b : Int NEW: r(b) -> x + b : Int NEW: call(x + b, plus|, ) -> -===================== \ No newline at end of file +===================== diff --git a/compiler/testData/cfg-variables/lexicalScopes/localClass.instructions b/compiler/testData/cfg-variables/lexicalScopes/localClass.instructions index d21e37a02e5..bc642bac5a7 100644 --- a/compiler/testData/cfg-variables/lexicalScopes/localClass.instructions +++ b/compiler/testData/cfg-variables/lexicalScopes/localClass.instructions @@ -18,11 +18,11 @@ L0: mark("before") r("before") -> v(val x: Int) INIT: in: {} out: {x=D} - magic(val x: Int) -> INIT: in: {x=D} out: {x=D} + magic[FAKE_INITIALIZER](val x: Int) -> INIT: in: {x=D} out: {x=D} w(x|) INIT: in: {x=D} out: {x=ID} 3 mark({ val a = x }) INIT: in: {x=ID} out: {x=ID} v(val a = x) INIT: in: {x=ID} out: {a=D, x=ID} - magic(x) -> INIT: in: {a=D, x=ID} out: {a=D, x=ID} + magic[IMPLICIT_RECEIVER](x) -> INIT: in: {a=D, x=ID} out: {a=D, x=ID} r(x|) -> w(a|) INIT: in: {a=D, x=ID} out: {a=ID, x=ID} 2 jmp?(L2) INIT: in: {x=ID} out: {x=ID} @@ -43,16 +43,16 @@ fun foo() { } --------------------- L3: - 3 INIT: in: {} out: {} + 3 INIT: in: {} out: {} 4 mark({ val b = x }) - v(val b = x) INIT: in: {} out: {b=D} - magic(x) -> INIT: in: {b=D} out: {b=D} USE: in: {x=READ} out: {x=READ} - r(x|) -> USE: in: {} out: {x=READ} - w(b|) INIT: in: {b=D} out: {b=ID} + v(val b = x) INIT: in: {} out: {b=D} + magic[IMPLICIT_RECEIVER](x) -> INIT: in: {b=D} out: {b=D} USE: in: {x=READ} out: {x=READ} + r(x|) -> USE: in: {} out: {x=READ} + w(b|) INIT: in: {b=D} out: {b=ID} L4: - 3 INIT: in: {} out: {} + 3 INIT: in: {} out: {} error: sink: - USE: in: {} out: {} + USE: in: {} out: {} ===================== diff --git a/compiler/testData/cfg-variables/lexicalScopes/localClass.values b/compiler/testData/cfg-variables/lexicalScopes/localClass.values index e823ea66ff9..4e98c3faac9 100644 --- a/compiler/testData/cfg-variables/lexicalScopes/localClass.values +++ b/compiler/testData/cfg-variables/lexicalScopes/localClass.values @@ -12,8 +12,8 @@ fun foo() { "after" } --------------------- - : Int NEW: magic(val x: Int) -> - : A NEW: magic(x) -> + : Int NEW: magic[FAKE_INITIALIZER](val x: Int) -> + : A NEW: magic[IMPLICIT_RECEIVER](x) -> "before" : * NEW: r("before") -> x : Int NEW: r(x|) -> "after" : * NEW: r("after") -> @@ -24,6 +24,6 @@ fun foo() { val b = x } --------------------- - : A NEW: magic(x) -> + : A NEW: magic[IMPLICIT_RECEIVER](x) -> x : Int NEW: r(x|) -> -===================== \ No newline at end of file +===================== diff --git a/compiler/testData/cfg-variables/lexicalScopes/localFunctionScope.instructions b/compiler/testData/cfg-variables/lexicalScopes/localFunctionScope.instructions index 00916331af2..8f6d2b3023b 100644 --- a/compiler/testData/cfg-variables/lexicalScopes/localFunctionScope.instructions +++ b/compiler/testData/cfg-variables/lexicalScopes/localFunctionScope.instructions @@ -34,21 +34,21 @@ fun local(x: Int) { } --------------------- L3: - 3 INIT: in: {} out: {} - v(x: Int) INIT: in: {} out: {x=D} - magic(x: Int) -> INIT: in: {x=D} out: {x=D} - w(x|) INIT: in: {x=D} out: {x=ID} - 4 mark({ val a = x + b }) INIT: in: {x=ID} out: {x=ID} - v(val a = x + b) INIT: in: {x=ID} out: {a=D, x=ID} USE: in: {b=READ, x=READ} out: {b=READ, x=READ} - r(x) -> INIT: in: {a=D, x=ID} out: {a=D, x=ID} USE: in: {b=READ} out: {b=READ, x=READ} - r(b) -> USE: in: {} out: {b=READ} + 3 INIT: in: {} out: {} + v(x: Int) INIT: in: {} out: {x=D} + magic[FAKE_INITIALIZER](x: Int) -> INIT: in: {x=D} out: {x=D} + w(x|) INIT: in: {x=D} out: {x=ID} + 4 mark({ val a = x + b }) INIT: in: {x=ID} out: {x=ID} + v(val a = x + b) INIT: in: {x=ID} out: {a=D, x=ID} USE: in: {b=READ, x=READ} out: {b=READ, x=READ} + r(x) -> INIT: in: {a=D, x=ID} out: {a=D, x=ID} USE: in: {b=READ} out: {b=READ, x=READ} + r(b) -> USE: in: {} out: {b=READ} mark(x + b) call(x + b, plus|, ) -> - w(a|) INIT: in: {a=D, x=ID} out: {a=ID, x=ID} + w(a|) INIT: in: {a=D, x=ID} out: {a=ID, x=ID} L4: - 3 INIT: in: {x=ID} out: {x=ID} + 3 INIT: in: {x=ID} out: {x=ID} error: - INIT: in: {} out: {} + INIT: in: {} out: {} sink: - INIT: in: {x=ID} out: {x=ID} USE: in: {} out: {} + INIT: in: {x=ID} out: {x=ID} USE: in: {} out: {} ===================== diff --git a/compiler/testData/cfg-variables/lexicalScopes/localFunctionScope.values b/compiler/testData/cfg-variables/lexicalScopes/localFunctionScope.values index 9fab1f2e7ab..0f06024c3db 100644 --- a/compiler/testData/cfg-variables/lexicalScopes/localFunctionScope.values +++ b/compiler/testData/cfg-variables/lexicalScopes/localFunctionScope.values @@ -18,8 +18,8 @@ fun local(x: Int) { val a = x + b } --------------------- - : Int NEW: magic(x: Int) -> + : Int NEW: magic[FAKE_INITIALIZER](x: Int) -> x : Int NEW: r(x) -> b : Int NEW: r(b) -> x + b : Int NEW: call(x + b, plus|, ) -> -===================== \ No newline at end of file +===================== diff --git a/compiler/testData/cfg-variables/lexicalScopes/localFunctionScopeWithoutBody.instructions b/compiler/testData/cfg-variables/lexicalScopes/localFunctionScopeWithoutBody.instructions index 2d36bee4b84..76d780b9e32 100644 --- a/compiler/testData/cfg-variables/lexicalScopes/localFunctionScopeWithoutBody.instructions +++ b/compiler/testData/cfg-variables/lexicalScopes/localFunctionScopeWithoutBody.instructions @@ -30,19 +30,19 @@ sink: fun local(x: Int) = x + b --------------------- L3: - 3 INIT: in: {} out: {} - v(x: Int) INIT: in: {} out: {x=D} - magic(x: Int) -> INIT: in: {x=D} out: {x=D} - w(x|) INIT: in: {x=D} out: {x=ID} USE: in: {b=READ, x=READ} out: {b=READ, x=READ} - r(x) -> INIT: in: {x=ID} out: {x=ID} USE: in: {b=READ} out: {b=READ, x=READ} - r(b) -> USE: in: {} out: {b=READ} + 3 INIT: in: {} out: {} + v(x: Int) INIT: in: {} out: {x=D} + magic[FAKE_INITIALIZER](x: Int) -> INIT: in: {x=D} out: {x=D} + w(x|) INIT: in: {x=D} out: {x=ID} USE: in: {b=READ, x=READ} out: {b=READ, x=READ} + r(x) -> INIT: in: {x=ID} out: {x=ID} USE: in: {b=READ} out: {b=READ, x=READ} + r(b) -> USE: in: {} out: {b=READ} mark(x + b) call(x + b, plus|, ) -> ret(*|) L4 L4: error: - INIT: in: {} out: {} + INIT: in: {} out: {} sink: - INIT: in: {x=ID} out: {x=ID} USE: in: {} out: {} + INIT: in: {x=ID} out: {x=ID} USE: in: {} out: {} ===================== diff --git a/compiler/testData/cfg-variables/lexicalScopes/localFunctionScopeWithoutBody.values b/compiler/testData/cfg-variables/lexicalScopes/localFunctionScopeWithoutBody.values index 004ccc35db5..ed923725ae7 100644 --- a/compiler/testData/cfg-variables/lexicalScopes/localFunctionScopeWithoutBody.values +++ b/compiler/testData/cfg-variables/lexicalScopes/localFunctionScopeWithoutBody.values @@ -7,15 +7,15 @@ fun foo() { } --------------------- "before" : * NEW: r("before") -> -1 : Int NEW: r(1) -> -"after" : * NEW: r("after") -> -{ "before" val b = 1 fun local(x: Int) = x + b "after" } : * COPY +1 : Int NEW: r(1) -> +"after" : * NEW: r("after") -> +{ "before" val b = 1 fun local(x: Int) = x + b "after" } : * COPY ===================== == local == fun local(x: Int) = x + b --------------------- - : Int NEW: magic(x: Int) -> -x : Int NEW: r(x) -> -b : Int NEW: r(b) -> -x + b : Int NEW: call(x + b, plus|, ) -> -===================== \ No newline at end of file + : Int NEW: magic[FAKE_INITIALIZER](x: Int) -> +x : Int NEW: r(x) -> +b : Int NEW: r(b) -> +x + b : Int NEW: call(x + b, plus|, ) -> +===================== diff --git a/compiler/testData/cfg-variables/lexicalScopes/propertyAccessorScope.instructions b/compiler/testData/cfg-variables/lexicalScopes/propertyAccessorScope.instructions index ee2affb4dde..5ad28a27fcd 100644 --- a/compiler/testData/cfg-variables/lexicalScopes/propertyAccessorScope.instructions +++ b/compiler/testData/cfg-variables/lexicalScopes/propertyAccessorScope.instructions @@ -34,17 +34,17 @@ get() { } --------------------- L3: - 3 INIT: in: {} out: {} + 3 INIT: in: {} out: {} 4 mark({ return $a }) - magic($a) -> USE: in: {a=READ} out: {a=READ} - r($a|) -> USE: in: {} out: {a=READ} + magic[IMPLICIT_RECEIVER]($a) -> USE: in: {a=READ} out: {a=READ} + r($a|) -> USE: in: {} out: {a=READ} ret(*|) L4 L4: 3 error: sink: - USE: in: {} out: {} + USE: in: {} out: {} ===================== == set_a == set(v: Int) { @@ -52,18 +52,18 @@ set(v: Int) { } --------------------- L6: - 3 INIT: in: {} out: {} - v(v: Int) INIT: in: {} out: {v=D} - magic(v: Int) -> INIT: in: {v=D} out: {v=D} - w(v|) INIT: in: {v=D} out: {v=ID} - 4 mark({ $a = v }) INIT: in: {v=ID} out: {v=ID} - magic($a) -> USE: in: {a=ONLY_WRITTEN_NEVER_READ, v=READ} out: {a=ONLY_WRITTEN_NEVER_READ, v=READ} - r(v) -> USE: in: {a=ONLY_WRITTEN_NEVER_READ} out: {a=ONLY_WRITTEN_NEVER_READ, v=READ} - w($a|, ) INIT: in: {v=ID} out: {a=I, v=ID} USE: in: {} out: {a=ONLY_WRITTEN_NEVER_READ} + 3 INIT: in: {} out: {} + v(v: Int) INIT: in: {} out: {v=D} + magic[FAKE_INITIALIZER](v: Int) -> INIT: in: {v=D} out: {v=D} + w(v|) INIT: in: {v=D} out: {v=ID} + 4 mark({ $a = v }) INIT: in: {v=ID} out: {v=ID} + magic[IMPLICIT_RECEIVER]($a) -> USE: in: {a=ONLY_WRITTEN_NEVER_READ, v=READ} out: {a=ONLY_WRITTEN_NEVER_READ, v=READ} + r(v) -> USE: in: {a=ONLY_WRITTEN_NEVER_READ} out: {a=ONLY_WRITTEN_NEVER_READ, v=READ} + w($a|, ) INIT: in: {v=ID} out: {a=I, v=ID} USE: in: {} out: {a=ONLY_WRITTEN_NEVER_READ} L7: - 3 INIT: in: {a=I, v=ID} out: {a=I, v=ID} + 3 INIT: in: {a=I, v=ID} out: {a=I, v=ID} error: - INIT: in: {} out: {} + INIT: in: {} out: {} sink: - INIT: in: {a=I, v=ID} out: {a=I, v=ID} USE: in: {} out: {} + INIT: in: {a=I, v=ID} out: {a=I, v=ID} USE: in: {} out: {} ===================== diff --git a/compiler/testData/cfg-variables/lexicalScopes/propertyAccessorScope.values b/compiler/testData/cfg-variables/lexicalScopes/propertyAccessorScope.values index b88e99490fe..16d26ec0c7c 100644 --- a/compiler/testData/cfg-variables/lexicalScopes/propertyAccessorScope.values +++ b/compiler/testData/cfg-variables/lexicalScopes/propertyAccessorScope.values @@ -17,7 +17,7 @@ get() { return $a } --------------------- - : A NEW: magic($a) -> + : A NEW: magic[IMPLICIT_RECEIVER]($a) -> $a : Int NEW: r($a|) -> ===================== == set_a == @@ -25,7 +25,7 @@ set(v: Int) { $a = v } --------------------- - : Int NEW: magic(v: Int) -> - : A NEW: magic($a) -> + : Int NEW: magic[FAKE_INITIALIZER](v: Int) -> + : A NEW: magic[IMPLICIT_RECEIVER]($a) -> v : Int NEW: r(v) -> -===================== \ No newline at end of file +===================== diff --git a/compiler/testData/cfg-variables/lexicalScopes/tryScope.instructions b/compiler/testData/cfg-variables/lexicalScopes/tryScope.instructions index 55659e62330..ee3f1acca74 100644 --- a/compiler/testData/cfg-variables/lexicalScopes/tryScope.instructions +++ b/compiler/testData/cfg-variables/lexicalScopes/tryScope.instructions @@ -27,7 +27,7 @@ L0: 2 jmp(L4 [afterCatches]) USE: in: {} out: {} L2 [onException]: 3 v(e: Exception) INIT: in: {} out: {e=D} - magic(e: Exception) -> INIT: in: {e=D} out: {e=D} + magic[FAKE_INITIALIZER](e: Exception) -> INIT: in: {e=D} out: {e=D} w(e|) INIT: in: {e=D} out: {e=ID} 4 mark({ val a = e }) INIT: in: {e=ID} out: {e=ID} v(val a = e) INIT: in: {e=ID} out: {a=D, e=ID} USE: in: {e=READ} out: {e=READ} diff --git a/compiler/testData/cfg-variables/lexicalScopes/tryScope.values b/compiler/testData/cfg-variables/lexicalScopes/tryScope.values index 40b7f16f8c9..76ef8379d2e 100644 --- a/compiler/testData/cfg-variables/lexicalScopes/tryScope.values +++ b/compiler/testData/cfg-variables/lexicalScopes/tryScope.values @@ -13,7 +13,7 @@ fun foo() { "after" } --------------------- - : {<: Exception} NEW: magic(e: Exception) -> + : {<: Exception} NEW: magic[FAKE_INITIALIZER](e: Exception) -> "before" : * NEW: r("before") -> foo() : * NEW: call(foo(), foo) -> { foo() } : * COPY @@ -22,4 +22,4 @@ e try { foo() } catch (e: Exception) { val a = e } finally { val a = 1 } : * COPY "after" : * NEW: r("after") -> { "before" try { foo() } catch (e: Exception) { val a = e } finally { val a = 1 } "after" } : * COPY -===================== \ No newline at end of file +===================== diff --git a/compiler/testData/cfg/arrays/ArrayOfFunctions.instructions b/compiler/testData/cfg/arrays/ArrayOfFunctions.instructions index a367b25e03a..9321af73d8d 100644 --- a/compiler/testData/cfg/arrays/ArrayOfFunctions.instructions +++ b/compiler/testData/cfg/arrays/ArrayOfFunctions.instructions @@ -6,7 +6,7 @@ fun test(array: Array<(Int)->Unit>) { L0: 1 v(array: Array<(Int)->Unit>) - magic(array: Array<(Int)->Unit>) -> + magic[FAKE_INITIALIZER](array: Array<(Int)->Unit>) -> w(array|) 2 mark({ array[11](3) }) mark(array[11]) @@ -18,9 +18,9 @@ L0: mark(array[11](3)) call(array[11](3), invoke|, ) -> L1: - 1 NEXT:[] + 1 NEXT:[] error: - PREV:[] + PREV:[] sink: - PREV:[, ] + PREV:[, ] ===================== diff --git a/compiler/testData/cfg/arrays/ArrayOfFunctions.values b/compiler/testData/cfg/arrays/ArrayOfFunctions.values index 7720f1b5017..1804b4c4df2 100644 --- a/compiler/testData/cfg/arrays/ArrayOfFunctions.values +++ b/compiler/testData/cfg/arrays/ArrayOfFunctions.values @@ -3,11 +3,11 @@ fun test(array: Array<(Int)->Unit>) { array[11](3) } --------------------- - : {<: Array<(Int) -> Unit>} NEW: magic(array: Array<(Int)->Unit>) -> -array : {<: Array<(Int) -> Unit>} NEW: r(array) -> -11 : Int NEW: r(11) -> -array[11] : {<: (Int) -> Unit} NEW: call(array[11], get|, ) -> -3 : Int NEW: r(3) -> -array[11](3) : * NEW: call(array[11](3), invoke|, ) -> -{ array[11](3) } : * COPY + : {<: Array<(Int) -> Unit>} NEW: magic[FAKE_INITIALIZER](array: Array<(Int)->Unit>) -> +array : {<: Array<(Int) -> Unit>} NEW: r(array) -> +11 : Int NEW: r(11) -> +array[11] : {<: (Int) -> Unit} NEW: call(array[11], get|, ) -> +3 : Int NEW: r(3) -> +array[11](3) : * NEW: call(array[11](3), invoke|, ) -> +{ array[11](3) } : * COPY ===================== diff --git a/compiler/testData/cfg/arrays/arrayAccessExpression.instructions b/compiler/testData/cfg/arrays/arrayAccessExpression.instructions index f027717800d..9b926590263 100644 --- a/compiler/testData/cfg/arrays/arrayAccessExpression.instructions +++ b/compiler/testData/cfg/arrays/arrayAccessExpression.instructions @@ -32,7 +32,7 @@ fun test(ab: Ab) { L0: 1 v(ab: Ab) - magic(ab: Ab) -> + magic[FAKE_INITIALIZER](ab: Ab) -> w(ab|) 2 mark({ ab.getArray()[1] }) mark(ab.getArray()[1]) diff --git a/compiler/testData/cfg/arrays/arrayAccessExpression.values b/compiler/testData/cfg/arrays/arrayAccessExpression.values index 2b7cc5b1d37..59a4f81e5e4 100644 --- a/compiler/testData/cfg/arrays/arrayAccessExpression.values +++ b/compiler/testData/cfg/arrays/arrayAccessExpression.values @@ -13,11 +13,11 @@ fun test(ab: Ab) { ab.getArray()[1] } --------------------- - : {<: Ab} NEW: magic(ab: Ab) -> -ab : {<: Ab} NEW: r(ab) -> -getArray() : {<: Array} NEW: call(getArray(), getArray|) -> -ab.getArray() : {<: Array} COPY -1 : Int NEW: r(1) -> + : {<: Ab} NEW: magic[FAKE_INITIALIZER](ab: Ab) -> +ab : {<: Ab} NEW: r(ab) -> +getArray() : {<: Array} NEW: call(getArray(), getArray|) -> +ab.getArray() : {<: Array} COPY +1 : Int NEW: r(1) -> ab.getArray()[1] : * NEW: call(ab.getArray()[1], get|, ) -> -{ ab.getArray()[1] } : * COPY -===================== \ No newline at end of file +{ ab.getArray()[1] } : * COPY +===================== diff --git a/compiler/testData/cfg/arrays/arrayInc.instructions b/compiler/testData/cfg/arrays/arrayInc.instructions index 3b77ae205e7..71af73e6dde 100644 --- a/compiler/testData/cfg/arrays/arrayInc.instructions +++ b/compiler/testData/cfg/arrays/arrayInc.instructions @@ -6,7 +6,7 @@ fun foo(a: Array) { L0: 1 v(a: Array) - magic(a: Array) -> + magic[FAKE_INITIALIZER](a: Array) -> w(a|) 2 mark({ a[0]++ }) mark(a[0]) @@ -20,9 +20,9 @@ L0: r(0) -> call(a[0]++, set|, , ) -> L1: - 1 NEXT:[] + 1 NEXT:[] error: - PREV:[] + PREV:[] sink: - PREV:[, ] + PREV:[, ] ===================== diff --git a/compiler/testData/cfg/arrays/arrayInc.values b/compiler/testData/cfg/arrays/arrayInc.values index c4c5007e9fb..cd86f21b90b 100644 --- a/compiler/testData/cfg/arrays/arrayInc.values +++ b/compiler/testData/cfg/arrays/arrayInc.values @@ -3,10 +3,10 @@ fun foo(a: Array) { a[0]++ } --------------------- - : {<: Array} NEW: magic(a: Array) -> -a : {<: Array} NEW: r(a) -> -0 : Int NEW: r(0) -> -a[0] : Int NEW: call(a[0], get|, ) -> -a[0]++ : Int COPY -{ a[0]++ } : Int COPY + : {<: Array} NEW: magic[FAKE_INITIALIZER](a: Array) -> +a : {<: Array} NEW: r(a) -> +0 : Int NEW: r(0) -> +a[0] : Int NEW: call(a[0], get|, ) -> +a[0]++ : Int COPY +{ a[0]++ } : Int COPY ===================== diff --git a/compiler/testData/cfg/arrays/arraySet.instructions b/compiler/testData/cfg/arrays/arraySet.instructions index 9dc1a48e27f..56104d57a8a 100644 --- a/compiler/testData/cfg/arrays/arraySet.instructions +++ b/compiler/testData/cfg/arrays/arraySet.instructions @@ -6,7 +6,7 @@ fun foo(a: Array) { L0: 1 v(a: Array) - magic(a: Array) -> + magic[FAKE_INITIALIZER](a: Array) -> w(a|) 2 mark({ a[1] = 2 }) mark(a[1]) @@ -15,9 +15,9 @@ L0: r(2) -> call(a[1] = 2, set|, , ) -> L1: - 1 NEXT:[] + 1 NEXT:[] error: - PREV:[] + PREV:[] sink: - PREV:[, ] + PREV:[, ] ===================== diff --git a/compiler/testData/cfg/arrays/arraySet.values b/compiler/testData/cfg/arrays/arraySet.values index 222da0eb858..0be70ebd032 100644 --- a/compiler/testData/cfg/arrays/arraySet.values +++ b/compiler/testData/cfg/arrays/arraySet.values @@ -3,7 +3,7 @@ fun foo(a: Array) { a[1] = 2 } --------------------- - : {<: Array} NEW: magic(a: Array) -> + : {<: Array} NEW: magic[FAKE_INITIALIZER](a: Array) -> a : {<: Array} NEW: r(a) -> 1 : Int NEW: r(1) -> 2 : Int NEW: r(2) -> diff --git a/compiler/testData/cfg/arrays/arraySetPlusAssign.instructions b/compiler/testData/cfg/arrays/arraySetPlusAssign.instructions index 0ac5852fab5..8c8202a5e67 100644 --- a/compiler/testData/cfg/arrays/arraySetPlusAssign.instructions +++ b/compiler/testData/cfg/arrays/arraySetPlusAssign.instructions @@ -6,7 +6,7 @@ fun foo(a: Array) { L0: 1 v(a: Array) - magic(a: Array) -> + magic[FAKE_INITIALIZER](a: Array) -> w(a|) 2 mark({ a[0] += 1 }) mark(a[0]) @@ -21,9 +21,9 @@ L0: r(0) -> call(a[0] += 1, set|, , ) -> L1: - 1 NEXT:[] + 1 NEXT:[] error: - PREV:[] + PREV:[] sink: - PREV:[, ] + PREV:[, ] ===================== diff --git a/compiler/testData/cfg/arrays/arraySetPlusAssign.values b/compiler/testData/cfg/arrays/arraySetPlusAssign.values index 8fd65f4825c..9a40aea925a 100644 --- a/compiler/testData/cfg/arrays/arraySetPlusAssign.values +++ b/compiler/testData/cfg/arrays/arraySetPlusAssign.values @@ -3,11 +3,11 @@ fun foo(a: Array) { a[0] += 1 } --------------------- - : {<: Array} NEW: magic(a: Array) -> -a : {<: Array} NEW: r(a) -> -0 : Int NEW: r(0) -> -a[0] : Int NEW: call(a[0], get|, ) -> -1 : Int NEW: r(1) -> -a[0] += 1 : * NEW: call(a[0] += 1, set|, , ) -> -{ a[0] += 1 } : * COPY + : {<: Array} NEW: magic[FAKE_INITIALIZER](a: Array) -> +a : {<: Array} NEW: r(a) -> +0 : Int NEW: r(0) -> +a[0] : Int NEW: call(a[0], get|, ) -> +1 : Int NEW: r(1) -> +a[0] += 1 : * NEW: call(a[0] += 1, set|, , ) -> +{ a[0] += 1 } : * COPY ===================== diff --git a/compiler/testData/cfg/basic/Basic.instructions b/compiler/testData/cfg/basic/Basic.instructions index 0c30684b0b6..dc16cd31545 100644 --- a/compiler/testData/cfg/basic/Basic.instructions +++ b/compiler/testData/cfg/basic/Basic.instructions @@ -20,7 +20,7 @@ fun f(a : Boolean) : Unit { L0: 1 v(a : Boolean) - magic(a : Boolean) -> + magic[FAKE_INITIALIZER](a : Boolean) -> w(a|) 2 mark({ 1 a 2.toLong() foo(a, 3) genfun() flfun {1} 3.equals(4) 3 equals 4 1 + 2 a && true a || false }) r(1) -> @@ -56,15 +56,15 @@ L2: mark(1 + 2) call(1 + 2, plus|, ) -> r(a) -> - jf(L5|) NEXT:[magic(a && true|, ) -> , r(true) -> ] + jf(L5|) NEXT:[magic[AND](a && true|, ) -> , r(true) -> ] r(true) -> L5: - magic(a && true|, ) -> PREV:[jf(L5|), r(true) -> ] + magic[AND](a && true|, ) -> PREV:[jf(L5|), r(true) -> ] r(a) -> - jt(L6|) NEXT:[r(false) -> , magic(a || false|, ) -> ] + jt(L6|) NEXT:[r(false) -> , magic[OR](a || false|, ) -> ] r(false) -> L6: - magic(a || false|, ) -> PREV:[jt(L6|), r(false) -> ] + magic[OR](a || false|, ) -> PREV:[jt(L6|), r(false) -> ] L1: 1 NEXT:[] error: @@ -93,19 +93,19 @@ fun foo(a : Boolean, b : Int) : Unit {} L0: 1 v(a : Boolean) - magic(a : Boolean) -> + magic[FAKE_INITIALIZER](a : Boolean) -> w(a|) v(b : Int) - magic(b : Int) -> + magic[FAKE_INITIALIZER](b : Int) -> w(b|) 2 mark({}) read (Unit) L1: - 1 NEXT:[] + 1 NEXT:[] error: - PREV:[] + PREV:[] sink: - PREV:[, ] + PREV:[, ] ===================== == genfun == fun genfun() : Unit {} @@ -127,14 +127,14 @@ fun flfun(f : () -> Any) : Unit {} L0: 1 v(f : () -> Any) - magic(f : () -> Any) -> + magic[FAKE_INITIALIZER](f : () -> Any) -> w(f|) 2 mark({}) read (Unit) L1: - 1 NEXT:[] + 1 NEXT:[] error: - PREV:[] + PREV:[] sink: - PREV:[, ] + PREV:[, ] ===================== diff --git a/compiler/testData/cfg/basic/Basic.values b/compiler/testData/cfg/basic/Basic.values index ce0905f83d1..67357513ffa 100644 --- a/compiler/testData/cfg/basic/Basic.values +++ b/compiler/testData/cfg/basic/Basic.values @@ -17,47 +17,47 @@ fun f(a : Boolean) : Unit { } --------------------- - : Boolean NEW: magic(a : Boolean) -> -1 : * NEW: r(1) -> -a : * NEW: r(a) -> -2 : {<: Number} NEW: r(2) -> -toLong() : * NEW: call(toLong(), toLong|) -> -2.toLong() : * COPY -a : Boolean NEW: r(a) -> -3 : Int NEW: r(3) -> -foo(a, 3) : * NEW: call(foo(a, 3), foo|, ) -> -genfun() : * NEW: call(genfun(), genfun) -> -{1} : {<: () -> Any} NEW: r({1}) -> -flfun {1} : * NEW: call(flfun {1}, flfun|) -> -3 : OR{{<: Any}, {<: Any}} NEW: r(3) -> -4 : {<: Any?} NEW: r(4) -> -equals(4) : * NEW: call(equals(4), equals|, ) -> -3.equals(4) : * COPY -3 : OR{{<: Any}, {<: Any}} NEW: r(3) -> -4 : {<: Any?} NEW: r(4) -> + : Boolean NEW: magic[FAKE_INITIALIZER](a : Boolean) -> +1 : * NEW: r(1) -> +a : * NEW: r(a) -> +2 : {<: Number} NEW: r(2) -> +toLong() : * NEW: call(toLong(), toLong|) -> +2.toLong() : * COPY +a : Boolean NEW: r(a) -> +3 : Int NEW: r(3) -> +foo(a, 3) : * NEW: call(foo(a, 3), foo|, ) -> +genfun() : * NEW: call(genfun(), genfun) -> +{1} : {<: () -> Any} NEW: r({1}) -> +flfun {1} : * NEW: call(flfun {1}, flfun|) -> +3 : OR{{<: Any}, {<: Any}} NEW: r(3) -> +4 : {<: Any?} NEW: r(4) -> +equals(4) : * NEW: call(equals(4), equals|, ) -> +3.equals(4) : * COPY +3 : OR{{<: Any}, {<: Any}} NEW: r(3) -> +4 : {<: Any?} NEW: r(4) -> 3 equals 4 : * NEW: call(3 equals 4, equals|, ) -> -1 : Int NEW: r(1) -> -2 : Int NEW: r(2) -> -1 + 2 : * NEW: call(1 + 2, plus|, ) -> -a : Boolean NEW: r(a) -> -true : Boolean NEW: r(true) -> -a && true : * NEW: magic(a && true|, ) -> -a : Boolean NEW: r(a) -> -false : Boolean NEW: r(false) -> -a || false : * NEW: magic(a || false|, ) -> -{ 1 a 2.toLong() foo(a, 3) genfun() flfun {1} 3.equals(4) 3 equals 4 1 + 2 a && true a || false } : * COPY +1 : Int NEW: r(1) -> +2 : Int NEW: r(2) -> +1 + 2 : * NEW: call(1 + 2, plus|, ) -> +a : Boolean NEW: r(a) -> +true : Boolean NEW: r(true) -> +a && true : * NEW: magic[AND](a && true|, ) -> +a : Boolean NEW: r(a) -> +false : Boolean NEW: r(false) -> +a || false : * NEW: magic[OR](a || false|, ) -> +{ 1 a 2.toLong() foo(a, 3) genfun() flfun {1} 3.equals(4) 3 equals 4 1 + 2 a && true a || false } : * COPY ===================== == anonymous_0 == {1} --------------------- 1 : Int NEW: r(1) -> -1 : Int COPY +1 : Int COPY ===================== == foo == fun foo(a : Boolean, b : Int) : Unit {} --------------------- - : Boolean NEW: magic(a : Boolean) -> - : Int NEW: magic(b : Int) -> + : Boolean NEW: magic[FAKE_INITIALIZER](a : Boolean) -> + : Int NEW: magic[FAKE_INITIALIZER](b : Int) -> ===================== == genfun == fun genfun() : Unit {} @@ -66,5 +66,5 @@ fun genfun() : Unit {} == flfun == fun flfun(f : () -> Any) : Unit {} --------------------- - : {<: () -> Any} NEW: magic(f : () -> Any) -> + : {<: () -> Any} NEW: magic[FAKE_INITIALIZER](f : () -> Any) -> ===================== diff --git a/compiler/testData/cfg/bugs/jumpToOuterScope.instructions b/compiler/testData/cfg/bugs/jumpToOuterScope.instructions index 018c604f721..1e8977e579e 100644 --- a/compiler/testData/cfg/bugs/jumpToOuterScope.instructions +++ b/compiler/testData/cfg/bugs/jumpToOuterScope.instructions @@ -10,33 +10,33 @@ fun foo(c: Collection) { L0: 1 v(c: Collection) - magic(c: Collection) -> + magic[FAKE_INITIALIZER](c: Collection) -> w(c|) 2 mark({ for (e in c) { { break } } }) 3 r(c) -> v(e) L3: - jmp?(L2) NEXT:[read (Unit), magic(c|) -> ] + jmp?(L2) NEXT:[read (Unit), magic[LOOP_RANGE_ITERATION](c|) -> ] L4 [loop entry point]: L5 [body entry point]: - magic(c|) -> PREV:[jmp?(L2), jmp?(L4 [loop entry point])] + magic[LOOP_RANGE_ITERATION](c|) -> PREV:[jmp?(L2), jmp?(L4 [loop entry point])] w(e|) mark(for (e in c) { { break } }) 4 mark({ { break } }) mark({ break }) - jmp?(L6) NEXT:[r({ break }) -> , d({ break })] - d({ break }) NEXT:[] + jmp?(L6) NEXT:[r({ break }) -> , d({ break })] + d({ break }) NEXT:[] L6: - r({ break }) -> PREV:[jmp?(L6)] - 3 jmp?(L4 [loop entry point]) NEXT:[magic(c|) -> , read (Unit)] + r({ break }) -> PREV:[jmp?(L6)] + 3 jmp?(L4 [loop entry point]) NEXT:[magic[LOOP_RANGE_ITERATION](c|) -> , read (Unit)] L2: - read (Unit) PREV:[jmp?(L2), jmp(L2), jmp?(L4 [loop entry point])] + read (Unit) PREV:[jmp?(L2), jmp(L2), jmp?(L4 [loop entry point])] L1: - 1 NEXT:[] + 1 NEXT:[] error: - PREV:[] + PREV:[] sink: - PREV:[, , d({ break })] + PREV:[, , d({ break })] ===================== == anonymous_0 == { diff --git a/compiler/testData/cfg/bugs/jumpToOuterScope.values b/compiler/testData/cfg/bugs/jumpToOuterScope.values index 4960adf6fe6..b0a3ca9ea68 100644 --- a/compiler/testData/cfg/bugs/jumpToOuterScope.values +++ b/compiler/testData/cfg/bugs/jumpToOuterScope.values @@ -7,11 +7,11 @@ fun foo(c: Collection) { } } --------------------- - : {<: Collection} NEW: magic(c: Collection) -> - : Int NEW: magic(c|) -> -c : {<: Iterable} NEW: r(c) -> -{ break } : * NEW: r({ break }) -> -{ { break } } : * COPY + : {<: Collection} NEW: magic[FAKE_INITIALIZER](c: Collection) -> + : Int NEW: magic[LOOP_RANGE_ITERATION](c|) -> +c : {<: Iterable} NEW: r(c) -> +{ break } : * NEW: r({ break }) -> +{ { break } } : * COPY ===================== == anonymous_0 == { diff --git a/compiler/testData/cfg/controlStructures/Finally.instructions b/compiler/testData/cfg/controlStructures/Finally.instructions index 989a34b06a6..249942ec105 100644 --- a/compiler/testData/cfg/controlStructures/Finally.instructions +++ b/compiler/testData/cfg/controlStructures/Finally.instructions @@ -435,7 +435,7 @@ fun t8(a : Int) { L0: 1 v(a : Int) - magic(a : Int) -> + magic[FAKE_INITIALIZER](a : Int) -> w(a|) 2 mark({ @l for (i in 1..a) { try { 1 if (2 > 3) { continue @l } } finally { 2 } } }) mark(@l for (i in 1..a) { try { 1 if (2 > 3) { continue @l } } finally { 2 } }) @@ -445,10 +445,10 @@ L0: call(1..a, rangeTo|, ) -> v(i) L3: - jmp?(L2) NEXT:[read (Unit), magic(1..a|) -> ] + jmp?(L2) NEXT:[read (Unit), magic[LOOP_RANGE_ITERATION](1..a|) -> ] L4 [loop entry point]: L5 [body entry point]: - magic(1..a|) -> PREV:[jmp?(L2), jmp(L4 [loop entry point]), jmp?(L4 [loop entry point])] + magic[LOOP_RANGE_ITERATION](1..a|) -> PREV:[jmp?(L2), jmp(L4 [loop entry point]), jmp?(L4 [loop entry point])] w(i|) mark(for (i in 1..a) { try { 1 if (2 > 3) { continue @l } } finally { 2 } }) 4 mark({ try { 1 if (2 > 3) { continue @l } } finally { 2 } }) @@ -467,7 +467,7 @@ L8 [start finally]: 7 mark({ 2 }) r(2) -> L9 [finish finally]: - 6 jmp(L4 [loop entry point]) NEXT:[magic(1..a|) -> ] + 6 jmp(L4 [loop entry point]) NEXT:[magic[LOOP_RANGE_ITERATION](1..a|) -> ] - 5 jmp(L10) NEXT:[jmp(L11 [skipFinallyToErrorBlock])] PREV:[] L7: read (Unit) PREV:[jf(L7|)] @@ -480,7 +480,7 @@ L6 [onExceptionToFinallyBlock]: L11 [skipFinallyToErrorBlock]: 7 mark({ 2 }) PREV:[jmp(L11 [skipFinallyToErrorBlock])] r(2) -> - 3 jmp?(L4 [loop entry point]) NEXT:[magic(1..a|) -> , read (Unit)] + 3 jmp?(L4 [loop entry point]) NEXT:[magic[LOOP_RANGE_ITERATION](1..a|) -> , read (Unit)] L2: read (Unit) PREV:[jmp?(L2), jmp?(L4 [loop entry point])] L1: @@ -508,7 +508,7 @@ fun t9(a : Int) { L0: 1 v(a : Int) - magic(a : Int) -> + magic[FAKE_INITIALIZER](a : Int) -> w(a|) 2 mark({ try { @l for (i in 1..a) { 1 if (2 > 3) { continue @l } } 5 } finally { 2 } }) mark(try { @l for (i in 1..a) { 1 if (2 > 3) { continue @l } } 5 } finally { 2 }) @@ -521,10 +521,10 @@ L0: call(1..a, rangeTo|, ) -> v(i) L4: - jmp?(L3) NEXT:[read (Unit), magic(1..a|) -> ] + jmp?(L3) NEXT:[read (Unit), magic[LOOP_RANGE_ITERATION](1..a|) -> ] L5 [loop entry point]: L6 [body entry point]: - magic(1..a|) -> PREV:[jmp?(L3), jmp(L5 [loop entry point]), jmp?(L5 [loop entry point])] + magic[LOOP_RANGE_ITERATION](1..a|) -> PREV:[jmp?(L3), jmp(L5 [loop entry point]), jmp?(L5 [loop entry point])] w(i|) mark(for (i in 1..a) { 1 if (2 > 3) { continue @l } }) 5 mark({ 1 if (2 > 3) { continue @l } }) @@ -536,12 +536,12 @@ L6 [body entry point]: call(2 > 3, compareTo|, ) -> jf(L7|) NEXT:[read (Unit), mark({ continue @l })] 6 mark({ continue @l }) - jmp(L5 [loop entry point]) NEXT:[magic(1..a|) -> ] + jmp(L5 [loop entry point]) NEXT:[magic[LOOP_RANGE_ITERATION](1..a|) -> ] - 5 jmp(L8) NEXT:[jmp?(L5 [loop entry point])] PREV:[] L7: read (Unit) PREV:[jf(L7|)] L8: - 4 jmp?(L5 [loop entry point]) NEXT:[magic(1..a|) -> , read (Unit)] + 4 jmp?(L5 [loop entry point]) NEXT:[magic[LOOP_RANGE_ITERATION](1..a|) -> , read (Unit)] L3: read (Unit) PREV:[jmp?(L3), jmp?(L5 [loop entry point])] 3 r(5) -> @@ -579,7 +579,7 @@ fun t10(a : Int) { L0: 1 v(a : Int) - magic(a : Int) -> + magic[FAKE_INITIALIZER](a : Int) -> w(a|) 2 mark({ try { @l for (i in 1..a) { 1 if (2 > 3) { continue @l } } } finally { 2 } }) mark(try { @l for (i in 1..a) { 1 if (2 > 3) { continue @l } } } finally { 2 }) @@ -592,10 +592,10 @@ L0: call(1..a, rangeTo|, ) -> v(i) L4: - jmp?(L3) NEXT:[read (Unit), magic(1..a|) -> ] + jmp?(L3) NEXT:[read (Unit), magic[LOOP_RANGE_ITERATION](1..a|) -> ] L5 [loop entry point]: L6 [body entry point]: - magic(1..a|) -> PREV:[jmp?(L3), jmp(L5 [loop entry point]), jmp?(L5 [loop entry point])] + magic[LOOP_RANGE_ITERATION](1..a|) -> PREV:[jmp?(L3), jmp(L5 [loop entry point]), jmp?(L5 [loop entry point])] w(i|) mark(for (i in 1..a) { 1 if (2 > 3) { continue @l } }) 5 mark({ 1 if (2 > 3) { continue @l } }) @@ -607,12 +607,12 @@ L6 [body entry point]: call(2 > 3, compareTo|, ) -> jf(L7|) NEXT:[read (Unit), mark({ continue @l })] 6 mark({ continue @l }) - jmp(L5 [loop entry point]) NEXT:[magic(1..a|) -> ] + jmp(L5 [loop entry point]) NEXT:[magic[LOOP_RANGE_ITERATION](1..a|) -> ] - 5 jmp(L8) NEXT:[jmp?(L5 [loop entry point])] PREV:[] L7: read (Unit) PREV:[jf(L7|)] L8: - 4 jmp?(L5 [loop entry point]) NEXT:[magic(1..a|) -> , read (Unit)] + 4 jmp?(L5 [loop entry point]) NEXT:[magic[LOOP_RANGE_ITERATION](1..a|) -> , read (Unit)] L3: read (Unit) PREV:[jmp?(L3), jmp?(L5 [loop entry point])] 2 jmp(L9 [skipFinallyToErrorBlock]) NEXT:[mark({ 2 })] @@ -746,7 +746,7 @@ L5 [finish finally]: - 2 jmp(L6 [afterCatches]) NEXT:[jmp(L7 [skipFinallyToErrorBlock])] PREV:[] L2 [onException]: 3 v(e: UnsupportedOperationException) PREV:[jmp?(L2 [onException])] - magic(e: UnsupportedOperationException) -> + magic[FAKE_INITIALIZER](e: UnsupportedOperationException) -> w(e|) 4 mark({ doSmth(2) }) r(2) -> @@ -794,7 +794,7 @@ L0: - 2 jmp(L3 [afterCatches]) NEXT:[] PREV:[] L2 [onException]: 3 v(e: UnsupportedOperationException) PREV:[jmp?(L2 [onException])] - magic(e: UnsupportedOperationException) -> + magic[FAKE_INITIALIZER](e: UnsupportedOperationException) -> w(e|) 4 mark({ doSmth(2) }) r(2) -> @@ -840,7 +840,7 @@ L5 [finish finally]: - 2 jmp(L6 [afterCatches]) NEXT:[jmp(L7 [skipFinallyToErrorBlock])] PREV:[] L2 [onException]: 3 v(e: UnsupportedOperationException) PREV:[jmp?(L2 [onException])] - magic(e: UnsupportedOperationException) -> + magic[FAKE_INITIALIZER](e: UnsupportedOperationException) -> w(e|) 4 mark({ return 2 }) r(2) -> @@ -896,7 +896,7 @@ L0: 2 jmp(L4 [afterCatches]) NEXT:[jmp(L7 [skipFinallyToErrorBlock])] L2 [onException]: 3 v(e: UnsupportedOperationException) PREV:[jmp?(L2 [onException])] - magic(e: UnsupportedOperationException) -> + magic[FAKE_INITIALIZER](e: UnsupportedOperationException) -> w(e|) 4 mark({ return 2 }) r(2) -> @@ -935,14 +935,14 @@ fun doSmth(i: Int) { L0: 1 v(i: Int) - magic(i: Int) -> + magic[FAKE_INITIALIZER](i: Int) -> w(i|) 2 mark({ }) read (Unit) L1: - 1 NEXT:[] + 1 NEXT:[] error: - PREV:[] + PREV:[] sink: - PREV:[, ] + PREV:[, ] ===================== diff --git a/compiler/testData/cfg/controlStructures/Finally.values b/compiler/testData/cfg/controlStructures/Finally.values index caaa4f106ff..0287b18c72b 100644 --- a/compiler/testData/cfg/controlStructures/Finally.values +++ b/compiler/testData/cfg/controlStructures/Finally.values @@ -8,11 +8,11 @@ fun t1() { } --------------------- 1 : * NEW: r(1) -> -{ 1 } : * COPY +{ 1 } : * COPY 2 : * NEW: r(2) -> -{ 2 } : * COPY -try { 1 } finally { 2 } : * COPY -{ try { 1 } finally { 2 } } : * COPY +{ 2 } : * COPY +try { 1 } finally { 2 } : * COPY +{ try { 1 } finally { 2 } } : * COPY ===================== == t2 == fun t2() { @@ -26,12 +26,12 @@ fun t2() { } } --------------------- -1 : * NEW: r(1) -> -2 : {<: Comparable} NEW: r(2) -> -3 : Int NEW: r(3) -> +1 : * NEW: r(1) -> +2 : {<: Comparable} NEW: r(2) -> +3 : Int NEW: r(3) -> 2 > 3 : Boolean NEW: call(2 > 3, compareTo|, ) -> -2 : * NEW: r(2) -> -{ 2 } : * COPY +2 : * NEW: r(2) -> +{ 2 } : * COPY ===================== == t3 == fun t3() { @@ -47,14 +47,14 @@ fun t3() { } } --------------------- -1 : * NEW: r(1) -> +1 : * NEW: r(1) -> { () -> if (2 > 3) { return@l } } : * NEW: r({ () -> if (2 > 3) { return@l } }) -> -@l{ () -> if (2 > 3) { return@l } } : * COPY -{ 1 @l{ () -> if (2 > 3) { return@l } } } : * COPY -2 : * NEW: r(2) -> -{ 2 } : * COPY -try { 1 @l{ () -> if (2 > 3) { return@l } } } finally { 2 } : * COPY -{ try { 1 @l{ () -> if (2 > 3) { return@l } } } finally { 2 } } : * COPY +@l{ () -> if (2 > 3) { return@l } } : * COPY +{ 1 @l{ () -> if (2 > 3) { return@l } } } : * COPY +2 : * NEW: r(2) -> +{ 2 } : * COPY +try { 1 @l{ () -> if (2 > 3) { return@l } } } finally { 2 } : * COPY +{ try { 1 @l{ () -> if (2 > 3) { return@l } } } finally { 2 } } : * COPY ===================== == anonymous_0 == { () -> @@ -63,8 +63,8 @@ try { 1 @l{ () -> if (2 > 3) { return@l } } } finally { 2 } : * COPY } } --------------------- -2 : {<: Comparable} NEW: r(2) -> -3 : Int NEW: r(3) -> +2 : {<: Comparable} NEW: r(2) -> +3 : Int NEW: r(3) -> 2 > 3 : Boolean NEW: call(2 > 3, compareTo|, ) -> ===================== == t4 == @@ -82,8 +82,8 @@ fun t4() { } --------------------- { () -> try { 1 if (2 > 3) { return@l } } finally { 2 } } : * NEW: r({ () -> try { 1 if (2 > 3) { return@l } } finally { 2 } }) -> -@l{ () -> try { 1 if (2 > 3) { return@l } } finally { 2 } } : * COPY -{ @l{ () -> try { 1 if (2 > 3) { return@l } } finally { 2 } } } : * COPY +@l{ () -> try { 1 if (2 > 3) { return@l } } finally { 2 } } : * COPY +{ @l{ () -> try { 1 if (2 > 3) { return@l } } finally { 2 } } } : * COPY ===================== == anonymous_1 == { () -> @@ -97,12 +97,12 @@ fun t4() { } } --------------------- -1 : * NEW: r(1) -> -2 : {<: Comparable} NEW: r(2) -> -3 : Int NEW: r(3) -> +1 : * NEW: r(1) -> +2 : {<: Comparable} NEW: r(2) -> +3 : Int NEW: r(3) -> 2 > 3 : Boolean NEW: call(2 > 3, compareTo|, ) -> -2 : * NEW: r(2) -> -{ 2 } : * COPY +2 : * NEW: r(2) -> +{ 2 } : * COPY ===================== == t5 == fun t5() { @@ -118,13 +118,13 @@ fun t5() { } } --------------------- -true : * NEW: r(true) -> -1 : * NEW: r(1) -> -2 : {<: Comparable} NEW: r(2) -> -3 : Int NEW: r(3) -> +true : * NEW: r(true) -> +1 : * NEW: r(1) -> +2 : {<: Comparable} NEW: r(2) -> +3 : Int NEW: r(3) -> 2 > 3 : Boolean NEW: call(2 > 3, compareTo|, ) -> -2 : * NEW: r(2) -> -{ 2 } : * COPY +2 : * NEW: r(2) -> +{ 2 } : * COPY ===================== == t6 == fun t6() { @@ -141,17 +141,17 @@ fun t6() { } } --------------------- -true : * NEW: r(true) -> -1 : * NEW: r(1) -> -2 : {<: Comparable} NEW: r(2) -> -3 : Int NEW: r(3) -> +true : * NEW: r(true) -> +1 : * NEW: r(1) -> +2 : {<: Comparable} NEW: r(2) -> +3 : Int NEW: r(3) -> 2 > 3 : Boolean NEW: call(2 > 3, compareTo|, ) -> -5 : * NEW: r(5) -> -{ @l while(true) { 1 if (2 > 3) { break @l } } 5 } : * COPY -2 : * NEW: r(2) -> -{ 2 } : * COPY -try { @l while(true) { 1 if (2 > 3) { break @l } } 5 } finally { 2 } : * COPY -{ try { @l while(true) { 1 if (2 > 3) { break @l } } 5 } finally { 2 } } : * COPY +5 : * NEW: r(5) -> +{ @l while(true) { 1 if (2 > 3) { break @l } } 5 } : * COPY +2 : * NEW: r(2) -> +{ 2 } : * COPY +try { @l while(true) { 1 if (2 > 3) { break @l } } 5 } finally { 2 } : * COPY +{ try { @l while(true) { 1 if (2 > 3) { break @l } } 5 } finally { 2 } } : * COPY ===================== == t7 == fun t7() { @@ -167,13 +167,13 @@ fun t7() { } } --------------------- -true : * NEW: r(true) -> -1 : * NEW: r(1) -> -2 : {<: Comparable} NEW: r(2) -> -3 : Int NEW: r(3) -> +true : * NEW: r(true) -> +1 : * NEW: r(1) -> +2 : {<: Comparable} NEW: r(2) -> +3 : Int NEW: r(3) -> 2 > 3 : Boolean NEW: call(2 > 3, compareTo|, ) -> -2 : * NEW: r(2) -> -{ 2 } : * COPY +2 : * NEW: r(2) -> +{ 2 } : * COPY ===================== == t8 == fun t8(a : Int) { @@ -189,17 +189,17 @@ fun t8(a : Int) { } } --------------------- - : Int NEW: magic(a : Int) -> - : Int NEW: magic(1..a|) -> -1 : Int NEW: r(1) -> -a : Int NEW: r(a) -> -1..a : {<: Iterable} NEW: call(1..a, rangeTo|, ) -> -1 : * NEW: r(1) -> -2 : {<: Comparable} NEW: r(2) -> -3 : Int NEW: r(3) -> -2 > 3 : Boolean NEW: call(2 > 3, compareTo|, ) -> -2 : * NEW: r(2) -> -{ 2 } : * COPY + : Int NEW: magic[FAKE_INITIALIZER](a : Int) -> + : Int NEW: magic[LOOP_RANGE_ITERATION](1..a|) -> +1 : Int NEW: r(1) -> +a : Int NEW: r(a) -> +1..a : {<: Iterable} NEW: call(1..a, rangeTo|, ) -> +1 : * NEW: r(1) -> +2 : {<: Comparable} NEW: r(2) -> +3 : Int NEW: r(3) -> +2 > 3 : Boolean NEW: call(2 > 3, compareTo|, ) -> +2 : * NEW: r(2) -> +{ 2 } : * COPY ===================== == t9 == fun t9(a : Int) { @@ -216,21 +216,21 @@ fun t9(a : Int) { } } --------------------- - : Int NEW: magic(a : Int) -> - : Int NEW: magic(1..a|) -> -1 : Int NEW: r(1) -> -a : Int NEW: r(a) -> -1..a : {<: Iterable} NEW: call(1..a, rangeTo|, ) -> -1 : * NEW: r(1) -> -2 : {<: Comparable} NEW: r(2) -> -3 : Int NEW: r(3) -> -2 > 3 : Boolean NEW: call(2 > 3, compareTo|, ) -> -5 : * NEW: r(5) -> -{ @l for (i in 1..a) { 1 if (2 > 3) { continue @l } } 5 } : * COPY -2 : * NEW: r(2) -> -{ 2 } : * COPY -try { @l for (i in 1..a) { 1 if (2 > 3) { continue @l } } 5 } finally { 2 } : * COPY -{ try { @l for (i in 1..a) { 1 if (2 > 3) { continue @l } } 5 } finally { 2 } } : * COPY + : Int NEW: magic[FAKE_INITIALIZER](a : Int) -> + : Int NEW: magic[LOOP_RANGE_ITERATION](1..a|) -> +1 : Int NEW: r(1) -> +a : Int NEW: r(a) -> +1..a : {<: Iterable} NEW: call(1..a, rangeTo|, ) -> +1 : * NEW: r(1) -> +2 : {<: Comparable} NEW: r(2) -> +3 : Int NEW: r(3) -> +2 > 3 : Boolean NEW: call(2 > 3, compareTo|, ) -> +5 : * NEW: r(5) -> +{ @l for (i in 1..a) { 1 if (2 > 3) { continue @l } } 5 } : * COPY +2 : * NEW: r(2) -> +{ 2 } : * COPY +try { @l for (i in 1..a) { 1 if (2 > 3) { continue @l } } 5 } finally { 2 } : * COPY +{ try { @l for (i in 1..a) { 1 if (2 > 3) { continue @l } } 5 } finally { 2 } } : * COPY ===================== == t10 == fun t10(a : Int) { @@ -246,17 +246,17 @@ fun t10(a : Int) { } } --------------------- - : Int NEW: magic(a : Int) -> - : Int NEW: magic(1..a|) -> -1 : Int NEW: r(1) -> -a : Int NEW: r(a) -> -1..a : {<: Iterable} NEW: call(1..a, rangeTo|, ) -> -1 : * NEW: r(1) -> -2 : {<: Comparable} NEW: r(2) -> -3 : Int NEW: r(3) -> -2 > 3 : Boolean NEW: call(2 > 3, compareTo|, ) -> -2 : * NEW: r(2) -> -{ 2 } : * COPY + : Int NEW: magic[FAKE_INITIALIZER](a : Int) -> + : Int NEW: magic[LOOP_RANGE_ITERATION](1..a|) -> +1 : Int NEW: r(1) -> +a : Int NEW: r(a) -> +1..a : {<: Iterable} NEW: call(1..a, rangeTo|, ) -> +1 : * NEW: r(1) -> +2 : {<: Comparable} NEW: r(2) -> +3 : Int NEW: r(3) -> +2 > 3 : Boolean NEW: call(2 > 3, compareTo|, ) -> +2 : * NEW: r(2) -> +{ 2 } : * COPY ===================== == t11 == fun t11() { @@ -281,10 +281,10 @@ fun t12() : Int { } } --------------------- -1 : Int NEW: r(1) -> -3 : Int NEW: r(3) -> +1 : Int NEW: r(1) -> +3 : Int NEW: r(3) -> doSmth(3) : * NEW: call(doSmth(3), doSmth|) -> -{ doSmth(3) } : * COPY +{ doSmth(3) } : * COPY ===================== == t13 == fun t13() : Int { @@ -299,16 +299,16 @@ fun t13() : Int { } } --------------------- - : {<: UnsupportedOperationException} NEW: magic(e: UnsupportedOperationException) -> -1 : Int NEW: r(1) -> -2 : Int NEW: r(2) -> -doSmth(2) : * NEW: call(doSmth(2), doSmth|) -> -{ doSmth(2) } : * COPY -3 : Int NEW: r(3) -> -doSmth(3) : * NEW: call(doSmth(3), doSmth|) -> -{ doSmth(3) } : * COPY -try { return 1 } catch (e: UnsupportedOperationException) { doSmth(2) } finally { doSmth(3) } : * COPY -{ try { return 1 } catch (e: UnsupportedOperationException) { doSmth(2) } finally { doSmth(3) } } : * COPY + : {<: UnsupportedOperationException} NEW: magic[FAKE_INITIALIZER](e: UnsupportedOperationException) -> +1 : Int NEW: r(1) -> +2 : Int NEW: r(2) -> +doSmth(2) : * NEW: call(doSmth(2), doSmth|) -> +{ doSmth(2) } : * COPY +3 : Int NEW: r(3) -> +doSmth(3) : * NEW: call(doSmth(3), doSmth|) -> +{ doSmth(3) } : * COPY +try { return 1 } catch (e: UnsupportedOperationException) { doSmth(2) } finally { doSmth(3) } : * COPY +{ try { return 1 } catch (e: UnsupportedOperationException) { doSmth(2) } finally { doSmth(3) } } : * COPY ===================== == t14 == fun t14() : Int { @@ -320,13 +320,13 @@ fun t14() : Int { } } --------------------- - : {<: UnsupportedOperationException} NEW: magic(e: UnsupportedOperationException) -> -1 : Int NEW: r(1) -> -2 : Int NEW: r(2) -> -doSmth(2) : * NEW: call(doSmth(2), doSmth|) -> -{ doSmth(2) } : * COPY -try { return 1 } catch (e: UnsupportedOperationException) { doSmth(2) } : * COPY -{ try { return 1 } catch (e: UnsupportedOperationException) { doSmth(2) } } : * COPY + : {<: UnsupportedOperationException} NEW: magic[FAKE_INITIALIZER](e: UnsupportedOperationException) -> +1 : Int NEW: r(1) -> +2 : Int NEW: r(2) -> +doSmth(2) : * NEW: call(doSmth(2), doSmth|) -> +{ doSmth(2) } : * COPY +try { return 1 } catch (e: UnsupportedOperationException) { doSmth(2) } : * COPY +{ try { return 1 } catch (e: UnsupportedOperationException) { doSmth(2) } } : * COPY ===================== == t15 == fun t15() : Int { @@ -341,12 +341,12 @@ fun t15() : Int { } } --------------------- - : {<: UnsupportedOperationException} NEW: magic(e: UnsupportedOperationException) -> -1 : Int NEW: r(1) -> -2 : Int NEW: r(2) -> -3 : Int NEW: r(3) -> -doSmth(3) : * NEW: call(doSmth(3), doSmth|) -> -{ doSmth(3) } : * COPY + : {<: UnsupportedOperationException} NEW: magic[FAKE_INITIALIZER](e: UnsupportedOperationException) -> +1 : Int NEW: r(1) -> +2 : Int NEW: r(2) -> +3 : Int NEW: r(3) -> +doSmth(3) : * NEW: call(doSmth(3), doSmth|) -> +{ doSmth(3) } : * COPY ===================== == t16 == fun t16() : Int { @@ -361,20 +361,20 @@ fun t16() : Int { } } --------------------- - : {<: UnsupportedOperationException} NEW: magic(e: UnsupportedOperationException) -> -1 : Int NEW: r(1) -> -doSmth(1) : * NEW: call(doSmth(1), doSmth|) -> -{ doSmth(1) } : * COPY -2 : Int NEW: r(2) -> -3 : Int NEW: r(3) -> -doSmth(3) : * NEW: call(doSmth(3), doSmth|) -> -{ doSmth(3) } : * COPY -try { doSmth(1) } catch (e: UnsupportedOperationException) { return 2 } finally { doSmth(3) } : * COPY -{ try { doSmth(1) } catch (e: UnsupportedOperationException) { return 2 } finally { doSmth(3) } } : * COPY + : {<: UnsupportedOperationException} NEW: magic[FAKE_INITIALIZER](e: UnsupportedOperationException) -> +1 : Int NEW: r(1) -> +doSmth(1) : * NEW: call(doSmth(1), doSmth|) -> +{ doSmth(1) } : * COPY +2 : Int NEW: r(2) -> +3 : Int NEW: r(3) -> +doSmth(3) : * NEW: call(doSmth(3), doSmth|) -> +{ doSmth(3) } : * COPY +try { doSmth(1) } catch (e: UnsupportedOperationException) { return 2 } finally { doSmth(3) } : * COPY +{ try { doSmth(1) } catch (e: UnsupportedOperationException) { return 2 } finally { doSmth(3) } } : * COPY ===================== == doSmth == fun doSmth(i: Int) { } --------------------- - : Int NEW: magic(i: Int) -> + : Int NEW: magic[FAKE_INITIALIZER](i: Int) -> ===================== diff --git a/compiler/testData/cfg/controlStructures/FinallyTestCopy.instructions b/compiler/testData/cfg/controlStructures/FinallyTestCopy.instructions index 2d26d9f4058..292c4442875 100644 --- a/compiler/testData/cfg/controlStructures/FinallyTestCopy.instructions +++ b/compiler/testData/cfg/controlStructures/FinallyTestCopy.instructions @@ -83,7 +83,7 @@ L0: L2 [onException]: jmp?(L5 [catch 0]) NEXT:[v(e: Exception), v(e: NullPointerException)] PREV:[jmp?(L2 [onException])] 3 v(e: NullPointerException) - magic(e: NullPointerException) -> + magic[FAKE_INITIALIZER](e: NullPointerException) -> w(e|) 4 mark({ doSmth1() }) mark(doSmth1()) @@ -91,7 +91,7 @@ L2 [onException]: 3 jmp(L4 [afterCatches]) NEXT:[jmp(L6 [skipFinallyToErrorBlock])] L5 [catch 0]: v(e: Exception) PREV:[jmp?(L5 [catch 0])] - magic(e: Exception) -> + magic[FAKE_INITIALIZER](e: Exception) -> w(e|) 4 mark({ doSmth2() }) mark(doSmth2()) @@ -158,7 +158,7 @@ L4 [body entry point]: L6 [onException]: jmp?(L9 [catch 0]) NEXT:[v(e: Exception), v(e: NullPointerException)] PREV:[jmp?(L6 [onException])] 4 v(e: NullPointerException) - magic(e: NullPointerException) -> + magic[FAKE_INITIALIZER](e: NullPointerException) -> w(e|) 5 mark({ doSmth1() }) mark(doSmth1()) @@ -166,7 +166,7 @@ L6 [onException]: 4 jmp(L8 [afterCatches]) NEXT:[jmp(L10 [skipFinallyToErrorBlock])] L9 [catch 0]: v(e: Exception) PREV:[jmp?(L9 [catch 0])] - magic(e: Exception) -> + magic[FAKE_INITIALIZER](e: Exception) -> w(e|) 5 mark({ doSmth2() }) mark(doSmth2()) @@ -237,7 +237,7 @@ L0: L2 [onException]: jmp?(L5 [catch 0]) NEXT:[v(e: Exception), v(e: NullPointerException)] PREV:[jmp?(L2 [onException])] 3 v(e: NullPointerException) - magic(e: NullPointerException) -> + magic[FAKE_INITIALIZER](e: NullPointerException) -> w(e|) 4 mark({ doSmth1() }) mark(doSmth1()) @@ -245,7 +245,7 @@ L2 [onException]: 3 jmp(L4 [afterCatches]) NEXT:[jmp(L6 [skipFinallyToErrorBlock])] L5 [catch 0]: v(e: Exception) PREV:[jmp?(L5 [catch 0])] - magic(e: Exception) -> + magic[FAKE_INITIALIZER](e: Exception) -> w(e|) 4 mark({ doSmth2() }) mark(doSmth2()) @@ -298,7 +298,7 @@ fun doTestCopy4(list: List?) : Int { L0: 1 v(list: List?) - magic(list: List?) -> + magic[FAKE_INITIALIZER](list: List?) -> w(list|) 2 mark({ try { doSmth() } finally { if(list != null) { } } }) mark(try { doSmth() } finally { if(list != null) { } }) diff --git a/compiler/testData/cfg/controlStructures/FinallyTestCopy.values b/compiler/testData/cfg/controlStructures/FinallyTestCopy.values index 210c5c07e0d..a0a82bc8c68 100644 --- a/compiler/testData/cfg/controlStructures/FinallyTestCopy.values +++ b/compiler/testData/cfg/controlStructures/FinallyTestCopy.values @@ -30,17 +30,17 @@ fun testCopy1() : Int { } } --------------------- - : {<: NullPointerException} NEW: magic(e: NullPointerException) -> - : {<: Exception} NEW: magic(e: Exception) -> -doSmth() : * NEW: call(doSmth(), doSmth) -> -{ doSmth() } : * COPY -doSmth1() : * NEW: call(doSmth1(), doSmth1) -> -{ doSmth1() } : * COPY -doSmth2() : * NEW: call(doSmth2(), doSmth2) -> -{ doSmth2() } : * COPY -1 : Int NEW: r(1) -> + : {<: NullPointerException} NEW: magic[FAKE_INITIALIZER](e: NullPointerException) -> + : {<: Exception} NEW: magic[FAKE_INITIALIZER](e: Exception) -> +doSmth() : * NEW: call(doSmth(), doSmth) -> +{ doSmth() } : * COPY +doSmth1() : * NEW: call(doSmth1(), doSmth1) -> +{ doSmth1() } : * COPY +doSmth2() : * NEW: call(doSmth2(), doSmth2) -> +{ doSmth2() } : * COPY +1 : Int NEW: r(1) -> try { doSmth() } catch (e: NullPointerException) { doSmth1() } catch (e: Exception) { doSmth2() } finally { return 1 } : * NEW: merge(try { doSmth() } catch (e: NullPointerException) { doSmth1() } catch (e: Exception) { doSmth2() } finally { return 1 }|, , ) -> -{ try { doSmth() } catch (e: NullPointerException) { doSmth1() } catch (e: Exception) { doSmth2() } finally { return 1 } } : * COPY +{ try { doSmth() } catch (e: NullPointerException) { doSmth1() } catch (e: Exception) { doSmth2() } finally { return 1 } } : * COPY ===================== == testCopy2 == fun testCopy2() { @@ -61,18 +61,18 @@ fun testCopy2() { } } --------------------- - : {<: NullPointerException} NEW: magic(e: NullPointerException) -> - : {<: Exception} NEW: magic(e: Exception) -> -cond() : Boolean NEW: call(cond(), cond) -> -doSmth() : * NEW: call(doSmth(), doSmth) -> -{ doSmth() } : * COPY -doSmth1() : * NEW: call(doSmth1(), doSmth1) -> -{ doSmth1() } : * COPY -doSmth2() : * NEW: call(doSmth2(), doSmth2) -> -{ doSmth2() } : * COPY -cond() : Boolean NEW: call(cond(), cond) -> + : {<: NullPointerException} NEW: magic[FAKE_INITIALIZER](e: NullPointerException) -> + : {<: Exception} NEW: magic[FAKE_INITIALIZER](e: Exception) -> +cond() : Boolean NEW: call(cond(), cond) -> +doSmth() : * NEW: call(doSmth(), doSmth) -> +{ doSmth() } : * COPY +doSmth1() : * NEW: call(doSmth1(), doSmth1) -> +{ doSmth1() } : * COPY +doSmth2() : * NEW: call(doSmth2(), doSmth2) -> +{ doSmth2() } : * COPY +cond() : Boolean NEW: call(cond(), cond) -> try { doSmth() } catch (e: NullPointerException) { doSmth1() } catch (e: Exception) { doSmth2() } finally { if (cond()) return else continue } : * NEW: merge(try { doSmth() } catch (e: NullPointerException) { doSmth1() } catch (e: Exception) { doSmth2() } finally { if (cond()) return else continue }|, , ) -> -{ try { doSmth() } catch (e: NullPointerException) { doSmth1() } catch (e: Exception) { doSmth2() } finally { if (cond()) return else continue } } : * COPY +{ try { doSmth() } catch (e: NullPointerException) { doSmth1() } catch (e: Exception) { doSmth2() } finally { if (cond()) return else continue } } : * COPY ===================== == testCopy3 == fun testCopy3() { @@ -90,17 +90,17 @@ fun testCopy3() { } } --------------------- - : {<: NullPointerException} NEW: magic(e: NullPointerException) -> - : {<: Exception} NEW: magic(e: Exception) -> -doSmth() : * NEW: call(doSmth(), doSmth) -> -{ doSmth() } : * COPY -doSmth1() : * NEW: call(doSmth1(), doSmth1) -> -{ doSmth1() } : * COPY -doSmth2() : * NEW: call(doSmth2(), doSmth2) -> -{ doSmth2() } : * COPY -cond() : Boolean NEW: call(cond(), cond) -> + : {<: NullPointerException} NEW: magic[FAKE_INITIALIZER](e: NullPointerException) -> + : {<: Exception} NEW: magic[FAKE_INITIALIZER](e: Exception) -> +doSmth() : * NEW: call(doSmth(), doSmth) -> +{ doSmth() } : * COPY +doSmth1() : * NEW: call(doSmth1(), doSmth1) -> +{ doSmth1() } : * COPY +doSmth2() : * NEW: call(doSmth2(), doSmth2) -> +{ doSmth2() } : * COPY +cond() : Boolean NEW: call(cond(), cond) -> try { doSmth() } catch (e: NullPointerException) { doSmth1() } catch (e: Exception) { doSmth2() } finally { while (cond()); } : * NEW: merge(try { doSmth() } catch (e: NullPointerException) { doSmth1() } catch (e: Exception) { doSmth2() } finally { while (cond()); }|, , ) -> -{ try { doSmth() } catch (e: NullPointerException) { doSmth1() } catch (e: Exception) { doSmth2() } finally { while (cond()); } } : * COPY +{ try { doSmth() } catch (e: NullPointerException) { doSmth1() } catch (e: Exception) { doSmth2() } finally { while (cond()); } } : * COPY ===================== == doTestCopy4 == fun doTestCopy4(list: List?) : Int { @@ -113,12 +113,12 @@ fun doTestCopy4(list: List?) : Int { } } --------------------- - : {<: List?} NEW: magic(list: List?) -> -doSmth() : * NEW: call(doSmth(), doSmth) -> -{ doSmth() } : * COPY -list : {<: Any?} NEW: r(list) -> -null : {<: Any?} NEW: r(null) -> -list != null : Boolean NEW: call(list != null, equals|, ) -> -try { doSmth() } finally { if(list != null) { } } : * COPY -{ try { doSmth() } finally { if(list != null) { } } } : * COPY + : {<: List?} NEW: magic[FAKE_INITIALIZER](list: List?) -> +doSmth() : * NEW: call(doSmth(), doSmth) -> +{ doSmth() } : * COPY +list : {<: Any?} NEW: r(list) -> +null : {<: Any?} NEW: r(null) -> +list != null : Boolean NEW: call(list != null, equals|, ) -> +try { doSmth() } finally { if(list != null) { } } : * COPY +{ try { doSmth() } finally { if(list != null) { } } } : * COPY ===================== diff --git a/compiler/testData/cfg/controlStructures/For.instructions b/compiler/testData/cfg/controlStructures/For.instructions index 9d2f798ed32..1b56e6af276 100644 --- a/compiler/testData/cfg/controlStructures/For.instructions +++ b/compiler/testData/cfg/controlStructures/For.instructions @@ -14,25 +14,25 @@ L0: call(1..2, rangeTo|, ) -> v(i) L3: - jmp?(L2) NEXT:[read (Unit), magic(1..2|) -> ] + jmp?(L2) NEXT:[read (Unit), magic[LOOP_RANGE_ITERATION](1..2|) -> ] L4 [loop entry point]: L5 [body entry point]: - magic(1..2|) -> PREV:[jmp?(L2), jmp?(L4 [loop entry point])] + magic[LOOP_RANGE_ITERATION](1..2|) -> PREV:[jmp?(L2), jmp?(L4 [loop entry point])] w(i|) mark(for (i in 1..2) { doSmth(i) }) 4 mark({ doSmth(i) }) r(i) -> mark(doSmth(i)) call(doSmth(i), doSmth|) -> - 3 jmp?(L4 [loop entry point]) NEXT:[magic(1..2|) -> , read (Unit)] + 3 jmp?(L4 [loop entry point]) NEXT:[magic[LOOP_RANGE_ITERATION](1..2|) -> , read (Unit)] L2: - read (Unit) PREV:[jmp?(L2), jmp?(L4 [loop entry point])] + read (Unit) PREV:[jmp?(L2), jmp?(L4 [loop entry point])] L1: - 1 NEXT:[] + 1 NEXT:[] error: - PREV:[] + PREV:[] sink: - PREV:[, ] + PREV:[, ] ===================== == doSmth == fun doSmth(i: Int) {} @@ -40,14 +40,14 @@ fun doSmth(i: Int) {} L0: 1 v(i: Int) - magic(i: Int) -> + magic[FAKE_INITIALIZER](i: Int) -> w(i|) 2 mark({}) read (Unit) L1: - 1 NEXT:[] + 1 NEXT:[] error: - PREV:[] + PREV:[] sink: - PREV:[, ] + PREV:[, ] ===================== diff --git a/compiler/testData/cfg/controlStructures/For.values b/compiler/testData/cfg/controlStructures/For.values index 98bc6ae4dfd..eabbcdce3a8 100644 --- a/compiler/testData/cfg/controlStructures/For.values +++ b/compiler/testData/cfg/controlStructures/For.values @@ -5,16 +5,16 @@ fun t1() { } } --------------------- - : Int NEW: magic(1..2|) -> -1 : Int NEW: r(1) -> -2 : Int NEW: r(2) -> -1..2 : {<: Iterable} NEW: call(1..2, rangeTo|, ) -> -i : Int NEW: r(i) -> -doSmth(i) : * NEW: call(doSmth(i), doSmth|) -> -{ doSmth(i) } : * COPY + : Int NEW: magic[LOOP_RANGE_ITERATION](1..2|) -> +1 : Int NEW: r(1) -> +2 : Int NEW: r(2) -> +1..2 : {<: Iterable} NEW: call(1..2, rangeTo|, ) -> +i : Int NEW: r(i) -> +doSmth(i) : * NEW: call(doSmth(i), doSmth|) -> +{ doSmth(i) } : * COPY ===================== == doSmth == fun doSmth(i: Int) {} --------------------- - : Int NEW: magic(i: Int) -> + : Int NEW: magic[FAKE_INITIALIZER](i: Int) -> ===================== diff --git a/compiler/testData/cfg/controlStructures/If.instructions b/compiler/testData/cfg/controlStructures/If.instructions index d9e58d0946e..31c9de62812 100644 --- a/compiler/testData/cfg/controlStructures/If.instructions +++ b/compiler/testData/cfg/controlStructures/If.instructions @@ -19,7 +19,7 @@ fun t1(b: Boolean) { L0: 1 v(b: Boolean) - magic(b: Boolean) -> + magic[FAKE_INITIALIZER](b: Boolean) -> w(b|) 2 mark({ var u: String if (b) { u = "s" } doSmth(u) var r: String if (b) { r = "s" } else { r = "t" } doSmth(r) }) v(var u: String) @@ -77,7 +77,7 @@ fun t2(b: Boolean) { L0: 1 v(b: Boolean) - magic(b: Boolean) -> + magic[FAKE_INITIALIZER](b: Boolean) -> w(b|) 2 mark({ val i = 3 if (b) { return; } doSmth(i) if (i is Int) { return; } }) v(val i = 3) @@ -98,7 +98,7 @@ L3: mark(if (i is Int) { return; }) mark(i is Int) r(i) -> - magic(i is Int|) -> + magic[IS](i is Int|) -> jf(L4|) NEXT:[read (Unit), mark({ return; })] 3 mark({ return; }) ret L1 NEXT:[] @@ -119,14 +119,14 @@ fun doSmth(s: String) {} L0: 1 v(s: String) - magic(s: String) -> + magic[FAKE_INITIALIZER](s: String) -> w(s|) 2 mark({}) read (Unit) L1: - 1 NEXT:[] + 1 NEXT:[] error: - PREV:[] + PREV:[] sink: - PREV:[, ] + PREV:[, ] ===================== diff --git a/compiler/testData/cfg/controlStructures/If.values b/compiler/testData/cfg/controlStructures/If.values index ae504962861..8c29d25273c 100644 --- a/compiler/testData/cfg/controlStructures/If.values +++ b/compiler/testData/cfg/controlStructures/If.values @@ -16,17 +16,17 @@ fun t1(b: Boolean) { doSmth(r) } --------------------- - : Boolean NEW: magic(b: Boolean) -> -b : Boolean NEW: r(b) -> -"s" : String NEW: r("s") -> -u : String NEW: r(u) -> -doSmth(u) : * NEW: call(doSmth(u), doSmth|) -> -b : Boolean NEW: r(b) -> -"s" : String NEW: r("s") -> -"t" : String NEW: r("t") -> -r : String NEW: r(r) -> -doSmth(r) : * NEW: call(doSmth(r), doSmth|) -> -{ var u: String if (b) { u = "s" } doSmth(u) var r: String if (b) { r = "s" } else { r = "t" } doSmth(r) } : * COPY + : Boolean NEW: magic[FAKE_INITIALIZER](b: Boolean) -> +b : Boolean NEW: r(b) -> +"s" : String NEW: r("s") -> +u : String NEW: r(u) -> +doSmth(u) : * NEW: call(doSmth(u), doSmth|) -> +b : Boolean NEW: r(b) -> +"s" : String NEW: r("s") -> +"t" : String NEW: r("t") -> +r : String NEW: r(r) -> +doSmth(r) : * NEW: call(doSmth(r), doSmth|) -> +{ var u: String if (b) { u = "s" } doSmth(u) var r: String if (b) { r = "s" } else { r = "t" } doSmth(r) } : * COPY ===================== == t2 == fun t2(b: Boolean) { @@ -40,16 +40,16 @@ fun t2(b: Boolean) { } } --------------------- - : Boolean NEW: magic(b: Boolean) -> -3 : Int NEW: r(3) -> -b : Boolean NEW: r(b) -> -i : String NEW: r(i) -> -doSmth(i) : * NEW: call(doSmth(i), doSmth|) -> -i : * NEW: r(i) -> -i is Int : Boolean NEW: magic(i is Int|) -> + : Boolean NEW: magic[FAKE_INITIALIZER](b: Boolean) -> +3 : Int NEW: r(3) -> +b : Boolean NEW: r(b) -> +i : String NEW: r(i) -> +doSmth(i) : * NEW: call(doSmth(i), doSmth|) -> +i : * NEW: r(i) -> +i is Int : Boolean NEW: magic[IS](i is Int|) -> ===================== == doSmth == fun doSmth(s: String) {} --------------------- - : String NEW: magic(s: String) -> + : String NEW: magic[FAKE_INITIALIZER](s: String) -> ===================== diff --git a/compiler/testData/cfg/controlStructures/returnsInWhen.instructions b/compiler/testData/cfg/controlStructures/returnsInWhen.instructions index 1d7e70b7bff..7c29d869c8d 100644 --- a/compiler/testData/cfg/controlStructures/returnsInWhen.instructions +++ b/compiler/testData/cfg/controlStructures/returnsInWhen.instructions @@ -8,14 +8,14 @@ fun illegalWhenBlock(a: Any): Any { L0: 1 v(a: Any) - magic(a: Any) -> + magic[FAKE_INITIALIZER](a: Any) -> w(a|) 2 mark({ when(a) { is Int -> return a } }) mark(when(a) { is Int -> return a }) r(a) -> mark(is Int -> return a) mark(is Int) - magic(is Int|) -> + magic[IS](is Int|) -> jmp?(L4|) NEXT:[, r(a) -> ] L3: r(a) -> diff --git a/compiler/testData/cfg/controlStructures/returnsInWhen.values b/compiler/testData/cfg/controlStructures/returnsInWhen.values index 8c6fb2241ec..f322b917ae6 100644 --- a/compiler/testData/cfg/controlStructures/returnsInWhen.values +++ b/compiler/testData/cfg/controlStructures/returnsInWhen.values @@ -5,8 +5,8 @@ fun illegalWhenBlock(a: Any): Any { } } --------------------- - : {<: Any} NEW: magic(a: Any) -> -a : * NEW: r(a) -> -is Int : * NEW: magic(is Int|) -> -a : {<: Any} NEW: r(a) -> + : {<: Any} NEW: magic[FAKE_INITIALIZER](a: Any) -> +a : * NEW: r(a) -> +is Int : * NEW: magic[IS](is Int|) -> +a : {<: Any} NEW: r(a) -> ===================== diff --git a/compiler/testData/cfg/controlStructures/whenConditions.instructions b/compiler/testData/cfg/controlStructures/whenConditions.instructions index 6cf42f7c0b0..f9561bda532 100644 --- a/compiler/testData/cfg/controlStructures/whenConditions.instructions +++ b/compiler/testData/cfg/controlStructures/whenConditions.instructions @@ -13,7 +13,7 @@ fun foo(a: Number) { L0: 1 v(a: Number) - magic(a: Number) -> + magic[FAKE_INITIALIZER](a: Number) -> w(a|) 2 mark({ val t = when (a) { 1 -> "1" in Collections.singleton(2) -> "2" is Int -> "Int" !in Collections.singleton(3) -> "!3" !is Number -> "!Number" else -> null } }) v(val t = when (a) { 1 -> "1" in Collections.singleton(2) -> "2" is Int -> "Int" !in Collections.singleton(3) -> "!3" !is Number -> "!Number" else -> null }) @@ -22,7 +22,7 @@ L0: mark(1 -> "1") mark(1) r(1) -> - magic(1|, ) -> + magic[EQUALS_IN_WHEN_CONDITION](1|, ) -> jmp?(L4|) NEXT:[mark(in Collections.singleton(2) -> "2"), mark("1")] L3: mark("1") @@ -44,7 +44,7 @@ L5: L6: mark(is Int -> "Int") PREV:[jmp?(L6|)] mark(is Int) - magic(is Int|) -> + magic[IS](is Int|) -> jmp?(L8|) NEXT:[mark(!in Collections.singleton(3) -> "!3"), mark("Int")] L7: mark("Int") @@ -66,7 +66,7 @@ L9: L10: mark(!is Number -> "!Number") PREV:[jmp?(L10|)] mark(!is Number) - magic(!is Number|) -> + magic[IS](!is Number|) -> jmp?(L12|) NEXT:[mark(else -> null), mark("!Number")] L11: mark("!Number") diff --git a/compiler/testData/cfg/controlStructures/whenConditions.values b/compiler/testData/cfg/controlStructures/whenConditions.values index f8498191f25..b6f54cff4a3 100644 --- a/compiler/testData/cfg/controlStructures/whenConditions.values +++ b/compiler/testData/cfg/controlStructures/whenConditions.values @@ -10,24 +10,24 @@ fun foo(a: Number) { } } --------------------- - : {<: Number} NEW: magic(a: Number) -> -a : AND{{<: Any?}, *} NEW: r(a) -> + : {<: Number} NEW: magic[FAKE_INITIALIZER](a: Number) -> +a : AND{*, {<: Any?}} NEW: r(a) -> 1 : * NEW: r(1) -> -1 : * NEW: magic(1|, ) -> +1 : * NEW: magic[EQUALS_IN_WHEN_CONDITION](1|, ) -> "1" : {<: String?} NEW: r("1") -> 2 : {<: Int?} NEW: r(2) -> singleton(2) : OR{{<: Collection}, {<: Collection}} NEW: call(singleton(2), singleton|) -> Collections.singleton(2) : OR{{<: Collection}, {<: Collection}} COPY in Collections.singleton(2) : * NEW: call(in Collections.singleton(2), contains|, ) -> "2" : {<: String?} NEW: r("2") -> -is Int : * NEW: magic(is Int|) -> +is Int : * NEW: magic[IS](is Int|) -> "Int" : {<: String?} NEW: r("Int") -> 3 : {<: Int?} NEW: r(3) -> singleton(3) : OR{{<: Collection}, {<: Collection}} NEW: call(singleton(3), singleton|) -> Collections.singleton(3) : OR{{<: Collection}, {<: Collection}} COPY !in Collections.singleton(3) : * NEW: call(!in Collections.singleton(3), contains|, ) -> "!3" : {<: String?} NEW: r("!3") -> -!is Number : * NEW: magic(!is Number|) -> +!is Number : * NEW: magic[IS](!is Number|) -> "!Number" : {<: String?} NEW: r("!Number") -> null : {<: String?} NEW: r(null) -> when (a) { 1 -> "1" in Collections.singleton(2) -> "2" is Int -> "Int" !in Collections.singleton(3) -> "!3" !is Number -> "!Number" else -> null } : {<: String?} NEW: merge(when (a) { 1 -> "1" in Collections.singleton(2) -> "2" is Int -> "Int" !in Collections.singleton(3) -> "!3" !is Number -> "!Number" else -> null }|, , , , , ) -> diff --git a/compiler/testData/cfg/conventions/bothReceivers.instructions b/compiler/testData/cfg/conventions/bothReceivers.instructions index c8f051e0d0e..1790e1a3cf9 100644 --- a/compiler/testData/cfg/conventions/bothReceivers.instructions +++ b/compiler/testData/cfg/conventions/bothReceivers.instructions @@ -47,7 +47,7 @@ fun foobar(f: Foo) { L0: 1 v(f: Foo) - magic(f: Foo) -> + magic[FAKE_INITIALIZER](f: Foo) -> w(f|) 2 mark({ Bar().f() }) mark(Bar().f()) @@ -57,9 +57,9 @@ L0: mark(f()) call(f(), invoke|, ) -> L1: - 1 NEXT:[] + 1 NEXT:[] error: - PREV:[] + PREV:[] sink: - PREV:[, ] + PREV:[, ] ===================== diff --git a/compiler/testData/cfg/conventions/bothReceivers.values b/compiler/testData/cfg/conventions/bothReceivers.values index 4ba909a308c..d9c0e62cc0f 100644 --- a/compiler/testData/cfg/conventions/bothReceivers.values +++ b/compiler/testData/cfg/conventions/bothReceivers.values @@ -18,10 +18,10 @@ fun foobar(f: Foo) { Bar().f() } --------------------- - : Foo NEW: magic(f: Foo) -> -Bar() : Bar NEW: call(Bar(), ) -> -f : Foo NEW: r(f) -> -f() : * NEW: call(f(), invoke|, ) -> -Bar().f() : * COPY -{ Bar().f() } : * COPY + : Foo NEW: magic[FAKE_INITIALIZER](f: Foo) -> +Bar() : Bar NEW: call(Bar(), ) -> +f : Foo NEW: r(f) -> +f() : * NEW: call(f(), invoke|, ) -> +Bar().f() : * COPY +{ Bar().f() } : * COPY ===================== diff --git a/compiler/testData/cfg/conventions/equals.instructions b/compiler/testData/cfg/conventions/equals.instructions index eed924e06ee..f0eaabc2a29 100644 --- a/compiler/testData/cfg/conventions/equals.instructions +++ b/compiler/testData/cfg/conventions/equals.instructions @@ -7,10 +7,10 @@ fun foo(a: Int, b: Int) { L0: 1 v(a: Int) - magic(a: Int) -> + magic[FAKE_INITIALIZER](a: Int) -> w(a|) v(b: Int) - magic(b: Int) -> + magic[FAKE_INITIALIZER](b: Int) -> w(b|) 2 mark({ if (a == b) { } }) mark(if (a == b) { }) diff --git a/compiler/testData/cfg/conventions/equals.values b/compiler/testData/cfg/conventions/equals.values index 85115541193..edd38961247 100644 --- a/compiler/testData/cfg/conventions/equals.values +++ b/compiler/testData/cfg/conventions/equals.values @@ -4,9 +4,9 @@ fun foo(a: Int, b: Int) { } } --------------------- - : Int NEW: magic(a: Int) -> - : Int NEW: magic(b: Int) -> -a : OR{{<: Any}, {<: Any}} NEW: r(a) -> -b : {<: Any?} NEW: r(b) -> + : Int NEW: magic[FAKE_INITIALIZER](a: Int) -> + : Int NEW: magic[FAKE_INITIALIZER](b: Int) -> +a : OR{{<: Any}, {<: Any}} NEW: r(a) -> +b : {<: Any?} NEW: r(b) -> a == b : Boolean NEW: call(a == b, equals|, ) -> ===================== diff --git a/compiler/testData/cfg/conventions/invoke.instructions b/compiler/testData/cfg/conventions/invoke.instructions index 6fdd1cd4d7b..84e30b6cce8 100644 --- a/compiler/testData/cfg/conventions/invoke.instructions +++ b/compiler/testData/cfg/conventions/invoke.instructions @@ -6,16 +6,16 @@ fun foo(f: () -> Unit) { L0: 1 v(f: () -> Unit) - magic(f: () -> Unit) -> + magic[FAKE_INITIALIZER](f: () -> Unit) -> w(f|) 2 mark({ f() }) r(f) -> mark(f()) call(f(), invoke|) -> L1: - 1 NEXT:[] + 1 NEXT:[] error: - PREV:[] + PREV:[] sink: - PREV:[, ] + PREV:[, ] ===================== diff --git a/compiler/testData/cfg/conventions/invoke.values b/compiler/testData/cfg/conventions/invoke.values index 67afd6d5b04..d94520fc4be 100644 --- a/compiler/testData/cfg/conventions/invoke.values +++ b/compiler/testData/cfg/conventions/invoke.values @@ -3,8 +3,8 @@ fun foo(f: () -> Unit) { f() } --------------------- - : {<: () -> Unit} NEW: magic(f: () -> Unit) -> -f : {<: () -> Unit} NEW: r(f) -> -f() : * NEW: call(f(), invoke|) -> -{ f() } : * COPY + : {<: () -> Unit} NEW: magic[FAKE_INITIALIZER](f: () -> Unit) -> +f : {<: () -> Unit} NEW: r(f) -> +f() : * NEW: call(f(), invoke|) -> +{ f() } : * COPY ===================== diff --git a/compiler/testData/cfg/conventions/notEqual.instructions b/compiler/testData/cfg/conventions/notEqual.instructions index b4f3d7715d7..a7ca06a80d1 100644 --- a/compiler/testData/cfg/conventions/notEqual.instructions +++ b/compiler/testData/cfg/conventions/notEqual.instructions @@ -6,10 +6,10 @@ fun neq(a: Int, b: Int) { L0: 1 v(a: Int) - magic(a: Int) -> + magic[FAKE_INITIALIZER](a: Int) -> w(a|) v(b: Int) - magic(b: Int) -> + magic[FAKE_INITIALIZER](b: Int) -> w(b|) 2 mark({ if (a != b) {} }) mark(if (a != b) {}) diff --git a/compiler/testData/cfg/conventions/notEqual.values b/compiler/testData/cfg/conventions/notEqual.values index 1d9133a0f24..4b26d518ded 100644 --- a/compiler/testData/cfg/conventions/notEqual.values +++ b/compiler/testData/cfg/conventions/notEqual.values @@ -3,9 +3,9 @@ fun neq(a: Int, b: Int) { if (a != b) {} } --------------------- - : Int NEW: magic(a: Int) -> - : Int NEW: magic(b: Int) -> -a : OR{{<: Any}, {<: Any}} NEW: r(a) -> -b : {<: Any?} NEW: r(b) -> + : Int NEW: magic[FAKE_INITIALIZER](a: Int) -> + : Int NEW: magic[FAKE_INITIALIZER](b: Int) -> +a : OR{{<: Any}, {<: Any}} NEW: r(a) -> +b : {<: Any?} NEW: r(b) -> a != b : Boolean NEW: call(a != b, equals|, ) -> ===================== diff --git a/compiler/testData/cfg/deadCode/stringTemplate.instructions b/compiler/testData/cfg/deadCode/stringTemplate.instructions index 8ce2cfe7b12..fa210184da3 100644 --- a/compiler/testData/cfg/deadCode/stringTemplate.instructions +++ b/compiler/testData/cfg/deadCode/stringTemplate.instructions @@ -10,13 +10,13 @@ L0: mark(throw Exception()) mark(Exception()) call(Exception(), ) -> - throw (throw Exception()|) NEXT:[] -- r(1) -> PREV:[] -- magic("${throw Exception()} ${1}"|) -> PREV:[] + throw (throw Exception()|) NEXT:[] +- r(1) -> PREV:[] +- magic[STRING_TEMPLATE]("${throw Exception()} ${1}"|) -> PREV:[] L1: - 1 NEXT:[] PREV:[] + 1 NEXT:[] PREV:[] error: - PREV:[throw (throw Exception()|)] + PREV:[throw (throw Exception()|)] sink: - PREV:[, ] + PREV:[, ] ===================== diff --git a/compiler/testData/cfg/deadCode/stringTemplate.values b/compiler/testData/cfg/deadCode/stringTemplate.values index d869c7b22d3..4f1ba9aa6a9 100644 --- a/compiler/testData/cfg/deadCode/stringTemplate.values +++ b/compiler/testData/cfg/deadCode/stringTemplate.values @@ -3,8 +3,8 @@ fun test() { "${throw Exception()} ${1}" } --------------------- -Exception() : {<: Throwable} NEW: call(Exception(), ) -> -1 : * NEW: r(1) -> -"${throw Exception()} ${1}" : * NEW: magic("${throw Exception()} ${1}"|) -> -{ "${throw Exception()} ${1}" } : * COPY +Exception() : {<: Throwable} NEW: call(Exception(), ) -> +1 : * NEW: r(1) -> +"${throw Exception()} ${1}" : * NEW: magic[STRING_TEMPLATE]("${throw Exception()} ${1}"|) -> +{ "${throw Exception()} ${1}" } : * COPY ===================== diff --git a/compiler/testData/cfg/declarations/classesAndObjects/AnonymousInitializers.instructions b/compiler/testData/cfg/declarations/classesAndObjects/AnonymousInitializers.instructions index 828260d6ffa..6818d2f4a2e 100644 --- a/compiler/testData/cfg/declarations/classesAndObjects/AnonymousInitializers.instructions +++ b/compiler/testData/cfg/declarations/classesAndObjects/AnonymousInitializers.instructions @@ -22,18 +22,18 @@ L0: w(k|) v(val i: Int) 2 mark({ $i = 12 }) - magic($i) -> + magic[IMPLICIT_RECEIVER]($i) -> r(12) -> w($i|, ) 1 v(val j: Int get() = 20) 2 mark({ $i = 13 }) - magic($i) -> + magic[IMPLICIT_RECEIVER]($i) -> r(13) -> w($i|, ) L1: - 1 NEXT:[] + 1 NEXT:[] error: - PREV:[] + PREV:[] sink: - PREV:[, ] + PREV:[, ] ===================== diff --git a/compiler/testData/cfg/declarations/classesAndObjects/AnonymousInitializers.values b/compiler/testData/cfg/declarations/classesAndObjects/AnonymousInitializers.values index 19c74ff5625..22fa9870f2c 100644 --- a/compiler/testData/cfg/declarations/classesAndObjects/AnonymousInitializers.values +++ b/compiler/testData/cfg/declarations/classesAndObjects/AnonymousInitializers.values @@ -15,9 +15,9 @@ class AnonymousInitializers() { } } --------------------- - : AnonymousInitializers NEW: magic($i) -> - : AnonymousInitializers NEW: magic($i) -> -34 : Int NEW: r(34) -> -12 : Int NEW: r(12) -> -13 : Int NEW: r(13) -> -===================== \ No newline at end of file + : AnonymousInitializers NEW: magic[IMPLICIT_RECEIVER]($i) -> + : AnonymousInitializers NEW: magic[IMPLICIT_RECEIVER]($i) -> +34 : Int NEW: r(34) -> +12 : Int NEW: r(12) -> +13 : Int NEW: r(13) -> +===================== diff --git a/compiler/testData/cfg/declarations/classesAndObjects/delegationByExpression.instructions b/compiler/testData/cfg/declarations/classesAndObjects/delegationByExpression.instructions index b4235d97823..c896956b781 100644 --- a/compiler/testData/cfg/declarations/classesAndObjects/delegationByExpression.instructions +++ b/compiler/testData/cfg/declarations/classesAndObjects/delegationByExpression.instructions @@ -16,18 +16,18 @@ class A(a: Int, b: Int): T L0: 1 v(a: Int) - magic(a: Int) -> + magic[FAKE_INITIALIZER](a: Int) -> w(a|) v(b: Int) - magic(b: Int) -> + magic[FAKE_INITIALIZER](b: Int) -> w(b|) unsupported(DELEGATOR_SUPER_CLASS : T) L1: - NEXT:[] + NEXT:[] error: - PREV:[] + PREV:[] sink: - PREV:[, ] + PREV:[, ] ===================== == B == class B(a: Int, b: Int): T by A(a + b, a - b) @@ -35,10 +35,10 @@ class B(a: Int, b: Int): T by A(a + b, a - b) L0: 1 v(a: Int) - magic(a: Int) -> + magic[FAKE_INITIALIZER](a: Int) -> w(a|) v(b: Int) - magic(b: Int) -> + magic[FAKE_INITIALIZER](b: Int) -> w(b|) r(a) -> r(b) -> @@ -50,11 +50,11 @@ L0: call(a - b, minus|, ) -> mark(A(a + b, a - b)) call(A(a + b, a - b), |, ) -> - magic(T by A(a + b, a - b)|) -> + magic[VALUE_CONSUMER](T by A(a + b, a - b)|) -> L1: - NEXT:[] + NEXT:[] error: - PREV:[] + PREV:[] sink: - PREV:[, ] + PREV:[, ] ===================== diff --git a/compiler/testData/cfg/declarations/classesAndObjects/delegationByExpression.values b/compiler/testData/cfg/declarations/classesAndObjects/delegationByExpression.values index fae9948bfbf..6d4a8f4528c 100644 --- a/compiler/testData/cfg/declarations/classesAndObjects/delegationByExpression.values +++ b/compiler/testData/cfg/declarations/classesAndObjects/delegationByExpression.values @@ -5,14 +5,14 @@ trait T == A == class A(a: Int, b: Int): T --------------------- - : Int NEW: magic(a: Int) -> - : Int NEW: magic(b: Int) -> + : Int NEW: magic[FAKE_INITIALIZER](a: Int) -> + : Int NEW: magic[FAKE_INITIALIZER](b: Int) -> ===================== == B == class B(a: Int, b: Int): T by A(a + b, a - b) --------------------- - : Int NEW: magic(a: Int) -> - : Int NEW: magic(b: Int) -> + : Int NEW: magic[FAKE_INITIALIZER](a: Int) -> + : Int NEW: magic[FAKE_INITIALIZER](b: Int) -> a : Int NEW: r(a) -> b : Int NEW: r(b) -> a + b : Int NEW: call(a + b, plus|, ) -> @@ -20,5 +20,5 @@ a : Int NEW: r(a) -> b : Int NEW: r(b) -> a - b : Int NEW: call(a - b, minus|, ) -> A(a + b, a - b) : {<: T} NEW: call(A(a + b, a - b), |, ) -> -T by A(a + b, a - b) : * NEW: magic(T by A(a + b, a - b)|) -> +T by A(a + b, a - b) : * NEW: magic[VALUE_CONSUMER](T by A(a + b, a - b)|) -> ===================== diff --git a/compiler/testData/cfg/declarations/classesAndObjects/delegationBySuperCall.instructions b/compiler/testData/cfg/declarations/classesAndObjects/delegationBySuperCall.instructions index e2eda1d5a49..d207130ef9a 100644 --- a/compiler/testData/cfg/declarations/classesAndObjects/delegationBySuperCall.instructions +++ b/compiler/testData/cfg/declarations/classesAndObjects/delegationBySuperCall.instructions @@ -4,17 +4,17 @@ open class A(a: Int, b: Int) L0: 1 v(a: Int) - magic(a: Int) -> + magic[FAKE_INITIALIZER](a: Int) -> w(a|) v(b: Int) - magic(b: Int) -> + magic[FAKE_INITIALIZER](b: Int) -> w(b|) L1: - NEXT:[] + NEXT:[] error: - PREV:[] + PREV:[] sink: - PREV:[, ] + PREV:[, ] ===================== == B == class B(a: Int, b: Int): A(a + b, a - b) @@ -22,10 +22,10 @@ class B(a: Int, b: Int): A(a + b, a - b) L0: 1 v(a: Int) - magic(a: Int) -> + magic[FAKE_INITIALIZER](a: Int) -> w(a|) v(b: Int) - magic(b: Int) -> + magic[FAKE_INITIALIZER](b: Int) -> w(b|) r(a) -> r(b) -> diff --git a/compiler/testData/cfg/declarations/classesAndObjects/delegationBySuperCall.values b/compiler/testData/cfg/declarations/classesAndObjects/delegationBySuperCall.values index dfcb5253064..09ef01f95a9 100644 --- a/compiler/testData/cfg/declarations/classesAndObjects/delegationBySuperCall.values +++ b/compiler/testData/cfg/declarations/classesAndObjects/delegationBySuperCall.values @@ -1,19 +1,19 @@ == A == open class A(a: Int, b: Int) --------------------- - : Int NEW: magic(a: Int) -> - : Int NEW: magic(b: Int) -> + : Int NEW: magic[FAKE_INITIALIZER](a: Int) -> + : Int NEW: magic[FAKE_INITIALIZER](b: Int) -> ===================== == B == class B(a: Int, b: Int): A(a + b, a - b) --------------------- - : Int NEW: magic(a: Int) -> - : Int NEW: magic(b: Int) -> -a : Int NEW: r(a) -> -b : Int NEW: r(b) -> -a + b : Int NEW: call(a + b, plus|, ) -> -a : Int NEW: r(a) -> -b : Int NEW: r(b) -> -a - b : Int NEW: call(a - b, minus|, ) -> + : Int NEW: magic[FAKE_INITIALIZER](a: Int) -> + : Int NEW: magic[FAKE_INITIALIZER](b: Int) -> +a : Int NEW: r(a) -> +b : Int NEW: r(b) -> +a + b : Int NEW: call(a + b, plus|, ) -> +a : Int NEW: r(a) -> +b : Int NEW: r(b) -> +a - b : Int NEW: call(a - b, minus|, ) -> A(a + b, a - b) : * NEW: call(A(a + b, a - b), |, ) -> ===================== diff --git a/compiler/testData/cfg/declarations/functions/typeParameter.instructions b/compiler/testData/cfg/declarations/functions/typeParameter.instructions index bd995517e63..941b6dc7445 100644 --- a/compiler/testData/cfg/declarations/functions/typeParameter.instructions +++ b/compiler/testData/cfg/declarations/functions/typeParameter.instructions @@ -7,11 +7,11 @@ L0: 1 2 mark({ T }) error(T, No resolved call) - magic(T) -> + magic[UNRESOLVED_CALL](T) -> L1: - 1 NEXT:[] + 1 NEXT:[] error: - PREV:[] + PREV:[] sink: - PREV:[, ] + PREV:[, ] ===================== diff --git a/compiler/testData/cfg/declarations/functions/typeParameter.values b/compiler/testData/cfg/declarations/functions/typeParameter.values index ddeb2059902..5bddf27abc1 100644 --- a/compiler/testData/cfg/declarations/functions/typeParameter.values +++ b/compiler/testData/cfg/declarations/functions/typeParameter.values @@ -3,6 +3,6 @@ fun foo() { T } --------------------- -T : * NEW: magic(T) -> -{ T } : * COPY +T : * NEW: magic[UNRESOLVED_CALL](T) -> +{ T } : * COPY ===================== diff --git a/compiler/testData/cfg/declarations/local/LocalDeclarations.instructions b/compiler/testData/cfg/declarations/local/LocalDeclarations.instructions index d5de9559dd4..efb6b2b5137 100644 --- a/compiler/testData/cfg/declarations/local/LocalDeclarations.instructions +++ b/compiler/testData/cfg/declarations/local/LocalDeclarations.instructions @@ -35,16 +35,16 @@ fun doSmth(i: Int) {} L0: 1 v(i: Int) - magic(i: Int) -> + magic[FAKE_INITIALIZER](i: Int) -> w(i|) 2 mark({}) read (Unit) L1: - 1 NEXT:[] + 1 NEXT:[] error: - PREV:[] + PREV:[] sink: - PREV:[, ] + PREV:[, ] ===================== == test1 == fun test1() { @@ -63,7 +63,7 @@ L0: mark(object { val x : Int { $x = 1 } }) v(val x : Int) 3 mark({ $x = 1 }) - magic($x) -> + magic[IMPLICIT_RECEIVER]($x) -> r(1) -> w($x|, ) 2 r(object { val x : Int { $x = 1 } }) -> @@ -87,15 +87,15 @@ L0: 1 v(val x : Int) 2 mark({ $x = 1 }) - magic($x) -> + magic[IMPLICIT_RECEIVER]($x) -> r(1) -> w($x|, ) L1: - 1 NEXT:[] + 1 NEXT:[] error: - PREV:[] + PREV:[] sink: - PREV:[, ] + PREV:[, ] ===================== == test2 == fun test2() { @@ -161,15 +161,15 @@ fun inner_bar() { L3: 3 4 mark({ y = 10 }) - magic(y) -> + magic[IMPLICIT_RECEIVER](y) -> r(10) -> w(y|, ) L4: - 3 NEXT:[] + 3 NEXT:[] error: - PREV:[] + PREV:[] sink: - PREV:[, ] + PREV:[, ] ===================== == test4 == fun test4() { @@ -193,7 +193,7 @@ L0: v(val x : Int) v(val y : Int) 3 mark({ $x = 1 }) - magic($x) -> + magic[IMPLICIT_RECEIVER]($x) -> r(1) -> w($x|, ) 2 jmp?(L2) NEXT:[r(object { val x : Int val y : Int { $x = 1 } fun ggg() { y = 10 } }) -> , d(fun ggg() { y = 10 })] @@ -216,15 +216,15 @@ fun ggg() { L3: 3 4 mark({ y = 10 }) - magic(y) -> + magic[IMPLICIT_RECEIVER](y) -> r(10) -> w(y|, ) L4: - 3 NEXT:[] + 3 NEXT:[] error: - PREV:[] + PREV:[] sink: - PREV:[, ] + PREV:[, ] ===================== == test5 == fun test5() { @@ -251,7 +251,7 @@ L0: r(1) -> w(x|) 3 mark({ $x = 2 }) - magic($x) -> + magic[IMPLICIT_RECEIVER]($x) -> r(2) -> w($x|, ) 2 jmp?(L2) NEXT:[jmp?(L5), d(fun foo() { x = 3 })] @@ -277,15 +277,15 @@ fun foo() { L3: 3 4 mark({ x = 3 }) - magic(x) -> + magic[IMPLICIT_RECEIVER](x) -> r(3) -> w(x|, ) L4: - 3 NEXT:[] + 3 NEXT:[] error: - PREV:[] + PREV:[] sink: - PREV:[, ] + PREV:[, ] ===================== == bar == fun bar() { @@ -295,13 +295,13 @@ fun bar() { L6: 3 4 mark({ x = 4 }) - magic(x) -> + magic[IMPLICIT_RECEIVER](x) -> r(4) -> w(x|, ) L7: - 3 NEXT:[] + 3 NEXT:[] error: - PREV:[] + PREV:[] sink: - PREV:[, ] + PREV:[, ] ===================== diff --git a/compiler/testData/cfg/declarations/local/LocalDeclarations.values b/compiler/testData/cfg/declarations/local/LocalDeclarations.values index 597197f5a84..b44de686959 100644 --- a/compiler/testData/cfg/declarations/local/LocalDeclarations.values +++ b/compiler/testData/cfg/declarations/local/LocalDeclarations.values @@ -22,7 +22,7 @@ class C() { == doSmth == fun doSmth(i: Int) {} --------------------- - : Int NEW: magic(i: Int) -> + : Int NEW: magic[FAKE_INITIALIZER](i: Int) -> ===================== == test1 == fun test1() { @@ -34,7 +34,7 @@ fun test1() { } } --------------------- - : NEW: magic($x) -> + : NEW: magic[IMPLICIT_RECEIVER]($x) -> 1 : Int NEW: r(1) -> object { val x : Int { $x = 1 } } : NEW: r(object { val x : Int { $x = 1 } }) -> ===================== @@ -46,8 +46,8 @@ object O { } } --------------------- - : O NEW: magic($x) -> -1 : Int NEW: r(1) -> + : O NEW: magic[IMPLICIT_RECEIVER]($x) -> +1 : Int NEW: r(1) -> ===================== == test2 == fun test2() { @@ -78,8 +78,8 @@ fun inner_bar() { y = 10 } --------------------- - : NEW: magic(y) -> -10 : Int NEW: r(10) -> + : NEW: magic[IMPLICIT_RECEIVER](y) -> +10 : Int NEW: r(10) -> ===================== == test4 == fun test4() { @@ -95,7 +95,7 @@ fun test4() { } } --------------------- - : NEW: magic($x) -> + : NEW: magic[IMPLICIT_RECEIVER]($x) -> 1 : Int NEW: r(1) -> object { val x : Int val y : Int { $x = 1 } fun ggg() { y = 10 } } : NEW: r(object { val x : Int val y : Int { $x = 1 } fun ggg() { y = 10 } }) -> ===================== @@ -104,8 +104,8 @@ fun ggg() { y = 10 } --------------------- - : NEW: magic(y) -> -10 : Int NEW: r(10) -> + : NEW: magic[IMPLICIT_RECEIVER](y) -> +10 : Int NEW: r(10) -> ===================== == test5 == fun test5() { @@ -123,7 +123,7 @@ fun test5() { } } --------------------- - : NEW: magic($x) -> + : NEW: magic[IMPLICIT_RECEIVER]($x) -> 1 : Int NEW: r(1) -> 2 : Int NEW: r(2) -> object { var x = 1 { $x = 2 } fun foo() { x = 3 } fun bar() { x = 4 } } : NEW: r(object { var x = 1 { $x = 2 } fun foo() { x = 3 } fun bar() { x = 4 } }) -> @@ -133,14 +133,14 @@ fun foo() { x = 3 } --------------------- - : NEW: magic(x) -> -3 : Int NEW: r(3) -> + : NEW: magic[IMPLICIT_RECEIVER](x) -> +3 : Int NEW: r(3) -> ===================== == bar == fun bar() { x = 4 } --------------------- - : NEW: magic(x) -> -4 : Int NEW: r(4) -> + : NEW: magic[IMPLICIT_RECEIVER](x) -> +4 : Int NEW: r(4) -> ===================== diff --git a/compiler/testData/cfg/declarations/local/ObjectExpression.instructions b/compiler/testData/cfg/declarations/local/ObjectExpression.instructions index f82366c28ec..db433ddbaca 100644 --- a/compiler/testData/cfg/declarations/local/ObjectExpression.instructions +++ b/compiler/testData/cfg/declarations/local/ObjectExpression.instructions @@ -62,13 +62,13 @@ fun foo(b: B) : Int { L0: 1 v(b: B) - magic(b: B) -> + magic[FAKE_INITIALIZER](b: B) -> w(b|) 2 mark({ val o = object : A by b {} return o.foo() }) v(val o = object : A by b {}) mark(object : A by b {}) r(b) -> - magic(A by b|) -> + magic[VALUE_CONSUMER](A by b|) -> r(object : A by b {}) -> w(o|) mark(o.foo()) diff --git a/compiler/testData/cfg/declarations/local/ObjectExpression.values b/compiler/testData/cfg/declarations/local/ObjectExpression.values index c1b74b0bdf5..4523e7363ea 100644 --- a/compiler/testData/cfg/declarations/local/ObjectExpression.values +++ b/compiler/testData/cfg/declarations/local/ObjectExpression.values @@ -25,11 +25,11 @@ fun foo(b: B) : Int { return o.foo() } --------------------- - : B NEW: magic(b: B) -> -b : {<: A} NEW: r(b) -> -A by b : * NEW: magic(A by b|) -> -object : A by b {} : NEW: r(object : A by b {}) -> -o : {<: A} NEW: r(o) -> -foo() : Int NEW: call(foo(), foo|) -> -o.foo() : Int COPY + : B NEW: magic[FAKE_INITIALIZER](b: B) -> +b : {<: A} NEW: r(b) -> +A by b : * NEW: magic[VALUE_CONSUMER](A by b|) -> +object : A by b {} : NEW: r(object : A by b {}) -> +o : {<: A} NEW: r(o) -> +foo() : Int NEW: call(foo(), foo|) -> +o.foo() : Int COPY ===================== diff --git a/compiler/testData/cfg/declarations/multiDeclaration/MultiDecl.instructions b/compiler/testData/cfg/declarations/multiDeclaration/MultiDecl.instructions index 4a25448c674..8f98c9214dd 100644 --- a/compiler/testData/cfg/declarations/multiDeclaration/MultiDecl.instructions +++ b/compiler/testData/cfg/declarations/multiDeclaration/MultiDecl.instructions @@ -50,7 +50,7 @@ fun test(c: C) { L0: 1 v(c: C) - magic(c: C) -> + magic[FAKE_INITIALIZER](c: C) -> w(c|) 2 mark({ val (a, b) = c val d = 1 }) r(c) -> @@ -64,9 +64,9 @@ L0: r(1) -> w(d|) L1: - 1 NEXT:[] + 1 NEXT:[] error: - PREV:[] + PREV:[] sink: - PREV:[, ] + PREV:[, ] ===================== diff --git a/compiler/testData/cfg/declarations/multiDeclaration/MultiDecl.values b/compiler/testData/cfg/declarations/multiDeclaration/MultiDecl.values index 1ad0cd475a2..d3ba4f3a28e 100644 --- a/compiler/testData/cfg/declarations/multiDeclaration/MultiDecl.values +++ b/compiler/testData/cfg/declarations/multiDeclaration/MultiDecl.values @@ -21,9 +21,9 @@ fun test(c: C) { val d = 1 } --------------------- - : C NEW: magic(c: C) -> -a : Int NEW: call(a, component1|) -> -b : Int NEW: call(b, component2|) -> -c : C NEW: r(c) -> -1 : Int NEW: r(1) -> + : C NEW: magic[FAKE_INITIALIZER](c: C) -> +a : Int NEW: call(a, component1|) -> +b : Int NEW: call(b, component2|) -> +c : C NEW: r(c) -> +1 : Int NEW: r(1) -> ===================== diff --git a/compiler/testData/cfg/declarations/multiDeclaration/multiDeclarationWithError.instructions b/compiler/testData/cfg/declarations/multiDeclaration/multiDeclarationWithError.instructions index 6b03dd674dd..5777f20e318 100644 --- a/compiler/testData/cfg/declarations/multiDeclaration/multiDeclarationWithError.instructions +++ b/compiler/testData/cfg/declarations/multiDeclaration/multiDeclarationWithError.instructions @@ -7,21 +7,21 @@ fun foo(x: Int) { L0: 1 v(x: Int) - magic(x: Int) -> + magic[FAKE_INITIALIZER](x: Int) -> w(x|) 2 mark({ val (a, b) = x a }) r(x) -> v(a) - magic(a|) -> + magic[UNRESOLVED_CALL](a|) -> w(a|) v(b) - magic(b|) -> + magic[UNRESOLVED_CALL](b|) -> w(b|) r(a) -> L1: - 1 NEXT:[] + 1 NEXT:[] error: - PREV:[] + PREV:[] sink: - PREV:[, ] + PREV:[, ] ===================== diff --git a/compiler/testData/cfg/declarations/multiDeclaration/multiDeclarationWithError.values b/compiler/testData/cfg/declarations/multiDeclaration/multiDeclarationWithError.values index ba8bab1e7b1..a06dbc1af66 100644 --- a/compiler/testData/cfg/declarations/multiDeclaration/multiDeclarationWithError.values +++ b/compiler/testData/cfg/declarations/multiDeclaration/multiDeclarationWithError.values @@ -4,10 +4,10 @@ fun foo(x: Int) { a } --------------------- - : Int NEW: magic(x: Int) -> - : {<: [ERROR : component1() return type]} NEW: magic(a|) -> - : {<: [ERROR : component2() return type]} NEW: magic(b|) -> -x : * NEW: r(x) -> -a : * NEW: r(a) -> -{ val (a, b) = x a } : * COPY -===================== \ No newline at end of file + : Int NEW: magic[FAKE_INITIALIZER](x: Int) -> + : {<: [ERROR : component1() return type]} NEW: magic[UNRESOLVED_CALL](a|) -> + : {<: [ERROR : component2() return type]} NEW: magic[UNRESOLVED_CALL](b|) -> +x : * NEW: r(x) -> +a : * NEW: r(a) -> +{ val (a, b) = x a } : * COPY +===================== diff --git a/compiler/testData/cfg/declarations/properties/DelegatedProperty.instructions b/compiler/testData/cfg/declarations/properties/DelegatedProperty.instructions index f5d0b83e476..e305af3e212 100644 --- a/compiler/testData/cfg/declarations/properties/DelegatedProperty.instructions +++ b/compiler/testData/cfg/declarations/properties/DelegatedProperty.instructions @@ -18,19 +18,19 @@ fun get(_this: Any, p: PropertyMetadata): Int = 0 L0: 1 v(_this: Any) - magic(_this: Any) -> + magic[FAKE_INITIALIZER](_this: Any) -> w(_this|) v(p: PropertyMetadata) - magic(p: PropertyMetadata) -> + magic[FAKE_INITIALIZER](p: PropertyMetadata) -> w(p|) r(0) -> ret(*|) L1 L1: - NEXT:[] + NEXT:[] error: - PREV:[] + PREV:[] sink: - PREV:[, ] + PREV:[, ] ===================== == a == val a = Delegate() diff --git a/compiler/testData/cfg/declarations/properties/DelegatedProperty.values b/compiler/testData/cfg/declarations/properties/DelegatedProperty.values index faf84c641ed..eea35c4faa8 100644 --- a/compiler/testData/cfg/declarations/properties/DelegatedProperty.values +++ b/compiler/testData/cfg/declarations/properties/DelegatedProperty.values @@ -7,8 +7,8 @@ class Delegate { == get == fun get(_this: Any, p: PropertyMetadata): Int = 0 --------------------- - : {<: Any} NEW: magic(_this: Any) -> - : {<: PropertyMetadata} NEW: magic(p: PropertyMetadata) -> + : {<: Any} NEW: magic[FAKE_INITIALIZER](_this: Any) -> + : {<: PropertyMetadata} NEW: magic[FAKE_INITIALIZER](p: PropertyMetadata) -> 0 : Int NEW: r(0) -> ===================== == a == diff --git a/compiler/testData/cfg/declarations/properties/backingFieldAccess.instructions b/compiler/testData/cfg/declarations/properties/backingFieldAccess.instructions index 4aebb6cfe36..bfd6adf4cfd 100644 --- a/compiler/testData/cfg/declarations/properties/backingFieldAccess.instructions +++ b/compiler/testData/cfg/declarations/properties/backingFieldAccess.instructions @@ -12,12 +12,12 @@ L0: 1 v(val a: Int get() = 1) 2 mark({ $a }) - magic($a) -> + magic[IMPLICIT_RECEIVER]($a) -> r($a|) -> L1: - 1 NEXT:[] + 1 NEXT:[] error: - PREV:[] + PREV:[] sink: - PREV:[, ] + PREV:[, ] ===================== diff --git a/compiler/testData/cfg/declarations/properties/backingFieldAccess.values b/compiler/testData/cfg/declarations/properties/backingFieldAccess.values index 26245e40deb..c84bbf62ebb 100644 --- a/compiler/testData/cfg/declarations/properties/backingFieldAccess.values +++ b/compiler/testData/cfg/declarations/properties/backingFieldAccess.values @@ -8,7 +8,7 @@ class C { } } --------------------- - : C NEW: magic($a) -> + : C NEW: magic[IMPLICIT_RECEIVER]($a) -> $a : * NEW: r($a|) -> { $a } : * COPY -===================== \ No newline at end of file +===================== diff --git a/compiler/testData/cfg/expressions/Assignments.instructions b/compiler/testData/cfg/expressions/Assignments.instructions index f663f94b38c..8ab2db8cfc8 100644 --- a/compiler/testData/cfg/expressions/Assignments.instructions +++ b/compiler/testData/cfg/expressions/Assignments.instructions @@ -54,17 +54,17 @@ L3: w(x|) v(val y = true && false) r(true) -> - jf(L4|) NEXT:[magic(true && false|, ) -> , r(false) -> ] + jf(L4|) NEXT:[magic[AND](true && false|, ) -> , r(false) -> ] r(false) -> L4: - magic(true && false|, ) -> PREV:[jf(L4|), r(false) -> ] + magic[AND](true && false|, ) -> PREV:[jf(L4|), r(false) -> ] w(y|) v(val z = false && true) r(false) -> - jf(L5|) NEXT:[magic(false && true|, ) -> , r(true) -> ] + jf(L5|) NEXT:[magic[AND](false && true|, ) -> , r(true) -> ] r(true) -> L5: - magic(false && true|, ) -> PREV:[jf(L5|), r(true) -> ] + magic[AND](false && true|, ) -> PREV:[jf(L5|), r(true) -> ] w(z|) v(val t = Test()) mark(Test()) diff --git a/compiler/testData/cfg/expressions/Assignments.values b/compiler/testData/cfg/expressions/Assignments.values index 8b3b66506e2..632a4117910 100644 --- a/compiler/testData/cfg/expressions/Assignments.values +++ b/compiler/testData/cfg/expressions/Assignments.values @@ -20,28 +20,28 @@ fun assignments() : Unit { t.x += 1 } --------------------- -1 : Int NEW: r(1) -> -2 : Int NEW: r(2) -> -x : Int NEW: r(x) -> -2 : Int NEW: r(2) -> -x += 2 : Int NEW: call(x += 2, plus|, ) -> -true : Boolean NEW: r(true) -> -1 : Int NEW: r(1) -> -2 : Int NEW: r(2) -> -if (true) 1 else 2 : Int NEW: merge(if (true) 1 else 2|, ) -> -true : Boolean NEW: r(true) -> -false : Boolean NEW: r(false) -> -true && false : Boolean NEW: magic(true && false|, ) -> -false : Boolean NEW: r(false) -> -true : Boolean NEW: r(true) -> -false && true : Boolean NEW: magic(false && true|, ) -> -Test() : Test NEW: call(Test(), ) -> -t : Test NEW: r(t) -> -1 : Int NEW: r(1) -> -t : Test NEW: r(t) -> -x : Int NEW: r(x|) -> -t.x : Int COPY -1 : Int NEW: r(1) -> -t.x += 1 : Int NEW: call(t.x += 1, plus|, ) -> -{ var x = 1 x = 2 x += 2 x = if (true) 1 else 2 val y = true && false val z = false && true val t = Test(); t.x = 1 t.x += 1 } : Int COPY -===================== \ No newline at end of file +1 : Int NEW: r(1) -> +2 : Int NEW: r(2) -> +x : Int NEW: r(x) -> +2 : Int NEW: r(2) -> +x += 2 : Int NEW: call(x += 2, plus|, ) -> +true : Boolean NEW: r(true) -> +1 : Int NEW: r(1) -> +2 : Int NEW: r(2) -> +if (true) 1 else 2 : Int NEW: merge(if (true) 1 else 2|, ) -> +true : Boolean NEW: r(true) -> +false : Boolean NEW: r(false) -> +true && false : Boolean NEW: magic[AND](true && false|, ) -> +false : Boolean NEW: r(false) -> +true : Boolean NEW: r(true) -> +false && true : Boolean NEW: magic[AND](false && true|, ) -> +Test() : Test NEW: call(Test(), ) -> +t : Test NEW: r(t) -> +1 : Int NEW: r(1) -> +t : Test NEW: r(t) -> +x : Int NEW: r(x|) -> +t.x : Int COPY +1 : Int NEW: r(1) -> +t.x += 1 : Int NEW: call(t.x += 1, plus|, ) -> +{ var x = 1 x = 2 x += 2 x = if (true) 1 else 2 val y = true && false val z = false && true val t = Test(); t.x = 1 t.x += 1 } : Int COPY +===================== diff --git a/compiler/testData/cfg/expressions/LazyBooleans.instructions b/compiler/testData/cfg/expressions/LazyBooleans.instructions index f7e99fd1981..0053b9b9f25 100644 --- a/compiler/testData/cfg/expressions/LazyBooleans.instructions +++ b/compiler/testData/cfg/expressions/LazyBooleans.instructions @@ -20,10 +20,10 @@ fun lazyBooleans(a : Boolean, b : Boolean) : Unit { L0: 1 v(a : Boolean) - magic(a : Boolean) -> + magic[FAKE_INITIALIZER](a : Boolean) -> w(a|) v(b : Boolean) - magic(b : Boolean) -> + magic[FAKE_INITIALIZER](b : Boolean) -> w(b|) 2 mark({ if (a) { 1 } else { 2 } 3 if (a && b) 5 else 6 7 if (a || b) 8 else 9 10 if (a) 11 12 if (a) else 13 14 }) mark(if (a) { 1 } else { 2 }) @@ -40,10 +40,10 @@ L3: r(3) -> mark(if (a && b) 5 else 6) r(a) -> - jf(L4|) NEXT:[magic(a && b|, ) -> , r(b) -> ] + jf(L4|) NEXT:[magic[AND](a && b|, ) -> , r(b) -> ] r(b) -> L4: - magic(a && b|, ) -> PREV:[jf(L4|), r(b) -> ] + magic[AND](a && b|, ) -> PREV:[jf(L4|), r(b) -> ] jf(L5|) NEXT:[r(6) -> , r(5) -> ] r(5) -> jmp(L6) NEXT:[merge(if (a && b) 5 else 6|, ) -> ] @@ -54,10 +54,10 @@ L6: r(7) -> mark(if (a || b) 8 else 9) r(a) -> - jt(L7|) NEXT:[r(b) -> , magic(a || b|, ) -> ] + jt(L7|) NEXT:[r(b) -> , magic[OR](a || b|, ) -> ] r(b) -> L7: - magic(a || b|, ) -> PREV:[jt(L7|), r(b) -> ] + magic[OR](a || b|, ) -> PREV:[jt(L7|), r(b) -> ] jf(L8|) NEXT:[r(9) -> , r(8) -> ] r(8) -> jmp(L9) NEXT:[merge(if (a || b) 8 else 9|, ) -> ] diff --git a/compiler/testData/cfg/expressions/LazyBooleans.values b/compiler/testData/cfg/expressions/LazyBooleans.values index 35f799025ea..77878b6a1f7 100644 --- a/compiler/testData/cfg/expressions/LazyBooleans.values +++ b/compiler/testData/cfg/expressions/LazyBooleans.values @@ -17,36 +17,36 @@ fun lazyBooleans(a : Boolean, b : Boolean) : Unit { 14 } --------------------- - : Boolean NEW: magic(a : Boolean) -> - : Boolean NEW: magic(b : Boolean) -> -a : Boolean NEW: r(a) -> -1 : * NEW: r(1) -> -{ 1 } : * COPY -2 : * NEW: r(2) -> -{ 2 } : * COPY + : Boolean NEW: magic[FAKE_INITIALIZER](a : Boolean) -> + : Boolean NEW: magic[FAKE_INITIALIZER](b : Boolean) -> +a : Boolean NEW: r(a) -> +1 : * NEW: r(1) -> +{ 1 } : * COPY +2 : * NEW: r(2) -> +{ 2 } : * COPY if (a) { 1 } else { 2 } : * NEW: merge(if (a) { 1 } else { 2 }|, ) -> -3 : * NEW: r(3) -> -a : Boolean NEW: r(a) -> -b : Boolean NEW: r(b) -> -a && b : Boolean NEW: magic(a && b|, ) -> -5 : * NEW: r(5) -> -6 : * NEW: r(6) -> +3 : * NEW: r(3) -> +a : Boolean NEW: r(a) -> +b : Boolean NEW: r(b) -> +a && b : Boolean NEW: magic[AND](a && b|, ) -> +5 : * NEW: r(5) -> +6 : * NEW: r(6) -> if (a && b) 5 else 6 : * NEW: merge(if (a && b) 5 else 6|, ) -> -7 : * NEW: r(7) -> -a : Boolean NEW: r(a) -> -b : Boolean NEW: r(b) -> -a || b : Boolean NEW: magic(a || b|, ) -> -8 : * NEW: r(8) -> -9 : * NEW: r(9) -> +7 : * NEW: r(7) -> +a : Boolean NEW: r(a) -> +b : Boolean NEW: r(b) -> +a || b : Boolean NEW: magic[OR](a || b|, ) -> +8 : * NEW: r(8) -> +9 : * NEW: r(9) -> if (a || b) 8 else 9 : * NEW: merge(if (a || b) 8 else 9|, ) -> -10 : * NEW: r(10) -> -a : Boolean NEW: r(a) -> -11 : * NEW: r(11) -> -if (a) 11 : * COPY -12 : * NEW: r(12) -> -a : Boolean NEW: r(a) -> -13 : * NEW: r(13) -> -if (a) else 13 : * COPY -14 : * NEW: r(14) -> -{ if (a) { 1 } else { 2 } 3 if (a && b) 5 else 6 7 if (a || b) 8 else 9 10 if (a) 11 12 if (a) else 13 14 } : * COPY -===================== \ No newline at end of file +10 : * NEW: r(10) -> +a : Boolean NEW: r(a) -> +11 : * NEW: r(11) -> +if (a) 11 : * COPY +12 : * NEW: r(12) -> +a : Boolean NEW: r(a) -> +13 : * NEW: r(13) -> +if (a) else 13 : * COPY +14 : * NEW: r(14) -> +{ if (a) { 1 } else { 2 } 3 if (a && b) 5 else 6 7 if (a || b) 8 else 9 10 if (a) 11 12 if (a) else 13 14 } : * COPY +===================== diff --git a/compiler/testData/cfg/expressions/ReturnFromExpression.instructions b/compiler/testData/cfg/expressions/ReturnFromExpression.instructions index d0de15eb96b..a1b6af0c54c 100644 --- a/compiler/testData/cfg/expressions/ReturnFromExpression.instructions +++ b/compiler/testData/cfg/expressions/ReturnFromExpression.instructions @@ -7,16 +7,16 @@ L0: 1 2 mark({ false || (return false) }) r(false) -> - jt(L2|) NEXT:[mark((return false)), magic(false || (return false)|) -> ] + jt(L2|) NEXT:[mark((return false)), magic[OR](false || (return false)|) -> ] mark((return false)) r(false) -> - ret(*|) L1 NEXT:[] + ret(*|) L1 NEXT:[] L2: - magic(false || (return false)|) -> PREV:[jt(L2|)] + magic[OR](false || (return false)|) -> PREV:[jt(L2|)] L1: - 1 NEXT:[] PREV:[ret(*|) L1, magic(false || (return false)|) -> ] + 1 NEXT:[] PREV:[ret(*|) L1, magic[OR](false || (return false)|) -> ] error: - PREV:[] + PREV:[] sink: - PREV:[, ] + PREV:[, ] ===================== diff --git a/compiler/testData/cfg/expressions/ReturnFromExpression.values b/compiler/testData/cfg/expressions/ReturnFromExpression.values index 66b6edea253..9b44fda7670 100644 --- a/compiler/testData/cfg/expressions/ReturnFromExpression.values +++ b/compiler/testData/cfg/expressions/ReturnFromExpression.values @@ -3,8 +3,8 @@ fun blockAndAndMismatch() : Boolean { false || (return false) } --------------------- -false : Boolean NEW: r(false) -> -false : Boolean NEW: r(false) -> -false || (return false) : * NEW: magic(false || (return false)|) -> -{ false || (return false) } : * COPY -===================== \ No newline at end of file +false : Boolean NEW: r(false) -> +false : Boolean NEW: r(false) -> +false || (return false) : * NEW: magic[OR](false || (return false)|) -> +{ false || (return false) } : * COPY +===================== diff --git a/compiler/testData/cfg/expressions/assignmentToThis.instructions b/compiler/testData/cfg/expressions/assignmentToThis.instructions index 2f57fddb5b3..5ed2bd6e808 100644 --- a/compiler/testData/cfg/expressions/assignmentToThis.instructions +++ b/compiler/testData/cfg/expressions/assignmentToThis.instructions @@ -6,7 +6,7 @@ fun Int.bar(c: C) { L0: 1 v(c: C) - magic(c: C) -> + magic[FAKE_INITIALIZER](c: C) -> w(c|) 2 mark({ this = c }) r(c) -> diff --git a/compiler/testData/cfg/expressions/assignmentToThis.values b/compiler/testData/cfg/expressions/assignmentToThis.values index de41bc207eb..7588f0c7036 100644 --- a/compiler/testData/cfg/expressions/assignmentToThis.values +++ b/compiler/testData/cfg/expressions/assignmentToThis.values @@ -3,6 +3,6 @@ fun Int.bar(c: C) { this = c } --------------------- - : {<: [ERROR : C]} NEW: magic(c: C) -> -c : * NEW: r(c) -> -===================== \ No newline at end of file + : {<: [ERROR : C]} NEW: magic[FAKE_INITIALIZER](c: C) -> +c : * NEW: r(c) -> +===================== diff --git a/compiler/testData/cfg/expressions/chainedQualifiedExpression.instructions b/compiler/testData/cfg/expressions/chainedQualifiedExpression.instructions index c07500535aa..c091344fd31 100644 --- a/compiler/testData/cfg/expressions/chainedQualifiedExpression.instructions +++ b/compiler/testData/cfg/expressions/chainedQualifiedExpression.instructions @@ -87,7 +87,7 @@ L0: mark(BunchKeywordRegister() .add(ABSTRACT_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(FINAL_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(OPEN_KEYWORD, inTopLevel, inTopLevel, inTopLevel)) mark(BunchKeywordRegister() .add(ABSTRACT_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(FINAL_KEYWORD, inTopLevel, inTopLevel, inTopLevel)) mark(BunchKeywordRegister() .add(ABSTRACT_KEYWORD, inTopLevel, inTopLevel, inTopLevel)) - magic(BunchKeywordRegister()) -> + magic[IMPLICIT_RECEIVER](BunchKeywordRegister()) -> mark(BunchKeywordRegister()) call(BunchKeywordRegister(), |) -> r(ABSTRACT_KEYWORD) -> @@ -213,7 +213,7 @@ L0: call(add(OUT_KEYWORD, inTopLevel), add|, , ) -> r(OBJECT_KEYWORD) -> error(unresolvedCode, No resolved call) - magic(unresolvedCode) -> + magic[UNRESOLVED_CALL](unresolvedCode) -> mark(add(OBJECT_KEYWORD, unresolvedCode)) call(add(OBJECT_KEYWORD, unresolvedCode), add|, , ) -> mark(registerAll()) diff --git a/compiler/testData/cfg/expressions/chainedQualifiedExpression.values b/compiler/testData/cfg/expressions/chainedQualifiedExpression.values index 5b742f0c0c7..41efe038e92 100644 --- a/compiler/testData/cfg/expressions/chainedQualifiedExpression.values +++ b/compiler/testData/cfg/expressions/chainedQualifiedExpression.values @@ -50,137 +50,137 @@ public open class JetKeywordCompletionContributor() { } } --------------------- - : {<: JetKeywordCompletionContributor} NEW: magic(BunchKeywordRegister()) -> -1.0 : Double NEW: r(1.0) -> -BunchKeywordRegister() : JetKeywordCompletionContributor.BunchKeywordRegister NEW: call(BunchKeywordRegister(), |) -> -ABSTRACT_KEYWORD : {<: [ERROR : Type annotation was missing]} NEW: r(ABSTRACT_KEYWORD) -> -inTopLevel : Double NEW: r(inTopLevel) -> -inTopLevel : Double NEW: r(inTopLevel) -> -inTopLevel : Double NEW: r(inTopLevel) -> -add(ABSTRACT_KEYWORD, inTopLevel, inTopLevel, inTopLevel) : JetKeywordCompletionContributor.BunchKeywordRegister NEW: call(add(ABSTRACT_KEYWORD, inTopLevel, inTopLevel, inTopLevel), add|, , , , ) -> -BunchKeywordRegister() .add(ABSTRACT_KEYWORD, inTopLevel, inTopLevel, inTopLevel) : JetKeywordCompletionContributor.BunchKeywordRegister COPY -FINAL_KEYWORD : {<: [ERROR : Type annotation was missing]} NEW: r(FINAL_KEYWORD) -> -inTopLevel : Double NEW: r(inTopLevel) -> -inTopLevel : Double NEW: r(inTopLevel) -> -inTopLevel : Double NEW: r(inTopLevel) -> -add(FINAL_KEYWORD, inTopLevel, inTopLevel, inTopLevel) : JetKeywordCompletionContributor.BunchKeywordRegister NEW: call(add(FINAL_KEYWORD, inTopLevel, inTopLevel, inTopLevel), add|, , , , ) -> -BunchKeywordRegister() .add(ABSTRACT_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(FINAL_KEYWORD, inTopLevel, inTopLevel, inTopLevel) : JetKeywordCompletionContributor.BunchKeywordRegister COPY -OPEN_KEYWORD : {<: [ERROR : Type annotation was missing]} NEW: r(OPEN_KEYWORD) -> -inTopLevel : Double NEW: r(inTopLevel) -> -inTopLevel : Double NEW: r(inTopLevel) -> -inTopLevel : Double NEW: r(inTopLevel) -> -add(OPEN_KEYWORD, inTopLevel, inTopLevel, inTopLevel) : JetKeywordCompletionContributor.BunchKeywordRegister NEW: call(add(OPEN_KEYWORD, inTopLevel, inTopLevel, inTopLevel), add|, , , , ) -> -BunchKeywordRegister() .add(ABSTRACT_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(FINAL_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(OPEN_KEYWORD, inTopLevel, inTopLevel, inTopLevel) : JetKeywordCompletionContributor.BunchKeywordRegister COPY -INTERNAL_KEYWORD : {<: [ERROR : Type annotation was missing]} NEW: r(INTERNAL_KEYWORD) -> -inTopLevel : Double NEW: r(inTopLevel) -> -inTopLevel : Double NEW: r(inTopLevel) -> -inTopLevel : Double NEW: r(inTopLevel) -> -inTopLevel : Double NEW: r(inTopLevel) -> -add(INTERNAL_KEYWORD, inTopLevel, inTopLevel, inTopLevel, inTopLevel) : JetKeywordCompletionContributor.BunchKeywordRegister NEW: call(add(INTERNAL_KEYWORD, inTopLevel, inTopLevel, inTopLevel, inTopLevel), add|, , , , , ) -> -BunchKeywordRegister() .add(ABSTRACT_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(FINAL_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(OPEN_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(INTERNAL_KEYWORD, inTopLevel, inTopLevel, inTopLevel, inTopLevel) : JetKeywordCompletionContributor.BunchKeywordRegister COPY -PRIVATE_KEYWORD : {<: [ERROR : Type annotation was missing]} NEW: r(PRIVATE_KEYWORD) -> -inTopLevel : Double NEW: r(inTopLevel) -> -inTopLevel : Double NEW: r(inTopLevel) -> -inTopLevel : Double NEW: r(inTopLevel) -> -inTopLevel : Double NEW: r(inTopLevel) -> -add(PRIVATE_KEYWORD, inTopLevel, inTopLevel, inTopLevel, inTopLevel) : JetKeywordCompletionContributor.BunchKeywordRegister NEW: call(add(PRIVATE_KEYWORD, inTopLevel, inTopLevel, inTopLevel, inTopLevel), add|, , , , , ) -> -BunchKeywordRegister() .add(ABSTRACT_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(FINAL_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(OPEN_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(INTERNAL_KEYWORD, inTopLevel, inTopLevel, inTopLevel, inTopLevel) .add(PRIVATE_KEYWORD, inTopLevel, inTopLevel, inTopLevel, inTopLevel) : JetKeywordCompletionContributor.BunchKeywordRegister COPY -PROTECTED_KEYWORD : {<: [ERROR : Type annotation was missing]} NEW: r(PROTECTED_KEYWORD) -> -inTopLevel : Double NEW: r(inTopLevel) -> -inTopLevel : Double NEW: r(inTopLevel) -> -inTopLevel : Double NEW: r(inTopLevel) -> -inTopLevel : Double NEW: r(inTopLevel) -> + : {<: JetKeywordCompletionContributor} NEW: magic[IMPLICIT_RECEIVER](BunchKeywordRegister()) -> +1.0 : Double NEW: r(1.0) -> +BunchKeywordRegister() : JetKeywordCompletionContributor.BunchKeywordRegister NEW: call(BunchKeywordRegister(), |) -> +ABSTRACT_KEYWORD : {<: [ERROR : Type annotation was missing]} NEW: r(ABSTRACT_KEYWORD) -> +inTopLevel : Double NEW: r(inTopLevel) -> +inTopLevel : Double NEW: r(inTopLevel) -> +inTopLevel : Double NEW: r(inTopLevel) -> +add(ABSTRACT_KEYWORD, inTopLevel, inTopLevel, inTopLevel) : JetKeywordCompletionContributor.BunchKeywordRegister NEW: call(add(ABSTRACT_KEYWORD, inTopLevel, inTopLevel, inTopLevel), add|, , , , ) -> +BunchKeywordRegister() .add(ABSTRACT_KEYWORD, inTopLevel, inTopLevel, inTopLevel) : JetKeywordCompletionContributor.BunchKeywordRegister COPY +FINAL_KEYWORD : {<: [ERROR : Type annotation was missing]} NEW: r(FINAL_KEYWORD) -> +inTopLevel : Double NEW: r(inTopLevel) -> +inTopLevel : Double NEW: r(inTopLevel) -> +inTopLevel : Double NEW: r(inTopLevel) -> +add(FINAL_KEYWORD, inTopLevel, inTopLevel, inTopLevel) : JetKeywordCompletionContributor.BunchKeywordRegister NEW: call(add(FINAL_KEYWORD, inTopLevel, inTopLevel, inTopLevel), add|, , , , ) -> +BunchKeywordRegister() .add(ABSTRACT_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(FINAL_KEYWORD, inTopLevel, inTopLevel, inTopLevel) : JetKeywordCompletionContributor.BunchKeywordRegister COPY +OPEN_KEYWORD : {<: [ERROR : Type annotation was missing]} NEW: r(OPEN_KEYWORD) -> +inTopLevel : Double NEW: r(inTopLevel) -> +inTopLevel : Double NEW: r(inTopLevel) -> +inTopLevel : Double NEW: r(inTopLevel) -> +add(OPEN_KEYWORD, inTopLevel, inTopLevel, inTopLevel) : JetKeywordCompletionContributor.BunchKeywordRegister NEW: call(add(OPEN_KEYWORD, inTopLevel, inTopLevel, inTopLevel), add|, , , , ) -> +BunchKeywordRegister() .add(ABSTRACT_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(FINAL_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(OPEN_KEYWORD, inTopLevel, inTopLevel, inTopLevel) : JetKeywordCompletionContributor.BunchKeywordRegister COPY +INTERNAL_KEYWORD : {<: [ERROR : Type annotation was missing]} NEW: r(INTERNAL_KEYWORD) -> +inTopLevel : Double NEW: r(inTopLevel) -> +inTopLevel : Double NEW: r(inTopLevel) -> +inTopLevel : Double NEW: r(inTopLevel) -> +inTopLevel : Double NEW: r(inTopLevel) -> +add(INTERNAL_KEYWORD, inTopLevel, inTopLevel, inTopLevel, inTopLevel) : JetKeywordCompletionContributor.BunchKeywordRegister NEW: call(add(INTERNAL_KEYWORD, inTopLevel, inTopLevel, inTopLevel, inTopLevel), add|, , , , , ) -> +BunchKeywordRegister() .add(ABSTRACT_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(FINAL_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(OPEN_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(INTERNAL_KEYWORD, inTopLevel, inTopLevel, inTopLevel, inTopLevel) : JetKeywordCompletionContributor.BunchKeywordRegister COPY +PRIVATE_KEYWORD : {<: [ERROR : Type annotation was missing]} NEW: r(PRIVATE_KEYWORD) -> +inTopLevel : Double NEW: r(inTopLevel) -> +inTopLevel : Double NEW: r(inTopLevel) -> +inTopLevel : Double NEW: r(inTopLevel) -> +inTopLevel : Double NEW: r(inTopLevel) -> +add(PRIVATE_KEYWORD, inTopLevel, inTopLevel, inTopLevel, inTopLevel) : JetKeywordCompletionContributor.BunchKeywordRegister NEW: call(add(PRIVATE_KEYWORD, inTopLevel, inTopLevel, inTopLevel, inTopLevel), add|, , , , , ) -> +BunchKeywordRegister() .add(ABSTRACT_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(FINAL_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(OPEN_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(INTERNAL_KEYWORD, inTopLevel, inTopLevel, inTopLevel, inTopLevel) .add(PRIVATE_KEYWORD, inTopLevel, inTopLevel, inTopLevel, inTopLevel) : JetKeywordCompletionContributor.BunchKeywordRegister COPY +PROTECTED_KEYWORD : {<: [ERROR : Type annotation was missing]} NEW: r(PROTECTED_KEYWORD) -> +inTopLevel : Double NEW: r(inTopLevel) -> +inTopLevel : Double NEW: r(inTopLevel) -> +inTopLevel : Double NEW: r(inTopLevel) -> +inTopLevel : Double NEW: r(inTopLevel) -> add(PROTECTED_KEYWORD, inTopLevel, inTopLevel, inTopLevel, inTopLevel) : JetKeywordCompletionContributor.BunchKeywordRegister NEW: call(add(PROTECTED_KEYWORD, inTopLevel, inTopLevel, inTopLevel, inTopLevel), add|, , , , , ) -> -BunchKeywordRegister() .add(ABSTRACT_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(FINAL_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(OPEN_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(INTERNAL_KEYWORD, inTopLevel, inTopLevel, inTopLevel, inTopLevel) .add(PRIVATE_KEYWORD, inTopLevel, inTopLevel, inTopLevel, inTopLevel) .add(PROTECTED_KEYWORD, inTopLevel, inTopLevel, inTopLevel, inTopLevel) : JetKeywordCompletionContributor.BunchKeywordRegister COPY -PUBLIC_KEYWORD : {<: [ERROR : Type annotation was missing]} NEW: r(PUBLIC_KEYWORD) -> -inTopLevel : Double NEW: r(inTopLevel) -> -inTopLevel : Double NEW: r(inTopLevel) -> -inTopLevel : Double NEW: r(inTopLevel) -> -inTopLevel : Double NEW: r(inTopLevel) -> -add(PUBLIC_KEYWORD, inTopLevel, inTopLevel, inTopLevel, inTopLevel) : JetKeywordCompletionContributor.BunchKeywordRegister NEW: call(add(PUBLIC_KEYWORD, inTopLevel, inTopLevel, inTopLevel, inTopLevel), add|, , , , , ) -> -BunchKeywordRegister() .add(ABSTRACT_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(FINAL_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(OPEN_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(INTERNAL_KEYWORD, inTopLevel, inTopLevel, inTopLevel, inTopLevel) .add(PRIVATE_KEYWORD, inTopLevel, inTopLevel, inTopLevel, inTopLevel) .add(PROTECTED_KEYWORD, inTopLevel, inTopLevel, inTopLevel, inTopLevel) .add(PUBLIC_KEYWORD, inTopLevel, inTopLevel, inTopLevel, inTopLevel) : JetKeywordCompletionContributor.BunchKeywordRegister COPY -CLASS_KEYWORD : {<: [ERROR : Type annotation was missing]} NEW: r(CLASS_KEYWORD) -> -inTopLevel : Double NEW: r(inTopLevel) -> -inTopLevel : Double NEW: r(inTopLevel) -> -inTopLevel : Double NEW: r(inTopLevel) -> -add(CLASS_KEYWORD, inTopLevel, inTopLevel, inTopLevel) : JetKeywordCompletionContributor.BunchKeywordRegister NEW: call(add(CLASS_KEYWORD, inTopLevel, inTopLevel, inTopLevel), add|, , , , ) -> -BunchKeywordRegister() .add(ABSTRACT_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(FINAL_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(OPEN_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(INTERNAL_KEYWORD, inTopLevel, inTopLevel, inTopLevel, inTopLevel) .add(PRIVATE_KEYWORD, inTopLevel, inTopLevel, inTopLevel, inTopLevel) .add(PROTECTED_KEYWORD, inTopLevel, inTopLevel, inTopLevel, inTopLevel) .add(PUBLIC_KEYWORD, inTopLevel, inTopLevel, inTopLevel, inTopLevel) .add(CLASS_KEYWORD, inTopLevel, inTopLevel, inTopLevel) : JetKeywordCompletionContributor.BunchKeywordRegister COPY -ENUM_KEYWORD : {<: [ERROR : Type annotation was missing]} NEW: r(ENUM_KEYWORD) -> -inTopLevel : Double NEW: r(inTopLevel) -> -inTopLevel : Double NEW: r(inTopLevel) -> -inTopLevel : Double NEW: r(inTopLevel) -> -add(ENUM_KEYWORD, inTopLevel, inTopLevel, inTopLevel) : JetKeywordCompletionContributor.BunchKeywordRegister NEW: call(add(ENUM_KEYWORD, inTopLevel, inTopLevel, inTopLevel), add|, , , , ) -> -BunchKeywordRegister() .add(ABSTRACT_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(FINAL_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(OPEN_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(INTERNAL_KEYWORD, inTopLevel, inTopLevel, inTopLevel, inTopLevel) .add(PRIVATE_KEYWORD, inTopLevel, inTopLevel, inTopLevel, inTopLevel) .add(PROTECTED_KEYWORD, inTopLevel, inTopLevel, inTopLevel, inTopLevel) .add(PUBLIC_KEYWORD, inTopLevel, inTopLevel, inTopLevel, inTopLevel) .add(CLASS_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(ENUM_KEYWORD, inTopLevel, inTopLevel, inTopLevel) : JetKeywordCompletionContributor.BunchKeywordRegister COPY -FUN_KEYWORD : {<: [ERROR : Type annotation was missing]} NEW: r(FUN_KEYWORD) -> -inTopLevel : Double NEW: r(inTopLevel) -> -inTopLevel : Double NEW: r(inTopLevel) -> -inTopLevel : Double NEW: r(inTopLevel) -> -add(FUN_KEYWORD, inTopLevel, inTopLevel, inTopLevel) : JetKeywordCompletionContributor.BunchKeywordRegister NEW: call(add(FUN_KEYWORD, inTopLevel, inTopLevel, inTopLevel), add|, , , , ) -> -BunchKeywordRegister() .add(ABSTRACT_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(FINAL_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(OPEN_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(INTERNAL_KEYWORD, inTopLevel, inTopLevel, inTopLevel, inTopLevel) .add(PRIVATE_KEYWORD, inTopLevel, inTopLevel, inTopLevel, inTopLevel) .add(PROTECTED_KEYWORD, inTopLevel, inTopLevel, inTopLevel, inTopLevel) .add(PUBLIC_KEYWORD, inTopLevel, inTopLevel, inTopLevel, inTopLevel) .add(CLASS_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(ENUM_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(FUN_KEYWORD, inTopLevel, inTopLevel, inTopLevel) : JetKeywordCompletionContributor.BunchKeywordRegister COPY -GET_KEYWORD : {<: [ERROR : Type annotation was missing]} NEW: r(GET_KEYWORD) -> -inTopLevel : Double NEW: r(inTopLevel) -> -inTopLevel : Double NEW: r(inTopLevel) -> -inTopLevel : Double NEW: r(inTopLevel) -> -add(GET_KEYWORD, inTopLevel, inTopLevel, inTopLevel) : JetKeywordCompletionContributor.BunchKeywordRegister NEW: call(add(GET_KEYWORD, inTopLevel, inTopLevel, inTopLevel), add|, , , , ) -> -BunchKeywordRegister() .add(ABSTRACT_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(FINAL_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(OPEN_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(INTERNAL_KEYWORD, inTopLevel, inTopLevel, inTopLevel, inTopLevel) .add(PRIVATE_KEYWORD, inTopLevel, inTopLevel, inTopLevel, inTopLevel) .add(PROTECTED_KEYWORD, inTopLevel, inTopLevel, inTopLevel, inTopLevel) .add(PUBLIC_KEYWORD, inTopLevel, inTopLevel, inTopLevel, inTopLevel) .add(CLASS_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(ENUM_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(FUN_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(GET_KEYWORD, inTopLevel, inTopLevel, inTopLevel) : JetKeywordCompletionContributor.BunchKeywordRegister COPY -SET_KEYWORD : {<: [ERROR : Type annotation was missing]} NEW: r(SET_KEYWORD) -> -inTopLevel : Double NEW: r(inTopLevel) -> -inTopLevel : Double NEW: r(inTopLevel) -> -inTopLevel : Double NEW: r(inTopLevel) -> -add(SET_KEYWORD, inTopLevel, inTopLevel, inTopLevel) : JetKeywordCompletionContributor.BunchKeywordRegister NEW: call(add(SET_KEYWORD, inTopLevel, inTopLevel, inTopLevel), add|, , , , ) -> -BunchKeywordRegister() .add(ABSTRACT_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(FINAL_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(OPEN_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(INTERNAL_KEYWORD, inTopLevel, inTopLevel, inTopLevel, inTopLevel) .add(PRIVATE_KEYWORD, inTopLevel, inTopLevel, inTopLevel, inTopLevel) .add(PROTECTED_KEYWORD, inTopLevel, inTopLevel, inTopLevel, inTopLevel) .add(PUBLIC_KEYWORD, inTopLevel, inTopLevel, inTopLevel, inTopLevel) .add(CLASS_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(ENUM_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(FUN_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(GET_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(SET_KEYWORD, inTopLevel, inTopLevel, inTopLevel) : JetKeywordCompletionContributor.BunchKeywordRegister COPY -TRAIT_KEYWORD : {<: [ERROR : Type annotation was missing]} NEW: r(TRAIT_KEYWORD) -> -inTopLevel : Double NEW: r(inTopLevel) -> -inTopLevel : Double NEW: r(inTopLevel) -> -inTopLevel : Double NEW: r(inTopLevel) -> -add(TRAIT_KEYWORD, inTopLevel, inTopLevel, inTopLevel) : JetKeywordCompletionContributor.BunchKeywordRegister NEW: call(add(TRAIT_KEYWORD, inTopLevel, inTopLevel, inTopLevel), add|, , , , ) -> -BunchKeywordRegister() .add(ABSTRACT_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(FINAL_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(OPEN_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(INTERNAL_KEYWORD, inTopLevel, inTopLevel, inTopLevel, inTopLevel) .add(PRIVATE_KEYWORD, inTopLevel, inTopLevel, inTopLevel, inTopLevel) .add(PROTECTED_KEYWORD, inTopLevel, inTopLevel, inTopLevel, inTopLevel) .add(PUBLIC_KEYWORD, inTopLevel, inTopLevel, inTopLevel, inTopLevel) .add(CLASS_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(ENUM_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(FUN_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(GET_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(SET_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(TRAIT_KEYWORD, inTopLevel, inTopLevel, inTopLevel) : JetKeywordCompletionContributor.BunchKeywordRegister COPY -VAL_KEYWORD : {<: [ERROR : Type annotation was missing]} NEW: r(VAL_KEYWORD) -> -inTopLevel : Double NEW: r(inTopLevel) -> -inTopLevel : Double NEW: r(inTopLevel) -> -inTopLevel : Double NEW: r(inTopLevel) -> -add(VAL_KEYWORD, inTopLevel, inTopLevel, inTopLevel) : JetKeywordCompletionContributor.BunchKeywordRegister NEW: call(add(VAL_KEYWORD, inTopLevel, inTopLevel, inTopLevel), add|, , , , ) -> -BunchKeywordRegister() .add(ABSTRACT_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(FINAL_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(OPEN_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(INTERNAL_KEYWORD, inTopLevel, inTopLevel, inTopLevel, inTopLevel) .add(PRIVATE_KEYWORD, inTopLevel, inTopLevel, inTopLevel, inTopLevel) .add(PROTECTED_KEYWORD, inTopLevel, inTopLevel, inTopLevel, inTopLevel) .add(PUBLIC_KEYWORD, inTopLevel, inTopLevel, inTopLevel, inTopLevel) .add(CLASS_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(ENUM_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(FUN_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(GET_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(SET_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(TRAIT_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(VAL_KEYWORD, inTopLevel, inTopLevel, inTopLevel) : JetKeywordCompletionContributor.BunchKeywordRegister COPY -VAR_KEYWORD : {<: [ERROR : Type annotation was missing]} NEW: r(VAR_KEYWORD) -> -inTopLevel : Double NEW: r(inTopLevel) -> -inTopLevel : Double NEW: r(inTopLevel) -> -inTopLevel : Double NEW: r(inTopLevel) -> -add(VAR_KEYWORD, inTopLevel, inTopLevel, inTopLevel) : JetKeywordCompletionContributor.BunchKeywordRegister NEW: call(add(VAR_KEYWORD, inTopLevel, inTopLevel, inTopLevel), add|, , , , ) -> -BunchKeywordRegister() .add(ABSTRACT_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(FINAL_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(OPEN_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(INTERNAL_KEYWORD, inTopLevel, inTopLevel, inTopLevel, inTopLevel) .add(PRIVATE_KEYWORD, inTopLevel, inTopLevel, inTopLevel, inTopLevel) .add(PROTECTED_KEYWORD, inTopLevel, inTopLevel, inTopLevel, inTopLevel) .add(PUBLIC_KEYWORD, inTopLevel, inTopLevel, inTopLevel, inTopLevel) .add(CLASS_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(ENUM_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(FUN_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(GET_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(SET_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(TRAIT_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(VAL_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(VAR_KEYWORD, inTopLevel, inTopLevel, inTopLevel) : JetKeywordCompletionContributor.BunchKeywordRegister COPY -TYPE_KEYWORD : {<: [ERROR : Type annotation was missing]} NEW: r(TYPE_KEYWORD) -> -inTopLevel : Double NEW: r(inTopLevel) -> -inTopLevel : Double NEW: r(inTopLevel) -> -inTopLevel : Double NEW: r(inTopLevel) -> -add(TYPE_KEYWORD, inTopLevel, inTopLevel, inTopLevel) : JetKeywordCompletionContributor.BunchKeywordRegister NEW: call(add(TYPE_KEYWORD, inTopLevel, inTopLevel, inTopLevel), add|, , , , ) -> -BunchKeywordRegister() .add(ABSTRACT_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(FINAL_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(OPEN_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(INTERNAL_KEYWORD, inTopLevel, inTopLevel, inTopLevel, inTopLevel) .add(PRIVATE_KEYWORD, inTopLevel, inTopLevel, inTopLevel, inTopLevel) .add(PROTECTED_KEYWORD, inTopLevel, inTopLevel, inTopLevel, inTopLevel) .add(PUBLIC_KEYWORD, inTopLevel, inTopLevel, inTopLevel, inTopLevel) .add(CLASS_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(ENUM_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(FUN_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(GET_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(SET_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(TRAIT_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(VAL_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(VAR_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(TYPE_KEYWORD, inTopLevel, inTopLevel, inTopLevel) : JetKeywordCompletionContributor.BunchKeywordRegister COPY -IMPORT_KEYWORD : {<: [ERROR : Type annotation was missing]} NEW: r(IMPORT_KEYWORD) -> -inTopLevel : Double NEW: r(inTopLevel) -> -add(IMPORT_KEYWORD, inTopLevel) : JetKeywordCompletionContributor.BunchKeywordRegister NEW: call(add(IMPORT_KEYWORD, inTopLevel), add|, , ) -> -BunchKeywordRegister() .add(ABSTRACT_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(FINAL_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(OPEN_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(INTERNAL_KEYWORD, inTopLevel, inTopLevel, inTopLevel, inTopLevel) .add(PRIVATE_KEYWORD, inTopLevel, inTopLevel, inTopLevel, inTopLevel) .add(PROTECTED_KEYWORD, inTopLevel, inTopLevel, inTopLevel, inTopLevel) .add(PUBLIC_KEYWORD, inTopLevel, inTopLevel, inTopLevel, inTopLevel) .add(CLASS_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(ENUM_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(FUN_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(GET_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(SET_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(TRAIT_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(VAL_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(VAR_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(TYPE_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(IMPORT_KEYWORD, inTopLevel) : JetKeywordCompletionContributor.BunchKeywordRegister COPY -PACKAGE_KEYWORD : {<: [ERROR : Type annotation was missing]} NEW: r(PACKAGE_KEYWORD) -> -inTopLevel : Double NEW: r(inTopLevel) -> -add(PACKAGE_KEYWORD, inTopLevel) : JetKeywordCompletionContributor.BunchKeywordRegister NEW: call(add(PACKAGE_KEYWORD, inTopLevel), add|, , ) -> -BunchKeywordRegister() .add(ABSTRACT_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(FINAL_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(OPEN_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(INTERNAL_KEYWORD, inTopLevel, inTopLevel, inTopLevel, inTopLevel) .add(PRIVATE_KEYWORD, inTopLevel, inTopLevel, inTopLevel, inTopLevel) .add(PROTECTED_KEYWORD, inTopLevel, inTopLevel, inTopLevel, inTopLevel) .add(PUBLIC_KEYWORD, inTopLevel, inTopLevel, inTopLevel, inTopLevel) .add(CLASS_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(ENUM_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(FUN_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(GET_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(SET_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(TRAIT_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(VAL_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(VAR_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(TYPE_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(IMPORT_KEYWORD, inTopLevel) .add(PACKAGE_KEYWORD, inTopLevel) : JetKeywordCompletionContributor.BunchKeywordRegister COPY -OVERRIDE_KEYWORD : {<: [ERROR : Type annotation was missing]} NEW: r(OVERRIDE_KEYWORD) -> -inTopLevel : Double NEW: r(inTopLevel) -> -add(OVERRIDE_KEYWORD, inTopLevel) : JetKeywordCompletionContributor.BunchKeywordRegister NEW: call(add(OVERRIDE_KEYWORD, inTopLevel), add|, , ) -> -BunchKeywordRegister() .add(ABSTRACT_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(FINAL_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(OPEN_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(INTERNAL_KEYWORD, inTopLevel, inTopLevel, inTopLevel, inTopLevel) .add(PRIVATE_KEYWORD, inTopLevel, inTopLevel, inTopLevel, inTopLevel) .add(PROTECTED_KEYWORD, inTopLevel, inTopLevel, inTopLevel, inTopLevel) .add(PUBLIC_KEYWORD, inTopLevel, inTopLevel, inTopLevel, inTopLevel) .add(CLASS_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(ENUM_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(FUN_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(GET_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(SET_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(TRAIT_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(VAL_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(VAR_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(TYPE_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(IMPORT_KEYWORD, inTopLevel) .add(PACKAGE_KEYWORD, inTopLevel) .add(OVERRIDE_KEYWORD, inTopLevel) : JetKeywordCompletionContributor.BunchKeywordRegister COPY -IN_KEYWORD : {<: [ERROR : Type annotation was missing]} NEW: r(IN_KEYWORD) -> -inTopLevel : Double NEW: r(inTopLevel) -> -inTopLevel : Double NEW: r(inTopLevel) -> -add(IN_KEYWORD, inTopLevel, inTopLevel) : JetKeywordCompletionContributor.BunchKeywordRegister NEW: call(add(IN_KEYWORD, inTopLevel, inTopLevel), add|, , , ) -> -BunchKeywordRegister() .add(ABSTRACT_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(FINAL_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(OPEN_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(INTERNAL_KEYWORD, inTopLevel, inTopLevel, inTopLevel, inTopLevel) .add(PRIVATE_KEYWORD, inTopLevel, inTopLevel, inTopLevel, inTopLevel) .add(PROTECTED_KEYWORD, inTopLevel, inTopLevel, inTopLevel, inTopLevel) .add(PUBLIC_KEYWORD, inTopLevel, inTopLevel, inTopLevel, inTopLevel) .add(CLASS_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(ENUM_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(FUN_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(GET_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(SET_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(TRAIT_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(VAL_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(VAR_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(TYPE_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(IMPORT_KEYWORD, inTopLevel) .add(PACKAGE_KEYWORD, inTopLevel) .add(OVERRIDE_KEYWORD, inTopLevel) .add(IN_KEYWORD, inTopLevel, inTopLevel) : JetKeywordCompletionContributor.BunchKeywordRegister COPY -OUT_KEYWORD : {<: [ERROR : Type annotation was missing]} NEW: r(OUT_KEYWORD) -> -inTopLevel : Double NEW: r(inTopLevel) -> -add(OUT_KEYWORD, inTopLevel) : JetKeywordCompletionContributor.BunchKeywordRegister NEW: call(add(OUT_KEYWORD, inTopLevel), add|, , ) -> -BunchKeywordRegister() .add(ABSTRACT_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(FINAL_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(OPEN_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(INTERNAL_KEYWORD, inTopLevel, inTopLevel, inTopLevel, inTopLevel) .add(PRIVATE_KEYWORD, inTopLevel, inTopLevel, inTopLevel, inTopLevel) .add(PROTECTED_KEYWORD, inTopLevel, inTopLevel, inTopLevel, inTopLevel) .add(PUBLIC_KEYWORD, inTopLevel, inTopLevel, inTopLevel, inTopLevel) .add(CLASS_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(ENUM_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(FUN_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(GET_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(SET_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(TRAIT_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(VAL_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(VAR_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(TYPE_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(IMPORT_KEYWORD, inTopLevel) .add(PACKAGE_KEYWORD, inTopLevel) .add(OVERRIDE_KEYWORD, inTopLevel) .add(IN_KEYWORD, inTopLevel, inTopLevel) .add(OUT_KEYWORD, inTopLevel) : JetKeywordCompletionContributor.BunchKeywordRegister COPY -OBJECT_KEYWORD : {<: [ERROR : Type annotation was missing]} NEW: r(OBJECT_KEYWORD) -> -unresolvedCode : Double NEW: magic(unresolvedCode) -> -add(OBJECT_KEYWORD, unresolvedCode) : JetKeywordCompletionContributor.BunchKeywordRegister NEW: call(add(OBJECT_KEYWORD, unresolvedCode), add|, , ) -> -BunchKeywordRegister() .add(ABSTRACT_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(FINAL_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(OPEN_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(INTERNAL_KEYWORD, inTopLevel, inTopLevel, inTopLevel, inTopLevel) .add(PRIVATE_KEYWORD, inTopLevel, inTopLevel, inTopLevel, inTopLevel) .add(PROTECTED_KEYWORD, inTopLevel, inTopLevel, inTopLevel, inTopLevel) .add(PUBLIC_KEYWORD, inTopLevel, inTopLevel, inTopLevel, inTopLevel) .add(CLASS_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(ENUM_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(FUN_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(GET_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(SET_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(TRAIT_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(VAL_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(VAR_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(TYPE_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(IMPORT_KEYWORD, inTopLevel) .add(PACKAGE_KEYWORD, inTopLevel) .add(OVERRIDE_KEYWORD, inTopLevel) .add(IN_KEYWORD, inTopLevel, inTopLevel) .add(OUT_KEYWORD, inTopLevel) .add(OBJECT_KEYWORD, unresolvedCode) : JetKeywordCompletionContributor.BunchKeywordRegister COPY -registerAll() : * NEW: call(registerAll(), registerAll|) -> -BunchKeywordRegister() .add(ABSTRACT_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(FINAL_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(OPEN_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(INTERNAL_KEYWORD, inTopLevel, inTopLevel, inTopLevel, inTopLevel) .add(PRIVATE_KEYWORD, inTopLevel, inTopLevel, inTopLevel, inTopLevel) .add(PROTECTED_KEYWORD, inTopLevel, inTopLevel, inTopLevel, inTopLevel) .add(PUBLIC_KEYWORD, inTopLevel, inTopLevel, inTopLevel, inTopLevel) .add(CLASS_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(ENUM_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(FUN_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(GET_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(SET_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(TRAIT_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(VAL_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(VAR_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(TYPE_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(IMPORT_KEYWORD, inTopLevel) .add(PACKAGE_KEYWORD, inTopLevel) .add(OVERRIDE_KEYWORD, inTopLevel) .add(IN_KEYWORD, inTopLevel, inTopLevel) .add(OUT_KEYWORD, inTopLevel) .add(OBJECT_KEYWORD, unresolvedCode) .registerAll() : * COPY -{ val inTopLevel = 1.0 BunchKeywordRegister() .add(ABSTRACT_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(FINAL_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(OPEN_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(INTERNAL_KEYWORD, inTopLevel, inTopLevel, inTopLevel, inTopLevel) .add(PRIVATE_KEYWORD, inTopLevel, inTopLevel, inTopLevel, inTopLevel) .add(PROTECTED_KEYWORD, inTopLevel, inTopLevel, inTopLevel, inTopLevel) .add(PUBLIC_KEYWORD, inTopLevel, inTopLevel, inTopLevel, inTopLevel) .add(CLASS_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(ENUM_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(FUN_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(GET_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(SET_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(TRAIT_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(VAL_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(VAR_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(TYPE_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(IMPORT_KEYWORD, inTopLevel) .add(PACKAGE_KEYWORD, inTopLevel) .add(OVERRIDE_KEYWORD, inTopLevel) .add(IN_KEYWORD, inTopLevel, inTopLevel) .add(OUT_KEYWORD, inTopLevel) .add(OBJECT_KEYWORD, unresolvedCode) .registerAll() } : * COPY +BunchKeywordRegister() .add(ABSTRACT_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(FINAL_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(OPEN_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(INTERNAL_KEYWORD, inTopLevel, inTopLevel, inTopLevel, inTopLevel) .add(PRIVATE_KEYWORD, inTopLevel, inTopLevel, inTopLevel, inTopLevel) .add(PROTECTED_KEYWORD, inTopLevel, inTopLevel, inTopLevel, inTopLevel) : JetKeywordCompletionContributor.BunchKeywordRegister COPY +PUBLIC_KEYWORD : {<: [ERROR : Type annotation was missing]} NEW: r(PUBLIC_KEYWORD) -> +inTopLevel : Double NEW: r(inTopLevel) -> +inTopLevel : Double NEW: r(inTopLevel) -> +inTopLevel : Double NEW: r(inTopLevel) -> +inTopLevel : Double NEW: r(inTopLevel) -> +add(PUBLIC_KEYWORD, inTopLevel, inTopLevel, inTopLevel, inTopLevel) : JetKeywordCompletionContributor.BunchKeywordRegister NEW: call(add(PUBLIC_KEYWORD, inTopLevel, inTopLevel, inTopLevel, inTopLevel), add|, , , , , ) -> +BunchKeywordRegister() .add(ABSTRACT_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(FINAL_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(OPEN_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(INTERNAL_KEYWORD, inTopLevel, inTopLevel, inTopLevel, inTopLevel) .add(PRIVATE_KEYWORD, inTopLevel, inTopLevel, inTopLevel, inTopLevel) .add(PROTECTED_KEYWORD, inTopLevel, inTopLevel, inTopLevel, inTopLevel) .add(PUBLIC_KEYWORD, inTopLevel, inTopLevel, inTopLevel, inTopLevel) : JetKeywordCompletionContributor.BunchKeywordRegister COPY +CLASS_KEYWORD : {<: [ERROR : Type annotation was missing]} NEW: r(CLASS_KEYWORD) -> +inTopLevel : Double NEW: r(inTopLevel) -> +inTopLevel : Double NEW: r(inTopLevel) -> +inTopLevel : Double NEW: r(inTopLevel) -> +add(CLASS_KEYWORD, inTopLevel, inTopLevel, inTopLevel) : JetKeywordCompletionContributor.BunchKeywordRegister NEW: call(add(CLASS_KEYWORD, inTopLevel, inTopLevel, inTopLevel), add|, , , , ) -> +BunchKeywordRegister() .add(ABSTRACT_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(FINAL_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(OPEN_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(INTERNAL_KEYWORD, inTopLevel, inTopLevel, inTopLevel, inTopLevel) .add(PRIVATE_KEYWORD, inTopLevel, inTopLevel, inTopLevel, inTopLevel) .add(PROTECTED_KEYWORD, inTopLevel, inTopLevel, inTopLevel, inTopLevel) .add(PUBLIC_KEYWORD, inTopLevel, inTopLevel, inTopLevel, inTopLevel) .add(CLASS_KEYWORD, inTopLevel, inTopLevel, inTopLevel) : JetKeywordCompletionContributor.BunchKeywordRegister COPY +ENUM_KEYWORD : {<: [ERROR : Type annotation was missing]} NEW: r(ENUM_KEYWORD) -> +inTopLevel : Double NEW: r(inTopLevel) -> +inTopLevel : Double NEW: r(inTopLevel) -> +inTopLevel : Double NEW: r(inTopLevel) -> +add(ENUM_KEYWORD, inTopLevel, inTopLevel, inTopLevel) : JetKeywordCompletionContributor.BunchKeywordRegister NEW: call(add(ENUM_KEYWORD, inTopLevel, inTopLevel, inTopLevel), add|, , , , ) -> +BunchKeywordRegister() .add(ABSTRACT_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(FINAL_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(OPEN_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(INTERNAL_KEYWORD, inTopLevel, inTopLevel, inTopLevel, inTopLevel) .add(PRIVATE_KEYWORD, inTopLevel, inTopLevel, inTopLevel, inTopLevel) .add(PROTECTED_KEYWORD, inTopLevel, inTopLevel, inTopLevel, inTopLevel) .add(PUBLIC_KEYWORD, inTopLevel, inTopLevel, inTopLevel, inTopLevel) .add(CLASS_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(ENUM_KEYWORD, inTopLevel, inTopLevel, inTopLevel) : JetKeywordCompletionContributor.BunchKeywordRegister COPY +FUN_KEYWORD : {<: [ERROR : Type annotation was missing]} NEW: r(FUN_KEYWORD) -> +inTopLevel : Double NEW: r(inTopLevel) -> +inTopLevel : Double NEW: r(inTopLevel) -> +inTopLevel : Double NEW: r(inTopLevel) -> +add(FUN_KEYWORD, inTopLevel, inTopLevel, inTopLevel) : JetKeywordCompletionContributor.BunchKeywordRegister NEW: call(add(FUN_KEYWORD, inTopLevel, inTopLevel, inTopLevel), add|, , , , ) -> +BunchKeywordRegister() .add(ABSTRACT_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(FINAL_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(OPEN_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(INTERNAL_KEYWORD, inTopLevel, inTopLevel, inTopLevel, inTopLevel) .add(PRIVATE_KEYWORD, inTopLevel, inTopLevel, inTopLevel, inTopLevel) .add(PROTECTED_KEYWORD, inTopLevel, inTopLevel, inTopLevel, inTopLevel) .add(PUBLIC_KEYWORD, inTopLevel, inTopLevel, inTopLevel, inTopLevel) .add(CLASS_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(ENUM_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(FUN_KEYWORD, inTopLevel, inTopLevel, inTopLevel) : JetKeywordCompletionContributor.BunchKeywordRegister COPY +GET_KEYWORD : {<: [ERROR : Type annotation was missing]} NEW: r(GET_KEYWORD) -> +inTopLevel : Double NEW: r(inTopLevel) -> +inTopLevel : Double NEW: r(inTopLevel) -> +inTopLevel : Double NEW: r(inTopLevel) -> +add(GET_KEYWORD, inTopLevel, inTopLevel, inTopLevel) : JetKeywordCompletionContributor.BunchKeywordRegister NEW: call(add(GET_KEYWORD, inTopLevel, inTopLevel, inTopLevel), add|, , , , ) -> +BunchKeywordRegister() .add(ABSTRACT_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(FINAL_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(OPEN_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(INTERNAL_KEYWORD, inTopLevel, inTopLevel, inTopLevel, inTopLevel) .add(PRIVATE_KEYWORD, inTopLevel, inTopLevel, inTopLevel, inTopLevel) .add(PROTECTED_KEYWORD, inTopLevel, inTopLevel, inTopLevel, inTopLevel) .add(PUBLIC_KEYWORD, inTopLevel, inTopLevel, inTopLevel, inTopLevel) .add(CLASS_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(ENUM_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(FUN_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(GET_KEYWORD, inTopLevel, inTopLevel, inTopLevel) : JetKeywordCompletionContributor.BunchKeywordRegister COPY +SET_KEYWORD : {<: [ERROR : Type annotation was missing]} NEW: r(SET_KEYWORD) -> +inTopLevel : Double NEW: r(inTopLevel) -> +inTopLevel : Double NEW: r(inTopLevel) -> +inTopLevel : Double NEW: r(inTopLevel) -> +add(SET_KEYWORD, inTopLevel, inTopLevel, inTopLevel) : JetKeywordCompletionContributor.BunchKeywordRegister NEW: call(add(SET_KEYWORD, inTopLevel, inTopLevel, inTopLevel), add|, , , , ) -> +BunchKeywordRegister() .add(ABSTRACT_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(FINAL_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(OPEN_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(INTERNAL_KEYWORD, inTopLevel, inTopLevel, inTopLevel, inTopLevel) .add(PRIVATE_KEYWORD, inTopLevel, inTopLevel, inTopLevel, inTopLevel) .add(PROTECTED_KEYWORD, inTopLevel, inTopLevel, inTopLevel, inTopLevel) .add(PUBLIC_KEYWORD, inTopLevel, inTopLevel, inTopLevel, inTopLevel) .add(CLASS_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(ENUM_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(FUN_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(GET_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(SET_KEYWORD, inTopLevel, inTopLevel, inTopLevel) : JetKeywordCompletionContributor.BunchKeywordRegister COPY +TRAIT_KEYWORD : {<: [ERROR : Type annotation was missing]} NEW: r(TRAIT_KEYWORD) -> +inTopLevel : Double NEW: r(inTopLevel) -> +inTopLevel : Double NEW: r(inTopLevel) -> +inTopLevel : Double NEW: r(inTopLevel) -> +add(TRAIT_KEYWORD, inTopLevel, inTopLevel, inTopLevel) : JetKeywordCompletionContributor.BunchKeywordRegister NEW: call(add(TRAIT_KEYWORD, inTopLevel, inTopLevel, inTopLevel), add|, , , , ) -> +BunchKeywordRegister() .add(ABSTRACT_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(FINAL_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(OPEN_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(INTERNAL_KEYWORD, inTopLevel, inTopLevel, inTopLevel, inTopLevel) .add(PRIVATE_KEYWORD, inTopLevel, inTopLevel, inTopLevel, inTopLevel) .add(PROTECTED_KEYWORD, inTopLevel, inTopLevel, inTopLevel, inTopLevel) .add(PUBLIC_KEYWORD, inTopLevel, inTopLevel, inTopLevel, inTopLevel) .add(CLASS_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(ENUM_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(FUN_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(GET_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(SET_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(TRAIT_KEYWORD, inTopLevel, inTopLevel, inTopLevel) : JetKeywordCompletionContributor.BunchKeywordRegister COPY +VAL_KEYWORD : {<: [ERROR : Type annotation was missing]} NEW: r(VAL_KEYWORD) -> +inTopLevel : Double NEW: r(inTopLevel) -> +inTopLevel : Double NEW: r(inTopLevel) -> +inTopLevel : Double NEW: r(inTopLevel) -> +add(VAL_KEYWORD, inTopLevel, inTopLevel, inTopLevel) : JetKeywordCompletionContributor.BunchKeywordRegister NEW: call(add(VAL_KEYWORD, inTopLevel, inTopLevel, inTopLevel), add|, , , , ) -> +BunchKeywordRegister() .add(ABSTRACT_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(FINAL_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(OPEN_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(INTERNAL_KEYWORD, inTopLevel, inTopLevel, inTopLevel, inTopLevel) .add(PRIVATE_KEYWORD, inTopLevel, inTopLevel, inTopLevel, inTopLevel) .add(PROTECTED_KEYWORD, inTopLevel, inTopLevel, inTopLevel, inTopLevel) .add(PUBLIC_KEYWORD, inTopLevel, inTopLevel, inTopLevel, inTopLevel) .add(CLASS_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(ENUM_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(FUN_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(GET_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(SET_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(TRAIT_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(VAL_KEYWORD, inTopLevel, inTopLevel, inTopLevel) : JetKeywordCompletionContributor.BunchKeywordRegister COPY +VAR_KEYWORD : {<: [ERROR : Type annotation was missing]} NEW: r(VAR_KEYWORD) -> +inTopLevel : Double NEW: r(inTopLevel) -> +inTopLevel : Double NEW: r(inTopLevel) -> +inTopLevel : Double NEW: r(inTopLevel) -> +add(VAR_KEYWORD, inTopLevel, inTopLevel, inTopLevel) : JetKeywordCompletionContributor.BunchKeywordRegister NEW: call(add(VAR_KEYWORD, inTopLevel, inTopLevel, inTopLevel), add|, , , , ) -> +BunchKeywordRegister() .add(ABSTRACT_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(FINAL_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(OPEN_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(INTERNAL_KEYWORD, inTopLevel, inTopLevel, inTopLevel, inTopLevel) .add(PRIVATE_KEYWORD, inTopLevel, inTopLevel, inTopLevel, inTopLevel) .add(PROTECTED_KEYWORD, inTopLevel, inTopLevel, inTopLevel, inTopLevel) .add(PUBLIC_KEYWORD, inTopLevel, inTopLevel, inTopLevel, inTopLevel) .add(CLASS_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(ENUM_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(FUN_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(GET_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(SET_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(TRAIT_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(VAL_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(VAR_KEYWORD, inTopLevel, inTopLevel, inTopLevel) : JetKeywordCompletionContributor.BunchKeywordRegister COPY +TYPE_KEYWORD : {<: [ERROR : Type annotation was missing]} NEW: r(TYPE_KEYWORD) -> +inTopLevel : Double NEW: r(inTopLevel) -> +inTopLevel : Double NEW: r(inTopLevel) -> +inTopLevel : Double NEW: r(inTopLevel) -> +add(TYPE_KEYWORD, inTopLevel, inTopLevel, inTopLevel) : JetKeywordCompletionContributor.BunchKeywordRegister NEW: call(add(TYPE_KEYWORD, inTopLevel, inTopLevel, inTopLevel), add|, , , , ) -> +BunchKeywordRegister() .add(ABSTRACT_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(FINAL_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(OPEN_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(INTERNAL_KEYWORD, inTopLevel, inTopLevel, inTopLevel, inTopLevel) .add(PRIVATE_KEYWORD, inTopLevel, inTopLevel, inTopLevel, inTopLevel) .add(PROTECTED_KEYWORD, inTopLevel, inTopLevel, inTopLevel, inTopLevel) .add(PUBLIC_KEYWORD, inTopLevel, inTopLevel, inTopLevel, inTopLevel) .add(CLASS_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(ENUM_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(FUN_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(GET_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(SET_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(TRAIT_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(VAL_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(VAR_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(TYPE_KEYWORD, inTopLevel, inTopLevel, inTopLevel) : JetKeywordCompletionContributor.BunchKeywordRegister COPY +IMPORT_KEYWORD : {<: [ERROR : Type annotation was missing]} NEW: r(IMPORT_KEYWORD) -> +inTopLevel : Double NEW: r(inTopLevel) -> +add(IMPORT_KEYWORD, inTopLevel) : JetKeywordCompletionContributor.BunchKeywordRegister NEW: call(add(IMPORT_KEYWORD, inTopLevel), add|, , ) -> +BunchKeywordRegister() .add(ABSTRACT_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(FINAL_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(OPEN_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(INTERNAL_KEYWORD, inTopLevel, inTopLevel, inTopLevel, inTopLevel) .add(PRIVATE_KEYWORD, inTopLevel, inTopLevel, inTopLevel, inTopLevel) .add(PROTECTED_KEYWORD, inTopLevel, inTopLevel, inTopLevel, inTopLevel) .add(PUBLIC_KEYWORD, inTopLevel, inTopLevel, inTopLevel, inTopLevel) .add(CLASS_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(ENUM_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(FUN_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(GET_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(SET_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(TRAIT_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(VAL_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(VAR_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(TYPE_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(IMPORT_KEYWORD, inTopLevel) : JetKeywordCompletionContributor.BunchKeywordRegister COPY +PACKAGE_KEYWORD : {<: [ERROR : Type annotation was missing]} NEW: r(PACKAGE_KEYWORD) -> +inTopLevel : Double NEW: r(inTopLevel) -> +add(PACKAGE_KEYWORD, inTopLevel) : JetKeywordCompletionContributor.BunchKeywordRegister NEW: call(add(PACKAGE_KEYWORD, inTopLevel), add|, , ) -> +BunchKeywordRegister() .add(ABSTRACT_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(FINAL_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(OPEN_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(INTERNAL_KEYWORD, inTopLevel, inTopLevel, inTopLevel, inTopLevel) .add(PRIVATE_KEYWORD, inTopLevel, inTopLevel, inTopLevel, inTopLevel) .add(PROTECTED_KEYWORD, inTopLevel, inTopLevel, inTopLevel, inTopLevel) .add(PUBLIC_KEYWORD, inTopLevel, inTopLevel, inTopLevel, inTopLevel) .add(CLASS_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(ENUM_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(FUN_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(GET_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(SET_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(TRAIT_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(VAL_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(VAR_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(TYPE_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(IMPORT_KEYWORD, inTopLevel) .add(PACKAGE_KEYWORD, inTopLevel) : JetKeywordCompletionContributor.BunchKeywordRegister COPY +OVERRIDE_KEYWORD : {<: [ERROR : Type annotation was missing]} NEW: r(OVERRIDE_KEYWORD) -> +inTopLevel : Double NEW: r(inTopLevel) -> +add(OVERRIDE_KEYWORD, inTopLevel) : JetKeywordCompletionContributor.BunchKeywordRegister NEW: call(add(OVERRIDE_KEYWORD, inTopLevel), add|, , ) -> +BunchKeywordRegister() .add(ABSTRACT_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(FINAL_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(OPEN_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(INTERNAL_KEYWORD, inTopLevel, inTopLevel, inTopLevel, inTopLevel) .add(PRIVATE_KEYWORD, inTopLevel, inTopLevel, inTopLevel, inTopLevel) .add(PROTECTED_KEYWORD, inTopLevel, inTopLevel, inTopLevel, inTopLevel) .add(PUBLIC_KEYWORD, inTopLevel, inTopLevel, inTopLevel, inTopLevel) .add(CLASS_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(ENUM_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(FUN_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(GET_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(SET_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(TRAIT_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(VAL_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(VAR_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(TYPE_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(IMPORT_KEYWORD, inTopLevel) .add(PACKAGE_KEYWORD, inTopLevel) .add(OVERRIDE_KEYWORD, inTopLevel) : JetKeywordCompletionContributor.BunchKeywordRegister COPY +IN_KEYWORD : {<: [ERROR : Type annotation was missing]} NEW: r(IN_KEYWORD) -> +inTopLevel : Double NEW: r(inTopLevel) -> +inTopLevel : Double NEW: r(inTopLevel) -> +add(IN_KEYWORD, inTopLevel, inTopLevel) : JetKeywordCompletionContributor.BunchKeywordRegister NEW: call(add(IN_KEYWORD, inTopLevel, inTopLevel), add|, , , ) -> +BunchKeywordRegister() .add(ABSTRACT_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(FINAL_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(OPEN_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(INTERNAL_KEYWORD, inTopLevel, inTopLevel, inTopLevel, inTopLevel) .add(PRIVATE_KEYWORD, inTopLevel, inTopLevel, inTopLevel, inTopLevel) .add(PROTECTED_KEYWORD, inTopLevel, inTopLevel, inTopLevel, inTopLevel) .add(PUBLIC_KEYWORD, inTopLevel, inTopLevel, inTopLevel, inTopLevel) .add(CLASS_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(ENUM_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(FUN_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(GET_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(SET_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(TRAIT_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(VAL_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(VAR_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(TYPE_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(IMPORT_KEYWORD, inTopLevel) .add(PACKAGE_KEYWORD, inTopLevel) .add(OVERRIDE_KEYWORD, inTopLevel) .add(IN_KEYWORD, inTopLevel, inTopLevel) : JetKeywordCompletionContributor.BunchKeywordRegister COPY +OUT_KEYWORD : {<: [ERROR : Type annotation was missing]} NEW: r(OUT_KEYWORD) -> +inTopLevel : Double NEW: r(inTopLevel) -> +add(OUT_KEYWORD, inTopLevel) : JetKeywordCompletionContributor.BunchKeywordRegister NEW: call(add(OUT_KEYWORD, inTopLevel), add|, , ) -> +BunchKeywordRegister() .add(ABSTRACT_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(FINAL_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(OPEN_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(INTERNAL_KEYWORD, inTopLevel, inTopLevel, inTopLevel, inTopLevel) .add(PRIVATE_KEYWORD, inTopLevel, inTopLevel, inTopLevel, inTopLevel) .add(PROTECTED_KEYWORD, inTopLevel, inTopLevel, inTopLevel, inTopLevel) .add(PUBLIC_KEYWORD, inTopLevel, inTopLevel, inTopLevel, inTopLevel) .add(CLASS_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(ENUM_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(FUN_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(GET_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(SET_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(TRAIT_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(VAL_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(VAR_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(TYPE_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(IMPORT_KEYWORD, inTopLevel) .add(PACKAGE_KEYWORD, inTopLevel) .add(OVERRIDE_KEYWORD, inTopLevel) .add(IN_KEYWORD, inTopLevel, inTopLevel) .add(OUT_KEYWORD, inTopLevel) : JetKeywordCompletionContributor.BunchKeywordRegister COPY +OBJECT_KEYWORD : {<: [ERROR : Type annotation was missing]} NEW: r(OBJECT_KEYWORD) -> +unresolvedCode : Double NEW: magic[UNRESOLVED_CALL](unresolvedCode) -> +add(OBJECT_KEYWORD, unresolvedCode) : JetKeywordCompletionContributor.BunchKeywordRegister NEW: call(add(OBJECT_KEYWORD, unresolvedCode), add|, , ) -> +BunchKeywordRegister() .add(ABSTRACT_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(FINAL_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(OPEN_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(INTERNAL_KEYWORD, inTopLevel, inTopLevel, inTopLevel, inTopLevel) .add(PRIVATE_KEYWORD, inTopLevel, inTopLevel, inTopLevel, inTopLevel) .add(PROTECTED_KEYWORD, inTopLevel, inTopLevel, inTopLevel, inTopLevel) .add(PUBLIC_KEYWORD, inTopLevel, inTopLevel, inTopLevel, inTopLevel) .add(CLASS_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(ENUM_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(FUN_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(GET_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(SET_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(TRAIT_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(VAL_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(VAR_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(TYPE_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(IMPORT_KEYWORD, inTopLevel) .add(PACKAGE_KEYWORD, inTopLevel) .add(OVERRIDE_KEYWORD, inTopLevel) .add(IN_KEYWORD, inTopLevel, inTopLevel) .add(OUT_KEYWORD, inTopLevel) .add(OBJECT_KEYWORD, unresolvedCode) : JetKeywordCompletionContributor.BunchKeywordRegister COPY +registerAll() : * NEW: call(registerAll(), registerAll|) -> +BunchKeywordRegister() .add(ABSTRACT_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(FINAL_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(OPEN_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(INTERNAL_KEYWORD, inTopLevel, inTopLevel, inTopLevel, inTopLevel) .add(PRIVATE_KEYWORD, inTopLevel, inTopLevel, inTopLevel, inTopLevel) .add(PROTECTED_KEYWORD, inTopLevel, inTopLevel, inTopLevel, inTopLevel) .add(PUBLIC_KEYWORD, inTopLevel, inTopLevel, inTopLevel, inTopLevel) .add(CLASS_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(ENUM_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(FUN_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(GET_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(SET_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(TRAIT_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(VAL_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(VAR_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(TYPE_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(IMPORT_KEYWORD, inTopLevel) .add(PACKAGE_KEYWORD, inTopLevel) .add(OVERRIDE_KEYWORD, inTopLevel) .add(IN_KEYWORD, inTopLevel, inTopLevel) .add(OUT_KEYWORD, inTopLevel) .add(OBJECT_KEYWORD, unresolvedCode) .registerAll() : * COPY +{ val inTopLevel = 1.0 BunchKeywordRegister() .add(ABSTRACT_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(FINAL_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(OPEN_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(INTERNAL_KEYWORD, inTopLevel, inTopLevel, inTopLevel, inTopLevel) .add(PRIVATE_KEYWORD, inTopLevel, inTopLevel, inTopLevel, inTopLevel) .add(PROTECTED_KEYWORD, inTopLevel, inTopLevel, inTopLevel, inTopLevel) .add(PUBLIC_KEYWORD, inTopLevel, inTopLevel, inTopLevel, inTopLevel) .add(CLASS_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(ENUM_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(FUN_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(GET_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(SET_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(TRAIT_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(VAL_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(VAR_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(TYPE_KEYWORD, inTopLevel, inTopLevel, inTopLevel) .add(IMPORT_KEYWORD, inTopLevel) .add(PACKAGE_KEYWORD, inTopLevel) .add(OVERRIDE_KEYWORD, inTopLevel) .add(IN_KEYWORD, inTopLevel, inTopLevel) .add(OUT_KEYWORD, inTopLevel) .add(OBJECT_KEYWORD, unresolvedCode) .registerAll() } : * COPY ===================== == ABSTRACT_KEYWORD == val ABSTRACT_KEYWORD = JetToken() @@ -290,4 +290,4 @@ JetToken() : JetToken NEW: call(JetToken(), ) -> val OBJECT_KEYWORD = JetToken() --------------------- JetToken() : JetToken NEW: call(JetToken(), ) -> -===================== \ No newline at end of file +===================== diff --git a/compiler/testData/cfg/expressions/expressionAsFunction.instructions b/compiler/testData/cfg/expressions/expressionAsFunction.instructions index 5e747c64ae3..a933a3c976f 100644 --- a/compiler/testData/cfg/expressions/expressionAsFunction.instructions +++ b/compiler/testData/cfg/expressions/expressionAsFunction.instructions @@ -6,7 +6,7 @@ fun invoke(f: () -> Unit) { L0: 1 v(f: () -> Unit) - magic(f: () -> Unit) -> + magic[FAKE_INITIALIZER](f: () -> Unit) -> w(f|) 2 mark({ (f)() }) mark((f)) @@ -14,9 +14,9 @@ L0: mark((f)()) call((f)(), invoke|) -> L1: - 1 NEXT:[] + 1 NEXT:[] error: - PREV:[] + PREV:[] sink: - PREV:[, ] + PREV:[, ] ===================== diff --git a/compiler/testData/cfg/expressions/expressionAsFunction.values b/compiler/testData/cfg/expressions/expressionAsFunction.values index 9ae991c34cf..3bc9ab690f8 100644 --- a/compiler/testData/cfg/expressions/expressionAsFunction.values +++ b/compiler/testData/cfg/expressions/expressionAsFunction.values @@ -3,9 +3,9 @@ fun invoke(f: () -> Unit) { (f)() } --------------------- - : {<: () -> Unit} NEW: magic(f: () -> Unit) -> -f : {<: () -> Unit} NEW: r(f) -> -(f) : {<: () -> Unit} COPY -(f)() : * NEW: call((f)(), invoke|) -> -{ (f)() } : * COPY -===================== \ No newline at end of file + : {<: () -> Unit} NEW: magic[FAKE_INITIALIZER](f: () -> Unit) -> +f : {<: () -> Unit} NEW: r(f) -> +(f) : {<: () -> Unit} COPY +(f)() : * NEW: call((f)(), invoke|) -> +{ (f)() } : * COPY +===================== diff --git a/compiler/testData/cfg/expressions/incdec.instructions b/compiler/testData/cfg/expressions/incdec.instructions index 81f0257b6c4..993ac589dd6 100644 --- a/compiler/testData/cfg/expressions/incdec.instructions +++ b/compiler/testData/cfg/expressions/incdec.instructions @@ -6,16 +6,16 @@ fun bar(n: Int) { L0: 1 v(n: Int) - magic(n: Int) -> + magic[FAKE_INITIALIZER](n: Int) -> w(n|) 2 mark({ }) read (Unit) L1: - 1 NEXT:[] + 1 NEXT:[] error: - PREV:[] + PREV:[] sink: - PREV:[, ] + PREV:[, ] ===================== == foo == fun foo() { @@ -62,4 +62,4 @@ error: PREV:[] sink: PREV:[, ] -===================== \ No newline at end of file +===================== diff --git a/compiler/testData/cfg/expressions/incdec.values b/compiler/testData/cfg/expressions/incdec.values index bccf6cd82ec..1fee4095c7b 100644 --- a/compiler/testData/cfg/expressions/incdec.values +++ b/compiler/testData/cfg/expressions/incdec.values @@ -3,7 +3,7 @@ fun bar(n: Int) { } --------------------- - : Int NEW: magic(n: Int) -> + : Int NEW: magic[FAKE_INITIALIZER](n: Int) -> ===================== == foo == fun foo() { @@ -28,4 +28,4 @@ a : Int NEW: r(a) -> : Int NEW: call(--a, dec|) -> bar(--a) : * NEW: call(bar(--a), bar|) -> { var a = 1 bar(a++) bar(a--) bar(++a) bar(--a) } : * COPY -===================== \ No newline at end of file +===================== diff --git a/compiler/testData/cfg/expressions/nothingExpr.instructions b/compiler/testData/cfg/expressions/nothingExpr.instructions index ceb92166aab..a350371841a 100644 --- a/compiler/testData/cfg/expressions/nothingExpr.instructions +++ b/compiler/testData/cfg/expressions/nothingExpr.instructions @@ -39,7 +39,7 @@ L0: 2 mark({ null!!.doSomething() bar().doSomething }) mark(null!!.doSomething()) r(null) -> - magic(null!!|) -> + magic[NOT_NULL_ASSERTION](null!!|) -> jmp(error) NEXT:[] - mark(doSomething()) PREV:[] - call(doSomething(), doSomething|) -> PREV:[] diff --git a/compiler/testData/cfg/expressions/nothingExpr.values b/compiler/testData/cfg/expressions/nothingExpr.values index 76dcacc87cc..5e0fcd71602 100644 --- a/compiler/testData/cfg/expressions/nothingExpr.values +++ b/compiler/testData/cfg/expressions/nothingExpr.values @@ -13,11 +13,11 @@ fun foo() { bar().doSomething } --------------------- -null : * NEW: r(null) -> -null!! : * NEW: magic(null!!|) -> -doSomething() : * NEW: call(doSomething(), doSomething|) -> -null!!.doSomething() : * COPY -doSomething : * NEW: call(doSomething, doSomething) -> -bar().doSomething : * COPY -{ null!!.doSomething() bar().doSomething } : * COPY -===================== \ No newline at end of file +null : * NEW: r(null) -> +null!! : * NEW: magic[NOT_NULL_ASSERTION](null!!|) -> +doSomething() : * NEW: call(doSomething(), doSomething|) -> +null!!.doSomething() : * COPY +doSomething : * NEW: call(doSomething, doSomething) -> +bar().doSomething : * COPY +{ null!!.doSomething() bar().doSomething } : * COPY +===================== diff --git a/compiler/testData/cfg/expressions/propertySafeCall.instructions b/compiler/testData/cfg/expressions/propertySafeCall.instructions index 07e587a6f09..f4be858ac32 100644 --- a/compiler/testData/cfg/expressions/propertySafeCall.instructions +++ b/compiler/testData/cfg/expressions/propertySafeCall.instructions @@ -6,16 +6,16 @@ fun test(s: String?) { L0: 1 v(s: String?) - magic(s: String?) -> + magic[FAKE_INITIALIZER](s: String?) -> w(s|) 2 mark({ s?.length }) mark(s?.length) r(s) -> r(length|) -> L1: - 1 NEXT:[] + 1 NEXT:[] error: - PREV:[] + PREV:[] sink: - PREV:[, ] + PREV:[, ] ===================== diff --git a/compiler/testData/cfg/expressions/propertySafeCall.values b/compiler/testData/cfg/expressions/propertySafeCall.values index 625fa9d6ebd..672540824d3 100644 --- a/compiler/testData/cfg/expressions/propertySafeCall.values +++ b/compiler/testData/cfg/expressions/propertySafeCall.values @@ -3,9 +3,9 @@ fun test(s: String?) { s?.length } --------------------- - : {<: String?} NEW: magic(s: String?) -> -s : {<: CharSequence?} NEW: r(s) -> -length : * NEW: r(length|) -> -s?.length : * COPY -{ s?.length } : * COPY -===================== \ No newline at end of file + : {<: String?} NEW: magic[FAKE_INITIALIZER](s: String?) -> +s : {<: CharSequence?} NEW: r(s) -> +length : * NEW: r(length|) -> +s?.length : * COPY +{ s?.length } : * COPY +===================== diff --git a/compiler/testData/cfg/expressions/qualifiedExpressionWithoutSelector.instructions b/compiler/testData/cfg/expressions/qualifiedExpressionWithoutSelector.instructions index 3ecb7f2e549..0b85abfa93a 100644 --- a/compiler/testData/cfg/expressions/qualifiedExpressionWithoutSelector.instructions +++ b/compiler/testData/cfg/expressions/qualifiedExpressionWithoutSelector.instructions @@ -6,16 +6,16 @@ fun foo(s: String) { L0: 1 v(s: String) - magic(s: String) -> + magic[FAKE_INITIALIZER](s: String) -> w(s|) 2 mark({ s. }) mark(s.) r(s) -> - magic(s.|) -> + magic[UNSUPPORTED_OPERATION](s.|) -> L1: - 1 NEXT:[] + 1 NEXT:[] error: - PREV:[] + PREV:[] sink: - PREV:[, ] + PREV:[, ] ===================== diff --git a/compiler/testData/cfg/expressions/qualifiedExpressionWithoutSelector.values b/compiler/testData/cfg/expressions/qualifiedExpressionWithoutSelector.values index b6f1cc5537a..96c93440950 100644 --- a/compiler/testData/cfg/expressions/qualifiedExpressionWithoutSelector.values +++ b/compiler/testData/cfg/expressions/qualifiedExpressionWithoutSelector.values @@ -3,8 +3,8 @@ fun foo(s: String) { s. } --------------------- - : String NEW: magic(s: String) -> -s : * NEW: r(s) -> -s. : * NEW: magic(s.|) -> -{ s. } : * COPY -===================== \ No newline at end of file + : String NEW: magic[FAKE_INITIALIZER](s: String) -> +s : * NEW: r(s) -> +s. : * NEW: magic[UNSUPPORTED_OPERATION](s.|) -> +{ s. } : * COPY +===================== diff --git a/compiler/testData/cfg/expressions/unresolvedCall.instructions b/compiler/testData/cfg/expressions/unresolvedCall.instructions index 1ae229915e0..998afd3ea14 100644 --- a/compiler/testData/cfg/expressions/unresolvedCall.instructions +++ b/compiler/testData/cfg/expressions/unresolvedCall.instructions @@ -6,7 +6,7 @@ fun test(a: Any) { L0: 1 v(a: Any) - magic(a: Any) -> + magic[FAKE_INITIALIZER](a: Any) -> w(a|) 2 mark({ a.foo() }) mark(a.foo()) @@ -14,11 +14,11 @@ L0: error(foo, No resolved call) r(a) -> mark(foo()) - magic(foo()|) -> + magic[UNRESOLVED_CALL](foo()|) -> L1: - 1 NEXT:[] + 1 NEXT:[] error: - PREV:[] + PREV:[] sink: - PREV:[, ] + PREV:[, ] ===================== diff --git a/compiler/testData/cfg/expressions/unresolvedCall.values b/compiler/testData/cfg/expressions/unresolvedCall.values index 94f904eab03..7975e28a21a 100644 --- a/compiler/testData/cfg/expressions/unresolvedCall.values +++ b/compiler/testData/cfg/expressions/unresolvedCall.values @@ -3,9 +3,9 @@ fun test(a: Any) { a.foo() } --------------------- - : {<: Any} NEW: magic(a: Any) -> -a : * NEW: r(a) -> -foo() : * NEW: magic(foo()|) -> -a.foo() : * COPY -{ a.foo() } : * COPY -===================== \ No newline at end of file + : {<: Any} NEW: magic[FAKE_INITIALIZER](a: Any) -> +a : * NEW: r(a) -> +foo() : * NEW: magic[UNRESOLVED_CALL](foo()|) -> +a.foo() : * COPY +{ a.foo() } : * COPY +===================== diff --git a/compiler/testData/cfg/expressions/unresolvedProperty.instructions b/compiler/testData/cfg/expressions/unresolvedProperty.instructions index 075e299ca13..bf28f30c1e0 100644 --- a/compiler/testData/cfg/expressions/unresolvedProperty.instructions +++ b/compiler/testData/cfg/expressions/unresolvedProperty.instructions @@ -6,17 +6,17 @@ fun test(a: Any) { L0: 1 v(a: Any) - magic(a: Any) -> + magic[FAKE_INITIALIZER](a: Any) -> w(a|) 2 mark({ a.foo }) mark(a.foo) error(foo, No resolved call) r(a) -> - magic(foo|) -> + magic[UNRESOLVED_CALL](foo|) -> L1: - 1 NEXT:[] + 1 NEXT:[] error: - PREV:[] + PREV:[] sink: - PREV:[, ] + PREV:[, ] ===================== diff --git a/compiler/testData/cfg/expressions/unresolvedProperty.values b/compiler/testData/cfg/expressions/unresolvedProperty.values index 8b96a60a0d4..311762d4ed4 100644 --- a/compiler/testData/cfg/expressions/unresolvedProperty.values +++ b/compiler/testData/cfg/expressions/unresolvedProperty.values @@ -3,9 +3,9 @@ fun test(a: Any) { a.foo } --------------------- - : {<: Any} NEW: magic(a: Any) -> -a : * NEW: r(a) -> -foo : * NEW: magic(foo|) -> -a.foo : * COPY -{ a.foo } : * COPY -===================== \ No newline at end of file + : {<: Any} NEW: magic[FAKE_INITIALIZER](a: Any) -> +a : * NEW: r(a) -> +foo : * NEW: magic[UNRESOLVED_CALL](foo|) -> +a.foo : * COPY +{ a.foo } : * COPY +===================== diff --git a/compiler/testData/cfg/expressions/unusedExpressionSimpleName.instructions b/compiler/testData/cfg/expressions/unusedExpressionSimpleName.instructions index 8b0f0986cbe..2b43e7499a8 100644 --- a/compiler/testData/cfg/expressions/unusedExpressionSimpleName.instructions +++ b/compiler/testData/cfg/expressions/unusedExpressionSimpleName.instructions @@ -6,15 +6,15 @@ fun main(arg : Array) { L0: 1 v(arg : Array) - magic(arg : Array) -> + magic[FAKE_INITIALIZER](arg : Array) -> w(arg|) 2 mark({ a }) error(a, No resolved call) - magic(a) -> + magic[UNRESOLVED_CALL](a) -> L1: - 1 NEXT:[] + 1 NEXT:[] error: - PREV:[] + PREV:[] sink: - PREV:[, ] + PREV:[, ] ===================== diff --git a/compiler/testData/cfg/expressions/unusedExpressionSimpleName.values b/compiler/testData/cfg/expressions/unusedExpressionSimpleName.values index bb8b0b2ad07..86e09324151 100644 --- a/compiler/testData/cfg/expressions/unusedExpressionSimpleName.values +++ b/compiler/testData/cfg/expressions/unusedExpressionSimpleName.values @@ -3,7 +3,7 @@ fun main(arg : Array) { a } --------------------- - : {<: Array} NEW: magic(arg : Array) -> -a : * NEW: magic(a) -> + : {<: Array} NEW: magic[FAKE_INITIALIZER](arg : Array) -> +a : * NEW: magic[UNRESOLVED_CALL](a) -> { a } : * COPY -===================== \ No newline at end of file +===================== diff --git a/compiler/testData/cfg/functions/DefaultValuesForArguments.instructions b/compiler/testData/cfg/functions/DefaultValuesForArguments.instructions index dfbd5514b6b..ece941690a2 100644 --- a/compiler/testData/cfg/functions/DefaultValuesForArguments.instructions +++ b/compiler/testData/cfg/functions/DefaultValuesForArguments.instructions @@ -4,14 +4,14 @@ fun foo(i: Int = 1, j: Int) = i + j L0: 1 v(i: Int = 1) - jmp?(L2 [after default value for parameter i]) NEXT:[magic(i: Int = 1) -> , r(1) -> ] + jmp?(L2 [after default value for parameter i]) NEXT:[magic[FAKE_INITIALIZER](i: Int = 1) -> , r(1) -> ] r(1) -> L2 [after default value for parameter i]: - magic(i: Int = 1) -> PREV:[jmp?(L2 [after default value for parameter i]), r(1) -> ] + magic[FAKE_INITIALIZER](i: Int = 1) -> PREV:[jmp?(L2 [after default value for parameter i]), r(1) -> ] merge(i: Int = 1|, ) -> w(i|) v(j: Int) - magic(j: Int) -> + magic[FAKE_INITIALIZER](j: Int) -> w(j|) r(i) -> r(j) -> diff --git a/compiler/testData/cfg/functions/DefaultValuesForArguments.values b/compiler/testData/cfg/functions/DefaultValuesForArguments.values index 99175d8cd75..575dcc457ac 100644 --- a/compiler/testData/cfg/functions/DefaultValuesForArguments.values +++ b/compiler/testData/cfg/functions/DefaultValuesForArguments.values @@ -1,11 +1,11 @@ == foo == fun foo(i: Int = 1, j: Int) = i + j --------------------- - : Int NEW: magic(i: Int = 1) -> - : Int NEW: magic(j: Int) -> -1 : Int NEW: r(1) -> -i: Int = 1 : Int NEW: merge(i: Int = 1|, ) -> -i : Int NEW: r(i) -> -j : Int NEW: r(j) -> -i + j : Int NEW: call(i + j, plus|, ) -> -===================== \ No newline at end of file + : Int NEW: magic[FAKE_INITIALIZER](i: Int = 1) -> + : Int NEW: magic[FAKE_INITIALIZER](j: Int) -> +1 : Int NEW: r(1) -> +i: Int = 1 : Int NEW: merge(i: Int = 1|, ) -> +i : Int NEW: r(i) -> +j : Int NEW: r(j) -> +i + j : Int NEW: call(i + j, plus|, ) -> +===================== diff --git a/compiler/testData/cfg/tailCalls/sum.instructions b/compiler/testData/cfg/tailCalls/sum.instructions index 51d121327de..a1a4b846c47 100644 --- a/compiler/testData/cfg/tailCalls/sum.instructions +++ b/compiler/testData/cfg/tailCalls/sum.instructions @@ -7,10 +7,10 @@ tailRecursive fun sum(x: Long, sum: Long): Long { L0: 1 v(x: Long) - magic(x: Long) -> + magic[FAKE_INITIALIZER](x: Long) -> w(x|) v(sum: Long) - magic(sum: Long) -> + magic[FAKE_INITIALIZER](sum: Long) -> w(sum|) 2 mark({ if (x == 0.toLong()) return sum return sum(x - 1, sum + x) }) mark(if (x == 0.toLong()) return sum) diff --git a/compiler/testData/cfg/tailCalls/sum.values b/compiler/testData/cfg/tailCalls/sum.values index 9c8e165b527..3af9727386a 100644 --- a/compiler/testData/cfg/tailCalls/sum.values +++ b/compiler/testData/cfg/tailCalls/sum.values @@ -4,19 +4,19 @@ tailRecursive fun sum(x: Long, sum: Long): Long { return sum(x - 1, sum + x) } --------------------- - : Long NEW: magic(x: Long) -> - : Long NEW: magic(sum: Long) -> -x : OR{{<: Any}, {<: Any}} NEW: r(x) -> -0 : {<: Number} NEW: r(0) -> -toLong() : {<: Any?} NEW: call(toLong(), toLong|) -> -0.toLong() : {<: Any?} COPY -x == 0.toLong() : Boolean NEW: call(x == 0.toLong(), equals|, ) -> -sum : Long NEW: r(sum) -> -x : Long NEW: r(x) -> -1 : Int NEW: r(1) -> -x - 1 : Long NEW: call(x - 1, minus|, ) -> -sum : Long NEW: r(sum) -> -x : Long NEW: r(x) -> -sum + x : Long NEW: call(sum + x, plus|, ) -> + : Long NEW: magic[FAKE_INITIALIZER](x: Long) -> + : Long NEW: magic[FAKE_INITIALIZER](sum: Long) -> +x : OR{{<: Any}, {<: Any}} NEW: r(x) -> +0 : {<: Number} NEW: r(0) -> +toLong() : {<: Any?} NEW: call(toLong(), toLong|) -> +0.toLong() : {<: Any?} COPY +x == 0.toLong() : Boolean NEW: call(x == 0.toLong(), equals|, ) -> +sum : Long NEW: r(sum) -> +x : Long NEW: r(x) -> +1 : Int NEW: r(1) -> +x - 1 : Long NEW: call(x - 1, minus|, ) -> +sum : Long NEW: r(sum) -> +x : Long NEW: r(x) -> +sum + x : Long NEW: call(sum + x, plus|, ) -> sum(x - 1, sum + x) : Long NEW: call(sum(x - 1, sum + x), sum|, ) -> -===================== \ No newline at end of file +===================== diff --git a/compiler/testData/cfg/tailCalls/try.instructions b/compiler/testData/cfg/tailCalls/try.instructions index 8f0be6471dd..5d1655718d4 100644 --- a/compiler/testData/cfg/tailCalls/try.instructions +++ b/compiler/testData/cfg/tailCalls/try.instructions @@ -19,7 +19,7 @@ L0: - 2 jmp(L3 [afterCatches]) NEXT:[] PREV:[] L2 [onException]: 3 v(e: Throwable) PREV:[jmp?(L2 [onException])] - magic(e: Throwable) -> + magic[FAKE_INITIALIZER](e: Throwable) -> w(e|) 4 mark({ }) read (Unit) diff --git a/compiler/testData/cfg/tailCalls/try.values b/compiler/testData/cfg/tailCalls/try.values index 7d0bbc7b982..3270934a9e1 100644 --- a/compiler/testData/cfg/tailCalls/try.values +++ b/compiler/testData/cfg/tailCalls/try.values @@ -7,6 +7,6 @@ tailRecursive fun foo() { } } --------------------- - : {<: Throwable} NEW: magic(e: Throwable) -> -foo() : Unit NEW: call(foo(), foo) -> -===================== \ No newline at end of file + : {<: Throwable} NEW: magic[FAKE_INITIALIZER](e: Throwable) -> +foo() : Unit NEW: call(foo(), foo) -> +===================== diff --git a/compiler/testData/cfg/tailCalls/tryCatchFinally.instructions b/compiler/testData/cfg/tailCalls/tryCatchFinally.instructions index ff5542db603..099a3458352 100644 --- a/compiler/testData/cfg/tailCalls/tryCatchFinally.instructions +++ b/compiler/testData/cfg/tailCalls/tryCatchFinally.instructions @@ -21,7 +21,7 @@ L0: 2 jmp(L4 [afterCatches]) NEXT:[jmp(L5 [skipFinallyToErrorBlock])] L2 [onException]: 3 v(any : Exception) PREV:[jmp?(L2 [onException])] - magic(any : Exception) -> + magic[FAKE_INITIALIZER](any : Exception) -> w(any|) 4 mark({ test() }) mark(test()) diff --git a/compiler/testData/cfg/tailCalls/tryCatchFinally.values b/compiler/testData/cfg/tailCalls/tryCatchFinally.values index f9cb6ab184a..d78d503a37a 100644 --- a/compiler/testData/cfg/tailCalls/tryCatchFinally.values +++ b/compiler/testData/cfg/tailCalls/tryCatchFinally.values @@ -9,13 +9,13 @@ fun test() : Unit { } } --------------------- - : {<: Exception} NEW: magic(any : Exception) -> -test() : * NEW: call(test(), test) -> -{ test() } : * COPY -test() : * NEW: call(test(), test) -> -{ test() } : * COPY -test() : * NEW: call(test(), test) -> -{ test() } : * COPY + : {<: Exception} NEW: magic[FAKE_INITIALIZER](any : Exception) -> +test() : * NEW: call(test(), test) -> +{ test() } : * COPY +test() : * NEW: call(test(), test) -> +{ test() } : * COPY +test() : * NEW: call(test(), test) -> +{ test() } : * COPY try { test() } catch (any : Exception) { test() } finally { test() } : * NEW: merge(try { test() } catch (any : Exception) { test() } finally { test() }|, ) -> -{ try { test() } catch (any : Exception) { test() } finally { test() } } : * COPY -===================== \ No newline at end of file +{ try { test() } catch (any : Exception) { test() } finally { test() } } : * COPY +=====================