OpcodeBacktracks() static private method

static private OpcodeBacktracks ( int Op ) : bool
Op int
return bool
示例#1
0
        /// <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);
        }
示例#2
0
        /// <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);
        }
示例#3
0
 /*
  * 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;
 }
示例#4
0
 /// <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;
 }
示例#5
0
 internal void Emit(int op)
 {
     if (this._counting)
     {
         this._count++;
         if (RegexCode.OpcodeBacktracks(op))
         {
             this._trackcount++;
         }
     }
     else
     {
         this._emitted[this._curpos++] = op;
     }
 }
示例#6
0
 /*
  * 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;
 }
示例#7
0
 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;
     }
 }