Set<String> (@NotNull List<Instruction> instructions, @NotNull ScopeOwner owner) { final Scope scope = ControlFlowCache.getScope(owner); final Set<String> nonlocalWrites = new LinkedHashSet<>(); for (Instruction instruction : getWriteInstructions(instructions)) { if (instruction instanceof ReadWriteInstruction) { final String name = ((ReadWriteInstruction)instruction).getName(); if (scope.isNonlocal(name)) { nonlocalWrites.add(name); } } } return nonlocalWrites; }