congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
Label
Code IndexAdd Tabnine to your IDE (free)

How to use
Label
in
clojure.asm

Best Java code snippets using clojure.asm.Label (Showing top 17 results out of 315)

origin: org.dunaj/clojure

/**
 * Creates a new {@link Label}.
 *
 * @return a new {@link Label}.
 */
public Label newLabel() {
  return new Label();
}
origin: org.dunaj/clojure

  if (!l.inSameSubroutine(JSR)) {
    Edge e = new Edge();
    e.info = l.inputStackTop;
if (l.inSubroutine(id)) {
  continue;
l.addToSubroutine(id, nbSubroutines);
origin: org.dunaj/clojure

/**
 * Ends the current basic block. This method must be used in the case where
 * the current basic block does not have any successor.
 */
private void noSuccessor() {
  if (compute == FRAMES) {
    Label l = new Label();
    l.frame = new Frame();
    l.frame.owner = l;
    l.resolve(this, code.length, code.data);
    previousBlock.successor = l;
    previousBlock = l;
  } else {
    currentBlock.outputStackMax = maxStackSize;
  }
  currentBlock = null;
}
origin: org.dunaj/clojure

    currentBlock.frame.execute(opcode, 0, null, null);
    label.getFirst().status |= Label.TARGET;
      nextInsn = new Label();
      addSuccessor(stackSize + 1, label);
      nextInsn = new Label();
    code.putByte(200); // GOTO_W
  label.put(this, code, code.length - 1, true);
} else {
  label.put(this, code, code.length - 1, false);
origin: org.dunaj/clojure

Label l = handler.start.getFirst();
Label h = handler.handler.getFirst();
Label e = handler.end.getFirst();
  Label n = e.successor.getFirst();
  boolean change = f.merge(cw, n.frame, e.info);
  if (change && n.next == null) {
labels.visitSubroutine(null, 1, subroutines);
      subroutine.visitSubroutine(null, (id / 32L) << 32
          | (1L << (id % 32)), subroutines);
    subroutine.visitSubroutine(l, 0, subroutines);
origin: org.dunaj/clojure

@Override
public void visitLookupSwitchInsn(final Label dflt, final int[] keys,
    final Label[] labels) {
  // adds the instruction to the bytecode of the method
  int source = code.length;
  code.putByte(Opcodes.LOOKUPSWITCH);
  code.putByteArray(null, 0, (4 - code.length % 4) % 4);
  dflt.put(this, code, source, true);
  code.putInt(labels.length);
  for (int i = 0; i < labels.length; ++i) {
    code.putInt(keys[i]);
    labels[i].put(this, code, source, true);
  }
  // updates currentBlock
  visitSwitchInsn(dflt, labels);
}
origin: org.dunaj/clojure

if ((status & RESOLVED) == 0) {
  if (wideOffset) {
    addReference(-1 - source, out.length);
    out.putInt(-1);
  } else {
    addReference(source, out.length);
    out.putShort(-1);
origin: org.dunaj/clojure

private void visitSwitchInsn(final Label dflt, final Label[] labels) {
  // Label currentBlock = this.currentBlock;
  if (currentBlock != null) {
    if (compute == FRAMES) {
      currentBlock.frame.execute(Opcodes.LOOKUPSWITCH, 0, null, null);
      // adds current block successors
      addSuccessor(Edge.NORMAL, dflt);
      dflt.getFirst().status |= Label.TARGET;
      for (int i = 0; i < labels.length; ++i) {
        addSuccessor(Edge.NORMAL, labels[i]);
        labels[i].getFirst().status |= Label.TARGET;
      }
    } else {
      // updates current stack size (max stack size unchanged)
      --stackSize;
      // adds current block successors
      addSuccessor(stackSize, dflt);
      for (int i = 0; i < labels.length; ++i) {
        addSuccessor(stackSize, labels[i]);
      }
    }
    // ends current block
    noSuccessor();
  }
}
origin: org.dunaj/clojure

@Override
public void visitLabel(final Label label) {
  resize |= label.resolve(this, code.length, code.data);
origin: org.dunaj/clojure

@Override
public void visitTableSwitchInsn(final int min, final int max,
    final Label dflt, final Label... labels) {
  // adds the instruction to the bytecode of the method
  int source = code.length;
  code.putByte(Opcodes.TABLESWITCH);
  code.putByteArray(null, 0, (4 - code.length % 4) % 4);
  dflt.put(this, code, source, true);
  code.putInt(min).putInt(max);
  for (int i = 0; i < labels.length; ++i) {
    labels[i].put(this, code, source, true);
  }
  // updates currentBlock
  visitSwitchInsn(dflt, labels);
}
origin: org.dunaj/clojure

/**
 * Returns the label corresponding to the given offset. The default
 * implementation of this method creates a label for the given offset if it
 * has not been already created.
 *
 * @param offset
 *            a bytecode offset in a method.
 * @param labels
 *            the already created labels, indexed by their offset. If a
 *            label already exists for offset this method must not create a
 *            new one. Otherwise it must store the new label in this array.
 * @return a non null Label, which must be equal to labels[offset].
 */
protected Label readLabel(int offset, Label[] labels) {
  if (labels[offset] == null) {
    labels[offset] = new Label();
  }
  return labels[offset];
}
origin: videlalvaro/clochure

addSuccessor(stackSize + 1, label);
nextInsn = new Label();
origin: org.dunaj/clojure

/**
 * Marks the current code position with a new label.
 *
 * @return the label that was created to mark the current code position.
 */
public Label mark() {
  Label label = new Label();
  mv.visitLabel(label);
  return label;
}
origin: org.dunaj/clojure

@Override
public void visitTypeInsn(final int opcode, final String type) {
  if (opcode == Opcodes.NEW) {
    if (labels == null) {
      Label l = new Label();
      labels = new ArrayList<Label>(3);
      labels.add(l);
      if (mv != null) {
        mv.visitLabel(l);
      }
    }
    for (int i = 0; i < labels.size(); ++i) {
      uninitializedTypes.put(labels.get(i), type);
    }
  }
  if (mv != null) {
    mv.visitTypeInsn(opcode, type);
  }
  execute(opcode, 0, type);
}
origin: org.dunaj/clojure

currentLocals = size;
labels = new Label();
labels.status |= Label.PUSHED;
visitLabel(labels);
origin: org.dunaj/clojure

visitLabel(new Label());
origin: videlalvaro/clochure

      labels[label] = new Label();
      labels[label] = new Label();
      labels[label] = new Label();
        labels[label] = new Label();
      labels[label] = new Label();
        labels[label] = new Label();
  labels[label] = start = new Label();
  labels[label] = end = new Label();
  labels[label] = handler = new Label();
        labels[label] = new Label(true);
        labels[label] = new Label(true);
        labels[label] = new Label(true);
      labels[frameOffset] = new Label();
labels[offset] = new Label();
clojure.asmLabel

Javadoc

A label represents a position in the bytecode of a method. Labels are used for jump, goto, and switch instructions, and for try catch blocks.

Most used methods

  • <init>
    Constructs a new label.
  • addReference
    Adds a forward reference to this label. This method must be called only for a true forward reference
  • addToSubroutine
    Marks this basic block as belonging to the given subroutine.
  • getFirst
    Returns the first label of the series to which this label belongs. For an isolated label or for the
  • inSameSubroutine
    Returns true if this basic block and the given one belong to a common subroutine.
  • inSubroutine
    Returns true is this basic block belongs to the given subroutine.
  • put
    Puts a reference to this label in the bytecode of a method. If the position of the label is known, t
  • resolve
    Resolves all forward references to this label. This method must be called when this label is added t
  • visitSubroutine
    Finds the basic blocks that belong to a given subroutine, and marks these blocks as belonging to thi

Popular in Java

  • Creating JSON documents from java classes using gson
  • getSharedPreferences (Context)
  • setRequestProperty (URLConnection)
  • startActivity (Activity)
  • OutputStream (java.io)
    A writable sink for bytes.Most clients will use output streams that write data to the file system (
  • ByteBuffer (java.nio)
    A buffer for bytes. A byte buffer can be created in either one of the following ways: * #allocate
  • Date (java.util)
    A specific moment in time, with millisecond precision. Values typically come from System#currentTime
  • TimeUnit (java.util.concurrent)
    A TimeUnit represents time durations at a given unit of granularity and provides utility methods to
  • JFrame (javax.swing)
  • SAXParseException (org.xml.sax)
    Encapsulate an XML parse error or warning.> This module, both source code and documentation, is in t
  • Top Vim plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now