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

Unified Diff: src/regexp-macro-assembler-ia32.cc

Issue 13618: * Delayed compilation of irregexps until use-time, and specialize on char type. (Closed)
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 side-by-side diff with in-line comments
Download patch
Index: src/regexp-macro-assembler-ia32.cc
diff --git a/src/regexp-macro-assembler-ia32.cc b/src/regexp-macro-assembler-ia32.cc
index a6b2f026c7fdbd35e8c8499317edee4e670a4c03..21993b7e7627c5e8cde3c3c68c4e9c1eb41ae0aa 100644
--- a/src/regexp-macro-assembler-ia32.cc
+++ b/src/regexp-macro-assembler-ia32.cc
@@ -111,9 +111,10 @@ RegExpMacroAssemblerIA32::~RegExpMacroAssemblerIA32() {
void RegExpMacroAssemblerIA32::AdvanceCurrentPosition(int by) {
- ASSERT(by > 0);
- Label inside_string;
- __ add(Operand(edi), Immediate(by * char_size()));
+ if (by != 0) {
+ Label inside_string;
+ __ add(Operand(edi), Immediate(by * char_size()));
+ }
}
@@ -138,7 +139,7 @@ void RegExpMacroAssemblerIA32::Bind(Label* label) {
void RegExpMacroAssemblerIA32::CheckBitmap(uc16 start,
Label* bitmap,
Label* on_zero) {
- UNREACHABLE();
+ UNIMPLEMENTED();
__ mov(eax, current_character());
__ sub(Operand(eax), Immediate(start));
__ cmp(eax, 64); // FIXME: 64 = length_of_bitmap_in_bits.
@@ -683,6 +684,8 @@ int RegExpMacroAssemblerIA32::CaseInsensitiveCompareUC16(uc16** buffer,
int byte_offset1,
int byte_offset2,
size_t byte_length) {
+ // This function MUST NOT cause a garbage collection. A GC might move
Erik Corry 2008/12/08 12:47:52 Instead of shouting RFC-style I would prefer 'is n
+ // the calling generated code and invalidate the stacked return address.
ASSERT(byte_length % 2 == 0);
Address buffer_address = reinterpret_cast<Address>(*buffer);
uc16* substring1 = reinterpret_cast<uc16*>(buffer_address + byte_offset1);
« src/jsregexp.cc ('K') | « src/objects.h ('k') | test/cctest/test-regexp.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698