| OLD | NEW |
| 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_unicode_regexps; | 16 var FLAG_harmony_unicode_regexps; |
| 16 var GlobalRegExp = global.RegExp; | 17 var GlobalRegExp = global.RegExp; |
| 17 var InternalPackedArray = utils.InternalPackedArray; | 18 var InternalPackedArray = utils.InternalPackedArray; |
| 18 | 19 |
| 19 utils.ImportFromExperimental(function(from) { | 20 utils.ImportFromExperimental(function(from) { |
| 20 FLAG_harmony_regexps = from.FLAG_harmony_regexps; | 21 FLAG_harmony_regexps = from.FLAG_harmony_regexps; |
| 22 FLAG_harmony_tolength = from.FLAG_harmony_tolength; |
| 21 FLAG_harmony_unicode_regexps = from.FLAG_harmony_unicode_regexps; | 23 FLAG_harmony_unicode_regexps = from.FLAG_harmony_unicode_regexps; |
| 22 }); | 24 }); |
| 23 | 25 |
| 24 // ------------------------------------------------------------------- | 26 // ------------------------------------------------------------------- |
| 25 | 27 |
| 26 // Property of the builtins object for recording the result of the last | 28 // Property of the builtins object for recording the result of the last |
| 27 // regexp match. The property RegExpLastMatchInfo includes the matchIndices | 29 // regexp match. The property RegExpLastMatchInfo includes the matchIndices |
| 28 // array of the last successful regexp match (an array of start/end index | 30 // array of the last successful regexp match (an array of start/end index |
| 29 // pairs for the match and all the captured substrings), the invariant is | 31 // pairs for the match and all the captured substrings), the invariant is |
| 30 // that there are at least two capture indeces. The array also contains | 32 // that there are at least two capture indeces. The array also contains |
| (...skipping 422 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 453 // Exports | 455 // Exports |
| 454 | 456 |
| 455 utils.Export(function(to) { | 457 utils.Export(function(to) { |
| 456 to.RegExpExec = DoRegExpExec; | 458 to.RegExpExec = DoRegExpExec; |
| 457 to.RegExpExecNoTests = RegExpExecNoTests; | 459 to.RegExpExecNoTests = RegExpExecNoTests; |
| 458 to.RegExpLastMatchInfo = RegExpLastMatchInfo; | 460 to.RegExpLastMatchInfo = RegExpLastMatchInfo; |
| 459 to.RegExpTest = RegExpTest; | 461 to.RegExpTest = RegExpTest; |
| 460 }); | 462 }); |
| 461 | 463 |
| 462 }) | 464 }) |
| OLD | NEW |