Java Code Examples for com.sun.org.apache.bcel.internal.Constants#T_ADDRESS
The following examples show how to use
com.sun.org.apache.bcel.internal.Constants#T_ADDRESS .
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: MethodGen.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
/** * Adds a local variable type to this method. * * @param name variable name * @param type variable type * @param slot the index of the local variable, if type is long or double, the next available * index is slot+2 * @param start from where the variable is valid * @param end until where the variable is valid * @return new local variable object * @see LocalVariable */ private LocalVariableGen addLocalVariableType(String name, Type type, int slot, InstructionHandle start, InstructionHandle end) { byte t = type.getType(); if(t != Constants.T_ADDRESS) { int add = type.getSize(); if(slot + add > max_locals) max_locals = slot + add; LocalVariableGen l = new LocalVariableGen(slot, name, type, start, end); int i; if((i = type_vec.indexOf(l)) >= 0) // Overwrite if necessary type_vec.set(i, l); else type_vec.add(l); return l; } else { throw new IllegalArgumentException("Can not use " + type + " as type for local variable"); } }
Example 2
Source File: MethodGen.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
/** * Adds a local variable to this method. * * @param name variable name * @param type variable type * @param slot the index of the local variable, if type is long or double, the next available * index is slot+2 * @param start from where the variable is valid * @param end until where the variable is valid * @return new local variable object * @see LocalVariable */ public LocalVariableGen addLocalVariable(String name, Type type, int slot, InstructionHandle start, InstructionHandle end) { byte t = type.getType(); if(t != Constants.T_ADDRESS) { int add = type.getSize(); if(slot + add > max_locals) max_locals = slot + add; LocalVariableGen l = new LocalVariableGen(slot, name, type, start, end); int i; if((i = variable_vec.indexOf(l)) >= 0) // Overwrite if necessary variable_vec.set(i, l); else variable_vec.add(l); return l; } else { throw new IllegalArgumentException("Can not use " + type + " as type for local variable"); } }
Example 3
Source File: MethodGen.java From hottub with GNU General Public License v2.0 | 5 votes |
/** * Adds a local variable type to this method. * * @param name variable name * @param type variable type * @param slot the index of the local variable, if type is long or double, the next available * index is slot+2 * @param start from where the variable is valid * @param end until where the variable is valid * @return new local variable object * @see LocalVariable */ private LocalVariableGen addLocalVariableType(String name, Type type, int slot, InstructionHandle start, InstructionHandle end) { byte t = type.getType(); if(t != Constants.T_ADDRESS) { int add = type.getSize(); if(slot + add > max_locals) max_locals = slot + add; LocalVariableGen l = new LocalVariableGen(slot, name, type, start, end); int i; if((i = type_vec.indexOf(l)) >= 0) // Overwrite if necessary type_vec.set(i, l); else type_vec.add(l); return l; } else { throw new IllegalArgumentException("Can not use " + type + " as type for local variable"); } }
Example 4
Source File: MethodGen.java From jdk8u60 with GNU General Public License v2.0 | 5 votes |
/** * Adds a local variable type to this method. * * @param name variable name * @param type variable type * @param slot the index of the local variable, if type is long or double, the next available * index is slot+2 * @param start from where the variable is valid * @param end until where the variable is valid * @return new local variable object * @see LocalVariable */ private LocalVariableGen addLocalVariableType(String name, Type type, int slot, InstructionHandle start, InstructionHandle end) { byte t = type.getType(); if(t != Constants.T_ADDRESS) { int add = type.getSize(); if(slot + add > max_locals) max_locals = slot + add; LocalVariableGen l = new LocalVariableGen(slot, name, type, start, end); int i; if((i = type_vec.indexOf(l)) >= 0) // Overwrite if necessary type_vec.set(i, l); else type_vec.add(l); return l; } else { throw new IllegalArgumentException("Can not use " + type + " as type for local variable"); } }
Example 5
Source File: MethodGen.java From jdk8u60 with GNU General Public License v2.0 | 5 votes |
/** * Adds a local variable to this method. * * @param name variable name * @param type variable type * @param slot the index of the local variable, if type is long or double, the next available * index is slot+2 * @param start from where the variable is valid * @param end until where the variable is valid * @return new local variable object * @see LocalVariable */ public LocalVariableGen addLocalVariable(String name, Type type, int slot, InstructionHandle start, InstructionHandle end) { byte t = type.getType(); if(t != Constants.T_ADDRESS) { int add = type.getSize(); if(slot + add > max_locals) max_locals = slot + add; LocalVariableGen l = new LocalVariableGen(slot, name, type, start, end); int i; if((i = variable_vec.indexOf(l)) >= 0) // Overwrite if necessary variable_vec.set(i, l); else variable_vec.add(l); return l; } else { throw new IllegalArgumentException("Can not use " + type + " as type for local variable"); } }
Example 6
Source File: MethodGen.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
/** * Adds a local variable to this method. * * @param name variable name * @param type variable type * @param slot the index of the local variable, if type is long or double, the next available * index is slot+2 * @param start from where the variable is valid * @param end until where the variable is valid * @return new local variable object * @see LocalVariable */ public LocalVariableGen addLocalVariable(String name, Type type, int slot, InstructionHandle start, InstructionHandle end) { byte t = type.getType(); if(t != Constants.T_ADDRESS) { int add = type.getSize(); if(slot + add > max_locals) max_locals = slot + add; LocalVariableGen l = new LocalVariableGen(slot, name, type, start, end); int i; if((i = variable_vec.indexOf(l)) >= 0) // Overwrite if necessary variable_vec.set(i, l); else variable_vec.add(l); return l; } else { throw new IllegalArgumentException("Can not use " + type + " as type for local variable"); } }
Example 7
Source File: MethodGen.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
/** * Adds a local variable to this method. * * @param name variable name * @param type variable type * @param slot the index of the local variable, if type is long or double, the next available * index is slot+2 * @param start from where the variable is valid * @param end until where the variable is valid * @return new local variable object * @see LocalVariable */ public LocalVariableGen addLocalVariable(String name, Type type, int slot, InstructionHandle start, InstructionHandle end) { byte t = type.getType(); if(t != Constants.T_ADDRESS) { int add = type.getSize(); if(slot + add > max_locals) max_locals = slot + add; LocalVariableGen l = new LocalVariableGen(slot, name, type, start, end); int i; if((i = variable_vec.indexOf(l)) >= 0) // Overwrite if necessary variable_vec.set(i, l); else variable_vec.add(l); return l; } else { throw new IllegalArgumentException("Can not use " + type + " as type for local variable"); } }
Example 8
Source File: ReturnaddressType.java From openjdk-jdk9 with GNU General Public License v2.0 | 4 votes |
/** * A Returnaddress [that doesn't know where to return to]. */ private ReturnaddressType(){ super(Constants.T_ADDRESS, "<return address>"); }
Example 9
Source File: ReturnaddressType.java From hottub with GNU General Public License v2.0 | 4 votes |
/** * A Returnaddress [that doesn't know where to return to]. */ private ReturnaddressType(){ super(Constants.T_ADDRESS, "<return address>"); }
Example 10
Source File: ReturnaddressType.java From TencentKona-8 with GNU General Public License v2.0 | 4 votes |
/** * A Returnaddress [that doesn't know where to return to]. */ private ReturnaddressType(){ super(Constants.T_ADDRESS, "<return address>"); }
Example 11
Source File: ReturnaddressType.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 4 votes |
/** * A Returnaddress [that doesn't know where to return to]. */ private ReturnaddressType(){ super(Constants.T_ADDRESS, "<return address>"); }
Example 12
Source File: ReturnaddressType.java From jdk1.8-source-analysis with Apache License 2.0 | 4 votes |
/** * Creates a ReturnaddressType object with a target. */ public ReturnaddressType(InstructionHandle returnTarget) { super(Constants.T_ADDRESS, "<return address targeting "+returnTarget+">"); this.returnTarget = returnTarget; }
Example 13
Source File: ReturnaddressType.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 4 votes |
/** * Creates a ReturnaddressType object with a target. */ public ReturnaddressType(InstructionHandle returnTarget) { super(Constants.T_ADDRESS, "<return address targeting "+returnTarget+">"); this.returnTarget = returnTarget; }
Example 14
Source File: FieldGenOrMethodGen.java From jdk1.8-source-analysis with Apache License 2.0 | 4 votes |
public void setType(Type type) { if(type.getType() == Constants.T_ADDRESS) throw new IllegalArgumentException("Type can not be " + type); this.type = type; }
Example 15
Source File: ReturnaddressType.java From jdk8u60 with GNU General Public License v2.0 | 4 votes |
/** * A Returnaddress [that doesn't know where to return to]. */ private ReturnaddressType(){ super(Constants.T_ADDRESS, "<return address>"); }
Example 16
Source File: ReturnaddressType.java From jdk8u60 with GNU General Public License v2.0 | 4 votes |
/** * Creates a ReturnaddressType object with a target. */ public ReturnaddressType(InstructionHandle returnTarget) { super(Constants.T_ADDRESS, "<return address targeting "+returnTarget+">"); this.returnTarget = returnTarget; }
Example 17
Source File: ReturnaddressType.java From openjdk-8 with GNU General Public License v2.0 | 4 votes |
/** * A Returnaddress [that doesn't know where to return to]. */ private ReturnaddressType(){ super(Constants.T_ADDRESS, "<return address>"); }
Example 18
Source File: FieldGenOrMethodGen.java From openjdk-8 with GNU General Public License v2.0 | 4 votes |
public void setType(Type type) { if(type.getType() == Constants.T_ADDRESS) throw new IllegalArgumentException("Type can not be " + type); this.type = type; }
Example 19
Source File: ReturnaddressType.java From openjdk-8-source with GNU General Public License v2.0 | 4 votes |
/** * A Returnaddress [that doesn't know where to return to]. */ private ReturnaddressType(){ super(Constants.T_ADDRESS, "<return address>"); }
Example 20
Source File: ReturnaddressType.java From openjdk-jdk8u with GNU General Public License v2.0 | 4 votes |
/** * A Returnaddress [that doesn't know where to return to]. */ private ReturnaddressType(){ super(Constants.T_ADDRESS, "<return address>"); }