Package com.alibaba.fastjson.asm

Examples of com.alibaba.fastjson.asm.MethodVisitor.visitFieldInsn()


        mw.visitMethodInsn(INVOKEVIRTUAL, getType(DefaultJSONParser.class), "getLexer", "()" + getDesc(JSONLexer.class));
        mw.visitTypeInsn(CHECKCAST, getType(JSONScanner.class)); // cast
        mw.visitVarInsn(ASTORE, context.var("lexer"));

        mw.visitVarInsn(ALOAD, context.var("lexer"));
        mw.visitFieldInsn(GETSTATIC, getType(Feature.class), "SortFeidFastMatch", "L" + getType(Feature.class) + ";");
        mw.visitMethodInsn(INVOKEVIRTUAL, getType(JSONScanner.class), "isEnabled", "(" + "L" + getType(Feature.class)
                                                                                   + ";" + ")Z");
        mw.visitJumpInsn(IFEQ, super_);

        mw.visitVarInsn(ALOAD, context.var("lexer"));
View Full Code Here


        mw.visitLdcInsn(context.getClazz().getName());
        // parser.setResolveStatus

        mw.visitMethodInsn(INVOKEVIRTUAL, getType(JSONScanner.class), "scanType", "(Ljava/lang/String;)I");

        mw.visitFieldInsn(GETSTATIC, getType(JSONScanner.class), "NOT_MATCH", "I");
        mw.visitJumpInsn(IF_ICMPEQ, super_);

        // matchType

        mw.visitVarInsn(ALOAD, context.var("lexer"));
View Full Code Here

                               "(Lcom/alibaba/fastjson/parser/ParseContext;Ljava/lang/Object;Ljava/lang/Object;)Lcom/alibaba/fastjson/parser/ParseContext;");
            mw.visitVarInsn(ASTORE, context.var("childContext"));
        }

        mw.visitVarInsn(ALOAD, context.var("lexer"));
        mw.visitFieldInsn(GETFIELD, getType(JSONScanner.class), "matchStat", "I");
        mw.visitFieldInsn(GETSTATIC, getType(JSONScanner.class), "END", "I");
        mw.visitJumpInsn(IF_ICMPEQ, return_);

        for (int i = 0, size = context.getFieldInfoList().size(); i < size; ++i) {
            FieldInfo fieldInfo = context.getFieldInfoList().get(i);
View Full Code Here

            mw.visitVarInsn(ASTORE, context.var("childContext"));
        }

        mw.visitVarInsn(ALOAD, context.var("lexer"));
        mw.visitFieldInsn(GETFIELD, getType(JSONScanner.class), "matchStat", "I");
        mw.visitFieldInsn(GETSTATIC, getType(JSONScanner.class), "END", "I");
        mw.visitJumpInsn(IF_ICMPEQ, return_);

        for (int i = 0, size = context.getFieldInfoList().size(); i < size; ++i) {
            FieldInfo fieldInfo = context.getFieldInfoList().get(i);
            Class<?> fieldClass = fieldInfo.getFieldClass();
View Full Code Here

            Class<?> fieldClass = fieldInfo.getFieldClass();
            Type fieldType = fieldInfo.getFieldType();

            mw.visitVarInsn(ALOAD, context.var("lexer"));
            mw.visitVarInsn(ALOAD, 0);
            mw.visitFieldInsn(GETFIELD, context.getClassName(), fieldInfo.getName() + "_asm_prefix__", "[C");
            if (fieldClass == boolean.class) {
                mw.visitMethodInsn(INVOKEVIRTUAL, getType(JSONScanner.class), "scanFieldBoolean", "([C)Z");
                mw.visitVarInsn(ISTORE, context.var(fieldInfo.getName() + "_asm"));

            } else if (fieldClass == byte.class) {
View Full Code Here

                Label endCheck_ = new Label();
                mw.visitJumpInsn(IFNONNULL, endCheck_);

                mw.visitVarInsn(ALOAD, 1);
                mw.visitFieldInsn(GETSTATIC, getType(Feature.class), "InitStringFieldAsEmpty", "L"
                                                                                               + getType(Feature.class)
                                                                                               + ";");
                mw.visitMethodInsn(INVOKEVIRTUAL, getType(DefaultJSONParser.class), "isEnabled",
                                   "(" + "L" + getType(Feature.class) + ";" + ")Z");
                mw.visitJumpInsn(IFEQ, endCheck_);
View Full Code Here

                continue;
            }

            mw.visitVarInsn(ALOAD, context.var("lexer"));
            mw.visitFieldInsn(GETFIELD, getType(JSONScanner.class), "matchStat", "I");
            mw.visitFieldInsn(GETSTATIC, getType(JSONScanner.class), "NOT_MATCH", "I");
            mw.visitJumpInsn(IF_ICMPEQ, reset_);

            if (i == size - 1) {
                mw.visitVarInsn(ALOAD, context.var("lexer"));
View Full Code Here

                continue;
            }

            mw.visitVarInsn(ALOAD, context.var("lexer"));
            mw.visitFieldInsn(GETFIELD, getType(JSONScanner.class), "matchStat", "I");
            mw.visitFieldInsn(GETSTATIC, getType(JSONScanner.class), "NOT_MATCH", "I");
            mw.visitJumpInsn(IF_ICMPEQ, reset_);

            if (i == size - 1) {
                mw.visitVarInsn(ALOAD, context.var("lexer"));
                mw.visitFieldInsn(GETFIELD, getType(JSONScanner.class), "matchStat", "I");
View Full Code Here

            mw.visitFieldInsn(GETSTATIC, getType(JSONScanner.class), "NOT_MATCH", "I");
            mw.visitJumpInsn(IF_ICMPEQ, reset_);

            if (i == size - 1) {
                mw.visitVarInsn(ALOAD, context.var("lexer"));
                mw.visitFieldInsn(GETFIELD, getType(JSONScanner.class), "matchStat", "I");
                mw.visitFieldInsn(GETSTATIC, getType(JSONScanner.class), "END", "I");
                mw.visitJumpInsn(IF_ICMPNE, reset_);
            }
        }
View Full Code Here

            mw.visitJumpInsn(IF_ICMPEQ, reset_);

            if (i == size - 1) {
                mw.visitVarInsn(ALOAD, context.var("lexer"));
                mw.visitFieldInsn(GETFIELD, getType(JSONScanner.class), "matchStat", "I");
                mw.visitFieldInsn(GETSTATIC, getType(JSONScanner.class), "END", "I");
                mw.visitJumpInsn(IF_ICMPNE, reset_);
            }
        }

        mw.visitLabel(end_);
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.