diff options
author | isaacs <i@izs.me> | 2012-05-29 15:05:24 -0700 |
---|---|---|
committer | isaacs <i@izs.me> | 2012-06-01 22:31:04 -0700 |
commit | cbdf3393a21690178822c2d6ce2513270d70a02e (patch) | |
tree | ebbf375e5d7aa32bf5fe988d2b3fe5fe788b404d /deps/v8/src/regexp.js | |
parent | 0262b6d2a563e8b96f02c3066b69fed66d956675 (diff) | |
download | node-new-cbdf3393a21690178822c2d6ce2513270d70a02e.tar.gz |
Upgrade v8 to 3.11.7
Diffstat (limited to 'deps/v8/src/regexp.js')
-rw-r--r-- | deps/v8/src/regexp.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/deps/v8/src/regexp.js b/deps/v8/src/regexp.js index a574f62bf6..38090397aa 100644 --- a/deps/v8/src/regexp.js +++ b/deps/v8/src/regexp.js @@ -278,6 +278,10 @@ function TrimRegExp(regexp) { function RegExpToString() { + if (!IS_REGEXP(this)) { + throw MakeTypeError('incompatible_method_receiver', + ['RegExp.prototype.toString', this]); + } var result = '/' + this.source + '/'; if (this.global) result += 'g'; if (this.ignoreCase) result += 'i'; @@ -423,6 +427,7 @@ function SetUpRegExp() { LAST_INPUT(lastMatchInfo) = ToString(string); }; + %OptimizeObjectForAddingMultipleProperties($RegExp, 22); %DefineOrRedefineAccessorProperty($RegExp, 'input', RegExpGetInput, RegExpSetInput, DONT_DELETE); %DefineOrRedefineAccessorProperty($RegExp, '$_', RegExpGetInput, @@ -477,6 +482,7 @@ function SetUpRegExp() { RegExpMakeCaptureGetter(i), NoOpSetter, DONT_DELETE); } + %ToFastProperties($RegExp); } SetUpRegExp(); |