Reviewers: Lasse Reichstein, Description: Fix the not-at-start optimization to trigger on the V8 regexp benchmark.
Please review this at http://codereview.chromium.org/20040 SVN Base: http://v8.googlecode.com/svn/branches/bleeding_edge/ Affected files: M src/jsregexp.cc Index: src/jsregexp.cc =================================================================== --- src/jsregexp.cc (revision 1221) +++ src/jsregexp.cc (working copy) @@ -2418,7 +2418,7 @@ RegExpCompiler* compiler, int characters_filled_in, bool not_at_start) { - not_at_start = not_at_start || not_at_start_; + not_at_start = (not_at_start || not_at_start_); int choice_count = alternatives_->length(); ASSERT(choice_count > 0); alternatives_->at(0).node()->GetQuickCheckDetails(details, @@ -3161,6 +3161,7 @@ new_trace.set_bound_checked_up_to(preload_characters); } new_trace.quick_check_performed()->Clear(); + if (not_at_start_) new_trace.set_at_start(Trace::FALSE); alt_gen->expects_preload = preload_is_current; bool generate_full_check_inline = false; if (FLAG_irregexp_optimization && @@ -3249,6 +3250,7 @@ Trace out_of_line_trace(*trace); out_of_line_trace.set_characters_preloaded(preload_characters); out_of_line_trace.set_quick_check_performed(&alt_gen->quick_check_details); + if (not_at_start_) out_of_line_trace.set_at_start(Trace::FALSE); ZoneList<Guard*>* guards = alternative.guards(); int guard_count = (guards == NULL) ? 0 : guards->length(); if (next_expects_preload) { --~--~---------~--~----~------------~-------~--~----~ v8-dev mailing list [email protected] http://groups.google.com/group/v8-dev -~----------~----~----~----~------~----~------~--~---
