private int addCompileStringlength(byte[]bytes, int p, int mbLength, int byteLength, boolean ignoreCase) { int op = selectStrOpcode(mbLength, byteLength, ignoreCase); int len = OPSize.OPCODE; if (Config.USE_STRING_TEMPLATES && opTemplated(op)) { // string length, template index, template string pointer len += OPSize.LENGTH + OPSize.INDEX + OPSize.INDEX; } else { if (isNeedStrLenOpExact(op)) len += OPSize.LENGTH; len += byteLength; } if (op == OPCode.EXACTMBN) len += OPSize.LENGTH; return len; }
private int addCompileStringlength(byte[]bytes, int p, int mbLength, int byteLength, boolean ignoreCase) { int op = selectStrOpcode(mbLength, byteLength, ignoreCase); int len = OPSize.OPCODE; if (Config.USE_STRING_TEMPLATES && opTemplated(op)) { // string length, template index, template string pointer len += OPSize.LENGTH + OPSize.INDEX + OPSize.INDEX; } else { if (isNeedStrLenOpExact(op)) len += OPSize.LENGTH; len += byteLength; } if (op == OPCode.EXACTMBN) len += OPSize.LENGTH; return len; }
@Override protected final void addCompileString(byte[]bytes, int p, int mbLength, int byteLength, boolean ignoreCase) { int op = selectStrOpcode(mbLength, byteLength, ignoreCase); addOpcode(op); if (op == OPCode.EXACTMBN) addLength(mbLength); if (isNeedStrLenOpExact(op)) { if (op == OPCode.EXACTN_IC || op == OPCode.EXACTN_IC_SB) { addLength(byteLength); } else { addLength(byteLength / mbLength); } } if (Config.USE_STRING_TEMPLATES && opTemplated(op)) { addInt(templateNum); addInt(p); addTemplate(bytes); } else { addBytes(bytes, p, byteLength); } }
@Override protected final void addCompileString(byte[]bytes, int p, int mbLength, int byteLength, boolean ignoreCase) { int op = selectStrOpcode(mbLength, byteLength, ignoreCase); addOpcode(op); if (op == OPCode.EXACTMBN) addLength(mbLength); if (isNeedStrLenOpExact(op)) { if (op == OPCode.EXACTN_IC || op == OPCode.EXACTN_IC_SB) { addLength(byteLength); } else { addLength(byteLength / mbLength); } } if (Config.USE_STRING_TEMPLATES && opTemplated(op)) { addInt(templateNum); addInt(p); addTemplate(bytes); } else { addBytes(bytes, p, byteLength); } }