| Index: src/regexp.js
|
| diff --git a/src/regexp.js b/src/regexp.js
|
| index f373ceb67e16bb98aeaf629d4d5161aab4279591..596c185438fc197183298c8ec87ed313e619ca74 100644
|
| --- a/src/regexp.js
|
| +++ b/src/regexp.js
|
| @@ -419,14 +419,18 @@ function SetUpRegExp() {
|
| }
|
| function RegExpSetInput(string) {
|
| LAST_INPUT(lastMatchInfo) = ToString(string);
|
| - };
|
| + }
|
|
|
| %DefineAccessor($RegExp, 'input', GETTER, RegExpGetInput, DONT_DELETE);
|
| %DefineAccessor($RegExp, 'input', SETTER, RegExpSetInput, DONT_DELETE);
|
| - %DefineAccessor($RegExp, '$_', GETTER, RegExpGetInput, DONT_ENUM | DONT_DELETE);
|
| - %DefineAccessor($RegExp, '$_', SETTER, RegExpSetInput, DONT_ENUM | DONT_DELETE);
|
| - %DefineAccessor($RegExp, '$input', GETTER, RegExpGetInput, DONT_ENUM | DONT_DELETE);
|
| - %DefineAccessor($RegExp, '$input', SETTER, RegExpSetInput, DONT_ENUM | DONT_DELETE);
|
| + %DefineAccessor($RegExp, '$_', GETTER, RegExpGetInput,
|
| + DONT_ENUM | DONT_DELETE);
|
| + %DefineAccessor($RegExp, '$_', SETTER, RegExpSetInput,
|
| + DONT_ENUM | DONT_DELETE);
|
| + %DefineAccessor($RegExp, '$input', GETTER, RegExpGetInput,
|
| + DONT_ENUM | DONT_DELETE);
|
| + %DefineAccessor($RegExp, '$input', SETTER, RegExpSetInput,
|
| + DONT_ENUM | DONT_DELETE);
|
|
|
| // The properties multiline and $* are aliases for each other. When this
|
| // value is set in SpiderMonkey, the value it is set to is coerced to a
|
| @@ -437,38 +441,51 @@ function SetUpRegExp() {
|
|
|
| // Getter and setter for multiline.
|
| var multiline = false;
|
| - function RegExpGetMultiline() { return multiline; };
|
| - function RegExpSetMultiline(flag) { multiline = flag ? true : false; };
|
| + function RegExpGetMultiline() { return multiline; }
|
| + function RegExpSetMultiline(flag) { multiline = flag ? true : false; }
|
|
|
| - %DefineAccessor($RegExp, 'multiline', GETTER, RegExpGetMultiline, DONT_DELETE);
|
| - %DefineAccessor($RegExp, 'multiline', SETTER, RegExpSetMultiline, DONT_DELETE);
|
| - %DefineAccessor($RegExp, '$*', GETTER, RegExpGetMultiline, DONT_ENUM | DONT_DELETE);
|
| - %DefineAccessor($RegExp, '$*', SETTER, RegExpSetMultiline, DONT_ENUM | DONT_DELETE);
|
| + %DefineAccessor($RegExp, 'multiline', GETTER, RegExpGetMultiline,
|
| + DONT_DELETE);
|
| + %DefineAccessor($RegExp, 'multiline', SETTER, RegExpSetMultiline,
|
| + DONT_DELETE);
|
| + %DefineAccessor($RegExp, '$*', GETTER, RegExpGetMultiline,
|
| + DONT_ENUM | DONT_DELETE);
|
| + %DefineAccessor($RegExp, '$*', SETTER, RegExpSetMultiline,
|
| + DONT_ENUM | DONT_DELETE);
|
|
|
|
|
| function NoOpSetter(ignored) {}
|
|
|
|
|
| // Static properties set by a successful match.
|
| - %DefineAccessor($RegExp, 'lastMatch', GETTER, RegExpGetLastMatch, DONT_DELETE);
|
| + %DefineAccessor($RegExp, 'lastMatch', GETTER, RegExpGetLastMatch,
|
| + DONT_DELETE);
|
| %DefineAccessor($RegExp, 'lastMatch', SETTER, NoOpSetter, DONT_DELETE);
|
| - %DefineAccessor($RegExp, '$&', GETTER, RegExpGetLastMatch, DONT_ENUM | DONT_DELETE);
|
| + %DefineAccessor($RegExp, '$&', GETTER, RegExpGetLastMatch,
|
| + DONT_ENUM | DONT_DELETE);
|
| %DefineAccessor($RegExp, '$&', SETTER, NoOpSetter, DONT_ENUM | DONT_DELETE);
|
| - %DefineAccessor($RegExp, 'lastParen', GETTER, RegExpGetLastParen, DONT_DELETE);
|
| + %DefineAccessor($RegExp, 'lastParen', GETTER, RegExpGetLastParen,
|
| + DONT_DELETE);
|
| %DefineAccessor($RegExp, 'lastParen', SETTER, NoOpSetter, DONT_DELETE);
|
| - %DefineAccessor($RegExp, '$+', GETTER, RegExpGetLastParen, DONT_ENUM | DONT_DELETE);
|
| + %DefineAccessor($RegExp, '$+', GETTER, RegExpGetLastParen,
|
| + DONT_ENUM | DONT_DELETE);
|
| %DefineAccessor($RegExp, '$+', SETTER, NoOpSetter, DONT_ENUM | DONT_DELETE);
|
| - %DefineAccessor($RegExp, 'leftContext', GETTER, RegExpGetLeftContext, DONT_DELETE);
|
| + %DefineAccessor($RegExp, 'leftContext', GETTER, RegExpGetLeftContext,
|
| + DONT_DELETE);
|
| %DefineAccessor($RegExp, 'leftContext', SETTER, NoOpSetter, DONT_DELETE);
|
| - %DefineAccessor($RegExp, '$`', GETTER, RegExpGetLeftContext, DONT_ENUM | DONT_DELETE);
|
| + %DefineAccessor($RegExp, '$`', GETTER, RegExpGetLeftContext,
|
| + DONT_ENUM | DONT_DELETE);
|
| %DefineAccessor($RegExp, '$`', SETTER, NoOpSetter, DONT_ENUM | DONT_DELETE);
|
| - %DefineAccessor($RegExp, 'rightContext', GETTER, RegExpGetRightContext, DONT_DELETE);
|
| + %DefineAccessor($RegExp, 'rightContext', GETTER, RegExpGetRightContext,
|
| + DONT_DELETE);
|
| %DefineAccessor($RegExp, 'rightContext', SETTER, NoOpSetter, DONT_DELETE);
|
| - %DefineAccessor($RegExp, "$'", GETTER, RegExpGetRightContext, DONT_ENUM | DONT_DELETE);
|
| + %DefineAccessor($RegExp, "$'", GETTER, RegExpGetRightContext,
|
| + DONT_ENUM | DONT_DELETE);
|
| %DefineAccessor($RegExp, "$'", SETTER, NoOpSetter, DONT_ENUM | DONT_DELETE);
|
|
|
| for (var i = 1; i < 10; ++i) {
|
| - %DefineAccessor($RegExp, '$' + i, GETTER, RegExpMakeCaptureGetter(i), DONT_DELETE);
|
| + %DefineAccessor($RegExp, '$' + i, GETTER, RegExpMakeCaptureGetter(i),
|
| + DONT_DELETE);
|
| %DefineAccessor($RegExp, '$' + i, SETTER, NoOpSetter, DONT_DELETE);
|
| }
|
| }
|
|
|