Java 类com.sun.org.apache.bcel.internal.generic.CHECKCAST 实例源码
项目:OpenJSharp
文件:Predicate.java
/**
* Translate a predicate expression. If non of the optimizations apply
* then this translation pushes two references on the stack: a reference
* to a newly created filter object and a reference to the predicate's
* closure. See class <code>Step</code> for further details.
*/
public void translate(ClassGenerator classGen, MethodGenerator methodGen) {
final ConstantPoolGen cpg = classGen.getConstantPool();
final InstructionList il = methodGen.getInstructionList();
if (_nthPositionFilter || _nthDescendant) {
_exp.translate(classGen, methodGen);
}
else if (isNodeValueTest() && (getParent() instanceof Step)) {
_value.translate(classGen, methodGen);
il.append(new CHECKCAST(cpg.addClass(STRING_CLASS)));
il.append(new PUSH(cpg, ((EqualityExpr)_exp).getOp()));
}
else {
translateFilter(classGen, methodGen);
}
}
项目:openjdk-jdk10
文件:Predicate.java
/**
* Translate a predicate expression. If non of the optimizations apply
* then this translation pushes two references on the stack: a reference
* to a newly created filter object and a reference to the predicate's
* closure. See class <code>Step</code> for further details.
*/
public void translate(ClassGenerator classGen, MethodGenerator methodGen) {
final ConstantPoolGen cpg = classGen.getConstantPool();
final InstructionList il = methodGen.getInstructionList();
if (_nthPositionFilter || _nthDescendant) {
_exp.translate(classGen, methodGen);
}
else if (isNodeValueTest() && (getParent() instanceof Step)) {
_value.translate(classGen, methodGen);
il.append(new CHECKCAST(cpg.addClass(STRING_CLASS)));
il.append(new PUSH(cpg, ((EqualityExpr)_exp).getOp()));
}
else {
translateFilter(classGen, methodGen);
}
}
项目:openjdk-jdk10
文件:VariableBase.java
/**
* Remove the mapping of this variable to a register.
* Called when we leave the AST scope of the variable's declaration
*/
public void unmapRegister(ClassGenerator classGen, MethodGenerator methodGen) {
if (_local != null) {
if (_type instanceof ResultTreeType) {
final ConstantPoolGen cpg = classGen.getConstantPool();
final InstructionList il = methodGen.getInstructionList();
if (classGen.getStylesheet().callsNodeset() && classGen.getDOMClass().equals(MULTI_DOM_CLASS)) {
final int removeDA = cpg.addMethodref(MULTI_DOM_CLASS, "removeDOMAdapter", "(" + DOM_ADAPTER_SIG + ")V");
il.append(methodGen.loadDOM());
il.append(new CHECKCAST(cpg.addClass(MULTI_DOM_CLASS)));
il.append(loadInstruction());
il.append(new CHECKCAST(cpg.addClass(DOM_ADAPTER_CLASS)));
il.append(new INVOKEVIRTUAL(removeDA));
}
final int release = cpg.addInterfaceMethodref(DOM_IMPL_CLASS, "release", "()V");
il.append(loadInstruction());
il.append(new INVOKEINTERFACE(release, 1));
}
_local.setEnd(methodGen.getInstructionList().getEnd());
methodGen.removeLocalVariable(_local);
_refs = null;
_local = null;
}
}
项目:openjdk9
文件:Predicate.java
/**
* Translate a predicate expression. If non of the optimizations apply
* then this translation pushes two references on the stack: a reference
* to a newly created filter object and a reference to the predicate's
* closure. See class <code>Step</code> for further details.
*/
public void translate(ClassGenerator classGen, MethodGenerator methodGen) {
final ConstantPoolGen cpg = classGen.getConstantPool();
final InstructionList il = methodGen.getInstructionList();
if (_nthPositionFilter || _nthDescendant) {
_exp.translate(classGen, methodGen);
}
else if (isNodeValueTest() && (getParent() instanceof Step)) {
_value.translate(classGen, methodGen);
il.append(new CHECKCAST(cpg.addClass(STRING_CLASS)));
il.append(new PUSH(cpg, ((EqualityExpr)_exp).getOp()));
}
else {
translateFilter(classGen, methodGen);
}
}
项目:openjdk9
文件:VariableBase.java
/**
* Remove the mapping of this variable to a register.
* Called when we leave the AST scope of the variable's declaration
*/
public void unmapRegister(ClassGenerator classGen, MethodGenerator methodGen) {
if (_local != null) {
if (_type instanceof ResultTreeType) {
final ConstantPoolGen cpg = classGen.getConstantPool();
final InstructionList il = methodGen.getInstructionList();
if (classGen.getStylesheet().callsNodeset() && classGen.getDOMClass().equals(MULTI_DOM_CLASS)) {
final int removeDA = cpg.addMethodref(MULTI_DOM_CLASS, "removeDOMAdapter", "(" + DOM_ADAPTER_SIG + ")V");
il.append(methodGen.loadDOM());
il.append(new CHECKCAST(cpg.addClass(MULTI_DOM_CLASS)));
il.append(loadInstruction());
il.append(new CHECKCAST(cpg.addClass(DOM_ADAPTER_CLASS)));
il.append(new INVOKEVIRTUAL(removeDA));
}
final int release = cpg.addInterfaceMethodref(DOM_IMPL_CLASS, "release", "()V");
il.append(loadInstruction());
il.append(new INVOKEINTERFACE(release, 1));
}
_local.setEnd(methodGen.getInstructionList().getEnd());
methodGen.removeLocalVariable(_local);
_refs = null;
_local = null;
}
}
项目:openjdk9
文件:WithParam.java
/**
* Release the compiled result tree.
*/
public void releaseResultTree(ClassGenerator classGen, MethodGenerator methodGen) {
if (_domAdapter != null) {
final ConstantPoolGen cpg = classGen.getConstantPool();
final InstructionList il = methodGen.getInstructionList();
if (classGen.getStylesheet().callsNodeset() && classGen.getDOMClass().equals(MULTI_DOM_CLASS)) {
final int removeDA = cpg.addMethodref(MULTI_DOM_CLASS, "removeDOMAdapter", "(" + DOM_ADAPTER_SIG + ")V");
il.append(methodGen.loadDOM());
il.append(new CHECKCAST(cpg.addClass(MULTI_DOM_CLASS)));
il.append(new ALOAD(_domAdapter.getIndex()));
il.append(new CHECKCAST(cpg.addClass(DOM_ADAPTER_CLASS)));
il.append(new INVOKEVIRTUAL(removeDA));
}
final int release = cpg.addInterfaceMethodref(DOM_IMPL_CLASS, "release", "()V");
il.append(new ALOAD(_domAdapter.getIndex()));
il.append(new INVOKEINTERFACE(release, 1));
_domAdapter = null;
}
}
项目:lookaside_java-1.8.0-openjdk
文件:Predicate.java
/**
* Translate a predicate expression. If non of the optimizations apply
* then this translation pushes two references on the stack: a reference
* to a newly created filter object and a reference to the predicate's
* closure. See class <code>Step</code> for further details.
*/
public void translate(ClassGenerator classGen, MethodGenerator methodGen) {
final ConstantPoolGen cpg = classGen.getConstantPool();
final InstructionList il = methodGen.getInstructionList();
if (_nthPositionFilter || _nthDescendant) {
_exp.translate(classGen, methodGen);
}
else if (isNodeValueTest() && (getParent() instanceof Step)) {
_value.translate(classGen, methodGen);
il.append(new CHECKCAST(cpg.addClass(STRING_CLASS)));
il.append(new PUSH(cpg, ((EqualityExpr)_exp).getOp()));
}
else {
translateFilter(classGen, methodGen);
}
}
项目:lookaside_java-1.8.0-openjdk
文件:VariableBase.java
/**
* Remove the mapping of this variable to a register.
* Called when we leave the AST scope of the variable's declaration
*/
public void unmapRegister(ClassGenerator classGen, MethodGenerator methodGen) {
if (_local != null) {
if (_type instanceof ResultTreeType) {
final ConstantPoolGen cpg = classGen.getConstantPool();
final InstructionList il = methodGen.getInstructionList();
if (classGen.getStylesheet().callsNodeset() && classGen.getDOMClass().equals(MULTI_DOM_CLASS)) {
final int removeDA = cpg.addMethodref(MULTI_DOM_CLASS, "removeDOMAdapter", "(" + DOM_ADAPTER_SIG + ")V");
il.append(methodGen.loadDOM());
il.append(new CHECKCAST(cpg.addClass(MULTI_DOM_CLASS)));
il.append(loadInstruction());
il.append(new CHECKCAST(cpg.addClass(DOM_ADAPTER_CLASS)));
il.append(new INVOKEVIRTUAL(removeDA));
}
final int release = cpg.addInterfaceMethodref(DOM_IMPL_CLASS, "release", "()V");
il.append(loadInstruction());
il.append(new INVOKEINTERFACE(release, 1));
}
_local.setEnd(methodGen.getInstructionList().getEnd());
methodGen.removeLocalVariable(_local);
_refs = null;
_local = null;
}
}
项目:lookaside_java-1.8.0-openjdk
文件:WithParam.java
/**
* Release the compiled result tree.
*/
public void releaseResultTree(ClassGenerator classGen, MethodGenerator methodGen) {
if (_domAdapter != null) {
final ConstantPoolGen cpg = classGen.getConstantPool();
final InstructionList il = methodGen.getInstructionList();
if (classGen.getStylesheet().callsNodeset() && classGen.getDOMClass().equals(MULTI_DOM_CLASS)) {
final int removeDA = cpg.addMethodref(MULTI_DOM_CLASS, "removeDOMAdapter", "(" + DOM_ADAPTER_SIG + ")V");
il.append(methodGen.loadDOM());
il.append(new CHECKCAST(cpg.addClass(MULTI_DOM_CLASS)));
il.append(new ALOAD(_domAdapter.getIndex()));
il.append(new CHECKCAST(cpg.addClass(DOM_ADAPTER_CLASS)));
il.append(new INVOKEVIRTUAL(removeDA));
}
final int release = cpg.addInterfaceMethodref(DOM_IMPL_CLASS, "release", "()V");
il.append(new ALOAD(_domAdapter.getIndex()));
il.append(new INVOKEINTERFACE(release, 1));
_domAdapter = null;
}
}
项目:infobip-open-jdk-8
文件:Predicate.java
/**
* Translate a predicate expression. If non of the optimizations apply
* then this translation pushes two references on the stack: a reference
* to a newly created filter object and a reference to the predicate's
* closure. See class <code>Step</code> for further details.
*/
public void translate(ClassGenerator classGen, MethodGenerator methodGen) {
final ConstantPoolGen cpg = classGen.getConstantPool();
final InstructionList il = methodGen.getInstructionList();
if (_nthPositionFilter || _nthDescendant) {
_exp.translate(classGen, methodGen);
}
else if (isNodeValueTest() && (getParent() instanceof Step)) {
_value.translate(classGen, methodGen);
il.append(new CHECKCAST(cpg.addClass(STRING_CLASS)));
il.append(new PUSH(cpg, ((EqualityExpr)_exp).getOp()));
}
else {
translateFilter(classGen, methodGen);
}
}
项目:OLD-OpenJDK8
文件:Predicate.java
/**
* Translate a predicate expression. If non of the optimizations apply
* then this translation pushes two references on the stack: a reference
* to a newly created filter object and a reference to the predicate's
* closure. See class <code>Step</code> for further details.
*/
public void translate(ClassGenerator classGen, MethodGenerator methodGen) {
final ConstantPoolGen cpg = classGen.getConstantPool();
final InstructionList il = methodGen.getInstructionList();
if (_nthPositionFilter || _nthDescendant) {
_exp.translate(classGen, methodGen);
}
else if (isNodeValueTest() && (getParent() instanceof Step)) {
_value.translate(classGen, methodGen);
il.append(new CHECKCAST(cpg.addClass(STRING_CLASS)));
il.append(new PUSH(cpg, ((EqualityExpr)_exp).getOp()));
}
else {
translateFilter(classGen, methodGen);
}
}
项目:openjdk-icedtea7
文件:Predicate.java
/**
* Translate a predicate expression. If non of the optimizations apply
* then this translation pushes two references on the stack: a reference
* to a newly created filter object and a reference to the predicate's
* closure. See class <code>Step</code> for further details.
*/
public void translate(ClassGenerator classGen, MethodGenerator methodGen) {
final ConstantPoolGen cpg = classGen.getConstantPool();
final InstructionList il = methodGen.getInstructionList();
if (_nthPositionFilter || _nthDescendant) {
_exp.translate(classGen, methodGen);
}
else if (isNodeValueTest() && (getParent() instanceof Step)) {
_value.translate(classGen, methodGen);
il.append(new CHECKCAST(cpg.addClass(STRING_CLASS)));
il.append(new PUSH(cpg, ((EqualityExpr)_exp).getOp()));
}
else {
translateFilter(classGen, methodGen);
}
}
项目:OpenJSharp
文件:CastCall.java
public void translate(ClassGenerator classGen, MethodGenerator methodGen) {
final ConstantPoolGen cpg = classGen.getConstantPool();
final InstructionList il = methodGen.getInstructionList();
_right.translate(classGen, methodGen);
il.append(new CHECKCAST(cpg.addClass(_className)));
}
项目:OpenJSharp
文件:IntType.java
/**
* Translates an object of this type to its unboxed representation.
*/
public void translateUnBox(ClassGenerator classGen,
MethodGenerator methodGen) {
final ConstantPoolGen cpg = classGen.getConstantPool();
final InstructionList il = methodGen.getInstructionList();
il.append(new CHECKCAST(cpg.addClass(INTEGER_CLASS)));
final int index = cpg.addMethodref(INTEGER_CLASS,
INT_VALUE,
INT_VALUE_SIG);
il.append(new INVOKEVIRTUAL(index));
}
项目:OpenJSharp
文件:RealType.java
/**
* Translates an object of this type to its unboxed representation.
*/
public void translateUnBox(ClassGenerator classGen,
MethodGenerator methodGen) {
final ConstantPoolGen cpg = classGen.getConstantPool();
final InstructionList il = methodGen.getInstructionList();
il.append(new CHECKCAST(cpg.addClass(DOUBLE_CLASS)));
il.append(new INVOKEVIRTUAL(cpg.addMethodref(DOUBLE_CLASS,
DOUBLE_VALUE,
DOUBLE_VALUE_SIG)));
}
项目:OpenJSharp
文件:BooleanType.java
/**
* Translates an object of this type to its unboxed representation.
*/
public void translateUnBox(ClassGenerator classGen,
MethodGenerator methodGen) {
final ConstantPoolGen cpg = classGen.getConstantPool();
final InstructionList il = methodGen.getInstructionList();
il.append(new CHECKCAST(cpg.addClass(BOOLEAN_CLASS)));
il.append(new INVOKEVIRTUAL(cpg.addMethodref(BOOLEAN_CLASS,
BOOLEAN_VALUE,
BOOLEAN_VALUE_SIG)));
}
项目:OpenJSharp
文件:NodeType.java
/**
* Translates an object of this type to its unboxed representation.
*/
public void translateUnBox(ClassGenerator classGen,
MethodGenerator methodGen) {
final ConstantPoolGen cpg = classGen.getConstantPool();
final InstructionList il = methodGen.getInstructionList();
il.append(new CHECKCAST(cpg.addClass(RUNTIME_NODE_CLASS)));
il.append(new GETFIELD(cpg.addFieldref(RUNTIME_NODE_CLASS,
NODE_FIELD,
NODE_FIELD_SIG)));
}
项目:openjdk-jdk10
文件:CastCall.java
public void translate(ClassGenerator classGen, MethodGenerator methodGen) {
final ConstantPoolGen cpg = classGen.getConstantPool();
final InstructionList il = methodGen.getInstructionList();
_right.translate(classGen, methodGen);
il.append(new CHECKCAST(cpg.addClass(_className)));
}
项目:openjdk-jdk10
文件:WithParam.java
/**
* Release the compiled result tree.
*/
public void releaseResultTree(ClassGenerator classGen,
MethodGenerator methodGen)
{
if (_domAdapter != null) {
final ConstantPoolGen cpg = classGen.getConstantPool();
final InstructionList il = methodGen.getInstructionList();
if (classGen.getStylesheet().callsNodeset() &&
classGen.getDOMClass().equals(MULTI_DOM_CLASS))
{
final int removeDA =
cpg.addMethodref(MULTI_DOM_CLASS, "removeDOMAdapter",
"(" + DOM_ADAPTER_SIG + ")V");
il.append(methodGen.loadDOM());
il.append(new CHECKCAST(cpg.addClass(MULTI_DOM_CLASS)));
il.append(new ALOAD(_domAdapter.getIndex()));
il.append(new CHECKCAST(cpg.addClass(DOM_ADAPTER_CLASS)));
il.append(new INVOKEVIRTUAL(removeDA));
}
final int release =
cpg.addInterfaceMethodref(DOM_IMPL_CLASS, "release", "()V");
il.append(new ALOAD(_domAdapter.getIndex()));
il.append(new INVOKEINTERFACE(release, 1));
_domAdapter.setEnd(il.getEnd());
methodGen.removeLocalVariable(_domAdapter);
_domAdapter = null;
}
}
项目:openjdk-jdk10
文件:IntType.java
/**
* Translates an object of this type to its unboxed representation.
*/
public void translateUnBox(ClassGenerator classGen,
MethodGenerator methodGen) {
final ConstantPoolGen cpg = classGen.getConstantPool();
final InstructionList il = methodGen.getInstructionList();
il.append(new CHECKCAST(cpg.addClass(INTEGER_CLASS)));
final int index = cpg.addMethodref(INTEGER_CLASS,
INT_VALUE,
INT_VALUE_SIG);
il.append(new INVOKEVIRTUAL(index));
}
项目:openjdk-jdk10
文件:RealType.java
/**
* Translates an object of this type to its unboxed representation.
*/
public void translateUnBox(ClassGenerator classGen,
MethodGenerator methodGen) {
final ConstantPoolGen cpg = classGen.getConstantPool();
final InstructionList il = methodGen.getInstructionList();
il.append(new CHECKCAST(cpg.addClass(DOUBLE_CLASS)));
il.append(new INVOKEVIRTUAL(cpg.addMethodref(DOUBLE_CLASS,
DOUBLE_VALUE,
DOUBLE_VALUE_SIG)));
}
项目:openjdk-jdk10
文件:BooleanType.java
/**
* Translates an object of this type to its unboxed representation.
*/
public void translateUnBox(ClassGenerator classGen,
MethodGenerator methodGen) {
final ConstantPoolGen cpg = classGen.getConstantPool();
final InstructionList il = methodGen.getInstructionList();
il.append(new CHECKCAST(cpg.addClass(BOOLEAN_CLASS)));
il.append(new INVOKEVIRTUAL(cpg.addMethodref(BOOLEAN_CLASS,
BOOLEAN_VALUE,
BOOLEAN_VALUE_SIG)));
}
项目:openjdk-jdk10
文件:NodeType.java
/**
* Translates an object of this type to its unboxed representation.
*/
public void translateUnBox(ClassGenerator classGen,
MethodGenerator methodGen) {
final ConstantPoolGen cpg = classGen.getConstantPool();
final InstructionList il = methodGen.getInstructionList();
il.append(new CHECKCAST(cpg.addClass(RUNTIME_NODE_CLASS)));
il.append(new GETFIELD(cpg.addFieldref(RUNTIME_NODE_CLASS,
NODE_FIELD,
NODE_FIELD_SIG)));
}
项目:openjdk9
文件:CastCall.java
public void translate(ClassGenerator classGen, MethodGenerator methodGen) {
final ConstantPoolGen cpg = classGen.getConstantPool();
final InstructionList il = methodGen.getInstructionList();
_right.translate(classGen, methodGen);
il.append(new CHECKCAST(cpg.addClass(_className)));
}
项目:openjdk9
文件:IntType.java
/**
* Translates an object of this type to its unboxed representation.
*/
public void translateUnBox(ClassGenerator classGen,
MethodGenerator methodGen) {
final ConstantPoolGen cpg = classGen.getConstantPool();
final InstructionList il = methodGen.getInstructionList();
il.append(new CHECKCAST(cpg.addClass(INTEGER_CLASS)));
final int index = cpg.addMethodref(INTEGER_CLASS,
INT_VALUE,
INT_VALUE_SIG);
il.append(new INVOKEVIRTUAL(index));
}
项目:openjdk9
文件:RealType.java
/**
* Translates an object of this type to its unboxed representation.
*/
public void translateUnBox(ClassGenerator classGen,
MethodGenerator methodGen) {
final ConstantPoolGen cpg = classGen.getConstantPool();
final InstructionList il = methodGen.getInstructionList();
il.append(new CHECKCAST(cpg.addClass(DOUBLE_CLASS)));
il.append(new INVOKEVIRTUAL(cpg.addMethodref(DOUBLE_CLASS,
DOUBLE_VALUE,
DOUBLE_VALUE_SIG)));
}
项目:openjdk9
文件:BooleanType.java
/**
* Translates an object of this type to its unboxed representation.
*/
public void translateUnBox(ClassGenerator classGen,
MethodGenerator methodGen) {
final ConstantPoolGen cpg = classGen.getConstantPool();
final InstructionList il = methodGen.getInstructionList();
il.append(new CHECKCAST(cpg.addClass(BOOLEAN_CLASS)));
il.append(new INVOKEVIRTUAL(cpg.addMethodref(BOOLEAN_CLASS,
BOOLEAN_VALUE,
BOOLEAN_VALUE_SIG)));
}
项目:openjdk9
文件:NodeType.java
/**
* Translates an object of this type to its unboxed representation.
*/
public void translateUnBox(ClassGenerator classGen,
MethodGenerator methodGen) {
final ConstantPoolGen cpg = classGen.getConstantPool();
final InstructionList il = methodGen.getInstructionList();
il.append(new CHECKCAST(cpg.addClass(RUNTIME_NODE_CLASS)));
il.append(new GETFIELD(cpg.addFieldref(RUNTIME_NODE_CLASS,
NODE_FIELD,
NODE_FIELD_SIG)));
}
项目:lookaside_java-1.8.0-openjdk
文件:CastCall.java
public void translate(ClassGenerator classGen, MethodGenerator methodGen) {
final ConstantPoolGen cpg = classGen.getConstantPool();
final InstructionList il = methodGen.getInstructionList();
_right.translate(classGen, methodGen);
il.append(new CHECKCAST(cpg.addClass(_className)));
}
项目:lookaside_java-1.8.0-openjdk
文件:IntType.java
/**
* Translates an object of this type to its unboxed representation.
*/
public void translateUnBox(ClassGenerator classGen,
MethodGenerator methodGen) {
final ConstantPoolGen cpg = classGen.getConstantPool();
final InstructionList il = methodGen.getInstructionList();
il.append(new CHECKCAST(cpg.addClass(INTEGER_CLASS)));
final int index = cpg.addMethodref(INTEGER_CLASS,
INT_VALUE,
INT_VALUE_SIG);
il.append(new INVOKEVIRTUAL(index));
}
项目:lookaside_java-1.8.0-openjdk
文件:RealType.java
/**
* Translates an object of this type to its unboxed representation.
*/
public void translateUnBox(ClassGenerator classGen,
MethodGenerator methodGen) {
final ConstantPoolGen cpg = classGen.getConstantPool();
final InstructionList il = methodGen.getInstructionList();
il.append(new CHECKCAST(cpg.addClass(DOUBLE_CLASS)));
il.append(new INVOKEVIRTUAL(cpg.addMethodref(DOUBLE_CLASS,
DOUBLE_VALUE,
DOUBLE_VALUE_SIG)));
}
项目:lookaside_java-1.8.0-openjdk
文件:BooleanType.java
/**
* Translates an object of this type to its unboxed representation.
*/
public void translateUnBox(ClassGenerator classGen,
MethodGenerator methodGen) {
final ConstantPoolGen cpg = classGen.getConstantPool();
final InstructionList il = methodGen.getInstructionList();
il.append(new CHECKCAST(cpg.addClass(BOOLEAN_CLASS)));
il.append(new INVOKEVIRTUAL(cpg.addMethodref(BOOLEAN_CLASS,
BOOLEAN_VALUE,
BOOLEAN_VALUE_SIG)));
}
项目:lookaside_java-1.8.0-openjdk
文件:NodeType.java
/**
* Translates an object of this type to its unboxed representation.
*/
public void translateUnBox(ClassGenerator classGen,
MethodGenerator methodGen) {
final ConstantPoolGen cpg = classGen.getConstantPool();
final InstructionList il = methodGen.getInstructionList();
il.append(new CHECKCAST(cpg.addClass(RUNTIME_NODE_CLASS)));
il.append(new GETFIELD(cpg.addFieldref(RUNTIME_NODE_CLASS,
NODE_FIELD,
NODE_FIELD_SIG)));
}
项目:infobip-open-jdk-8
文件:CastCall.java
public void translate(ClassGenerator classGen, MethodGenerator methodGen) {
final ConstantPoolGen cpg = classGen.getConstantPool();
final InstructionList il = methodGen.getInstructionList();
_right.translate(classGen, methodGen);
il.append(new CHECKCAST(cpg.addClass(_className)));
}
项目:infobip-open-jdk-8
文件:IntType.java
/**
* Translates an object of this type to its unboxed representation.
*/
public void translateUnBox(ClassGenerator classGen,
MethodGenerator methodGen) {
final ConstantPoolGen cpg = classGen.getConstantPool();
final InstructionList il = methodGen.getInstructionList();
il.append(new CHECKCAST(cpg.addClass(INTEGER_CLASS)));
final int index = cpg.addMethodref(INTEGER_CLASS,
INT_VALUE,
INT_VALUE_SIG);
il.append(new INVOKEVIRTUAL(index));
}
项目:infobip-open-jdk-8
文件:RealType.java
/**
* Translates an object of this type to its unboxed representation.
*/
public void translateUnBox(ClassGenerator classGen,
MethodGenerator methodGen) {
final ConstantPoolGen cpg = classGen.getConstantPool();
final InstructionList il = methodGen.getInstructionList();
il.append(new CHECKCAST(cpg.addClass(DOUBLE_CLASS)));
il.append(new INVOKEVIRTUAL(cpg.addMethodref(DOUBLE_CLASS,
DOUBLE_VALUE,
DOUBLE_VALUE_SIG)));
}
项目:infobip-open-jdk-8
文件:BooleanType.java
/**
* Translates an object of this type to its unboxed representation.
*/
public void translateUnBox(ClassGenerator classGen,
MethodGenerator methodGen) {
final ConstantPoolGen cpg = classGen.getConstantPool();
final InstructionList il = methodGen.getInstructionList();
il.append(new CHECKCAST(cpg.addClass(BOOLEAN_CLASS)));
il.append(new INVOKEVIRTUAL(cpg.addMethodref(BOOLEAN_CLASS,
BOOLEAN_VALUE,
BOOLEAN_VALUE_SIG)));
}
项目:infobip-open-jdk-8
文件:NodeType.java
/**
* Translates an object of this type to its unboxed representation.
*/
public void translateUnBox(ClassGenerator classGen,
MethodGenerator methodGen) {
final ConstantPoolGen cpg = classGen.getConstantPool();
final InstructionList il = methodGen.getInstructionList();
il.append(new CHECKCAST(cpg.addClass(RUNTIME_NODE_CLASS)));
il.append(new GETFIELD(cpg.addFieldref(RUNTIME_NODE_CLASS,
NODE_FIELD,
NODE_FIELD_SIG)));
}
项目:OLD-OpenJDK8
文件:CastCall.java
public void translate(ClassGenerator classGen, MethodGenerator methodGen) {
final ConstantPoolGen cpg = classGen.getConstantPool();
final InstructionList il = methodGen.getInstructionList();
_right.translate(classGen, methodGen);
il.append(new CHECKCAST(cpg.addClass(_className)));
}
项目:OLD-OpenJDK8
文件:IntType.java
/**
* Translates an object of this type to its unboxed representation.
*/
public void translateUnBox(ClassGenerator classGen,
MethodGenerator methodGen) {
final ConstantPoolGen cpg = classGen.getConstantPool();
final InstructionList il = methodGen.getInstructionList();
il.append(new CHECKCAST(cpg.addClass(INTEGER_CLASS)));
final int index = cpg.addMethodref(INTEGER_CLASS,
INT_VALUE,
INT_VALUE_SIG);
il.append(new INVOKEVIRTUAL(index));
}