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();
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) {
mw.visitMethodInsn(INVOKEVIRTUAL, getType(JSONScanner.class), "scanFieldInt", "([C)I");
mw.visitVarInsn(ISTORE, context.var(fieldInfo.getName() + "_asm"));
} else if (fieldClass == short.class) {
mw.visitMethodInsn(INVOKEVIRTUAL, getType(JSONScanner.class), "scanFieldInt", "([C)I");
mw.visitVarInsn(ISTORE, context.var(fieldInfo.getName() + "_asm"));
} else if (fieldClass == int.class) {
mw.visitMethodInsn(INVOKEVIRTUAL, getType(JSONScanner.class), "scanFieldInt", "([C)I");
mw.visitVarInsn(ISTORE, context.var(fieldInfo.getName() + "_asm"));
} else if (fieldClass == long.class) {
mw.visitMethodInsn(INVOKEVIRTUAL, getType(JSONScanner.class), "scanFieldLong", "([C)J");
mw.visitVarInsn(LSTORE, context.var(fieldInfo.getName() + "_asm", 2));
} else if (fieldClass == float.class) {
mw.visitMethodInsn(INVOKEVIRTUAL, getType(JSONScanner.class), "scanFieldFloat", "([C)F");
mw.visitVarInsn(FSTORE, context.var(fieldInfo.getName() + "_asm"));
} else if (fieldClass == double.class) {
mw.visitMethodInsn(INVOKEVIRTUAL, getType(JSONScanner.class), "scanFieldDouble", "([C)D");
mw.visitVarInsn(DSTORE, context.var(fieldInfo.getName() + "_asm", 2));
} else if (fieldClass == String.class) {
mw.visitMethodInsn(INVOKEVIRTUAL, getType(JSONScanner.class), "scanFieldString",
"([C)Ljava/lang/String;");
mw.visitInsn(DUP);
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_);
mw.visitInsn(POP);
mw.visitLdcInsn("");
mw.visitLabel(endCheck_);
mw.visitVarInsn(ASTORE, context.var(fieldInfo.getName() + "_asm"));
} else if (fieldClass == byte[].class) {
mw.visitMethodInsn(INVOKEVIRTUAL, getType(JSONScanner.class), "scanFieldByteArray", "([C)[B");
mw.visitVarInsn(ASTORE, context.var(fieldInfo.getName() + "_asm"));
} else if (fieldClass.isEnum()) {
Label enumNull_ = new Label();
mw.visitInsn(ACONST_NULL);
mw.visitTypeInsn(CHECKCAST, getType(fieldClass)); // cast
mw.visitVarInsn(ASTORE, context.var(fieldInfo.getName() + "_asm"));
mw.visitVarInsn(ALOAD, 1);
mw.visitMethodInsn(INVOKEVIRTUAL, getType(DefaultJSONParser.class), "getSymbolTable",
"()" + getDesc(SymbolTable.class));
mw.visitMethodInsn(INVOKEVIRTUAL, getType(JSONScanner.class), "scanFieldSymbol",
"([C" + getDesc(SymbolTable.class) + ")Ljava/lang/String;");
mw.visitInsn(DUP);
mw.visitVarInsn(ASTORE, context.var(fieldInfo.getName() + "_asm_enumName"));
mw.visitJumpInsn(IFNULL, enumNull_);
mw.visitVarInsn(ALOAD, context.var(fieldInfo.getName() + "_asm_enumName"));
mw.visitMethodInsn(INVOKESTATIC, getType(fieldClass), "valueOf", "(Ljava/lang/String;)"
+ getDesc(fieldClass));
mw.visitVarInsn(ASTORE, context.var(fieldInfo.getName() + "_asm"));
mw.visitLabel(enumNull_);
} else if (Collection.class.isAssignableFrom(fieldClass)) {
Type actualTypeArgument = ((ParameterizedType) fieldType).getActualTypeArguments()[0];
if (actualTypeArgument instanceof Class) {
Class<?> itemClass = (Class<?>) actualTypeArgument;
if (!Modifier.isPublic(itemClass.getModifiers())) {
throw new ASMException("can not create ASMParser");
}
if (itemClass == String.class) {
mw.visitMethodInsn(INVOKEVIRTUAL, getType(JSONScanner.class), "scanFieldStringArray",
"([C)" + getDesc(ArrayList.class));
mw.visitVarInsn(ASTORE, context.var(fieldInfo.getName() + "_asm"));
} else {
_deserialze_list_obj(context, mw, reset_, fieldInfo, fieldClass, itemClass);
if (i == size - 1) {
_deserialize_endCheck(context, mw, reset_);