Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(125)

Side by Side Diff: src/interpreter-re2k.cc

Issue 11352: * Match literals in a case independent way.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/regexp2000/
Patch Set: '' Created 12 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/flag-definitions.h ('k') | src/jsregexp.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2008 the V8 project authors. All rights reserved. 1 // Copyright 2008 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 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 } 188 }
189 BYTECODE(CHECK_NOT_CHAR) { 189 BYTECODE(CHECK_NOT_CHAR) {
190 int c = Load16(pc + 1); 190 int c = Load16(pc + 1);
191 if (c != current_char) { 191 if (c != current_char) {
192 pc = code_base + Load32(pc + 3); 192 pc = code_base + Load32(pc + 3);
193 } else { 193 } else {
194 pc += BC_CHECK_NOT_CHAR_LENGTH; 194 pc += BC_CHECK_NOT_CHAR_LENGTH;
195 } 195 }
196 break; 196 break;
197 } 197 }
198 BYTECODE(OR_CHECK_NOT_CHAR) {
199 int c = Load16(pc + 1);
200 if (c != (current_char | Load16(pc + 3))) {
201 pc = code_base + Load32(pc + 5);
202 } else {
203 pc += BC_OR_CHECK_NOT_CHAR_LENGTH;
204 }
205 break;
206 }
207 BYTECODE(MINUS_OR_CHECK_NOT_CHAR) {
208 int c = Load16(pc + 1);
209 int m = Load16(pc + 3);
210 if (c != ((current_char - m) | m)) {
211 pc = code_base + Load32(pc + 5);
212 } else {
213 pc += BC_MINUS_OR_CHECK_NOT_CHAR_LENGTH;
214 }
215 break;
216 }
198 BYTECODE(CHECK_LT) { 217 BYTECODE(CHECK_LT) {
199 int limit = Load16(pc + 1); 218 int limit = Load16(pc + 1);
200 if (current_char < limit) { 219 if (current_char < limit) {
201 pc = code_base + Load32(pc + 3); 220 pc = code_base + Load32(pc + 3);
202 } else { 221 } else {
203 pc += BC_CHECK_LT_LENGTH; 222 pc += BC_CHECK_LT_LENGTH;
204 } 223 }
205 break; 224 break;
206 } 225 }
207 BYTECODE(CHECK_GT) { 226 BYTECODE(CHECK_GT) {
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
319 AssertNoAllocation a; 338 AssertNoAllocation a;
320 const byte* code_base = code_array->GetDataStartAddress(); 339 const byte* code_base = code_array->GetDataStartAddress();
321 return RawMatch(code_base, 340 return RawMatch(code_base,
322 Vector<const uc16>(subject16->GetTwoByteData(), 341 Vector<const uc16>(subject16->GetTwoByteData(),
323 subject16->length()), 342 subject16->length()),
324 registers, 343 registers,
325 start_position); 344 start_position);
326 } 345 }
327 346
328 } } // namespace v8::internal 347 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/flag-definitions.h ('k') | src/jsregexp.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698