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

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

Issue 1302533002: Native context: debug.js does not load from js builtins object anymore. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: make importing requirement more explicit Created 5 years, 4 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/harmony-object.js ('k') | src/harmony-typedarray.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
11 // -------------------------------------------------------------------
12 // Imports
13
11 var GlobalRegExp = global.RegExp; 14 var GlobalRegExp = global.RegExp;
15 var ToString;
16
17 utils.Import(function(from) {
18 ToString = from.ToString;
19 });
12 20
13 // ------------------------------------------------------------------- 21 // -------------------------------------------------------------------
14 22
15 // ES6 draft 12-06-13, section 21.2.5.3 23 // ES6 draft 12-06-13, section 21.2.5.3
16 // + https://bugs.ecmascript.org/show_bug.cgi?id=3423 24 // + https://bugs.ecmascript.org/show_bug.cgi?id=3423
17 function RegExpGetFlags() { 25 function RegExpGetFlags() {
18 if (!IS_SPEC_OBJECT(this)) { 26 if (!IS_SPEC_OBJECT(this)) {
19 throw MakeTypeError(kFlagsGetterNonObject, $toString(this)); 27 throw MakeTypeError(kFlagsGetterNonObject, ToString(this));
20 } 28 }
21 var result = ''; 29 var result = '';
22 if (this.global) result += 'g'; 30 if (this.global) result += 'g';
23 if (this.ignoreCase) result += 'i'; 31 if (this.ignoreCase) result += 'i';
24 if (this.multiline) result += 'm'; 32 if (this.multiline) result += 'm';
25 if (this.unicode) result += 'u'; 33 if (this.unicode) result += 'u';
26 if (this.sticky) result += 'y'; 34 if (this.sticky) result += 'y';
27 return result; 35 return result;
28 } 36 }
29 37
30 %DefineAccessorPropertyUnchecked(GlobalRegExp.prototype, 'flags', 38 %DefineAccessorPropertyUnchecked(GlobalRegExp.prototype, 'flags',
31 RegExpGetFlags, null, DONT_ENUM); 39 RegExpGetFlags, null, DONT_ENUM);
32 %SetNativeFlag(RegExpGetFlags); 40 %SetNativeFlag(RegExpGetFlags);
33 41
34 }) 42 })
OLDNEW
« no previous file with comments | « src/harmony-object.js ('k') | src/harmony-typedarray.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698