Tabnine Logo
ILOAD
Code IndexAdd Tabnine to your IDE (free)

How to use
ILOAD
in
org.apache.bcel.generic

Best Java code snippets using org.apache.bcel.generic.ILOAD (Showing top 20 results out of 315)

origin: xalan/xalan

public Instruction LOAD(int slot) {
return new ILOAD(slot);
}
 
origin: xalan/xalan

!match[2].hasTargeters() &&
!match[3].hasTargeters() &&
iload1.getIndex() == iload2.getIndex() &&
iload2.getIndex() == istore.getIndex())
origin: xalan/xalan

public Instruction LOAD(int slot) {
return new ILOAD(slot);
}
 
origin: bcel/bcel

/** Checks if the constraints of operands of the said instruction(s) are satisfied. */
public void visitILOAD(ILOAD o){
  int idx = o.getIndex();
  if (idx < 0){
    constraintViolated(o, "Index '"+idx+"' must be non-negative.");
  }
  else{
    int maxminus1 =  max_locals()-1;
    if (idx > maxminus1){
      constraintViolated(o, "Index '"+idx+"' must not be greater than max_locals-1 '"+maxminus1+"'.");
    }
  }
}
origin: xalan/xalan

public Instruction LOAD(int slot) {
return new ILOAD(slot);
}
 
origin: org.apache.bcel/bcel

/** Checks if the constraints of operands of the said instruction(s) are satisfied. */
@Override
public void visitILOAD(final ILOAD o) {
  final int idx = o.getIndex();
  if (idx < 0) {
    constraintViolated(o, "Index '"+idx+"' must be non-negative.");
  }
  else{
    final int maxminus1 =  max_locals()-1;
    if (idx > maxminus1) {
      constraintViolated(o, "Index '"+idx+"' must not be greater than max_locals-1 '"+maxminus1+"'.");
    }
  }
}
origin: xalan/xalan

public MatchGenerator(int access_flags, Type return_type, 
     Type[] arg_types, String[] arg_names, 
     String method_name, String class_name,
     InstructionList il, ConstantPoolGen cp) {
super(access_flags, return_type, arg_types, arg_names, method_name, 
   class_name, il, cp);

_iloadCurrent = new ILOAD(CURRENT_INDEX);
_istoreCurrent = new ISTORE(CURRENT_INDEX);
}
origin: xalan/xalan

public TestGenerator(int access_flags, Type return_type,
     Type[] arg_types, String[] arg_names,
     String method_name, String class_name,
     InstructionList il, ConstantPoolGen cp) {
super(access_flags, return_type, arg_types, arg_names, method_name, 
   class_name, il, cp);

_iloadCurrent  = new ILOAD(CURRENT_NODE_INDEX);
_istoreCurrent = new ISTORE(CURRENT_NODE_INDEX);
_iloadContext  = new ILOAD(CONTEXT_NODE_INDEX);
_istoreContext  = new ILOAD(CONTEXT_NODE_INDEX);
_astoreIterator = new ASTORE(ITERATOR_INDEX);
_aloadIterator  = new ALOAD(ITERATOR_INDEX);
}
origin: xalan/xalan

/**
 * Helper method to generate an instance of a subclass of
 * {@link LoadInstruction} based on the specified {@link Type} that will
 * load the specified local variable
 * @param index the JVM stack frame index of the variable that is to be
 * loaded
 * @param type the {@link Type} of the variable
 * @return the generated {@link LoadInstruction}
 */
private static Instruction loadLocal(int index, Type type) {
  if (type == Type.BOOLEAN) {
    return new ILOAD(index);
  } else if (type == Type.INT) {
    return new ILOAD(index);
  } else if (type == Type.SHORT) {
    return new ILOAD(index);
  } else if (type == Type.LONG) {
    return new LLOAD(index);
  } else if (type == Type.BYTE) {
    return new ILOAD(index);
  } else if (type == Type.CHAR) {
    return new ILOAD(index);
  } else if (type == Type.FLOAT) {
    return new FLOAD(index);
  } else if (type == Type.DOUBLE) {
    return new DLOAD(index);
  } else {
    return new ALOAD(index);
  }
}
origin: xalan/xalan

