com.sun.org.apache.bcel.internal.generic.InstructionConstants Java Examples

The following examples show how to use com.sun.org.apache.bcel.internal.generic.InstructionConstants. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: FunctionCall.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
private void generateAddReads(ClassGenerator classGen, MethodGenerator methodGen,
                      String clazz) {
    final ConstantPoolGen cpg = classGen.getConstantPool();
    final InstructionList il = methodGen.getInstructionList();

    // Generate call to Module.addReads:
    //   <TransletClass>.class.getModule().addReads(
    //        Class.forName(<clazz>).getModule());
    // Class.forName may throw ClassNotFoundException.
    // This is OK as it will caught higher up the stack in
    // TransformerImpl.transform() and wrapped into a
    // TransformerException.
    methodGen.markChunkStart();

    int index = cpg.addMethodref(CLASS_CLASS,
                                 GET_MODULE,
                                 GET_MODULE_SIG);
    int index2 = cpg.addMethodref(CLASS_CLASS,
                                  FOR_NAME,
                                  FOR_NAME_SIG);
    il.append(new LDC(cpg.addString(classGen.getClassName())));
    il.append(new INVOKESTATIC(index2));
    il.append(new INVOKEVIRTUAL(index));
    il.append(new LDC(cpg.addString(clazz)));
    il.append(new INVOKESTATIC(index2));
    il.append(new INVOKEVIRTUAL(index));
    index = cpg.addMethodref(MODULE_CLASS,
                             ADD_READS,
                             ADD_READS_SIG);
    il.append(new INVOKEVIRTUAL(index));
    il.append(InstructionConstants.POP);

    methodGen.markChunkEnd();
}
 
Example #2
Source File: IntType.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
public Instruction MUL() {
    return InstructionConstants.IMUL;
}
 
Example #3
Source File: IntType.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 4 votes vote down vote up
public Instruction REM() {
    return InstructionConstants.IREM;
}
 
Example #4
Source File: IntType.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
public Instruction NEG() {
    return InstructionConstants.INEG;
}
 
Example #5
Source File: IntType.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
public Instruction ADD() {
    return InstructionConstants.IADD;
}
 
Example #6
Source File: RealType.java    From openjdk-8-source with GNU General Public License v2.0 4 votes vote down vote up
public Instruction ADD() {
    return InstructionConstants.DADD;
}
 
Example #7
Source File: RealType.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 4 votes vote down vote up
public Instruction MUL() {
    return InstructionConstants.DMUL;
}
 
Example #8
Source File: RealType.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 4 votes vote down vote up
public Instruction SUB() {
    return InstructionConstants.DSUB;
}
 
Example #9
Source File: RealType.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 4 votes vote down vote up
public Instruction ADD() {
    return InstructionConstants.DADD;
}
 
Example #10
Source File: IntType.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 4 votes vote down vote up
public Instruction NEG() {
    return InstructionConstants.INEG;
}
 
Example #11
Source File: RealType.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 4 votes vote down vote up
public Instruction DIV() {
    return InstructionConstants.DDIV;
}
 
Example #12
Source File: RealType.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
public Instruction SUB() {
    return InstructionConstants.DSUB;
}
 
Example #13
Source File: RealType.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
public Instruction ADD() {
    return InstructionConstants.DADD;
}
 
Example #14
Source File: IntType.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
public Instruction NEG() {
    return InstructionConstants.INEG;
}
 
Example #15
Source File: IntType.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
public Instruction REM() {
    return InstructionConstants.IREM;
}
 
Example #16
Source File: IntType.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
public Instruction DIV() {
    return InstructionConstants.IDIV;
}
 
Example #17
Source File: IntType.java    From hottub with GNU General Public License v2.0 4 votes vote down vote up
public Instruction ADD() {
    return InstructionConstants.IADD;
}
 
Example #18
Source File: IntType.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
public Instruction SUB() {
    return InstructionConstants.ISUB;
}
 
Example #19
Source File: IntType.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
public Instruction ADD() {
    return InstructionConstants.IADD;
}
 
Example #20
Source File: RealType.java    From openjdk-8-source with GNU General Public License v2.0 4 votes vote down vote up
public Instruction REM() {
    return InstructionConstants.DREM;
}
 
Example #21
Source File: IntType.java    From openjdk-8-source with GNU General Public License v2.0 4 votes vote down vote up
public Instruction SUB() {
    return InstructionConstants.ISUB;
}
 
Example #22
Source File: RealType.java    From JDKSourceCode1.8 with MIT License 4 votes vote down vote up
public Instruction REM() {
    return InstructionConstants.DREM;
}
 
Example #23
Source File: RealType.java    From JDKSourceCode1.8 with MIT License 4 votes vote down vote up
public Instruction DIV() {
    return InstructionConstants.DDIV;
}
 
Example #24
Source File: IntType.java    From openjdk-8 with GNU General Public License v2.0 4 votes vote down vote up
public Instruction DIV() {
    return InstructionConstants.IDIV;
}
 
Example #25
Source File: RealType.java    From JDKSourceCode1.8 with MIT License 4 votes vote down vote up
public Instruction SUB() {
    return InstructionConstants.DSUB;
}
 
Example #26
Source File: IntType.java    From openjdk-8 with GNU General Public License v2.0 4 votes vote down vote up
public Instruction REM() {
    return InstructionConstants.IREM;
}
 
Example #27
Source File: RealType.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
public Instruction ADD() {
    return InstructionConstants.DADD;
}
 
Example #28
Source File: IntType.java    From JDKSourceCode1.8 with MIT License 4 votes vote down vote up
public Instruction REM() {
    return InstructionConstants.IREM;
}
 
Example #29
Source File: IntType.java    From JDKSourceCode1.8 with MIT License 4 votes vote down vote up
public Instruction DIV() {
    return InstructionConstants.IDIV;
}
 
Example #30
Source File: RealType.java    From hottub with GNU General Public License v2.0 4 votes vote down vote up
public Instruction MUL() {
    return InstructionConstants.DMUL;
}