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

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

Issue 13615: Irregexp (bytecodes) don't forget to update current position... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
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 | « no previous file | no next file » | 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 363 matching lines...) Expand 10 before | Expand all | Expand 10 after
374 int len = registers[pc[1] + 1] - from; 374 int len = registers[pc[1] + 1] - from;
375 if (from < 0 || len <= 0) { 375 if (from < 0 || len <= 0) {
376 pc += BC_CHECK_NOT_BACK_REF_NO_CASE_LENGTH; 376 pc += BC_CHECK_NOT_BACK_REF_NO_CASE_LENGTH;
377 break; 377 break;
378 } 378 }
379 if (current + len > subject.length()) { 379 if (current + len > subject.length()) {
380 pc = code_base + Load32(pc + 2); 380 pc = code_base + Load32(pc + 2);
381 break; 381 break;
382 } else { 382 } else {
383 if (BackRefMatchesNoCase(from, current, len, subject)) { 383 if (BackRefMatchesNoCase(from, current, len, subject)) {
384 current += len;
384 pc += BC_CHECK_NOT_BACK_REF_NO_CASE_LENGTH; 385 pc += BC_CHECK_NOT_BACK_REF_NO_CASE_LENGTH;
385 } else { 386 } else {
386 pc = code_base + Load32(pc + 2); 387 pc = code_base + Load32(pc + 2);
387 } 388 }
388 } 389 }
389 break; 390 break;
390 } 391 }
391 BYTECODE(CHECK_NOT_AT_START) 392 BYTECODE(CHECK_NOT_AT_START)
392 if (current == 0) { 393 if (current == 0) {
393 pc += BC_CHECK_NOT_AT_START_LENGTH; 394 pc += BC_CHECK_NOT_AT_START_LENGTH;
(...skipping 23 matching lines...) Expand all
417 Vector<const uc16>(subject16->GetTwoByteData(), subject16->length()); 418 Vector<const uc16>(subject16->GetTwoByteData(), subject16->length());
418 if (start_position != 0) previous_char = subject_vector[start_position - 1]; 419 if (start_position != 0) previous_char = subject_vector[start_position - 1];
419 return RawMatch(code_base, 420 return RawMatch(code_base,
420 subject_vector, 421 subject_vector,
421 registers, 422 registers,
422 start_position, 423 start_position,
423 previous_char); 424 previous_char);
424 } 425 }
425 426
426 } } // namespace v8::internal 427 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698