Examples of PutField


Examples of org.apache.bcel.generic.PUTFIELD

      il.append(DUP);
      il.append(new PUSH(cpg, i));
      il.append(new PUSH(cpg, name));
      il.append(AASTORE);
  }
  il.append(new PUTFIELD(cpg.addFieldref(TRANSLET_CLASS,
                 NAMES_INDEX,
                 NAMES_INDEX_SIG)));

  // Put the namespace names array into the translet
  final Vector namespaces = getXSLTC().getNamespaceIndex();
  il.append(classGen.loadTranslet());
  il.append(new PUSH(cpg, namespaces.size()));
  il.append(new ANEWARRAY(cpg.addClass(STRING)));   

  for (int i = 0; i < namespaces.size(); i++) {
      final String ns = (String)namespaces.elementAt(i);
      il.append(DUP);
      il.append(new PUSH(cpg, i));
      il.append(new PUSH(cpg, ns));
      il.append(AASTORE);
  }
  il.append(new PUTFIELD(cpg.addFieldref(TRANSLET_CLASS,
                 NAMESPACE_INDEX,
                 NAMESPACE_INDEX_SIG)));

  // Compile in code to set the output configuration from <xsl:output>
  if (output != null) {
View Full Code Here

Examples of org.apache.bcel.generic.PUTFIELD

      il.append(new INVOKESPECIAL(init));
      // MultiDOM is on the stack
  }
 
  //store to _dom variable
  il.append(new PUTFIELD(domField));

  // continue with globals initialization
  il.append(new PUSH(cpg, DOM.ROOTNODE));
  il.append(new ISTORE(current.getIndex()));
View Full Code Here

Examples of org.apache.bcel.generic.PUTFIELD

    final VariableBase var = varRef.getVariable();

    // Store variable in new closure
    il.append(DUP);
    il.append(var.loadInstruction());
    il.append(new PUTFIELD(
      cpg.addFieldref(sortRecordFactoryClass, var.getEscapedName(),
          var.getType().toSignature())));
    dups.add(varRef);
      }
  }
View Full Code Here

Examples of org.apache.bcel.generic.PUTFIELD

      il.append(new GETFIELD(
    cpg.addFieldref(className,
        var.getEscapedName(), varType.toSignature())));

      // Put field in record class
      il.append(new PUTFIELD(
    cpg.addFieldref(sortRecordClass,
        var.getEscapedName(), varType.toSignature())));
  }
  il.append(POP);
  il.append(ARETURN);
View Full Code Here

Examples of org.apache.bcel.generic.PUTFIELD

    // Push a reference to "this" for putfield
    il.append(classGen.loadTranslet());
    // Compile variable value computation
    translateValue(classGen, methodGen);
    // Store the variable in the allocated field
    il.append(new PUTFIELD(cpg.addFieldref(classGen.getClassName(),
                   name, signature)));
      }
  }
    }
View Full Code Here

Examples of org.apache.bcel.generic.PUTFIELD

    // Cache the result of addParameter() in a field
    if (className != EMPTYSTRING) {
        il.append(new CHECKCAST(cpg.addClass(className)));
    }
    il.append(new PUTFIELD(cpg.addFieldref(classGen.getClassName(),
                   name, signature)));
      }
  }
    }
View Full Code Here

