Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(350)

Unified Diff: src/harmony-regexp.js

Issue 1100673002: Wrap harmony implementations in functions. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/harmony-reflect.js ('k') | src/harmony-spread.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
+})();
« no previous file with comments | « src/harmony-reflect.js ('k') | src/harmony-spread.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698