Examples of write16bit()


Examples of javassist.bytecode.Bytecode.write16bit()

        code.addIndex(0);

        callFindMethod(code, "findSuperMethod", arrayVar, origIndex, meth.getName(), desc);
        callFindMethod(code, "findMethod", arrayVar, delIndex, delegatorName, desc);

        code.write16bit(pc, code.currentPc() - pc + 1);
        code.addAload(0);
        code.addGetfield(thisClassName, HANDLER, HANDLER_TYPE);
        code.addAload(0);

        code.addAload(arrayVar);
View Full Code Here

Examples of javassist.bytecode.Bytecode.write16bit()

/*  275 */     Bytecode bc = this.bytecode;
/*  276 */     int n = returnList.size();
/*  277 */     for (int i = 0; i < n; i++) {
/*  278 */       int[] ret = (int[])(int[])returnList.get(i);
/*  279 */       int pc = ret[0];
/*  280 */       bc.write16bit(pc, bc.currentPc() - pc + 1);
/*  281 */       CodeGen.ReturnHook hook = new JsrHook2(this, ret);
/*  282 */       finallyBlock.accept(this);
/*  283 */       hook.remove(this);
/*  284 */       if (!this.hasReturned) {
/*  285 */         bc.addOpcode(167);
View Full Code Here

Examples of javassist.bytecode.Bytecode.write16bit()

/*  681 */       bc.addOpcode(191);
/*  682 */       bc.addExceptionHandler(pc, pc2, pc4, 0);
/*      */     }
/*      */
/*  685 */     if (!this.hasReturned) {
/*  686 */       bc.write16bit(pc3, bc.currentPc() - pc3 + 1);
/*      */     }
/*  688 */     rh.remove(this);
/*      */
/*  690 */     if ((getListSize(this.breakList) != nbreaks) || (getListSize(this.continueList) != ncontinues))
/*      */     {
View Full Code Here

Examples of javassist.bytecode.CodeIterator.write16bit()

                constPool.getThisClassInfo(),
                attributeDescriptor.getReader().getName(),
                attributeDescriptor.getReader().getSignature()
            );
            itr.writeByte( Opcode.INVOKESPECIAL, index );
            itr.write16bit( readMethodIndex, index + 1 );
          }
          else {
            final int writeMethodIndex = constPool.addMethodrefInfo(
                constPool.getThisClassInfo(),
                attributeDescriptor.getWriter().getName(),
View Full Code Here

Examples of javassist.bytecode.CodeIterator.write16bit()

                constPool.getThisClassInfo(),
                attributeDescriptor.getWriter().getName(),
                attributeDescriptor.getWriter().getSignature()
            );
            itr.writeByte( Opcode.INVOKESPECIAL, index );
            itr.write16bit( writeMethodIndex, index + 1 );
          }
        }

        final StackMapTable smt = MapMaker.make( classPool, methodInfo );
        methodInfo.getCodeAttribute().setAttribute( smt );
View Full Code Here

Examples of javassist.bytecode.CodeIterator.write16bit()

                constPool.getThisClassInfo(),
                attributeDescriptor.getReader().getName(),
                attributeDescriptor.getReader().getSignature()
            );
            itr.writeByte( Opcode.INVOKESPECIAL, index );
            itr.write16bit( read_method_index, index+1 );
          }
          else {
            int write_method_index = constPool.addMethodrefInfo(
                constPool.getThisClassInfo(),
                attributeDescriptor.getWriter().getName(),
View Full Code Here

Examples of javassist.bytecode.CodeIterator.write16bit()

                constPool.getThisClassInfo(),
                attributeDescriptor.getWriter().getName(),
                attributeDescriptor.getWriter().getSignature()
            );
            itr.writeByte( Opcode.INVOKESPECIAL, index );
            itr.write16bit( write_method_index, index+1 );
          }
        }

        StackMapTable smt = MapMaker.make( classPool, methodInfo );
        methodInfo.getCodeAttribute().setAttribute(smt);
View Full Code Here

Examples of javassist.bytecode.CodeIterator.write16bit()

                        int op = it.byteAt(index);
                        if (op == CodeIterator.GETSTATIC || op == CodeIterator.PUTSTATIC) {
                            int val = it.s16bitAt(index + 1);
                            if (fieldAccessLocations.containsKey(val)) {
                                StaticFieldAccessRewriteData data = fieldAccessLocations.get(val);
                                it.write16bit(newFieldAccessLocations.get(data), index + 1);
                            }
                        }
                    }
                    m.getCodeAttribute().computeMaxStack();
                } catch (Exception e) {
View Full Code Here

Examples of javassist.bytecode.CodeIterator.write16bit()

                            if (methodCallLocations.containsKey(val)) {
                                VirtualToStaticData data = methodCallLocations.get(val);
                                // change the call to an invokestatic
                                it.writeByte(CodeIterator.INVOKESTATIC, index);
                                // change the method that is being called
                                it.write16bit(newCallLocations.get(data), index + 1);
                                if (op == CodeIterator.INVOKEINTERFACE) {
                                    // INVOKEINTERFACE has some extra parameters
                                    it.writeByte(CodeIterator.NOP, index + 3);
                                    it.writeByte(CodeIterator.NOP, index + 4);
                                }
View Full Code Here

Examples of javassist.bytecode.CodeIterator.write16bit()

                constPool.getThisClassInfo(),
                attributeDescriptor.getReader().getName(),
                attributeDescriptor.getReader().getSignature()
            );
            itr.writeByte( Opcode.INVOKESPECIAL, index );
            itr.write16bit( readMethodIndex, index+1 );
          }
          else {
            final int writeMethodIndex = constPool.addMethodrefInfo(
                constPool.getThisClassInfo(),
                attributeDescriptor.getWriter().getName(),
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.