| 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 891 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 902 // ReplaceResultBuilder support. | 902 // ReplaceResultBuilder support. |
| 903 function ReplaceResultBuilder(str) { | 903 function ReplaceResultBuilder(str) { |
| 904 if (%_ArgumentsLength() > 1) { | 904 if (%_ArgumentsLength() > 1) { |
| 905 this.elements = %_Arguments(1); | 905 this.elements = %_Arguments(1); |
| 906 } else { | 906 } else { |
| 907 this.elements = new InternalArray(); | 907 this.elements = new InternalArray(); |
| 908 } | 908 } |
| 909 this.special_string = str; | 909 this.special_string = str; |
| 910 } | 910 } |
| 911 | 911 |
| 912 ReplaceResultBuilder.prototype.__proto__ = null; |
| 913 |
| 912 | 914 |
| 913 ReplaceResultBuilder.prototype.add = function(str) { | 915 ReplaceResultBuilder.prototype.add = function(str) { |
| 914 str = TO_STRING_INLINE(str); | 916 str = TO_STRING_INLINE(str); |
| 915 if (str.length > 0) this.elements.push(str); | 917 if (str.length > 0) this.elements.push(str); |
| 916 } | 918 } |
| 917 | 919 |
| 918 | 920 |
| 919 ReplaceResultBuilder.prototype.addSpecialSlice = function(start, end) { | 921 ReplaceResultBuilder.prototype.addSpecialSlice = function(start, end) { |
| 920 var len = end - start; | 922 var len = end - start; |
| 921 if (start < 0 || len <= 0) return; | 923 if (start < 0 || len <= 0) return; |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 985 "italics", StringItalics, | 987 "italics", StringItalics, |
| 986 "small", StringSmall, | 988 "small", StringSmall, |
| 987 "strike", StringStrike, | 989 "strike", StringStrike, |
| 988 "sub", StringSub, | 990 "sub", StringSub, |
| 989 "sup", StringSup | 991 "sup", StringSup |
| 990 )); | 992 )); |
| 991 } | 993 } |
| 992 | 994 |
| 993 | 995 |
| 994 SetupString(); | 996 SetupString(); |
| OLD | NEW |