Index: src/harmony-regexp.js |
diff --git a/src/harmony-regexp.js b/src/harmony-regexp.js |
index a1b32ab2385fff00609428934e6ee21ac140f75b..c90eb802a14e02f41d517045733a36a9ccf27b9f 100644 |
--- a/src/harmony-regexp.js |
+++ b/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() { |
+ |
'use strict'; |
-var $RegExp = global.RegExp; |
+%CheckIsBootstrapping(); |
+ |
+var GlobalRegExp = global.RegExp; |
// ------------------------------------------------------------------- |
@@ -24,12 +28,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(); |
+})(); |