/// <summary> /// Emits a zero-argument operation. Note that the emit /// functions all run in two modes: they can emit code, or /// they can just count the size of the code. /// </summary> private void Emit(int op) { if (RegexCode.OpcodeBacktracks(op)) { _trackCount++; } _emitted.Append(op); }
/// <summary>Emits a one-argument operation.</summary> private void Emit(RegexOpcode op, int opd1) { if (RegexCode.OpcodeBacktracks(op)) { _trackCount++; } _emitted.Append((int)op); _emitted.Append(opd1); }
/* * Emits a zero-argument operation. Note that the emit * functions all run in two modes: they can emit code, or * they can just count the size of the code. */ internal void Emit(int op) { if (_counting) { _count += 1; if (RegexCode.OpcodeBacktracks(op)) { _trackcount += 1; } return; } _emitted[_curpos++] = op; }
/// <summary> /// Emits a one-argument operation. /// </summary> private void Emit(int op, int opd1) { if (_counting) { _count += 2; if (RegexCode.OpcodeBacktracks(op)) { _trackcount += 1; } return; } _emitted[_curpos++] = op; _emitted[_curpos++] = opd1; }
internal void Emit(int op) { if (this._counting) { this._count++; if (RegexCode.OpcodeBacktracks(op)) { this._trackcount++; } } else { this._emitted[this._curpos++] = op; } }
/* * Emits a three-argument operation. */ internal void Emit(int op, int opd1, int opd2, int opd3) { if (_counting) { _count += 4; if (RegexCode.OpcodeBacktracks(op)) { _trackcount += 1; } return; } _emitted[_curpos++] = op; _emitted[_curpos++] = opd1; _emitted[_curpos++] = opd2; _emitted[_curpos++] = opd3; }
internal void Emit(int op, int opd1, int opd2, int opd3) { if (this._counting) { this._count += 4; if (RegexCode.OpcodeBacktracks(op)) { this._trackcount++; } } else { this._emitted[this._curpos++] = op; this._emitted[this._curpos++] = opd1; this._emitted[this._curpos++] = opd2; this._emitted[this._curpos++] = opd3; } }