Pop a pair of nodes from the tail of the stack.
Special purpose method for TransformerImpl, pushElemTemplateElement.
Performance critical.
348436
public final void popPair()
  {

    m_firstFree -= 2;
    m_map[m_firstFree] = DTM.NULL;
    m_map[m_firstFree + 1] = DTM.NULL;
  }
448798
function pushSingle(arr, element) {
    var index = arr.sortedIndex(element),
        _ = arr._sortedArray;

    // original push and unshift are faster than splice
    if (index === 0) {
        _.unshift.call(arr, element);
    } else if (index === arr.length) {
        _.push.call(arr, element);
    } else {
        _.splice.call(arr, index, 0, element);
    }
}
526312
def pop(self):
        
        if self.next is None:
            raise SimEmptyCallStackError("Cannot pop a frame from an empty call stack.")
        new_list = self.next.copy({})

        if self.state is not None:
            self.state.register_plugin('callstack', new_list)
            self.state.history.recent_stack_actions.append(CallStackAction(
                hash(new_list), len(new_list), 'pop', ret_site_addr=self.ret_addr
            ))

        return new_list
18443
private void popLastItem() {
        KeyValue<K,V> lastKV = items.last();
        items.remove(lastKV);
        index.remove(lastKV.key);
    }
61766
private void pushState(Node<K,V>[] t, int i, int n) {
            TableStack<K,V> s = spare;  // reuse if possible
            if (s != null)
                spare = s.next;
            else
                s = new TableStack<K,V>();
            s.tab = t;
            s.length = n;
            s.index = i;
            s.next = stack;
            stack = s;
        }
252545
public T pop() {
		final int max = stack.size() - 1;
		if (max < 0) {
			throw new NoSuchElementException();
		}
		return stack.remove(max);
	}
4216
def pop(self, key, default=UNSET):
        
        self._find_lt(key)
        node = self._path[0][2]
        if node is self._tail or key < node[0]:
            if default is self.UNSET:
                raise KeyError('key {!r} not in list')
            return default
        self._remove(node)
        return node[1]
332382
def pop_frame(self):
        
        self.frames.pop(0)
        if len(self.frames) == 0:
            raise Exception("stack is exhausted")
        return self.frames[0]
1004930
public void push(E d) {
        StackNode<E> oldTop, newTop;

        newTop = new StackNode<E>(d);

        while (true) {
            oldTop = top.get();
            newTop.next = oldTop;
            if (oldTop != null)
                newTop.index = oldTop.index + 1;
            else
                newTop.index = 0;
            if (top.compareAndSet(oldTop, newTop))
                return;
        }
    }
1166163
@Override
    public N pop() {
        try {
            return stack[(--stackTop)&mask];
        } finally {
            // remove the reference to the element in the
            // stack to prevent hanging references from living forever
            stack[(stackTop&mask)] = null;
        }
    }
961873
private void popScope(boolean quietly) {
    if (!quietly && scopeCallback != null) {
      scopeCallback.exitScope(this);
    }
    Node scopeRoot;
    int roots = scopeRoots.size();
    if (roots > 0) {
      scopeRoot = scopeRoots.remove(roots - 1);
    } else {
      scopeRoot = scopes.pop().getRootNode();
    }
    if (NodeUtil.isValidCfgRoot(scopeRoot)) {
      cfgs.pop();
    }
  }
184909
def pop(self: BoardT) -> Move:
        
        move = self.move_stack.pop()
        self._stack.pop().restore(self)
        return move
544762
def pop_callback(obj):
    """"""
    callbacks = obj._callbacks
    if not callbacks:
        return
    if isinstance(callbacks, Node):
        node = callbacks
        obj._callbacks = None
    else:
        node = callbacks.first
        callbacks.remove(node)
        if not callbacks:
            obj._callbacks = None
    return node.data, node.extra
168481
def remove(self):
        
        if not self._is_item:
            raise TypeError("Should be called on an item, not ListNode's itself.")
        self.container.node_stack.remove(self)
565425
def _pop_indent_stack(self, node, node_type=None, action=None):
        """"""
        indent = self._get_indent(node)
        indent_stack = copy.deepcopy(self._indent_stack)
        # Find enclosing scope
        while (len(indent_stack) > 1) and (
            (
                (indent <= indent_stack[-1]["level"])
                and (indent_stack[-1]["type"] != "module")
            )
            or (indent_stack[-1]["type"] == "prop")
        ):
            self._close_callable(node)
            indent_stack.pop()
        # Construct new callable name
        name = (
            (
                node.targets[0].id
                if hasattr(node.targets[0], "id")
                else node.targets[0].value.id
            )
            if node_type == "prop"
            else node.name
        )
        element_full_name = ".".join(
            [self._module]
            + [
                indent_dict["prefix"]
                for indent_dict in indent_stack
                if indent_dict["type"] != "module"
            ]
            + [name]
        ) + ("({0})".format(action) if action else "")
        # Add new callable entry to indentation stack
        self._indent_stack = indent_stack
        self._indent_stack.append(
            {
                "level": indent,
                "prefix": name,
                "type": node_type,
                "full_name": element_full_name,
                "lineno": node.lineno,
            }
        )
        return element_full_name
939970
def pop(self, index=-1) -> Union[int, Expression]:
        

        try:
            return super(MachineStack, self).pop(index)
        except IndexError:
            raise StackUnderflowException("Trying to pop from an empty stack")
1300560
def stack_pop(self, key):
        
        task = Task.current_task()
        try:
            context = task._context_stack
        except AttributeError:
            raise KeyError('pop from empty stack') from None
        value = context[key]
        stack_value = value.pop()
        if not value:
            context.pop(key)
        return stack_value