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/js/regexp.js

Issue 1850643002: Adding %_NewObject intrinsic (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: formatting Created 4 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 unified diff | Download patch
« no previous file with comments | « src/js/promise.js ('k') | src/js/string.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 if (IS_REGEXP(pattern)) { 102 if (IS_REGEXP(pattern)) {
103 if (IS_UNDEFINED(flags)) flags = PatternFlags(pattern); 103 if (IS_UNDEFINED(flags)) flags = PatternFlags(pattern);
104 pattern = REGEXP_SOURCE(pattern); 104 pattern = REGEXP_SOURCE(pattern);
105 105
106 } else if (pattern_is_regexp) { 106 } else if (pattern_is_regexp) {
107 var input_pattern = pattern; 107 var input_pattern = pattern;
108 pattern = pattern.source; 108 pattern = pattern.source;
109 if (IS_UNDEFINED(flags)) flags = input_pattern.flags; 109 if (IS_UNDEFINED(flags)) flags = input_pattern.flags;
110 } 110 }
111 111
112 var object = %NewObject(GlobalRegExp, newtarget); 112 var object = %_NewObject(GlobalRegExp, newtarget);
113 return RegExpInitialize(object, pattern, flags); 113 return RegExpInitialize(object, pattern, flags);
114 } 114 }
115 115
116 116
117 // ES#sec-regexp.prototype.compile RegExp.prototype.compile (pattern, flags) 117 // ES#sec-regexp.prototype.compile RegExp.prototype.compile (pattern, flags)
118 function RegExpCompileJS(pattern, flags) { 118 function RegExpCompileJS(pattern, flags) {
119 if (!IS_REGEXP(this)) { 119 if (!IS_REGEXP(this)) {
120 throw MakeTypeError(kIncompatibleMethodReceiver, 120 throw MakeTypeError(kIncompatibleMethodReceiver,
121 "RegExp.prototype.compile", this); 121 "RegExp.prototype.compile", this);
122 } 122 }
(...skipping 1124 matching lines...) Expand 10 before | Expand all | Expand 10 after
1247 to.RegExpSubclassExecJS = RegExpSubclassExecJS; 1247 to.RegExpSubclassExecJS = RegExpSubclassExecJS;
1248 to.RegExpSubclassMatch = RegExpSubclassMatch; 1248 to.RegExpSubclassMatch = RegExpSubclassMatch;
1249 to.RegExpSubclassReplace = RegExpSubclassReplace; 1249 to.RegExpSubclassReplace = RegExpSubclassReplace;
1250 to.RegExpSubclassSearch = RegExpSubclassSearch; 1250 to.RegExpSubclassSearch = RegExpSubclassSearch;
1251 to.RegExpSubclassSplit = RegExpSubclassSplit; 1251 to.RegExpSubclassSplit = RegExpSubclassSplit;
1252 to.RegExpSubclassTest = RegExpSubclassTest; 1252 to.RegExpSubclassTest = RegExpSubclassTest;
1253 to.RegExpTest = RegExpTest; 1253 to.RegExpTest = RegExpTest;
1254 }); 1254 });
1255 1255
1256 }) 1256 })
OLDNEW
« no previous file with comments | « src/js/promise.js ('k') | src/js/string.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698