Package javassist.bytecode

Examples of javassist.bytecode.CodeIterator.byteAt()


      CodeIterator iterator = context.behavior.getMethodInfo().getCodeAttribute().iterator();
      iterator.move(from);
      Stack currentStack = stack.copy();
      while(iterator.hasNext()) {
        int index = iterator.next();
        Op op = Opcodes.OPCODES.get(iterator.byteAt(index)).init(context, index);
        trace.append("\n").append(index).append(":").append(op.getName()).append(" --> ");
        Frame frame = frames[index];
        frame.isAccessible = true;
        frame.stackBefore = currentStack.copy();
        frame.decodedOp = op.decode(context, index);
View Full Code Here


                    codeAttribute.setMaxStack(codeAttribute.computeMaxStack());

                    // Bon chaque instruction de cette méthode
                    while (codeIterator.hasNext()) {
                        int index = codeIterator.next();
                        int op = codeIterator.byteAt(index);

                        // DEBUG
                        // printOp(op);

                        int varNumber = -1;
View Full Code Here

                        int varNumber = -1;
                        // The variable changes
                        if (storeByCode.containsKey(op)) {
                            varNumber = storeByCode.get(op);
                            if (varNumber == -2) {
                                varNumber = codeIterator.byteAt(index + 1);
                            }
                        }

                        // Si c'est un store de la variable en cours d'examination
                        // et que c'est dans la frame d'utilisation de cette variable on trace l'affectation.
View Full Code Here

      try {
        final CodeIterator itr = codeAttr.iterator();
        while ( itr.hasNext() ) {
          final int index = itr.next();
          final int op = itr.byteAt( index );
          if ( op != Opcode.PUTFIELD && op != Opcode.GETFIELD ) {
            continue;
          }

          final int constIndex = itr.u16bitAt( index+1 );
View Full Code Here

         return;
      CodeIterator iterator = code.iterator();
      while (iterator.hasNext())
      {
         int index = iterator.next();
         int op = iterator.byteAt(index);

         if (op == Opcode.LDC || op == Opcode.LDC_W)
         {
            int index0 = iterator.byteAt(index + 1);
            int constIndex = index0;
View Full Code Here

         int index = iterator.next();
         int op = iterator.byteAt(index);

         if (op == Opcode.LDC || op == Opcode.LDC_W)
         {
            int index0 = iterator.byteAt(index + 1);
            int constIndex = index0;
            if (op == Opcode.LDC_W)
            {
               int index1 = iterator.byteAt(index + 2);
               constIndex = (index0 << 8) + index1;
View Full Code Here

         {
            int index0 = iterator.byteAt(index + 1);
            int constIndex = index0;
            if (op == Opcode.LDC_W)
            {
               int index1 = iterator.byteAt(index + 2);
               constIndex = (index0 << 8) + index1;
            }
            if (7 == constPool.getTag(constIndex))
            {
               String className = constPool.getClassInfo(constIndex);
View Full Code Here

/*  799 */       while (iterator.hasNext()) {
/*  800 */         int pos = iterator.next();
/*  801 */         if (pos >= subr) {
/*      */           break;
/*      */         }
/*  804 */         int c = iterator.byteAt(pos);
/*  805 */         if ((c == 176) || (c == 172) || (c == 174) || (c == 173) || (c == 175) || (c == 177))
/*      */         {
/*  808 */           insertGoto(iterator, subr, pos);
/*  809 */           subr = iterator.getCodeLength() - gapLen;
/*      */         }
View Full Code Here

/* 225 */     if (ca == null) {
/* 226 */       return (getModifiers() & 0x400) != 0;
/*     */     }
/* 228 */     CodeIterator it = ca.iterator();
/*     */     try {
/* 230 */       return (it.hasNext()) && (it.byteAt(it.next()) == 177) && (!it.hasNext());
/*     */     }
/*     */     catch (BadBytecode e) {
/*     */     }
/* 234 */     return false;
/*     */   }
View Full Code Here

/*     */
/* 156 */     ConstPool cp = ca.getConstPool();
/* 157 */     CodeIterator it = ca.iterator();
/*     */     try
/*     */     {
/* 160 */       int op0 = it.byteAt(it.next());
/*     */       int pos;
/*     */       int desc;
/* 161 */       return (op0 == 177) || ((op0 == 42) && (it.byteAt(pos = it.next()) == 183) && ((desc = cp.isConstructor(getSuperclassName(), it.u16bitAt(pos + 1))) != 0) && ("()V".equals(cp.getUtf8Info(desc))) && (it.byteAt(it.next()) == 177) && (!it.hasNext()));
/*     */     }
/*     */     catch (BadBytecode e)
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.