summaryrefslogtreecommitdiff
path: root/deps/v8/src/regexp.js
diff options
context:
space:
mode:
authorisaacs <i@izs.me>2012-05-29 15:05:24 -0700
committerisaacs <i@izs.me>2012-06-01 22:31:04 -0700
commitcbdf3393a21690178822c2d6ce2513270d70a02e (patch)
treeebbf375e5d7aa32bf5fe988d2b3fe5fe788b404d /deps/v8/src/regexp.js
parent0262b6d2a563e8b96f02c3066b69fed66d956675 (diff)
downloadnode-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.js6
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();