Examples of ALOAD


Examples of org.apache.bcel.generic.ALOAD

                                                null);
                   
            // store the name into a variable first so _name.translate only needs to be called once 
            _name.translate(classGen, methodGen);
            nameValue.setStart(il.append(new ASTORE(nameValue.getIndex())));
            il.append(new ALOAD(nameValue.getIndex()));
           
            // call checkQName if the name is an AVT
            final int check = cpg.addMethodref(BASIS_LIBRARY_CLASS, "checkQName",
                            "("
                            +STRING_SIG
                            +")V");                
            il.append(new INVOKESTATIC(check));
           
            // Push handler for call to endElement()
            il.append(methodGen.loadHandler());        
           
            // load name value again
            nameValue.setEnd(il.append(new ALOAD(nameValue.getIndex())));
                   
      if (_namespace != null) {
    _namespace.translate(classGen, methodGen);
      }
      else {
View Full Code Here

Examples of org.apache.bcel.generic.ALOAD

                    continue;
                }
                // System.out.println(handle.getPosition() + "\t" +
                // ins.getName() + "\t" + frame);

                ALOAD load = (ALOAD) ins;

                int index = load.getIndex();
                IsNullValue v = frame.getValue(index);
                if (!v.isDefinitelyNull()) {
                    int sourceLine = lineNumbers.getSourceLine(handle.getPosition());
                    if (sourceLine > 0) {
                        linesWithLoadsOfNotDefinitelyNullValues.set(sourceLine);
                    }
                }
            }
        }

        IdentityHashMap<InstructionHandle, Object> sometimesGood = new IdentityHashMap<InstructionHandle, Object>();

        for (Iterator<Location> i = cfg.locationIterator(); i.hasNext();) {
            Location location = i.next();
            InstructionHandle handle = location.getHandle();
            Instruction ins = handle.getInstruction();
            if (!(ins instanceof ALOAD)) {
                continue;
            }
            IsNullValueFrame frame = nullValueDataflow.getFactAtLocation(location);
            if (!frame.isValid()) {
                // This basic block is probably dead
                continue;
            }
            // System.out.println(handle.getPosition() + "\t" + ins.getName() +
            // "\t" + frame);

            ALOAD load = (ALOAD) ins;

            int index = load.getIndex();
            IsNullValue v = frame.getValue(index);
            if (!v.isDefinitelyNull()) {
                sometimesGood.put(handle, null);
            }
        }

        // System.out.println(nullValueDataflow);
        for (Iterator<Location> i = cfg.locationIterator(); i.hasNext();) {
            Location location = i.next();

            InstructionHandle handle = location.getHandle();
            Instruction ins = handle.getInstruction();
            if (!(ins instanceof ALOAD)) {
                continue;
            }

            if (sometimesGood.containsKey(handle)) {
                continue;
            }
            IsNullValueFrame frame = nullValueDataflow.getFactAtLocation(location);
            if (!frame.isValid()) {
                // This basic block is probably dead
                continue;
            }
            // System.out.println(handle.getPosition() + "\t" + ins.getName() +
            // "\t" + frame);

            ALOAD load = (ALOAD) ins;

            int index = load.getIndex();
            IsNullValue v = frame.getValue(index);
            if (v.isDefinitelyNull()) {
                InstructionHandle nextHandle = handle.getNext();
                Instruction next = nextHandle.getInstruction();
                int position = location
View Full Code Here

Examples of org.apache.bcel.generic.ALOAD

        Instruction nextInstruction = nextNextHandle.getInstruction();

        if (!(nextInstruction instanceof ALOAD)) {
            return false;
        }
        ALOAD nextLoad = (ALOAD) nextInstruction;
        if (load.getIndex() != nextLoad.getIndex()) {
            return false;
        }
        InstructionHandle nextNextNextHandle = nextNextHandle.getNext(); // invoke
        if (nextNextNextHandle == null) {
            return false;
View Full Code Here

Examples of org.apache.bcel.generic.ALOAD

            "compareTo",
            "(Ljava/lang/String;)I");

      // Handle elements="ns:*" type rule
      if (rule.getStrength() == RULE_NAMESPACE) {
    il.append(new ALOAD(paramDom));
    il.append(new ILOAD(paramCurrent));
    il.append(new INVOKEINTERFACE(gns,2));
    il.append(new PUSH(cpg, rule.getNamespace()));
    il.append(new INVOKEVIRTUAL(strcmp));
    il.append(ICONST_0);
View Full Code Here

Examples of org.apache.bcel.generic.ALOAD

        sortRecordFactoryTemp.setStart(
                il.append(new ASTORE(sortRecordFactoryTemp.getIndex())));

  il.append(new NEW(cpg.addClass(SORT_ITERATOR)));
  il.append(DUP);
        nodesTemp.setEnd(il.append(new ALOAD(nodesTemp.getIndex())));
        sortRecordFactoryTemp.setEnd(
                il.append(new ALOAD(sortRecordFactoryTemp.getIndex())));
  il.append(new INVOKESPECIAL(init));
    }
View Full Code Here

Examples of org.apache.bcel.generic.ALOAD

  il.append(DUP);
  il.append(methodGen.loadDOM());
  il.append(new PUSH(cpg, sortRecordClass));
  il.append(classGen.loadTranslet());

        sortOrderTemp.setEnd(il.append(new ALOAD(sortOrderTemp.getIndex())));
        sortTypeTemp.setEnd(il.append(new ALOAD(sortTypeTemp.getIndex())));
        sortLangTemp.setEnd(il.append(new ALOAD(sortLangTemp.getIndex())));
        sortCaseOrderTemp.setEnd(
                il.append(new ALOAD(sortCaseOrderTemp.getIndex())));

  il.append(new INVOKESPECIAL(
      cpg.addMethodref(sortRecordFactoryClass, "<init>",
    "(" + DOM_INTF_SIG
        + STRING_SIG
View Full Code Here

Examples of org.apache.bcel.generic.ALOAD

  // Push all parameters onto the stack and called super.<init>()
  il.append(ALOAD_0);
  il.append(ALOAD_1);
  il.append(ALOAD_2);
  il.append(new ALOAD(3));
  il.append(new ALOAD(4));
  il.append(new ALOAD(5));
  il.append(new ALOAD(6));
  il.append(new ALOAD(7));
  il.append(new INVOKESPECIAL(cpg.addMethodref(NODE_SORT_FACTORY,
      "<init>",
      "(" + DOM_INTF_SIG
    + STRING_SIG
    + TRANSLET_INTF_SIG
View Full Code Here

Examples of org.apache.bcel.generic.ALOAD

              +NODE_ITERATOR_SIG
              +")V");
  il.append(new NEW(cpg.addClass(STEP_ITERATOR_CLASS)));
  il.append(DUP);

        pathTemp.setEnd(il.append(new ALOAD(pathTemp.getIndex())));
        stepTemp.setEnd(il.append(new ALOAD(stepTemp.getIndex())));

  // Initialize StepIterator with iterators from the stack
  il.append(new INVOKESPECIAL(initSI));

  // This is a special case for the //* path with or without predicates
View Full Code Here

Examples of org.apache.bcel.generic.ALOAD

  il.append(DUP);
  name.setStart(il.append(new ASTORE(name.getIndex())));
  final BranchHandle ifBlock1 = il.append(new IFNULL(null));

  // Get the length of the node name and save for later
  il.append(new ALOAD(name.getIndex()));
  final int lengthMethod = cpg.addMethodref(STRING_CLASS,"length","()I");
  il.append(new INVOKEVIRTUAL(lengthMethod));
  length.setStart(il.append(new ISTORE(length.getIndex())));

  // Copy in attribute sets if specified
  if (_useSets != null) {
      // If the parent of this element will result in an element being
      // output then we know that it is safe to copy out the attributes
      final SyntaxTreeNode parent = getParent();
      if ((parent instanceof LiteralElement) ||
    (parent instanceof LiteralElement)) {
    _useSets.translate(classGen, methodGen);
      }
      // If not we have to check to see if the copy will result in an
      // element being output.
      else {
    // check if element; if not skip to translate body
    il.append(new ILOAD(length.getIndex()));
    final BranchHandle ifBlock2 = il.append(new IFEQ(null));
    // length != 0 -> element -> do attribute sets
    _useSets.translate(classGen, methodGen);
    // not an element; root
    ifBlock2.setTarget(il.append(NOP));
      }
  }

  // Instantiate body of xsl:copy
  translateContents(classGen, methodGen);

  // Call the output handler's endElement() if we copied an element
  // (The DOM.shallowCopy() method calls startElement().)
  length.setEnd(il.append(new ILOAD(length.getIndex())));
  final BranchHandle ifBlock3 = il.append(new IFEQ(null));
  il.append(methodGen.loadHandler());
  name.setEnd(il.append(new ALOAD(name.getIndex())));
  il.append(methodGen.endElement());
 
  final InstructionHandle end = il.append(NOP);
  ifBlock1.setTarget(end);
  ifBlock3.setTarget(end);
View Full Code Here

Examples of org.apache.bcel.generic.ALOAD

            pathTemp.setStart(il.append(new ASTORE(pathTemp.getIndex())));

      // Create new Dup Filter Iterator
      il.append(new NEW(cpg.addClass(DUP_FILTERED_ITERATOR)));
      il.append(DUP);
            pathTemp.setEnd(il.append(new ALOAD(pathTemp.getIndex())));

      // Initialize Dup Filter Iterator with iterator from the stack
      il.append(new INVOKESPECIAL(initDFI));
  }
  else {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.