From 80ace73cb866404f57a74b49c6575fb58d15c1d6 Mon Sep 17 00:00:00 2001 From: "lrn@chromium.org" Date: Thu, 18 Nov 2010 10:42:22 +0000 Subject: [PATCH] Make count-line-ends use StringSearch and only iterate over the source once. Review URL: http://codereview.chromium.org/5121007 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5850 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- src/handles.cc | 66 ++++++++++++++++++++++++++++++++-------------------------- 1 file changed, 37 insertions(+), 29 deletions(-) diff --git a/src/handles.cc b/src/handles.cc index 1364951..3dfb886 100644 --- a/src/handles.cc +++ b/src/handles.cc @@ -37,6 +37,7 @@ #include "global-handles.h" #include "natives.h" #include "runtime.h" +#include "string-search.h" #include "stub-cache.h" namespace v8 { @@ -508,43 +509,50 @@ void InitScriptLineEnds(Handle