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

Side by Side Diff: src/harmony-regexp.js

Issue 788053003: Make `RegExp.prototype.flags` getter configurable (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 6 years 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 unified diff | Download patch
« no previous file with comments | « no previous file | test/mjsunit/harmony/regexp-flags.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 'use strict'; 5 'use strict';
6 6
7 var $RegExp = global.RegExp; 7 var $RegExp = global.RegExp;
8 8
9 // ------------------------------------------------------------------- 9 // -------------------------------------------------------------------
10 10
(...skipping 10 matching lines...) Expand all
21 if (this.multiline) result += 'm'; 21 if (this.multiline) result += 'm';
22 if (this.unicode) result += 'u'; 22 if (this.unicode) result += 'u';
23 if (this.sticky) result += 'y'; 23 if (this.sticky) result += 'y';
24 return result; 24 return result;
25 } 25 }
26 26
27 function ExtendRegExpPrototype() { 27 function ExtendRegExpPrototype() {
28 %CheckIsBootstrapping(); 28 %CheckIsBootstrapping();
29 29
30 %DefineAccessorPropertyUnchecked($RegExp.prototype, 'flags', RegExpGetFlags, 30 %DefineAccessorPropertyUnchecked($RegExp.prototype, 'flags', RegExpGetFlags,
31 null, DONT_ENUM | DONT_DELETE); 31 null, DONT_ENUM);
32 %SetNativeFlag(RegExpGetFlags); 32 %SetNativeFlag(RegExpGetFlags);
33 } 33 }
34 34
35 ExtendRegExpPrototype(); 35 ExtendRegExpPrototype();
OLDNEW
« no previous file with comments | « no previous file | test/mjsunit/harmony/regexp-flags.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698