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

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

Issue 10992: Implement $ for non-multiline. (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
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 305 matching lines...) Expand 10 before | Expand all | Expand 10 after
316 } 316 }
317 BYTECODE(LOOKUP_HI_MAP8) { 317 BYTECODE(LOOKUP_HI_MAP8) {
318 // Look up high byte of this character in a byte map. Use the byte as 318 // Look up high byte of this character in a byte map. Use the byte as
319 // an index into a table that follows this instruction immediately. 319 // an index into a table that follows this instruction immediately.
320 int index = (current_char >> 8) - pc[1]; 320 int index = (current_char >> 8) - pc[1];
321 byte map = code_base[Load32(pc + 2) + index]; 321 byte map = code_base[Load32(pc + 2) + index];
322 const byte* new_pc = code_base + Load32(pc + 6) + (map << 2); 322 const byte* new_pc = code_base + Load32(pc + 6) + (map << 2);
323 pc = code_base + Load32(new_pc); 323 pc = code_base + Load32(new_pc);
324 break; 324 break;
325 } 325 }
326 BYTECODE(CHECK_NOT_REGS_EQUAL)
327 if (registers[pc[1]] == registers[pc[2]]) {
328 pc += BC_CHECK_NOT_REGS_EQUAL_LENGTH;
329 } else {
330 pc = code_base + Load32(pc + 3);
331 }
332 break;
326 BYTECODE(CHECK_NOT_BACK_REF) { 333 BYTECODE(CHECK_NOT_BACK_REF) {
327 int from = registers[pc[1]]; 334 int from = registers[pc[1]];
328 int len = registers[pc[1] + 1] - from; 335 int len = registers[pc[1] + 1] - from;
329 if (current + len > subject.length()) { 336 if (current + len > subject.length()) {
330 pc = code_base + Load32(pc + 2); 337 pc = code_base + Load32(pc + 2);
331 break; 338 break;
332 } else { 339 } else {
333 int i; 340 int i;
334 for (i = 0; i < len; i++) { 341 for (i = 0; i < len; i++) {
335 if (subject[from + i] != subject[current + i]) { 342 if (subject[from + i] != subject[current + i]) {
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
376 AssertNoAllocation a; 383 AssertNoAllocation a;
377 const byte* code_base = code_array->GetDataStartAddress(); 384 const byte* code_base = code_array->GetDataStartAddress();
378 return RawMatch(code_base, 385 return RawMatch(code_base,
379 Vector<const uc16>(subject16->GetTwoByteData(), 386 Vector<const uc16>(subject16->GetTwoByteData(),
380 subject16->length()), 387 subject16->length()),
381 registers, 388 registers,
382 start_position); 389 start_position);
383 } 390 }
384 391
385 } } // namespace v8::internal 392 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/flag-definitions.h ('k') | src/jsregexp.h » ('j') | src/jsregexp.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698