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

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

Issue 1413173003: Move error message makers off js builtins object. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebase Created 5 years, 2 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/proxy.js ('k') | src/js/runtime.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 var $regexpLastMatchInfoOverride; 5 var $regexpLastMatchInfoOverride;
6 6
7 (function(global, utils) { 7 (function(global, utils) {
8 8
9 %CheckIsBootstrapping(); 9 %CheckIsBootstrapping();
10 10
11 // ------------------------------------------------------------------- 11 // -------------------------------------------------------------------
12 // Imports 12 // Imports
13 13
14 var FLAG_harmony_regexps; 14 var FLAG_harmony_regexps;
15 var FLAG_harmony_tolength; 15 var FLAG_harmony_tolength;
16 var FLAG_harmony_unicode_regexps; 16 var FLAG_harmony_unicode_regexps;
17 var GlobalRegExp = global.RegExp; 17 var GlobalRegExp = global.RegExp;
18 var InternalPackedArray = utils.InternalPackedArray; 18 var InternalPackedArray = utils.InternalPackedArray;
19 var MakeTypeError;
19 20
20 utils.ImportFromExperimental(function(from) { 21 utils.ImportFromExperimental(function(from) {
21 FLAG_harmony_regexps = from.FLAG_harmony_regexps; 22 FLAG_harmony_regexps = from.FLAG_harmony_regexps;
22 FLAG_harmony_tolength = from.FLAG_harmony_tolength; 23 FLAG_harmony_tolength = from.FLAG_harmony_tolength;
23 FLAG_harmony_unicode_regexps = from.FLAG_harmony_unicode_regexps; 24 FLAG_harmony_unicode_regexps = from.FLAG_harmony_unicode_regexps;
24 }); 25 });
25 26
27 utils.Import(function(from) {
28 MakeTypeError = from.MakeTypeError;
29 });
30
26 // ------------------------------------------------------------------- 31 // -------------------------------------------------------------------
27 32
28 // Property of the builtins object for recording the result of the last 33 // Property of the builtins object for recording the result of the last
29 // regexp match. The property RegExpLastMatchInfo includes the matchIndices 34 // regexp match. The property RegExpLastMatchInfo includes the matchIndices
30 // array of the last successful regexp match (an array of start/end index 35 // array of the last successful regexp match (an array of start/end index
31 // pairs for the match and all the captured substrings), the invariant is 36 // pairs for the match and all the captured substrings), the invariant is
32 // that there are at least two capture indeces. The array also contains 37 // that there are at least two capture indeces. The array also contains
33 // the subject string for the last successful match. 38 // the subject string for the last successful match.
34 var RegExpLastMatchInfo = new InternalPackedArray( 39 var RegExpLastMatchInfo = new InternalPackedArray(
35 2, // REGEXP_NUMBER_OF_CAPTURES 40 2, // REGEXP_NUMBER_OF_CAPTURES
(...skipping 419 matching lines...) Expand 10 before | Expand all | Expand 10 after
455 // Exports 460 // Exports
456 461
457 utils.Export(function(to) { 462 utils.Export(function(to) {
458 to.RegExpExec = DoRegExpExec; 463 to.RegExpExec = DoRegExpExec;
459 to.RegExpExecNoTests = RegExpExecNoTests; 464 to.RegExpExecNoTests = RegExpExecNoTests;
460 to.RegExpLastMatchInfo = RegExpLastMatchInfo; 465 to.RegExpLastMatchInfo = RegExpLastMatchInfo;
461 to.RegExpTest = RegExpTest; 466 to.RegExpTest = RegExpTest;
462 }); 467 });
463 468
464 }) 469 })
OLDNEW
« no previous file with comments | « src/js/proxy.js ('k') | src/js/runtime.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698