OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 (function(global, utils) { |
| 6 |
| 7 %CheckIsBootstrapping(); |
| 8 |
| 9 // ------------------------------------------------------------------- |
| 10 // Imports |
| 11 |
| 12 var GlobalRegExp = global.RegExp; |
| 13 var RegExpSubclassExecJS = utils.ImportNow("RegExpSubclassExecJS"); |
| 14 var RegExpSubclassMatch = utils.ImportNow("RegExpSubclassMatch"); |
| 15 var RegExpSubclassReplace = utils.ImportNow("RegExpSubclassReplace"); |
| 16 var RegExpSubclassSearch = utils.ImportNow("RegExpSubclassSearch"); |
| 17 var RegExpSubclassSplit = utils.ImportNow("RegExpSubclassSplit"); |
| 18 var RegExpSubclassTest = utils.ImportNow("RegExpSubclassTest"); |
| 19 var matchSymbol = utils.ImportNow("match_symbol"); |
| 20 var replaceSymbol = utils.ImportNow("replace_symbol"); |
| 21 var searchSymbol = utils.ImportNow("search_symbol"); |
| 22 var splitSymbol = utils.ImportNow("split_symbol"); |
| 23 |
| 24 utils.OverrideFunction(GlobalRegExp.prototype, "exec", |
| 25 RegExpSubclassExecJS, true); |
| 26 utils.OverrideFunction(GlobalRegExp.prototype, matchSymbol, |
| 27 RegExpSubclassMatch, true); |
| 28 utils.OverrideFunction(GlobalRegExp.prototype, replaceSymbol, |
| 29 RegExpSubclassReplace, true); |
| 30 utils.OverrideFunction(GlobalRegExp.prototype, searchSymbol, |
| 31 RegExpSubclassSearch, true); |
| 32 utils.OverrideFunction(GlobalRegExp.prototype, splitSymbol, |
| 33 RegExpSubclassSplit, true); |
| 34 utils.OverrideFunction(GlobalRegExp.prototype, "test", |
| 35 RegExpSubclassTest, true); |
| 36 |
| 37 }) |
OLD | NEW |