com.sun.org.apache.bcel.internal.generic.IFGE Java Examples
The following examples show how to use
com.sun.org.apache.bcel.internal.generic.IFGE.
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: IntType.java From hottub with GNU General Public License v2.0 | 4 votes |
public BranchInstruction GE(boolean tozero) { return tozero ? (BranchInstruction) new IFGE(null) : (BranchInstruction) new IF_ICMPGE(null); }
Example #2
Source File: BooleanType.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 4 votes |
public BranchInstruction GE(boolean tozero) { return tozero ? (BranchInstruction) new IFGE(null) : (BranchInstruction) new IF_ICMPGE(null); }
Example #3
Source File: Key.java From Bytecoder with Apache License 2.0 | 4 votes |
/** * This method is called if the "use" attribute of the key contains a * node set. In this case we must traverse all nodes in the set and * create one entry in this key's index for each node in the set. */ public void traverseNodeSet(ClassGenerator classGen, MethodGenerator methodGen, int buildKeyIndex) { final ConstantPoolGen cpg = classGen.getConstantPool(); final InstructionList il = methodGen.getInstructionList(); // DOM.getStringValueX(nodeIndex) => String final int getNodeValue = cpg.addInterfaceMethodref(DOM_INTF, GET_NODE_VALUE, "(I)"+STRING_SIG); final int getNodeIdent = cpg.addInterfaceMethodref(DOM_INTF, "getNodeIdent", "(I)"+NODE_SIG); // AbstractTranslet.SetKeyIndexDom(name, Dom) => void final int keyDom = cpg.addMethodref(TRANSLET_CLASS, "setKeyIndexDom", "("+STRING_SIG+DOM_INTF_SIG+")V"); // This variable holds the id of the node we found with the "match" // attribute of xsl:key. This is the id we store, with the value we // get from the nodes we find here, in the index for this key. final LocalVariableGen parentNode = methodGen.addLocalVariable("parentNode", Util.getJCRefType("I"), null, null); // Get the 'parameter' from the stack and store it in a local var. parentNode.setStart(il.append(new ISTORE(parentNode.getIndex()))); // Save current node and current iterator on the stack il.append(methodGen.loadCurrentNode()); il.append(methodGen.loadIterator()); // Overwrite current iterator with one that gives us only what we want _use.translate(classGen, methodGen); _use.startIterator(classGen, methodGen); il.append(methodGen.storeIterator()); final BranchHandle nextNode = il.append(new GOTO(null)); final InstructionHandle loop = il.append(NOP); // Prepare to call buildKeyIndex(String name, int node, String value); il.append(classGen.loadTranslet()); il.append(new PUSH(cpg, _name.toString())); parentNode.setEnd(il.append(new ILOAD(parentNode.getIndex()))); // Now get the node value and push it on the parameter stack il.append(methodGen.loadDOM()); il.append(methodGen.loadCurrentNode()); il.append(new INVOKEINTERFACE(getNodeValue, 2)); // Finally do the call to add an entry in the index for this key. il.append(new INVOKEVIRTUAL(buildKeyIndex)); il.append(classGen.loadTranslet()); il.append(new PUSH(cpg, getName())); il.append(methodGen.loadDOM()); il.append(new INVOKEVIRTUAL(keyDom)); nextNode.setTarget(il.append(methodGen.loadIterator())); il.append(methodGen.nextNode()); il.append(DUP); il.append(methodGen.storeCurrentNode()); il.append(new IFGE(loop)); // Go on to next matching node.... // Restore current node and current iterator from the stack il.append(methodGen.storeIterator()); il.append(methodGen.storeCurrentNode()); }
Example #4
Source File: IntType.java From Bytecoder with Apache License 2.0 | 4 votes |
public BranchInstruction GE(boolean tozero) { return tozero ? (BranchInstruction) new IFGE(null) : (BranchInstruction) new IF_ICMPGE(null); }
Example #5
Source File: BooleanType.java From Bytecoder with Apache License 2.0 | 4 votes |
public BranchInstruction GE(boolean tozero) { return tozero ? (BranchInstruction) new IFGE(null) : (BranchInstruction) new IF_ICMPGE(null); }
Example #6
Source File: Key.java From openjdk-jdk9 with GNU General Public License v2.0 | 4 votes |
/** * This method is called if the "use" attribute of the key contains a * node set. In this case we must traverse all nodes in the set and * create one entry in this key's index for each node in the set. */ public void traverseNodeSet(ClassGenerator classGen, MethodGenerator methodGen, int buildKeyIndex) { final ConstantPoolGen cpg = classGen.getConstantPool(); final InstructionList il = methodGen.getInstructionList(); // DOM.getStringValueX(nodeIndex) => String final int getNodeValue = cpg.addInterfaceMethodref(DOM_INTF, GET_NODE_VALUE, "(I)"+STRING_SIG); final int getNodeIdent = cpg.addInterfaceMethodref(DOM_INTF, "getNodeIdent", "(I)"+NODE_SIG); // AbstractTranslet.SetKeyIndexDom(name, Dom) => void final int keyDom = cpg.addMethodref(TRANSLET_CLASS, "setKeyIndexDom", "("+STRING_SIG+DOM_INTF_SIG+")V"); // This variable holds the id of the node we found with the "match" // attribute of xsl:key. This is the id we store, with the value we // get from the nodes we find here, in the index for this key. final LocalVariableGen parentNode = methodGen.addLocalVariable("parentNode", Util.getJCRefType("I"), null, null); // Get the 'parameter' from the stack and store it in a local var. parentNode.setStart(il.append(new ISTORE(parentNode.getIndex()))); // Save current node and current iterator on the stack il.append(methodGen.loadCurrentNode()); il.append(methodGen.loadIterator()); // Overwrite current iterator with one that gives us only what we want _use.translate(classGen, methodGen); _use.startIterator(classGen, methodGen); il.append(methodGen.storeIterator()); final BranchHandle nextNode = il.append(new GOTO(null)); final InstructionHandle loop = il.append(NOP); // Prepare to call buildKeyIndex(String name, int node, String value); il.append(classGen.loadTranslet()); il.append(new PUSH(cpg, _name.toString())); parentNode.setEnd(il.append(new ILOAD(parentNode.getIndex()))); // Now get the node value and push it on the parameter stack il.append(methodGen.loadDOM()); il.append(methodGen.loadCurrentNode()); il.append(new INVOKEINTERFACE(getNodeValue, 2)); // Finally do the call to add an entry in the index for this key. il.append(new INVOKEVIRTUAL(buildKeyIndex)); il.append(classGen.loadTranslet()); il.append(new PUSH(cpg, getName())); il.append(methodGen.loadDOM()); il.append(new INVOKEVIRTUAL(keyDom)); nextNode.setTarget(il.append(methodGen.loadIterator())); il.append(methodGen.nextNode()); il.append(DUP); il.append(methodGen.storeCurrentNode()); il.append(new IFGE(loop)); // Go on to next matching node.... // Restore current node and current iterator from the stack il.append(methodGen.storeIterator()); il.append(methodGen.storeCurrentNode()); }
Example #7
Source File: IntType.java From openjdk-jdk9 with GNU General Public License v2.0 | 4 votes |
public BranchInstruction GE(boolean tozero) { return tozero ? (BranchInstruction) new IFGE(null) : (BranchInstruction) new IF_ICMPGE(null); }
Example #8
Source File: BooleanType.java From openjdk-jdk9 with GNU General Public License v2.0 | 4 votes |
public BranchInstruction GE(boolean tozero) { return tozero ? (BranchInstruction) new IFGE(null) : (BranchInstruction) new IF_ICMPGE(null); }
Example #9
Source File: Key.java From hottub with GNU General Public License v2.0 | 4 votes |
/** * This method is called if the "use" attribute of the key contains a * node set. In this case we must traverse all nodes in the set and * create one entry in this key's index for each node in the set. */ public void traverseNodeSet(ClassGenerator classGen, MethodGenerator methodGen, int buildKeyIndex) { final ConstantPoolGen cpg = classGen.getConstantPool(); final InstructionList il = methodGen.getInstructionList(); // DOM.getStringValueX(nodeIndex) => String final int getNodeValue = cpg.addInterfaceMethodref(DOM_INTF, GET_NODE_VALUE, "(I)"+STRING_SIG); final int getNodeIdent = cpg.addInterfaceMethodref(DOM_INTF, "getNodeIdent", "(I)"+NODE_SIG); // AbstractTranslet.SetKeyIndexDom(name, Dom) => void final int keyDom = cpg.addMethodref(TRANSLET_CLASS, "setKeyIndexDom", "("+STRING_SIG+DOM_INTF_SIG+")V"); // This variable holds the id of the node we found with the "match" // attribute of xsl:key. This is the id we store, with the value we // get from the nodes we find here, in the index for this key. final LocalVariableGen parentNode = methodGen.addLocalVariable("parentNode", Util.getJCRefType("I"), null, null); // Get the 'parameter' from the stack and store it in a local var. parentNode.setStart(il.append(new ISTORE(parentNode.getIndex()))); // Save current node and current iterator on the stack il.append(methodGen.loadCurrentNode()); il.append(methodGen.loadIterator()); // Overwrite current iterator with one that gives us only what we want _use.translate(classGen, methodGen); _use.startIterator(classGen, methodGen); il.append(methodGen.storeIterator()); final BranchHandle nextNode = il.append(new GOTO(null)); final InstructionHandle loop = il.append(NOP); // Prepare to call buildKeyIndex(String name, int node, String value); il.append(classGen.loadTranslet()); il.append(new PUSH(cpg, _name.toString())); parentNode.setEnd(il.append(new ILOAD(parentNode.getIndex()))); // Now get the node value and push it on the parameter stack il.append(methodGen.loadDOM()); il.append(methodGen.loadCurrentNode()); il.append(new INVOKEINTERFACE(getNodeValue, 2)); // Finally do the call to add an entry in the index for this key. il.append(new INVOKEVIRTUAL(buildKeyIndex)); il.append(classGen.loadTranslet()); il.append(new PUSH(cpg, getName())); il.append(methodGen.loadDOM()); il.append(new INVOKEVIRTUAL(keyDom)); nextNode.setTarget(il.append(methodGen.loadIterator())); il.append(methodGen.nextNode()); il.append(DUP); il.append(methodGen.storeCurrentNode()); il.append(new IFGE(loop)); // Go on to next matching node.... // Restore current node and current iterator from the stack il.append(methodGen.storeIterator()); il.append(methodGen.storeCurrentNode()); }
Example #10
Source File: IntType.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 4 votes |
public BranchInstruction GE(boolean tozero) { return tozero ? (BranchInstruction) new IFGE(null) : (BranchInstruction) new IF_ICMPGE(null); }
Example #11
Source File: BooleanType.java From hottub with GNU General Public License v2.0 | 4 votes |
public BranchInstruction GE(boolean tozero) { return tozero ? (BranchInstruction) new IFGE(null) : (BranchInstruction) new IF_ICMPGE(null); }
Example #12
Source File: Key.java From openjdk-8-source with GNU General Public License v2.0 | 4 votes |
/** * This method is called if the "use" attribute of the key contains a * node set. In this case we must traverse all nodes in the set and * create one entry in this key's index for each node in the set. */ public void traverseNodeSet(ClassGenerator classGen, MethodGenerator methodGen, int buildKeyIndex) { final ConstantPoolGen cpg = classGen.getConstantPool(); final InstructionList il = methodGen.getInstructionList(); // DOM.getStringValueX(nodeIndex) => String final int getNodeValue = cpg.addInterfaceMethodref(DOM_INTF, GET_NODE_VALUE, "(I)"+STRING_SIG); final int getNodeIdent = cpg.addInterfaceMethodref(DOM_INTF, "getNodeIdent", "(I)"+NODE_SIG); // AbstractTranslet.SetKeyIndexDom(name, Dom) => void final int keyDom = cpg.addMethodref(TRANSLET_CLASS, "setKeyIndexDom", "("+STRING_SIG+DOM_INTF_SIG+")V"); // This variable holds the id of the node we found with the "match" // attribute of xsl:key. This is the id we store, with the value we // get from the nodes we find here, in the index for this key. final LocalVariableGen parentNode = methodGen.addLocalVariable("parentNode", Util.getJCRefType("I"), null, null); // Get the 'parameter' from the stack and store it in a local var. parentNode.setStart(il.append(new ISTORE(parentNode.getIndex()))); // Save current node and current iterator on the stack il.append(methodGen.loadCurrentNode()); il.append(methodGen.loadIterator()); // Overwrite current iterator with one that gives us only what we want _use.translate(classGen, methodGen); _use.startIterator(classGen, methodGen); il.append(methodGen.storeIterator()); final BranchHandle nextNode = il.append(new GOTO(null)); final InstructionHandle loop = il.append(NOP); // Prepare to call buildKeyIndex(String name, int node, String value); il.append(classGen.loadTranslet()); il.append(new PUSH(cpg, _name.toString())); parentNode.setEnd(il.append(new ILOAD(parentNode.getIndex()))); // Now get the node value and push it on the parameter stack il.append(methodGen.loadDOM()); il.append(methodGen.loadCurrentNode()); il.append(new INVOKEINTERFACE(getNodeValue, 2)); // Finally do the call to add an entry in the index for this key. il.append(new INVOKEVIRTUAL(buildKeyIndex)); il.append(classGen.loadTranslet()); il.append(new PUSH(cpg, getName())); il.append(methodGen.loadDOM()); il.append(new INVOKEVIRTUAL(keyDom)); nextNode.setTarget(il.append(methodGen.loadIterator())); il.append(methodGen.nextNode()); il.append(DUP); il.append(methodGen.storeCurrentNode()); il.append(new IFGE(loop)); // Go on to next matching node.... // Restore current node and current iterator from the stack il.append(methodGen.storeIterator()); il.append(methodGen.storeCurrentNode()); }
Example #13
Source File: IntType.java From openjdk-8-source with GNU General Public License v2.0 | 4 votes |
public BranchInstruction GE(boolean tozero) { return tozero ? (BranchInstruction) new IFGE(null) : (BranchInstruction) new IF_ICMPGE(null); }
Example #14
Source File: BooleanType.java From openjdk-8-source with GNU General Public License v2.0 | 4 votes |
public BranchInstruction GE(boolean tozero) { return tozero ? (BranchInstruction) new IFGE(null) : (BranchInstruction) new IF_ICMPGE(null); }
Example #15
Source File: Key.java From openjdk-8 with GNU General Public License v2.0 | 4 votes |
/** * This method is called if the "use" attribute of the key contains a * node set. In this case we must traverse all nodes in the set and * create one entry in this key's index for each node in the set. */ public void traverseNodeSet(ClassGenerator classGen, MethodGenerator methodGen, int buildKeyIndex) { final ConstantPoolGen cpg = classGen.getConstantPool(); final InstructionList il = methodGen.getInstructionList(); // DOM.getStringValueX(nodeIndex) => String final int getNodeValue = cpg.addInterfaceMethodref(DOM_INTF, GET_NODE_VALUE, "(I)"+STRING_SIG); final int getNodeIdent = cpg.addInterfaceMethodref(DOM_INTF, "getNodeIdent", "(I)"+NODE_SIG); // AbstractTranslet.SetKeyIndexDom(name, Dom) => void final int keyDom = cpg.addMethodref(TRANSLET_CLASS, "setKeyIndexDom", "("+STRING_SIG+DOM_INTF_SIG+")V"); // This variable holds the id of the node we found with the "match" // attribute of xsl:key. This is the id we store, with the value we // get from the nodes we find here, in the index for this key. final LocalVariableGen parentNode = methodGen.addLocalVariable("parentNode", Util.getJCRefType("I"), null, null); // Get the 'parameter' from the stack and store it in a local var. parentNode.setStart(il.append(new ISTORE(parentNode.getIndex()))); // Save current node and current iterator on the stack il.append(methodGen.loadCurrentNode()); il.append(methodGen.loadIterator()); // Overwrite current iterator with one that gives us only what we want _use.translate(classGen, methodGen); _use.startIterator(classGen, methodGen); il.append(methodGen.storeIterator()); final BranchHandle nextNode = il.append(new GOTO(null)); final InstructionHandle loop = il.append(NOP); // Prepare to call buildKeyIndex(String name, int node, String value); il.append(classGen.loadTranslet()); il.append(new PUSH(cpg, _name.toString())); parentNode.setEnd(il.append(new ILOAD(parentNode.getIndex()))); // Now get the node value and push it on the parameter stack il.append(methodGen.loadDOM()); il.append(methodGen.loadCurrentNode()); il.append(new INVOKEINTERFACE(getNodeValue, 2)); // Finally do the call to add an entry in the index for this key. il.append(new INVOKEVIRTUAL(buildKeyIndex)); il.append(classGen.loadTranslet()); il.append(new PUSH(cpg, getName())); il.append(methodGen.loadDOM()); il.append(new INVOKEVIRTUAL(keyDom)); nextNode.setTarget(il.append(methodGen.loadIterator())); il.append(methodGen.nextNode()); il.append(DUP); il.append(methodGen.storeCurrentNode()); il.append(new IFGE(loop)); // Go on to next matching node.... // Restore current node and current iterator from the stack il.append(methodGen.storeIterator()); il.append(methodGen.storeCurrentNode()); }
Example #16
Source File: IntType.java From openjdk-8 with GNU General Public License v2.0 | 4 votes |
public BranchInstruction GE(boolean tozero) { return tozero ? (BranchInstruction) new IFGE(null) : (BranchInstruction) new IF_ICMPGE(null); }
Example #17
Source File: BooleanType.java From openjdk-8 with GNU General Public License v2.0 | 4 votes |
public BranchInstruction GE(boolean tozero) { return tozero ? (BranchInstruction) new IFGE(null) : (BranchInstruction) new IF_ICMPGE(null); }
Example #18
Source File: Key.java From jdk1.8-source-analysis with Apache License 2.0 | 4 votes |
/** * This method is called if the "use" attribute of the key contains a * node set. In this case we must traverse all nodes in the set and * create one entry in this key's index for each node in the set. */ public void traverseNodeSet(ClassGenerator classGen, MethodGenerator methodGen, int buildKeyIndex) { final ConstantPoolGen cpg = classGen.getConstantPool(); final InstructionList il = methodGen.getInstructionList(); // DOM.getStringValueX(nodeIndex) => String final int getNodeValue = cpg.addInterfaceMethodref(DOM_INTF, GET_NODE_VALUE, "(I)"+STRING_SIG); final int getNodeIdent = cpg.addInterfaceMethodref(DOM_INTF, "getNodeIdent", "(I)"+NODE_SIG); // AbstractTranslet.SetKeyIndexDom(name, Dom) => void final int keyDom = cpg.addMethodref(TRANSLET_CLASS, "setKeyIndexDom", "("+STRING_SIG+DOM_INTF_SIG+")V"); // This variable holds the id of the node we found with the "match" // attribute of xsl:key. This is the id we store, with the value we // get from the nodes we find here, in the index for this key. final LocalVariableGen parentNode = methodGen.addLocalVariable("parentNode", Util.getJCRefType("I"), null, null); // Get the 'parameter' from the stack and store it in a local var. parentNode.setStart(il.append(new ISTORE(parentNode.getIndex()))); // Save current node and current iterator on the stack il.append(methodGen.loadCurrentNode()); il.append(methodGen.loadIterator()); // Overwrite current iterator with one that gives us only what we want _use.translate(classGen, methodGen); _use.startIterator(classGen, methodGen); il.append(methodGen.storeIterator()); final BranchHandle nextNode = il.append(new GOTO(null)); final InstructionHandle loop = il.append(NOP); // Prepare to call buildKeyIndex(String name, int node, String value); il.append(classGen.loadTranslet()); il.append(new PUSH(cpg, _name.toString())); parentNode.setEnd(il.append(new ILOAD(parentNode.getIndex()))); // Now get the node value and push it on the parameter stack il.append(methodGen.loadDOM()); il.append(methodGen.loadCurrentNode()); il.append(new INVOKEINTERFACE(getNodeValue, 2)); // Finally do the call to add an entry in the index for this key. il.append(new INVOKEVIRTUAL(buildKeyIndex)); il.append(classGen.loadTranslet()); il.append(new PUSH(cpg, getName())); il.append(methodGen.loadDOM()); il.append(new INVOKEVIRTUAL(keyDom)); nextNode.setTarget(il.append(methodGen.loadIterator())); il.append(methodGen.nextNode()); il.append(DUP); il.append(methodGen.storeCurrentNode()); il.append(new IFGE(loop)); // Go on to next matching node.... // Restore current node and current iterator from the stack il.append(methodGen.storeIterator()); il.append(methodGen.storeCurrentNode()); }
Example #19
Source File: Key.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 4 votes |
/** * This method is called if the "use" attribute of the key contains a * node set. In this case we must traverse all nodes in the set and * create one entry in this key's index for each node in the set. */ public void traverseNodeSet(ClassGenerator classGen, MethodGenerator methodGen, int buildKeyIndex) { final ConstantPoolGen cpg = classGen.getConstantPool(); final InstructionList il = methodGen.getInstructionList(); // DOM.getStringValueX(nodeIndex) => String final int getNodeValue = cpg.addInterfaceMethodref(DOM_INTF, GET_NODE_VALUE, "(I)"+STRING_SIG); final int getNodeIdent = cpg.addInterfaceMethodref(DOM_INTF, "getNodeIdent", "(I)"+NODE_SIG); // AbstractTranslet.SetKeyIndexDom(name, Dom) => void final int keyDom = cpg.addMethodref(TRANSLET_CLASS, "setKeyIndexDom", "("+STRING_SIG+DOM_INTF_SIG+")V"); // This variable holds the id of the node we found with the "match" // attribute of xsl:key. This is the id we store, with the value we // get from the nodes we find here, in the index for this key. final LocalVariableGen parentNode = methodGen.addLocalVariable("parentNode", Util.getJCRefType("I"), null, null); // Get the 'parameter' from the stack and store it in a local var. parentNode.setStart(il.append(new ISTORE(parentNode.getIndex()))); // Save current node and current iterator on the stack il.append(methodGen.loadCurrentNode()); il.append(methodGen.loadIterator()); // Overwrite current iterator with one that gives us only what we want _use.translate(classGen, methodGen); _use.startIterator(classGen, methodGen); il.append(methodGen.storeIterator()); final BranchHandle nextNode = il.append(new GOTO(null)); final InstructionHandle loop = il.append(NOP); // Prepare to call buildKeyIndex(String name, int node, String value); il.append(classGen.loadTranslet()); il.append(new PUSH(cpg, _name.toString())); parentNode.setEnd(il.append(new ILOAD(parentNode.getIndex()))); // Now get the node value and push it on the parameter stack il.append(methodGen.loadDOM()); il.append(methodGen.loadCurrentNode()); il.append(new INVOKEINTERFACE(getNodeValue, 2)); // Finally do the call to add an entry in the index for this key. il.append(new INVOKEVIRTUAL(buildKeyIndex)); il.append(classGen.loadTranslet()); il.append(new PUSH(cpg, getName())); il.append(methodGen.loadDOM()); il.append(new INVOKEVIRTUAL(keyDom)); nextNode.setTarget(il.append(methodGen.loadIterator())); il.append(methodGen.nextNode()); il.append(DUP); il.append(methodGen.storeCurrentNode()); il.append(new IFGE(loop)); // Go on to next matching node.... // Restore current node and current iterator from the stack il.append(methodGen.storeIterator()); il.append(methodGen.storeCurrentNode()); }
Example #20
Source File: BooleanType.java From openjdk-jdk8u with GNU General Public License v2.0 | 4 votes |
public BranchInstruction GE(boolean tozero) { return tozero ? (BranchInstruction) new IFGE(null) : (BranchInstruction) new IF_ICMPGE(null); }
Example #21
Source File: IntType.java From openjdk-jdk8u with GNU General Public License v2.0 | 4 votes |
public BranchInstruction GE(boolean tozero) { return tozero ? (BranchInstruction) new IFGE(null) : (BranchInstruction) new IF_ICMPGE(null); }
Example #22
Source File: Key.java From openjdk-jdk8u with GNU General Public License v2.0 | 4 votes |
/** * This method is called if the "use" attribute of the key contains a * node set. In this case we must traverse all nodes in the set and * create one entry in this key's index for each node in the set. */ public void traverseNodeSet(ClassGenerator classGen, MethodGenerator methodGen, int buildKeyIndex) { final ConstantPoolGen cpg = classGen.getConstantPool(); final InstructionList il = methodGen.getInstructionList(); // DOM.getStringValueX(nodeIndex) => String final int getNodeValue = cpg.addInterfaceMethodref(DOM_INTF, GET_NODE_VALUE, "(I)"+STRING_SIG); final int getNodeIdent = cpg.addInterfaceMethodref(DOM_INTF, "getNodeIdent", "(I)"+NODE_SIG); // AbstractTranslet.SetKeyIndexDom(name, Dom) => void final int keyDom = cpg.addMethodref(TRANSLET_CLASS, "setKeyIndexDom", "("+STRING_SIG+DOM_INTF_SIG+")V"); // This variable holds the id of the node we found with the "match" // attribute of xsl:key. This is the id we store, with the value we // get from the nodes we find here, in the index for this key. final LocalVariableGen parentNode = methodGen.addLocalVariable("parentNode", Util.getJCRefType("I"), null, null); // Get the 'parameter' from the stack and store it in a local var. parentNode.setStart(il.append(new ISTORE(parentNode.getIndex()))); // Save current node and current iterator on the stack il.append(methodGen.loadCurrentNode()); il.append(methodGen.loadIterator()); // Overwrite current iterator with one that gives us only what we want _use.translate(classGen, methodGen); _use.startIterator(classGen, methodGen); il.append(methodGen.storeIterator()); final BranchHandle nextNode = il.append(new GOTO(null)); final InstructionHandle loop = il.append(NOP); // Prepare to call buildKeyIndex(String name, int node, String value); il.append(classGen.loadTranslet()); il.append(new PUSH(cpg, _name.toString())); parentNode.setEnd(il.append(new ILOAD(parentNode.getIndex()))); // Now get the node value and push it on the parameter stack il.append(methodGen.loadDOM()); il.append(methodGen.loadCurrentNode()); il.append(new INVOKEINTERFACE(getNodeValue, 2)); // Finally do the call to add an entry in the index for this key. il.append(new INVOKEVIRTUAL(buildKeyIndex)); il.append(classGen.loadTranslet()); il.append(new PUSH(cpg, getName())); il.append(methodGen.loadDOM()); il.append(new INVOKEVIRTUAL(keyDom)); nextNode.setTarget(il.append(methodGen.loadIterator())); il.append(methodGen.nextNode()); il.append(DUP); il.append(methodGen.storeCurrentNode()); il.append(new IFGE(loop)); // Go on to next matching node.... // Restore current node and current iterator from the stack il.append(methodGen.storeIterator()); il.append(methodGen.storeCurrentNode()); }
Example #23
Source File: BooleanType.java From JDKSourceCode1.8 with MIT License | 4 votes |
public BranchInstruction GE(boolean tozero) { return tozero ? (BranchInstruction) new IFGE(null) : (BranchInstruction) new IF_ICMPGE(null); }
Example #24
Source File: IntType.java From JDKSourceCode1.8 with MIT License | 4 votes |
public BranchInstruction GE(boolean tozero) { return tozero ? (BranchInstruction) new IFGE(null) : (BranchInstruction) new IF_ICMPGE(null); }
Example #25
Source File: Key.java From JDKSourceCode1.8 with MIT License | 4 votes |
/** * This method is called if the "use" attribute of the key contains a * node set. In this case we must traverse all nodes in the set and * create one entry in this key's index for each node in the set. */ public void traverseNodeSet(ClassGenerator classGen, MethodGenerator methodGen, int buildKeyIndex) { final ConstantPoolGen cpg = classGen.getConstantPool(); final InstructionList il = methodGen.getInstructionList(); // DOM.getStringValueX(nodeIndex) => String final int getNodeValue = cpg.addInterfaceMethodref(DOM_INTF, GET_NODE_VALUE, "(I)"+STRING_SIG); final int getNodeIdent = cpg.addInterfaceMethodref(DOM_INTF, "getNodeIdent", "(I)"+NODE_SIG); // AbstractTranslet.SetKeyIndexDom(name, Dom) => void final int keyDom = cpg.addMethodref(TRANSLET_CLASS, "setKeyIndexDom", "("+STRING_SIG+DOM_INTF_SIG+")V"); // This variable holds the id of the node we found with the "match" // attribute of xsl:key. This is the id we store, with the value we // get from the nodes we find here, in the index for this key. final LocalVariableGen parentNode = methodGen.addLocalVariable("parentNode", Util.getJCRefType("I"), null, null); // Get the 'parameter' from the stack and store it in a local var. parentNode.setStart(il.append(new ISTORE(parentNode.getIndex()))); // Save current node and current iterator on the stack il.append(methodGen.loadCurrentNode()); il.append(methodGen.loadIterator()); // Overwrite current iterator with one that gives us only what we want _use.translate(classGen, methodGen); _use.startIterator(classGen, methodGen); il.append(methodGen.storeIterator()); final BranchHandle nextNode = il.append(new GOTO(null)); final InstructionHandle loop = il.append(NOP); // Prepare to call buildKeyIndex(String name, int node, String value); il.append(classGen.loadTranslet()); il.append(new PUSH(cpg, _name.toString())); parentNode.setEnd(il.append(new ILOAD(parentNode.getIndex()))); // Now get the node value and push it on the parameter stack il.append(methodGen.loadDOM()); il.append(methodGen.loadCurrentNode()); il.append(new INVOKEINTERFACE(getNodeValue, 2)); // Finally do the call to add an entry in the index for this key. il.append(new INVOKEVIRTUAL(buildKeyIndex)); il.append(classGen.loadTranslet()); il.append(new PUSH(cpg, getName())); il.append(methodGen.loadDOM()); il.append(new INVOKEVIRTUAL(keyDom)); nextNode.setTarget(il.append(methodGen.loadIterator())); il.append(methodGen.nextNode()); il.append(DUP); il.append(methodGen.storeCurrentNode()); il.append(new IFGE(loop)); // Go on to next matching node.... // Restore current node and current iterator from the stack il.append(methodGen.storeIterator()); il.append(methodGen.storeCurrentNode()); }
Example #26
Source File: BooleanType.java From jdk8u60 with GNU General Public License v2.0 | 4 votes |
public BranchInstruction GE(boolean tozero) { return tozero ? (BranchInstruction) new IFGE(null) : (BranchInstruction) new IF_ICMPGE(null); }
Example #27
Source File: IntType.java From jdk8u60 with GNU General Public License v2.0 | 4 votes |
public BranchInstruction GE(boolean tozero) { return tozero ? (BranchInstruction) new IFGE(null) : (BranchInstruction) new IF_ICMPGE(null); }
Example #28
Source File: Key.java From jdk8u60 with GNU General Public License v2.0 | 4 votes |
/** * This method is called if the "use" attribute of the key contains a * node set. In this case we must traverse all nodes in the set and * create one entry in this key's index for each node in the set. */ public void traverseNodeSet(ClassGenerator classGen, MethodGenerator methodGen, int buildKeyIndex) { final ConstantPoolGen cpg = classGen.getConstantPool(); final InstructionList il = methodGen.getInstructionList(); // DOM.getStringValueX(nodeIndex) => String final int getNodeValue = cpg.addInterfaceMethodref(DOM_INTF, GET_NODE_VALUE, "(I)"+STRING_SIG); final int getNodeIdent = cpg.addInterfaceMethodref(DOM_INTF, "getNodeIdent", "(I)"+NODE_SIG); // AbstractTranslet.SetKeyIndexDom(name, Dom) => void final int keyDom = cpg.addMethodref(TRANSLET_CLASS, "setKeyIndexDom", "("+STRING_SIG+DOM_INTF_SIG+")V"); // This variable holds the id of the node we found with the "match" // attribute of xsl:key. This is the id we store, with the value we // get from the nodes we find here, in the index for this key. final LocalVariableGen parentNode = methodGen.addLocalVariable("parentNode", Util.getJCRefType("I"), null, null); // Get the 'parameter' from the stack and store it in a local var. parentNode.setStart(il.append(new ISTORE(parentNode.getIndex()))); // Save current node and current iterator on the stack il.append(methodGen.loadCurrentNode()); il.append(methodGen.loadIterator()); // Overwrite current iterator with one that gives us only what we want _use.translate(classGen, methodGen); _use.startIterator(classGen, methodGen); il.append(methodGen.storeIterator()); final BranchHandle nextNode = il.append(new GOTO(null)); final InstructionHandle loop = il.append(NOP); // Prepare to call buildKeyIndex(String name, int node, String value); il.append(classGen.loadTranslet()); il.append(new PUSH(cpg, _name.toString())); parentNode.setEnd(il.append(new ILOAD(parentNode.getIndex()))); // Now get the node value and push it on the parameter stack il.append(methodGen.loadDOM()); il.append(methodGen.loadCurrentNode()); il.append(new INVOKEINTERFACE(getNodeValue, 2)); // Finally do the call to add an entry in the index for this key. il.append(new INVOKEVIRTUAL(buildKeyIndex)); il.append(classGen.loadTranslet()); il.append(new PUSH(cpg, getName())); il.append(methodGen.loadDOM()); il.append(new INVOKEVIRTUAL(keyDom)); nextNode.setTarget(il.append(methodGen.loadIterator())); il.append(methodGen.nextNode()); il.append(DUP); il.append(methodGen.storeCurrentNode()); il.append(new IFGE(loop)); // Go on to next matching node.... // Restore current node and current iterator from the stack il.append(methodGen.storeIterator()); il.append(methodGen.storeCurrentNode()); }
Example #29
Source File: BooleanType.java From TencentKona-8 with GNU General Public License v2.0 | 4 votes |
public BranchInstruction GE(boolean tozero) { return tozero ? (BranchInstruction) new IFGE(null) : (BranchInstruction) new IF_ICMPGE(null); }
Example #30
Source File: IntType.java From TencentKona-8 with GNU General Public License v2.0 | 4 votes |
public BranchInstruction GE(boolean tozero) { return tozero ? (BranchInstruction) new IFGE(null) : (BranchInstruction) new IF_ICMPGE(null); }