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

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

Issue 1550713002: Guard the property RegExp.prototype.unicode behind --harmony-regexp-unicode (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Test262 expectations Created 4 years, 11 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 unified diff | Download patch
« no previous file with comments | « src/bootstrapper.cc ('k') | src/js/harmony-unicode-regexps.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 (function(global, utils) { 5 (function(global, utils) {
6 6
7 'use strict'; 7 'use strict';
8 8
9 %CheckIsBootstrapping(); 9 %CheckIsBootstrapping();
10 10
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 %IncrementUseCounter(kRegExpPrototypeStickyGetter); 49 %IncrementUseCounter(kRegExpPrototypeStickyGetter);
50 return UNDEFINED; 50 return UNDEFINED;
51 } 51 }
52 throw MakeTypeError(kRegExpNonRegExp, "RegExp.prototype.sticky"); 52 throw MakeTypeError(kRegExpNonRegExp, "RegExp.prototype.sticky");
53 } 53 }
54 return !!REGEXP_STICKY(this); 54 return !!REGEXP_STICKY(this);
55 } 55 }
56 %FunctionSetName(RegExpGetSticky, "RegExp.prototype.sticky"); 56 %FunctionSetName(RegExpGetSticky, "RegExp.prototype.sticky");
57 %SetNativeFlag(RegExpGetSticky); 57 %SetNativeFlag(RegExpGetSticky);
58 58
59
60 // ES6 21.2.5.15.
61 function RegExpGetUnicode() {
62 if (!IS_REGEXP(this)) {
63 throw MakeTypeError(kRegExpNonRegExp, "RegExp.prototype.unicode");
64 }
65 return !!REGEXP_UNICODE(this);
66 }
67 %FunctionSetName(RegExpGetUnicode, "RegExp.prototype.unicode");
68 %SetNativeFlag(RegExpGetUnicode);
69
70 utils.InstallGetter(GlobalRegExp.prototype, 'flags', RegExpGetFlags); 59 utils.InstallGetter(GlobalRegExp.prototype, 'flags', RegExpGetFlags);
71 utils.InstallGetter(GlobalRegExp.prototype, 'sticky', RegExpGetSticky); 60 utils.InstallGetter(GlobalRegExp.prototype, 'sticky', RegExpGetSticky);
72 utils.InstallGetter(GlobalRegExp.prototype, 'unicode', RegExpGetUnicode);
73 61
74 }) 62 })
OLDNEW
« no previous file with comments | « src/bootstrapper.cc ('k') | src/js/harmony-unicode-regexps.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698