rename: in -> incoming, out -> outgoing

This commit is contained in:
Svetlana Isakova
2014-03-05 19:11:20 +04:00
parent 0a4abd2ebd
commit 5d77ae075c
3 changed files with 8 additions and 8 deletions
@@ -502,7 +502,7 @@ public class JetFlowInformationProvider {
Set<VariableDescriptor> declaredVariables = getPseudocodeVariablesData().getDeclaredVariables(pseudocode, false); Set<VariableDescriptor> declaredVariables = getPseudocodeVariablesData().getDeclaredVariables(pseudocode, false);
for (VariableDescriptor variable : declaredVariables) { for (VariableDescriptor variable : declaredVariables) {
if (variable instanceof PropertyDescriptor) { if (variable instanceof PropertyDescriptor) {
PseudocodeVariablesData.VariableInitState variableInitState = initializers.getIn().get(variable); PseudocodeVariablesData.VariableInitState variableInitState = initializers.getIncoming().get(variable);
if (variableInitState == null) return; if (variableInitState == null) return;
trace.record(BindingContext.IS_INITIALIZED, (PropertyDescriptor) variable, variableInitState.isInitialized); trace.record(BindingContext.IS_INITIALIZED, (PropertyDescriptor) variable, variableInitState.isInitialized);
} }
@@ -69,7 +69,7 @@ fun <D> Pseudocode.traverse(
} }
val edges = edgesMap.get(instruction) val edges = edgesMap.get(instruction)
if (edges != null) { if (edges != null) {
analyzeInstruction(instruction, edges.`in`, edges.out) analyzeInstruction(instruction, edges.incoming, edges.outgoing)
} }
} }
} }
@@ -163,8 +163,8 @@ private fun <D> Pseudocode.collectDataFromSubgraph(
if (newValue == null) if (newValue == null)
null null
else else
Edges(updateEdge(lastInstruction, instruction, newValue.`in`), Edges(updateEdge(lastInstruction, instruction, newValue.incoming),
updateEdge(lastInstruction, instruction, newValue.out)) updateEdge(lastInstruction, instruction, newValue.outgoing))
updateEdgeDataForInstruction(previousValue, updatedValue) updateEdgeDataForInstruction(previousValue, updatedValue)
continue continue
} }
@@ -177,7 +177,7 @@ private fun <D> Pseudocode.collectDataFromSubgraph(
val previousData = edgesMap.get(previousInstruction) val previousData = edgesMap.get(previousInstruction)
if (previousData != null) { if (previousData != null) {
incomingEdgesData.add(updateEdge( incomingEdgesData.add(updateEdge(
previousInstruction, instruction, previousData.out)) previousInstruction, instruction, previousData.outgoing))
} }
} }
val mergedData = mergeEdges(instruction, incomingEdgesData) val mergedData = mergeEdges(instruction, incomingEdgesData)
@@ -185,7 +185,7 @@ private fun <D> Pseudocode.collectDataFromSubgraph(
} }
} }
data class Edges<T>(val `in`: T, val out: T) data class Edges<T>(val incoming: T, val outgoing: T)
// returns false when interrupted by handler // returns false when interrupted by handler
@@ -93,8 +93,8 @@ public abstract class AbstractDataFlowTest extends AbstractPseudocodeTest {
@NotNull @NotNull
private <D> String dumpEdgesData(String prefix, @NotNull Edges<Map<VariableDescriptor, D>> edges) { private <D> String dumpEdgesData(String prefix, @NotNull Edges<Map<VariableDescriptor, D>> edges) {
return prefix + return prefix +
" in: " + renderVariableMap(edges.getIn()) + " in: " + renderVariableMap(edges.getIncoming()) +
" out: " + renderVariableMap(edges.getOut()); " out: " + renderVariableMap(edges.getOutgoing());
} }
private <D> String renderVariableMap(Map<VariableDescriptor, D> map) { private <D> String renderVariableMap(Map<VariableDescriptor, D> map) {