Home | History | Annotate | Download | only in src

Lines Matching refs:regexp

31 const $RegExp = global.RegExp;
36 // RegExp : Called as constructor; see ECMA-262, section 15.10.4.
85 // RegExp : Called as function; see ECMA-262, section 15.10.3.1.
89 return new $RegExp(pattern, flags);
94 // Deprecated RegExp.prototype.compile method. We behave like the constructor
95 // were called again. In SpiderMonkey, this method returns the regexp object.
103 // RegExp.prototype.compile and in the constructor, where they are
114 function DoRegExpExec(regexp, string, index) {
115 var result = %_RegExpExec(regexp, string, index, lastMatchInfo);
151 function RegExpExecNoTests(regexp, string, start) {
152 // Must be called with RegExp, string and positive integer as arguments.
153 var matchInfo = %_RegExpExec(regexp, string, start, lastMatchInfo);
165 ['RegExp.prototype.exec', this]);
178 // Conversion is required by the ES5 specification (RegExp.prototype.exec
192 %_Log('regexp', 'regexp-exec,%0r,%1S,%2i', [this, string, lastIndex]);
210 // One-element cache for the simplified test regexp.
221 ['RegExp.prototype.test', this]);
235 // Conversion is required by the ES5 specification (RegExp.prototype.exec
244 %_Log('regexp', 'regexp-exec,%0r,%1S,%2i', [this, string, lastIndex]);
255 // Non-global regexp.
256 // Remove irrelevant preceeding '.*' in a non-global test regexp.
264 regexp_val = new $RegExp(SubString(this.source, 2, this.source.length),
273 %_Log('regexp', 'regexp-exec,%0r,%1S,%2i', [this, string, lastIndex]);
286 // ecma_2/RegExp/properties-001.js.
297 // rightContext of the RegExp constructor. The properties are computed based
382 // regexp match. The property lastMatchInfo includes the matchIndices
383 // array of the last successful regexp match (an array of start/end index
396 // Used internally by replace regexp with function.
404 %FunctionSetInstanceClassName($RegExp, 'RegExp');
405 %FunctionSetPrototype($RegExp, new $Object());
406 %SetProperty($RegExp.prototype, 'constructor', $RegExp, DONT_ENUM);
407 %SetCode($RegExp, RegExpConstructor);
409 InstallFunctions($RegExp.prototype, DONT_ENUM, $Array(
417 %FunctionSetLength($RegExp.prototype.compile, 1);
430 %DefineAccessor($RegExp, 'input', GETTER, RegExpGetInput, DONT_DELETE);
431 %DefineAccessor($RegExp, 'input', SETTER, RegExpSetInput, DONT_DELETE);
432 %DefineAccessor($RegExp, '$_', GETTER, RegExpGetInput, DONT_ENUM | DONT_DELETE);
433 %DefineAccessor($RegExp, '$_', SETTER, RegExpSetInput, DONT_ENUM | DONT_DELETE);
434 %DefineAccessor($RegExp, '$input', GETTER, RegExpGetInput, DONT_ENUM | DONT_DELETE);
435 %DefineAccessor($RegExp, '$input', SETTER, RegExpSetInput, DONT_ENUM | DONT_DELETE);
440 // the value of the expression 'RegExp.multiline = null' (for instance) is the
449 %DefineAccessor($RegExp, 'multiline', GETTER, RegExpGetMultiline, DONT_DELETE);
450 %DefineAccessor($RegExp, 'multiline', SETTER, RegExpSetMultiline, DONT_DELETE);
451 %DefineAccessor($RegExp, '$*', GETTER, RegExpGetMultiline, DONT_ENUM | DONT_DELETE);
452 %DefineAccessor($RegExp, '$*', SETTER, RegExpSetMultiline, DONT_ENUM | DONT_DELETE);
459 %DefineAccessor($RegExp
460 %DefineAccessor($RegExp, 'lastMatch', SETTER, NoOpSetter, DONT_DELETE);
461 %DefineAccessor($RegExp, '$&', GETTER, RegExpGetLastMatch, DONT_ENUM | DONT_DELETE);
462 %DefineAccessor($RegExp, '$&', SETTER, NoOpSetter, DONT_ENUM | DONT_DELETE);
463 %DefineAccessor($RegExp, 'lastParen', GETTER, RegExpGetLastParen, DONT_DELETE);
464 %DefineAccessor($RegExp, 'lastParen', SETTER, NoOpSetter, DONT_DELETE);
465 %DefineAccessor($RegExp, '$+', GETTER, RegExpGetLastParen, DONT_ENUM | DONT_DELETE);
466 %DefineAccessor($RegExp, '$+', SETTER, NoOpSetter, DONT_ENUM | DONT_DELETE);
467 %DefineAccessor($RegExp, 'leftContext', GETTER, RegExpGetLeftContext, DONT_DELETE);
468 %DefineAccessor($RegExp, 'leftContext', SETTER, NoOpSetter, DONT_DELETE);
469 %DefineAccessor($RegExp, '$`', GETTER, RegExpGetLeftContext, DONT_ENUM | DONT_DELETE);
470 %DefineAccessor($RegExp, '$`', SETTER, NoOpSetter, DONT_ENUM | DONT_DELETE);
471 %DefineAccessor($RegExp, 'rightContext', GETTER, RegExpGetRightContext, DONT_DELETE);
472 %DefineAccessor($RegExp, 'rightContext', SETTER, NoOpSetter, DONT_DELETE);
473 %DefineAccessor($RegExp, "$'", GETTER, RegExpGetRightContext, DONT_ENUM | DONT_DELETE);
474 %DefineAccessor($RegExp, "$'", SETTER, NoOpSetter, DONT_ENUM | DONT_DELETE);
477 %DefineAccessor($RegExp, '$' + i, GETTER, RegExpMakeCaptureGetter(i), DONT_DELETE);
478 %DefineAccessor($RegExp, '$' + i, SETTER, NoOpSetter, DONT_DELETE);