Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* This is JavaScriptCore's variant of the PCRE library. While this library | 1 /* This is JavaScriptCore's variant of the PCRE library. While this library |
| 2 started out as a copy of PCRE, many of the features of PCRE have been | 2 started out as a copy of PCRE, many of the features of PCRE have been |
| 3 removed. This library now supports only the regular expression features | 3 removed. This library now supports only the regular expression features |
| 4 required by the JavaScript language specification, and has only the functions | 4 required by the JavaScript language specification, and has only the functions |
| 5 needed by JavaScriptCore and the rest of WebKit. | 5 needed by JavaScriptCore and the rest of WebKit. |
| 6 | 6 |
| 7 Originally written by Philip Hazel | 7 Originally written by Philip Hazel |
| 8 Copyright (c) 1997-2006 University of Cambridge | 8 Copyright (c) 1997-2006 University of Cambridge |
| 9 Copyright (C) 2002, 2004, 2006, 2007 Apple Inc. All rights reserved. | 9 Copyright (C) 2002, 2004, 2006, 2007 Apple Inc. All rights reserved. |
| 10 Copyright (C) 2007 Eric Seidel <eric@webkit.org> | 10 Copyright (C) 2007 Eric Seidel <eric@webkit.org> |
| (...skipping 1133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1144 | 1144 |
| 1145 REPEATCHAR: | 1145 REPEATCHAR: |
| 1146 | 1146 |
| 1147 stack.currentFrame->locals.length = 1; | 1147 stack.currentFrame->locals.length = 1; |
| 1148 getUTF8CharAndIncrementLength(stack.currentFrame->locals.fc, sta ck.currentFrame->args.instructionPtr, stack.currentFrame->locals.length); | 1148 getUTF8CharAndIncrementLength(stack.currentFrame->locals.fc, sta ck.currentFrame->args.instructionPtr, stack.currentFrame->locals.length); |
| 1149 if (min * (stack.currentFrame->locals.fc > 0xFFFF ? 2 : 1) > md. endSubject - stack.currentFrame->args.subjectPtr) | 1149 if (min * (stack.currentFrame->locals.fc > 0xFFFF ? 2 : 1) > md. endSubject - stack.currentFrame->args.subjectPtr) |
| 1150 RRETURN_NO_MATCH; | 1150 RRETURN_NO_MATCH; |
| 1151 stack.currentFrame->args.instructionPtr += stack.currentFrame->l ocals.length; | 1151 stack.currentFrame->args.instructionPtr += stack.currentFrame->l ocals.length; |
| 1152 | 1152 |
| 1153 if (stack.currentFrame->locals.fc <= 0xFFFF) { | 1153 if (stack.currentFrame->locals.fc <= 0xFFFF) { |
| 1154 int othercase = md.ignoreCase ? kjs_pcre_ucp_othercase(stack .currentFrame->locals.fc) : -1; | 1154 int othercase; |
| 1155 othercase = md.ignoreCase ? kjs_pcre_ucp_othercase(stack.cur rentFrame->locals.fc) : -1; | |
|
Ivan Posva
2011/10/31 14:00:09
Not sure what you changed here. And why it makes c
Anton Muhin
2011/10/31 18:46:01
Clang complains:
<quotation>
/Users/antonm/Google
| |
| 1155 | 1156 |
| 1156 for (int i = 1; i <= min; i++) { | 1157 for (int i = 1; i <= min; i++) { |
| 1157 if (*stack.currentFrame->args.subjectPtr != stack.curren tFrame->locals.fc && *stack.currentFrame->args.subjectPtr != othercase) | 1158 if (*stack.currentFrame->args.subjectPtr != stack.curren tFrame->locals.fc && *stack.currentFrame->args.subjectPtr != othercase) |
| 1158 RRETURN_NO_MATCH; | 1159 RRETURN_NO_MATCH; |
| 1159 ++stack.currentFrame->args.subjectPtr; | 1160 ++stack.currentFrame->args.subjectPtr; |
| 1160 } | 1161 } |
| 1161 | 1162 |
| 1162 if (min == stack.currentFrame->locals.max) | 1163 if (min == stack.currentFrame->locals.max) |
| 1163 NEXT_OPCODE; | 1164 NEXT_OPCODE; |
| 1164 | 1165 |
| (...skipping 911 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2076 if (using_temporary_offsets) { | 2077 if (using_temporary_offsets) { |
| 2077 DPRINTF(("Freeing temporary memory\n")); | 2078 DPRINTF(("Freeing temporary memory\n")); |
| 2078 delete [] matchBlock.offsetVector; | 2079 delete [] matchBlock.offsetVector; |
| 2079 } | 2080 } |
| 2080 | 2081 |
| 2081 DPRINTF((">>>> returning PCRE_ERROR_NOMATCH\n")); | 2082 DPRINTF((">>>> returning PCRE_ERROR_NOMATCH\n")); |
| 2082 return JSRegExpErrorNoMatch; | 2083 return JSRegExpErrorNoMatch; |
| 2083 } | 2084 } |
| 2084 | 2085 |
| 2085 } } // namespace dart::jscre | 2086 } } // namespace dart::jscre |
| OLD | NEW |