public Instruction loadCurrentNode() {
if (_iloadCurrent == null) {
  int idx = getLocalIndex("current");
  if (idx > 0)
  _iloadCurrent = new ILOAD(idx);
  else
  _iloadCurrent = new ICONST(0);
}
return _iloadCurrent;
}
origin: xalan/xalan

public CompareGenerator(int access_flags, Type return_type,
      Type[] arg_types, String[] arg_names,
      String method_name, String class_name,
      InstructionList il, ConstantPoolGen cp) {
super(access_flags, return_type, arg_types, arg_names, method_name, 
   class_name, il, cp);

_iloadCurrent = new ILOAD(CURRENT_INDEX);
_istoreCurrent = new ISTORE(CURRENT_INDEX);
_aloadDom = new ALOAD(DOM_INDEX);
_iloadLast = new ILOAD(LAST_INDEX);
LocalVariableGen iterator =
  addLocalVariable("iterator",
       Util.getJCRefType(Constants.NODE_ITERATOR_SIG),
       null, null);
ITERATOR_INDEX = iterator.getIndex();
_aloadIterator = new ALOAD(ITERATOR_INDEX);
_astoreIterator = new ASTORE(ITERATOR_INDEX);
il.append(new ACONST_NULL());
il.append(storeIterator());
}
origin: xalan/xalan

public static void compileGetChildren(ClassGenerator classGen,
         MethodGenerator methodGen,
         int node) {
final ConstantPoolGen cpg = classGen.getConstantPool();
final InstructionList il = methodGen.getInstructionList();
final int git = cpg.addInterfaceMethodref(DOM_INTF,
           GET_CHILDREN,
           GET_CHILDREN_SIG);
il.append(methodGen.loadDOM());
il.append(new ILOAD(node));
il.append(new INVOKEINTERFACE(git, 2));
}
origin: xalan/xalan

          "(I)I");
il.append(methodGen.loadDOM());
il.append(new ILOAD(_currentIndex));
il.append(new INVOKEINTERFACE(getNS, 2));
il.append(new SWITCH(types, targets, defaultTarget));
origin: xalan/xalan

  public void translate(ClassGenerator classGen, MethodGenerator methodGen) {
  final InstructionList il = methodGen.getInstructionList();

  if (methodGen instanceof CompareGenerator) {
    il.append(((CompareGenerator)methodGen).loadCurrentNode());
  }
  else if (methodGen instanceof TestGenerator) {
    il.append(new ILOAD(POSITION_INDEX));
  }
  else {
    final ConstantPoolGen cpg = classGen.getConstantPool();
      final int index = cpg.addInterfaceMethodref(NODE_ITERATOR,
                            "getPosition",
                            "()I");

    il.append(methodGen.loadIterator());
      il.append(new INVOKEINTERFACE(index,1));
  }
  }
}
origin: xalan/xalan

  public void translate(ClassGenerator classGen, MethodGenerator methodGen) {
  final InstructionList il = methodGen.getInstructionList();

  if (methodGen instanceof CompareGenerator) {
    il.append(((CompareGenerator)methodGen).loadLastNode());
  }
  else if (methodGen instanceof TestGenerator) {
    il.append(new ILOAD(LAST_INDEX));
  }
  else {
    final ConstantPoolGen cpg = classGen.getConstantPool();
    final int getLast = cpg.addInterfaceMethodref(NODE_ITERATOR,
               "getLast", 
               "()I");
    il.append(methodGen.loadIterator());
    il.append(new INVOKEINTERFACE(getLast, 1));
  }
  }
}
origin: xalan/xalan

  /**
   * This method is called when the constructor is compiled in
   * Stylesheet.compileConstructor() and not as the syntax tree is traversed.
   */
  public void translate(ClassGenerator classGen,
       MethodGenerator methodGen) {
  final ConstantPoolGen cpg = classGen.getConstantPool();
  final InstructionList il = methodGen.getInstructionList();

  final int tst = cpg.addMethodref(BASIS_LIBRARY_CLASS,
           "testLanguage",
           "("+STRING_SIG+DOM_INTF_SIG+"I)Z");
  _lang.translate(classGen,methodGen);
  il.append(methodGen.loadDOM());
  if (classGen instanceof FilterGenerator)
    il.append(new ILOAD(1));
  else
    il.append(methodGen.loadContextNode());
  il.append(new INVOKESTATIC(tst));
  }
}
origin: xalan/xalan

