aboutsummaryrefslogtreecommitdiff
path: root/deps/v8/src/harmony-regexp.js
diff options
context:
space:
mode:
Diffstat (limited to 'deps/v8/src/harmony-regexp.js')
-rw-r--r--deps/v8/src/harmony-regexp.js21
1 files changed, 10 insertions, 11 deletions
diff --git a/deps/v8/src/harmony-regexp.js b/deps/v8/src/harmony-regexp.js
index a1b32ab238..6a32f16c75 100644
--- a/deps/v8/src/harmony-regexp.js
+++ b/deps/v8/src/harmony-regexp.js
@@ -2,9 +2,13 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+(function(global, shared, exports) {
+
'use strict';
-var $RegExp = global.RegExp;
+%CheckIsBootstrapping();
+
+var GlobalRegExp = global.RegExp;
// -------------------------------------------------------------------
@@ -12,8 +16,7 @@ var $RegExp = global.RegExp;
// + https://bugs.ecmascript.org/show_bug.cgi?id=3423
function RegExpGetFlags() {
if (!IS_SPEC_OBJECT(this)) {
- throw MakeTypeError('flags_getter_non_object',
- [%ToString(this)]);
+ throw MakeTypeError(kFlagsGetterNonObject, $toString(this));
}
var result = '';
if (this.global) result += 'g';
@@ -24,12 +27,8 @@ function RegExpGetFlags() {
return result;
}
-function ExtendRegExpPrototype() {
- %CheckIsBootstrapping();
-
- %DefineAccessorPropertyUnchecked($RegExp.prototype, 'flags', RegExpGetFlags,
- null, DONT_ENUM);
- %SetNativeFlag(RegExpGetFlags);
-}
+%DefineAccessorPropertyUnchecked(GlobalRegExp.prototype, 'flags',
+ RegExpGetFlags, null, DONT_ENUM);
+%SetNativeFlag(RegExpGetFlags);
-ExtendRegExpPrototype();
+})