internal RegexRunnerFactory FactoryInstanceFromCode(RegexCode code, RegexOptions options) {
_code = code;
_codes = code._codes;
_strings = code._strings;
_fcPrefix = code._fcPrefix;
_bmPrefix = code._bmPrefix;
_anchors = code._anchors;
_trackcount = code._trackcount;
_options = options;
// pick a unique number for the methods we generate
int regexnum = Interlocked.Increment(ref _regexCount);
string regexnumString = regexnum.ToString(CultureInfo.InvariantCulture);
DynamicMethod goMethod = DefineDynamicMethod("Go" + regexnumString, null, typeof(CompiledRegexRunner));
GenerateGo();
DynamicMethod firstCharMethod = DefineDynamicMethod("FindFirstChar" + regexnumString, typeof(bool), typeof(CompiledRegexRunner));
GenerateFindFirstChar();
DynamicMethod trackCountMethod = DefineDynamicMethod("InitTrackCount" + regexnumString, null, typeof(CompiledRegexRunner));
GenerateInitTrackCount();
return new CompiledRegexRunnerFactory(goMethod, firstCharMethod, trackCountMethod);
}