Traverses memory, to make any local label a unique
    global one. At this point there's only a single code
    block
979376
def cleanup_local_labels(block):
    
    global PROC_COUNTER

    stack = [[]]
    hashes = [{}]
    stackprc = [PROC_COUNTER]
    used = [{}]  # List of hashes of unresolved labels per scope

    MEMORY = block.mem

    for cell in MEMORY:
        if cell.inst.upper() == 'PROC':
            stack += [[]]
            hashes += [{}]
            stackprc += [PROC_COUNTER]
            used += [{}]
            PROC_COUNTER += 1
            continue

        if cell.inst.upper() == 'ENDP':
            if len(stack) > 1:  # There might be unbalanced stack due to syntax errors
                for label in used[-1].keys():
                    if label in stack[-1]:
                        newlabel = hashes[-1][label]
                        for cell in used[-1][label]:
                            cell.replace_label(label, newlabel)

                stack.pop()
                hashes.pop()
                stackprc.pop()
                used.pop()
            continue

        tmp = cell.asm.strip()
        if tmp.upper()[:5] == 'LOCAL':
            tmp = tmp[5:].split(',')
            for lbl in tmp:
                lbl = lbl.strip()
                if lbl in stack[-1]:
                    continue
                stack[-1] += [lbl]
                hashes[-1][lbl] = 'PROC%i.' % stackprc[-1] + lbl
                if used[-1].get(lbl, None) is None:
                    used[-1][lbl] = []

            cell.asm = ';' + cell.asm  # Remove it
            continue

        if cell.is_label:
            label = cell.inst
            for i in range(len(stack) - 1, -1, -1):
                if label in stack[i]:
                    label = hashes[i][label]
                    cell.asm = label + ':'
                    break
            continue

        for label in cell.used_labels:
            labelUsed = False
            for i in range(len(stack) - 1, -1, -1):
                if label in stack[i]:
                    newlabel = hashes[i][label]
                    cell.replace_label(label, newlabel)
                    labelUsed = True
                    break

            if not labelUsed:
                if used[-1].get(label, None) is None:
                    used[-1][label] = []

                used[-1][label] += [cell]

    for i in range(len(MEMORY) - 1, -1, -1):
        if MEMORY[i].asm[0] == ';':
            MEMORY.pop(i)

    block.mem = MEMORY
    block.asm = [x.asm for x in MEMORY if len(x.asm.strip())]
814871
private void ensureIndex(DS session, L label, PrimitivePropertyMethodMetadata<PropertyMetadata> propertyMethodMetadata, boolean unique) {
        PropertyMetadata propertyMetadata = propertyMethodMetadata.getDatastoreMetadata();
        String statement;
        if (unique) {
            LOGGER.debug("Creating constraint for label {} on property '{}'.", label, propertyMetadata.getName());
            statement = String.format("CREATE CONSTRAINT ON (n:%s) ASSERT n.%s IS UNIQUE", label.getName(), propertyMetadata.getName());
        } else {
            LOGGER.debug("Creating index for label {} on property '{}'.", label, propertyMetadata.getName());
            statement = String.format("CREATE INDEX ON :%s(%s)", label.getName(), propertyMetadata.getName());
        }
        try (ResultIterator iterator = session.createQuery(Cypher.class).execute(statement, Collections.emptyMap())) {
        }
    }
623577
def resolve(label):
    '''
    

    '''
    term_id = label
    if label is not None and label in LOCALTT:
        term_id = LOCALTT[label]
        if term_id in GLOBALTT:
            term_id = GLOBALTT[term_id]
        else:
            LOG.warning(
                'Local translation but do not have a global term_id for %s', label)
    elif label is not None and label in GLOBALTT:
        term_id = GLOBALTT[label]
    else:
        LOG.error('Do not have any mapping for label: ' + label)
    return term_id
1176719
private void makeLocalNamesUnique(Node fnNode, boolean isCallInLoop) {
    Supplier<String> idSupplier = compiler.getUniqueNameIdSupplier();
    // Make variable names unique to this instance.
    NodeTraversal.traverseScopeRoots(
        compiler,
        null,
        ImmutableList.of(fnNode),
        new MakeDeclaredNamesUnique(
            new InlineRenamer(
                compiler.getCodingConvention(), idSupplier, "inline_", isCallInLoop, true, null),
            false),
        true);
    // Make label names unique to this instance.
    new RenameLabels(compiler, new LabelNameSupplier(idSupplier), false, false)
        .process(null, fnNode);
  }
374119
private void cleanGlobalBlockList() {
    for (Iterator<Block> globalBlockListIterator=globalBlockList.keySet().iterator();
    globalBlockListIterator.hasNext();) {
      Block block = globalBlockListIterator.next();
      if(!movedBlocks.contains(block)) {
        globalBlockListIterator.remove();
      }
    }
  }
316257
function Stack(global1, local, scope, stack) {
            this.global = global1 != null ? global1 : global;
            this.local = local != null ? local : {};
            this.scope = scope != null ? scope : [];
            this.stack = stack != null ? stack : [];
        }
