1. 03 Apr, 2012 1 commit
  2. 02 Apr, 2012 1 commit
    • erikcorry's avatar
      Regexp: Improve the speed that we scan for an initial point where a non-anchored · f14b93a5
      erikcorry authored
      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
      f14b93a5
  3. 30 Mar, 2012 1 commit
  4. 27 Mar, 2012 1 commit
  5. 12 Mar, 2012 1 commit
  6. 28 Feb, 2012 1 commit
  7. 20 Feb, 2012 1 commit
  8. 16 Jan, 2012 2 commits
  9. 26 Oct, 2011 1 commit
  10. 07 Oct, 2011 1 commit
  11. 06 Oct, 2011 1 commit
  12. 06 Sep, 2011 1 commit
  13. 29 Aug, 2011 1 commit
  14. 26 Aug, 2011 1 commit
  15. 23 Aug, 2011 2 commits
  16. 05 Aug, 2011 1 commit
  17. 20 Jul, 2011 2 commits
  18. 07 Jul, 2011 1 commit
  19. 05 Jul, 2011 1 commit
    • ricow@chromium.org's avatar
      Introduce code flushing of RegExp code. · 0f682143
      ricow@chromium.org authored
      Due to issues relating mostly to chrome extensions we have lately been
      running into OOMs that are caused by our executable space running
      out. This change introduces flushing of code from regexps if we have
      not used the code for 5 mark sweeps.
      
      The approach is different from the normal function code flusing. Here
      we make a copy of the code inside the data array, and exchange the
      original code with a smi determined by the sweep_generation (a new
      heap variable increased everytime we do mark sweep/compact). If we
      encounter a smi in EnsureCompiled we simply reinstate the code
      object. If, in the marking phase of mark sweep, we find a regexp that
      already have a smi in the code field, and this is more than 5
      generations old we flush the code from the saved index.
      Review URL: http://codereview.chromium.org/7282026
      
      git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8532 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
      0f682143
  20. 17 Jun, 2011 1 commit
  21. 15 Jun, 2011 1 commit
  22. 07 Jun, 2011 1 commit
  23. 06 Jun, 2011 1 commit
  24. 23 May, 2011 1 commit
  25. 11 May, 2011 1 commit
  26. 28 Mar, 2011 1 commit
  27. 23 Mar, 2011 1 commit
  28. 18 Mar, 2011 3 commits
  29. 08 Mar, 2011 2 commits
  30. 03 Mar, 2011 1 commit
  31. 12 Jan, 2011 1 commit
  32. 03 Dec, 2010 1 commit
  33. 30 Nov, 2010 1 commit
  34. 27 Oct, 2010 1 commit