| OLD | NEW |
| 1 // Copyright 2006-2009 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2009 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 896 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 907 // ReplaceResultBuilder support. | 907 // ReplaceResultBuilder support. |
| 908 function ReplaceResultBuilder(str) { | 908 function ReplaceResultBuilder(str) { |
| 909 if (%_ArgumentsLength() > 1) { | 909 if (%_ArgumentsLength() > 1) { |
| 910 this.elements = %_Arguments(1); | 910 this.elements = %_Arguments(1); |
| 911 } else { | 911 } else { |
| 912 this.elements = new InternalArray(); | 912 this.elements = new InternalArray(); |
| 913 } | 913 } |
| 914 this.special_string = str; | 914 this.special_string = str; |
| 915 } | 915 } |
| 916 | 916 |
| 917 ReplaceResultBuilder.prototype.__proto__ = null; |
| 918 |
| 917 | 919 |
| 918 ReplaceResultBuilder.prototype.add = function(str) { | 920 ReplaceResultBuilder.prototype.add = function(str) { |
| 919 str = TO_STRING_INLINE(str); | 921 str = TO_STRING_INLINE(str); |
| 920 if (str.length > 0) this.elements.push(str); | 922 if (str.length > 0) this.elements.push(str); |
| 921 } | 923 } |
| 922 | 924 |
| 923 | 925 |
| 924 ReplaceResultBuilder.prototype.addSpecialSlice = function(start, end) { | 926 ReplaceResultBuilder.prototype.addSpecialSlice = function(start, end) { |
| 925 var len = end - start; | 927 var len = end - start; |
| 926 if (start < 0 || len <= 0) return; | 928 if (start < 0 || len <= 0) return; |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 990 "italics", StringItalics, | 992 "italics", StringItalics, |
| 991 "small", StringSmall, | 993 "small", StringSmall, |
| 992 "strike", StringStrike, | 994 "strike", StringStrike, |
| 993 "sub", StringSub, | 995 "sub", StringSub, |
| 994 "sup", StringSup | 996 "sup", StringSup |
| 995 )); | 997 )); |
| 996 } | 998 } |
| 997 | 999 |
| 998 | 1000 |
| 999 SetupString(); | 1001 SetupString(); |
| OLD | NEW |