/**
 * Compiles the default action for DOM text nodes and attribute nodes:
 * output the node's text value
 */
private InstructionList compileDefaultText(ClassGenerator classGen,
            MethodGenerator methodGen,
            InstructionHandle next) {
final ConstantPoolGen cpg = classGen.getConstantPool();
final InstructionList il = new InstructionList();
final int chars = cpg.addInterfaceMethodref(DOM_INTF,
            CHARACTERS,
            CHARACTERS_SIG);
il.append(methodGen.loadDOM());
il.append(new ILOAD(_currentIndex));
il.append(methodGen.loadHandler());
il.append(new INVOKEINTERFACE(chars, 3));
il.append(new GOTO_W(next));
return il;
}
origin: xalan/xalan

il.append(new ILOAD(extractMethod.getLocalIndex("level")));
origin: xalan/xalan

/**
 * Translates reference into object of internal type <code>type</code>.
 *
 * @see    org.apache.xalan.xsltc.compiler.util.Type#translateTo
 */
public void translateTo(ClassGenerator classGen, MethodGenerator methodGen,
      StringType type) {
final int current = methodGen.getLocalIndex("current");
ConstantPoolGen cpg = classGen.getConstantPool();
InstructionList il = methodGen.getInstructionList();
// If no current, conversion is a top-level
if (current < 0) {
  il.append(new PUSH(cpg, DTM.ROOT_NODE));  // push root node
}
else {
  il.append(new ILOAD(current));
}
il.append(methodGen.loadDOM());
final int stringF = cpg.addMethodref(BASIS_LIBRARY_CLASS,
           "stringF",
           "("
           + OBJECT_SIG
           + NODE_SIG
           + DOM_INTF_SIG
           + ")" + STRING_SIG);
il.append(new INVOKESTATIC(stringF));
}
origin: xalan/xalan

il.append(new ILOAD(paramCurrent));
il.append(new INVOKEINTERFACE(gns,2));
il.append(new PUSH(cpg, rule.getNamespace()));
il.append(new ILOAD(paramType));
il.append(new PUSH(cpg, elementType));
org.apache.bcel.genericILOAD

Javadoc

ILOAD - Load int from local variable onto stack
Stack: ... -> ..., result

Most used methods

  • <init>
    Load int from local variable
  • getIndex

Popular in Java

  • Making http post requests using okhttp
  • requestLocationUpdates (LocationManager)
  • getSupportFragmentManager (FragmentActivity)
  • putExtra (Intent)
  • Color (java.awt)
    The Color class is used to encapsulate colors in the default sRGB color space or colors in arbitrary
  • FlowLayout (java.awt)
    A flow layout arranges components in a left-to-right flow, much like lines of text in a paragraph. F
  • BigDecimal (java.math)
    An immutable arbitrary-precision signed decimal.A value is represented by an arbitrary-precision "un
  • ReentrantLock (java.util.concurrent.locks)
    A reentrant mutual exclusion Lock with the same basic behavior and semantics as the implicit monitor
  • Manifest (java.util.jar)
    The Manifest class is used to obtain attribute information for a JarFile and its entries.
  • JTextField (javax.swing)
  • Top Sublime Text 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