diff options
author | Leon Clarke <leonclarke@google.com> | 2010-01-27 15:57:47 +0000 |
---|---|---|
committer | Leon Clarke <leonclarke@google.com> | 2010-01-27 15:57:47 +0000 |
commit | 888f6729be6a6f6fbe246cb5a9f122e2dbe455b7 (patch) | |
tree | 16f9ce250ef5d36e49a0fb0018e979002ed5b4fb /src/regexp-macro-assembler.cc | |
parent | 1471e9f5b6f291eea8447f441527cd2a85074a33 (diff) | |
download | android_external_v8-888f6729be6a6f6fbe246cb5a9f122e2dbe455b7.tar.gz android_external_v8-888f6729be6a6f6fbe246cb5a9f122e2dbe455b7.tar.bz2 android_external_v8-888f6729be6a6f6fbe246cb5a9f122e2dbe455b7.zip |
Pull from svn bleeding_edge@3716
Diffstat (limited to 'src/regexp-macro-assembler.cc')
-rw-r--r-- | src/regexp-macro-assembler.cc | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/regexp-macro-assembler.cc b/src/regexp-macro-assembler.cc index 3685fcd3..0fcfc33d 100644 --- a/src/regexp-macro-assembler.cc +++ b/src/regexp-macro-assembler.cc @@ -122,7 +122,10 @@ NativeRegExpMacroAssembler::Result NativeRegExpMacroAssembler::Match( bool is_ascii = subject->IsAsciiRepresentation(); + // The string has been flattened, so it it is a cons string it contains the + // full string in the first part. if (StringShape(subject_ptr).IsCons()) { + ASSERT_EQ(0, ConsString::cast(subject_ptr)->second()->length()); subject_ptr = ConsString::cast(subject_ptr)->first(); } // Ensure that an underlying string has the same ascii-ness. @@ -141,8 +144,7 @@ NativeRegExpMacroAssembler::Result NativeRegExpMacroAssembler::Match( start_offset, input_start, input_end, - offsets_vector, - previous_index == 0); + offsets_vector); return res; } @@ -153,14 +155,11 @@ NativeRegExpMacroAssembler::Result NativeRegExpMacroAssembler::Execute( int start_offset, const byte* input_start, const byte* input_end, - int* output, - bool at_start) { + int* output) { typedef int (*matcher)(String*, int, const byte*, - const byte*, int*, int, Address, int); + const byte*, int*, Address, int); matcher matcher_func = FUNCTION_CAST<matcher>(code->entry()); - int at_start_val = at_start ? 1 : 0; - // Ensure that the minimum stack has been allocated. RegExpStack stack; Address stack_base = RegExpStack::stack_base(); @@ -172,7 +171,6 @@ NativeRegExpMacroAssembler::Result NativeRegExpMacroAssembler::Execute( input_start, input_end, output, - at_start_val, stack_base, direct_call); ASSERT(result <= SUCCESS); |