Package org.ow2.asm

Examples of org.ow2.asm.MethodVisitor.visitIntInsn()


                if ( field.isKey() ) {

                    // result = result * 31 + <attr_hash>
                    mv.visitVarInsn( Opcodes.ILOAD,
                                     1 );
                    mv.visitIntInsn( Opcodes.BIPUSH,
                                     31 );
                    mv.visitVarInsn( Opcodes.ILOAD,
                                     1 );
                    mv.visitInsn( Opcodes.IMUL );

View Full Code Here


                    if ( "boolean".equals( field.getTypeName() ) ) {
                        // attr_hash ::== <boolean_attr> ? 1231 : 1237;
                        Label blabel1 = new Label();
                        mv.visitJumpInsn( Opcodes.IFEQ,
                                          blabel1 );
                        mv.visitIntInsn( Opcodes.SIPUSH,
                                         1231 );
                        Label blabel2 = new Label();
                        mv.visitJumpInsn( Opcodes.GOTO,
                                          blabel2 );
                        mv.visitLabel( blabel1 );
View Full Code Here

                                         1231 );
                        Label blabel2 = new Label();
                        mv.visitJumpInsn( Opcodes.GOTO,
                                          blabel2 );
                        mv.visitLabel( blabel1 );
                        mv.visitIntInsn( Opcodes.SIPUSH,
                                         1237 );
                        mv.visitLabel( blabel2 );
                    } else if ( "long".equals( field.getTypeName() ) ) {
                        // attr_hash ::== (int) (longAttr ^ (longAttr >>> 32))
                        mv.visitVarInsn( Opcodes.ALOAD,
View Full Code Here

                                         0 );
                        mv.visitFieldInsn( Opcodes.GETFIELD,
                                           getInternalType( classDef.getClassName() ),
                                           field.getName(),
                                           getTypeDescriptor( field.getTypeName() ) );
                        mv.visitIntInsn( Opcodes.BIPUSH,
                                         32 );
                        mv.visitInsn( Opcodes.LUSHR );
                        mv.visitInsn( Opcodes.LXOR );
                        mv.visitInsn( Opcodes.L2I );
View Full Code Here

                        mv.visitMethodInsn( Opcodes.INVOKESTATIC,
                                            Type.getInternalName( Double.class ),
                                            "doubleToLongBits",
                                            "(D)J" );
                        mv.visitInsn( Opcodes.DUP2 );
                        mv.visitIntInsn( Opcodes.BIPUSH,
                                         32 );
                        mv.visitInsn( Opcodes.LUSHR );
                        mv.visitInsn( Opcodes.LXOR );
                        mv.visitInsn( Opcodes.L2I );
                    } else if ( !isPrimitive( field.getTypeName() ) ) {
View Full Code Here

                                "org/drools/factmodel/traits/TraitProxy",
                                "hashCode",
                                "()I" );
            mv.visitVarInsn( ISTORE,
                             1 );
            mv.visitIntInsn( BIPUSH,
                             31 );
            mv.visitVarInsn( ILOAD,
                             1 );
            mv.visitInsn( IMUL );
            mv.visitVarInsn( ALOAD,
View Full Code Here

                                "hashCode",
                                "()I" );
            mv.visitInsn( IADD );
            mv.visitVarInsn( ISTORE,
                             1 );
            mv.visitIntInsn( BIPUSH,
                             31 );
            mv.visitVarInsn( ILOAD,
                             1 );
            mv.visitInsn( IMUL );
            mv.visitVarInsn( ALOAD,
View Full Code Here

                                 "hashCode",
                                 "()I",
                                 null,
                                 null );
            mv.visitCode();
            mv.visitIntInsn( BIPUSH,
                             31 );
            mv.visitVarInsn( ISTORE,
                             1 );

            int count = 0;
View Full Code Here

                if (field.isKey()) {
                    count++;

                    if (!BuildUtils.isPrimitive( field.getTypeName() )) {

                        mv.visitIntInsn( BIPUSH,
                                         31 );
                        mv.visitVarInsn( ILOAD,
                                         1 );
                        mv.visitInsn( IMUL );
                        mv.visitVarInsn( ALOAD,
View Full Code Here

                        mv.visitLabel( l2 );
                        mv.visitInsn( LCONST_0 );
                        mv.visitLabel( l3 );
                        mv.visitVarInsn( LSTORE,
                                         2 );
                        mv.visitIntInsn( BIPUSH,
                                         31 );
                        mv.visitVarInsn( ILOAD,
                                         1 );
                        mv.visitInsn( IMUL );
                        mv.visitVarInsn( LLOAD,
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.