601248
def _find_global(self, module, func):
        """"""
        if module == __name__:
            if func == '_unpickle_call_error' or func == 'CallError':
                return _unpickle_call_error
            elif func == '_unpickle_sender':
                return self._unpickle_sender
            elif func == '_unpickle_context':
                return self._unpickle_context
            elif func == 'Blob':
                return Blob
            elif func == 'Secret':
                return Secret
            elif func == 'Kwargs':
                return Kwargs
        elif module == '_codecs' and func == 'encode':
            return self._unpickle_bytes
        elif module == '__builtin__' and func == 'bytes':
            return BytesType
        raise StreamError('cannot unpickle %r/%r', module, func)
1118025
function(label) {
			var forkContext = this.forkContext;

			if (!forkContext.reachable) {
				return;
			}

			var context = getContinueContext(this, label);

			/* istanbul ignore else: foolproof (syntax error) */
			if (context) {
				if (context.continueDestSegments) {
					makeLooped(this, forkContext.head, context.continueDestSegments);

					// If the context is a for-in/of loop, this effects a break also.
					if (context.type === "ForInStatement" ||
						context.type === "ForOfStatement"
					) {
						context.brokenForkContext.add(forkContext.head);
					}
				} else {
					context.continueForkContext.add(forkContext.head);
				}
			}
			forkContext.replaceHead(forkContext.makeUnreachable(-1, -1));
		}
437709
def get_labels(MEMORY, basic_block):
    
    for cell in MEMORY:
        if cell.is_label:
            label = cell.inst
            LABELS[label] = LabelInfo(label, cell.addr, basic_block)
217160
def get_global_namespace(decls):
    
    found = [
        decl for decl in scopedef.make_flatten(decls) if decl.name == '::' and
        isinstance(decl, namespace_t)]
    if len(found) == 1:
        return found[0]
    raise RuntimeError("Unable to find global namespace.")
1011554
def train_global(self, label_vector_description=None, N=None, limits=None,
        pivot=True, **kwargs):
        

        lv = self._cannon_label_vector if label_vector_description is None else\
            self._interpret_label_vector(label_vector_description)
        lv_array, grid_indices, offsets = _build_label_vector_array(
            self.grid_points, lv, N, limits, pivot=pivot)
        return self._train(lv_array, grid_indices, offsets, lv, **kwargs)
595533
def make_global_and_nonlocal_decls(code_instrs):
    
    globals_ = sorted(set(
        i.arg for i in code_instrs if isinstance(i, instrs.STORE_GLOBAL)
    ))
    nonlocals = sorted(set(
        i.arg for i in code_instrs
        if isinstance(i, instrs.STORE_DEREF) and i.vartype == 'free'
    ))

    out = []
    if globals_:
        out.append(ast.Global(names=globals_))
    if nonlocals:
        out.append(ast.Nonlocal(names=nonlocals))
    return out
1189911
public void mark(Label label) {
        adopt(label);
        if (label.marked) {
            throw new IllegalStateException("already marked");
        }
        label.marked = true;
        if (currentLabel != null) {
            jump(label); // blocks must end with a branch, return or throw
        }
        currentLabel = label;
    }
983832
public static String formatAllLabels(Node node, Map<String, Set<String>> uniqueConstraints, Set<String> indexNames) {
        StringBuilder result = new StringBuilder(100);
        boolean uniqueLabelFound = false;
        List<String> list = getLabelsSorted(node);

        for (String labelName : list) {
            uniqueLabelFound = isUniqueLabelFound(node, uniqueConstraints, labelName);
            if (indexNames != null && indexNames.contains(labelName))
                result.insert(0, label(labelName));
            else
                result.append(label(labelName));
        }
        if (!uniqueLabelFound) {
            result.append(label(UNIQUE_ID_LABEL));
        }
        return result.toString();
    }
1219991
def GLOBAL(self, node):
        """"""
        if isinstance(self.scope, FunctionScope):
            self.scope.globals.update(node.names)
387698
private static void checkNonDebugLabel(final Label label) {
        Field f = getLabelStatusField();
        int status = 0;
        try {
            status = f == null ? 0 : ((Integer) f.get(label)).intValue();
        } catch (IllegalAccessException e) {
            throw new Error("Internal error");
        }
        if ((status & 0x01) != 0) {
            throw new IllegalArgumentException(
                    "Labels used for debug info cannot be reused for control flow");
        }
    }
752144
@Override
    public void visitCode(Code obj) {
        stack.resetForMethodEntry(this);
        localLabels.clear();
        super.visitCode(obj);
        for (SourceLineAnnotation sla : localLabels.values()) {
            BugInstance bug = new BugInstance(this, BugType.S508C_NO_SETLABELFOR.name(), NORMAL_PRIORITY).addClass(this).addMethod(this);

            if (sla != null) {
                bug.addSourceLine(sla);
            }

            bugReporter.reportBug(bug);
        }
    }