v8/test/cctest
erikcorry f14b93a508 Regexp: Improve the speed that we scan for an initial point where a non-anchored
regexp can match by using a Boyer-Moore-like table.  This is done by identifying
non-greedy non-capturing loops in the nodes that eat any character one at a time.
For example in the middle of the regexp /foo[\s\S]*?bar/ we find such a loop.
There is also such a loop implicitly inserted at the start of any non-anchored
regexp.

When we have found such a loop we look ahead in the nodes to find the set of
characters that can come at given distances.  For example for the regexp
/.?foo/ we know that there are at least 3 characters ahead of us, and the sets
of characters that can occur are [any, [f, o], [o]].  We find a range in the
lookahead info where the set of characters is reasonably constrained.  In our
example this is from index 1 to 2 (0 is not constrained).  We can now look 3
characters ahead and if we don't find one of [f, o] (the union of [f, o] and
[o]) then we can skip forwards by the range size (in this case 2).

For Unicode input strings we do the same, but modulo 128.

We also look at the first string fed to the regexp and use that to get a hint
of the character frequencies in the inputs.  This affects the assessment of
whether the set of characters is 'reasonably constrained'.

We still have the old lookahead mechanism, which uses a wide load of multiple
characters followed by a mask and compare to determine whether a match is
possible at this point.
Review URL: http://codereview.chromium.org/9965010

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11204 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-04-02 09:38:07 +00:00
..
cctest.cc Reverting 3174. Aka reapplying 3150, 3151 and 3159. Aka api accessor 2009-11-04 08:51:48 +00:00
cctest.gyp Implement date library functions in C++. 2012-03-09 12:07:29 +00:00
cctest.h Cosmetic changes ("set up" is a verb, "setup" is a noun). 2012-01-13 13:09:52 +00:00
cctest.status Enable snapshots on MIPS. This is based on 2012-03-21 14:29:14 +00:00
gay-fixed.cc Dtoa for fixed notation. 2010-05-05 13:51:27 +00:00
gay-fixed.h Dtoa for fixed notation. 2010-05-05 13:51:27 +00:00
gay-precision.cc Added precision mode to fast-dtoa. 2010-09-20 09:18:00 +00:00
gay-precision.h Added precision mode to fast-dtoa. 2010-09-20 09:18:00 +00:00
gay-shortest.cc Dtoa for fixed notation. 2010-05-05 13:51:27 +00:00
gay-shortest.h Dtoa for fixed notation. 2010-05-05 13:51:27 +00:00
log-eq-of-logging-and-traversal.js Eliminate the need for code delete events in CPU profiler. 2011-09-14 11:47:03 +00:00
SConscript Implement date library functions in C++. 2012-03-09 12:07:29 +00:00
test-accessors.cc Merge experimental/gc branch to the bleeding_edge. 2011-09-19 18:36:47 +00:00
test-alloc.cc Ensure that executable pages are properly guarded. 2012-02-23 12:11:24 +00:00
test-api.cc Speed up WriteUtf8 in the case where the output buffer is large enough. 2012-03-21 13:48:29 +00:00
test-assembler-arm.cc Fixed a bug in the chaining of fixup position 2011-08-30 07:36:31 +00:00
test-assembler-ia32.cc Support multi-byte nop instructions as recommended by 2011-12-02 10:01:50 +00:00
test-assembler-mips.cc MIPS: Added support for Loongson architectures. 2012-03-13 16:18:30 +00:00
test-assembler-x64.cc Cosmetic changes ("set up" is a verb, "setup" is a noun). 2012-01-13 13:09:52 +00:00
test-ast.cc Collect AstNode type information 2012-02-08 09:56:33 +00:00
test-bignum-dtoa.cc Fix X64 compilation on Windows. 2011-02-03 11:13:04 +00:00
test-bignum.cc Bignum implementation of Strtod. 2010-11-08 11:49:47 +00:00
test-circular-queue.cc Pick the namespace alias 'i' from v8.h. 2011-08-12 09:49:55 +00:00
test-compiler.cc Fix building with clang 2012-01-24 16:36:55 +00:00
test-conversions.cc Cleanup of ScannerConstants, now named UnicodeCache. 2011-04-12 08:27:38 +00:00
test-cpu-profiler.cc Cosmetic changes ("set up" is a verb, "setup" is a noun). 2012-01-13 13:09:52 +00:00
test-dataflow.cc Eliminate use of ZONE macro in BitVector class and pass a zone explicitly. 2012-02-22 11:40:28 +00:00
test-date.cc Implement date library functions in C++. 2012-03-09 12:07:29 +00:00
test-debug.cc Set debug break slot at init of loop variable in a for loop. 2012-03-08 10:21:43 +00:00
test-decls.cc Change global const handling to silently ignore redeclarations 2011-09-15 12:00:30 +00:00
test-deoptimization.cc Add kAbortIncrementalMarkingMask flag for GC. 2012-03-07 17:52:16 +00:00
test-dictionary.cc Fix identity hash code function to respect flag. 2011-10-26 12:23:40 +00:00
test-disasm-arm.cc Cosmetic changes ("set up" is a verb, "setup" is a noun). 2012-01-13 13:09:52 +00:00
test-disasm-ia32.cc Support multi-byte nop instructions as recommended by 2011-12-02 10:01:50 +00:00
test-disasm-mips.cc MIPS: Added support for Loongson architectures. 2012-03-13 16:18:30 +00:00
test-disasm-x64.cc Clean up multi byte nop support on x64 to more closely match IA32. 2011-12-05 08:58:01 +00:00
test-diy-fp.cc Rename files containing underscores. 2010-03-19 12:15:24 +00:00
test-double.cc Fix Double.NextDouble function. 2010-11-08 12:13:05 +00:00
test-dtoa.cc Fix compilation on 64-bit Windows, update Visual Studio projects. 2011-02-03 13:29:10 +00:00
test-fast-dtoa.cc Fix X64 Windows compilation. 2011-02-03 15:14:46 +00:00
test-fixed-dtoa.cc Dtoa for fixed notation. 2010-05-05 13:51:27 +00:00
test-flags.cc Fix warnings on Win64. 2009-11-11 09:50:06 +00:00
test-func-name-inference.cc Fix incorrect function name inference in case of assignment / global assignment. 2011-10-03 19:18:05 +00:00
test-hashing.cc Minor cleanups of numeric seeded hashing patch. 2012-01-10 13:24:18 +00:00
test-hashmap.cc Make the hash map test run faster by doing less work. 2009-05-15 13:49:00 +00:00
test-heap-profiler.cc Fix presubmit check. 2012-03-29 14:50:26 +00:00
test-heap.cc Add kAbortIncrementalMarkingMask flag for GC. 2012-03-07 17:52:16 +00:00
test-list.cc v8: Move DeleteEmpty test to test-list.cc 2011-07-24 17:59:59 +00:00
test-liveedit.cc Revert "Fix Issue 1320: LiveEdit: text differencer fails with out of memory on large files" 2011-06-01 23:11:10 +00:00
test-lock.cc Stop running some liveedit tests (see issue 915). 2010-10-29 07:10:14 +00:00
test-lockers.cc MIPS: Reduced the number of threads in cctest test-lockers. 2011-11-23 08:36:03 +00:00
test-log-stack-tracer.cc When running with --always-opt, don't deoptimize named loads with uninitialized type feedback. 2012-03-21 09:23:09 +00:00
test-log.cc Merge experimental/gc branch to the bleeding_edge. 2011-09-19 18:36:47 +00:00
test-macro-assembler-x64.cc Fix non-ia32 build. 2011-04-01 15:37:59 +00:00
test-mark-compact.cc Reduce initial boot-up memory use. This is an other attempt at what 2012-04-02 08:32:31 +00:00
test-parsing.cc Fix compile warning on 64 bit Windows. 2012-03-12 15:26:05 +00:00
test-platform-linux.cc Cosmetic changes ("set up" is a verb, "setup" is a noun). 2012-01-13 13:09:52 +00:00
test-platform-macos.cc Changed copyright header from google inc. to v8 project authors. 2008-09-09 20:08:45 +00:00
test-platform-nullos.cc Changed copyright header from google inc. to v8 project authors. 2008-09-09 20:08:45 +00:00
test-platform-tls.cc "Deiceolate" Thread classes. 2011-06-10 09:54:04 +00:00
test-platform-win32.cc Cosmetic changes ("set up" is a verb, "setup" is a noun). 2012-01-13 13:09:52 +00:00
test-profile-generator.cc Merge experimental/gc branch to the bleeding_edge. 2011-09-19 18:36:47 +00:00
test-random.cc Fix nosse2 tests. 2012-03-06 13:37:25 +00:00
test-regexp.cc Regexp: Improve the speed that we scan for an initial point where a non-anchored 2012-04-02 09:38:07 +00:00
test-reloc-info.cc Merge experimental/gc branch to the bleeding_edge. 2011-09-19 18:36:47 +00:00
test-serialize.cc Ensure that executable pages are properly guarded. 2012-02-23 12:11:24 +00:00
test-sockets.cc Cosmetic changes ("set up" is a verb, "setup" is a noun). 2012-01-13 13:09:52 +00:00
test-spaces.cc Reduce initial boot-up memory use. This is an other attempt at what 2012-04-02 08:32:31 +00:00
test-strings.cc Recursion limit for one-char string replace and retire String::kMinNonFlatLength. 2012-01-17 14:29:17 +00:00
test-strtod.cc Revert r10913. 2012-03-05 07:55:27 +00:00
test-thread-termination.cc "Deiceolate" Thread classes. 2011-06-10 09:54:04 +00:00
test-threads.cc Fixing test case from r9469. 2011-09-28 14:26:23 +00:00
test-unbound-queue.cc Pick the namespace alias 'i' from v8.h. 2011-08-12 09:49:55 +00:00
test-utils.cc Cosmetic changes ("set up" is a verb, "setup" is a noun). 2012-01-13 13:09:52 +00:00
test-version.cc Update V8 to version 3.0 (re-land r5920). 2010-12-07 11:31:57 +00:00
test-weakmaps.cc Fix compilation error and add missing file to GYP. 2011-10-04 16:32:34 +00:00
testcfg.py Make GYP build usable for day-to-day work (second attempt) 2011-08-05 09:44:30 +00:00