Examples of org.apache.bcel.generic.PUTFIELD

                                oldMethCopyInIL.append(
                                        InstructionConstants.DUP);
                                InstructionHandle copyInLoad =
                                    oldMethCopyInIL.append(
                                        loadLocal(oldLocalVarIndex, varType));
                                oldMethCopyInIL.append(new PUTFIELD(fieldRef));

                                // If the end of the live range of the old
                                // variable was in the middle of the outlined
                                // chunk.  Make the load of its value the new
                                // end of its range.
                                if (!copyOutLocalValue) {
                                    revisedLocalVarEnd.put(oldLVG, copyInLoad);
                                }

                                // Generate code for start of the outlined
                                // method to copy the value from a field in
                                // CopyLocals to the new local in the outlined
                                // method
                                newMethCopyInIL.append(
                                        InstructionConstants.ALOAD_1);
                                newMethCopyInIL.append(new GETFIELD(fieldRef));
                                newMethCopyInIL.append(
                                        storeLocal(newLocalVarIndex, varType));
                            }

                            if (copyOutLocalValue) {
                                // Generate code for the end of the outlined
                                // method to copy the value from the new local
                                // variable into a field in CopyLocals
                                // method
                                newMethCopyOutIL.append(
                                        InstructionConstants.ALOAD_1);
                                newMethCopyOutIL.append(
                                        loadLocal(newLocalVarIndex, varType));
                                newMethCopyOutIL.append(new PUTFIELD(fieldRef));

                                // Generate code to copy the value from a field
                                // in CopyLocals into a local in the original
                                // method following invocation of the outlined
                                // method.
View Full Code Here

Examples of org.apache.bcel.generic.PUTFIELD

  InstructionHandle iterStore = il.append(new ASTORE(iter.getIndex()));

  // If in the main class update the field too
  if (!classGen.isExternal()) {
      il.append(new ALOAD(iter.getIndex()));
      il.append(new PUTFIELD(iteratorIndex));
      ifBlock.setTarget(il.append(NOP));
  } else {
            // If class is not external, start of range for iter variable was
            // set above
            iter.setStart(iterStore);      
View Full Code Here

Examples of org.apache.bcel.generic.PUTFIELD

        constructor.markChunkStart();
  il.append(classGen.loadTranslet());
  il.append(new GETSTATIC(cpg.addFieldref(_className,
                                          STATIC_NAMES_ARRAY_FIELD,
                                          NAMES_INDEX_SIG)));
  il.append(new PUTFIELD(cpg.addFieldref(TRANSLET_CLASS,
                                         NAMES_INDEX,
                                         NAMES_INDEX_SIG)));
        constructor.markChunkEnd();
 
        constructor.markChunkStart();
  il.append(classGen.loadTranslet());
  il.append(new GETSTATIC(cpg.addFieldref(_className,
                                          STATIC_URIS_ARRAY_FIELD,
                                          URIS_INDEX_SIG)));
  il.append(new PUTFIELD(cpg.addFieldref(TRANSLET_CLASS,
                                         URIS_INDEX,
                                         URIS_INDEX_SIG)));
        constructor.markChunkEnd();

        constructor.markChunkStart();
  il.append(classGen.loadTranslet());
  il.append(new GETSTATIC(cpg.addFieldref(_className,
                                          STATIC_TYPES_ARRAY_FIELD,
                                          TYPES_INDEX_SIG)));
  il.append(new PUTFIELD(cpg.addFieldref(TRANSLET_CLASS,
                                         TYPES_INDEX,
                                         TYPES_INDEX_SIG)));
        constructor.markChunkEnd();

        constructor.markChunkStart();
  il.append(classGen.loadTranslet());
  il.append(new GETSTATIC(cpg.addFieldref(_className,
                                          STATIC_NAMESPACE_ARRAY_FIELD,
                                          NAMESPACE_INDEX_SIG)));
  il.append(new PUTFIELD(cpg.addFieldref(TRANSLET_CLASS,
                                         NAMESPACE_INDEX,
                                         NAMESPACE_INDEX_SIG)));
        constructor.markChunkEnd();

        constructor.markChunkStart();
  il.append(classGen.loadTranslet());
        il.append(new PUSH(cpg, AbstractTranslet.CURRENT_TRANSLET_VERSION));
  il.append(new PUTFIELD(cpg.addFieldref(TRANSLET_CLASS,
                                         TRANSLET_VERSION_INDEX,
                                         TRANSLET_VERSION_INDEX_SIG)));
        constructor.markChunkEnd();
 
  if (_hasIdCall) {
            constructor.markChunkStart();
      il.append(classGen.loadTranslet());
      il.append(new PUSH(cpg, Boolean.TRUE));
      il.append(new PUTFIELD(cpg.addFieldref(TRANSLET_CLASS,
                     HASIDCALL_INDEX,
                     HASIDCALL_INDEX_SIG)));
            constructor.markChunkEnd();
  }
 
View Full Code Here

Examples of org.apache.bcel.generic.PUTFIELD

      il.append(new INVOKESPECIAL(init));
      // MultiDOM is on the stack
  }
 
  //store to _dom variable
  il.append(new PUTFIELD(domField));

  // continue with globals initialization
  final int gitr = cpg.addInterfaceMethodref(DOM_INTF,
              "getIterator",
              "()"+NODE_ITERATOR_SIG);
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.