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

Unified Diff: src/interpreter-irregexp.cc

Issue 10995: * Remove an unused layer of abstraction by not having both a macro assembler ... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 12 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: src/interpreter-irregexp.cc
===================================================================
--- src/interpreter-irregexp.cc (revision 862)
+++ src/interpreter-irregexp.cc (working copy)
@@ -99,13 +99,13 @@
static bool RawMatch(const byte* code_base,
Vector<const uc16> subject,
int* registers,
- int current) {
+ int current,
+ int current_char) {
const byte* pc = code_base;
static const int kBacktrackStackSize = 10000;
int backtrack_stack[kBacktrackStackSize];
int backtrack_stack_space = kBacktrackStackSize;
int* backtrack_sp = backtrack_stack;
- int current_char = -1;
#ifdef DEBUG
if (FLAG_trace_regexp_bytecodes) {
PrintF("\n\nStart bytecode interpreter\n\n");
@@ -382,11 +382,15 @@
AssertNoAllocation a;
const byte* code_base = code_array->GetDataStartAddress();
+ uc16 previous_char = '\n';
+ Vector<const uc16> subject_vector =
+ Vector<const uc16>(subject16->GetTwoByteData(), subject16->length());
+ if (start_position != 0) previous_char = subject_vector[start_position - 1];
return RawMatch(code_base,
- Vector<const uc16>(subject16->GetTwoByteData(),
- subject16->length()),
+ subject_vector,
registers,
- start_position);
+ start_position,
+ previous_char);
}
} } // namespace v8::internal
« no previous file with comments | « src/assembler-irregexp-inl.h ('k') | src/jsregexp.cc » ('j') | src/jsregexp.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698