Commit Graph

40 Commits

Author SHA1 Message Date
lrn@chromium.org
cf1e1b1b98 Trace contains information about whether we know that we are at the start of input.
Choice nodes may know that they are never not at the start of input.
This can remove start_of_input assertions in cases where they are statically known to fail.
The initial loop is unrolled once if the regexp might check for the start of input. Only the first iteration may be at the start, the following loop knows that it isn't.


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1217 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-02-03 11:43:55 +00:00
erik.corry@gmail.com
260cd876d1 Eliminate the code that handles fallback to JSCRE. The only way to get
JSCRE now is to use the --noirregexp flag.  Also add code to check that
we react sensibly to some very large regexps.
Review URL: http://codereview.chromium.org/18587

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1166 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-26 20:09:35 +00:00
erik.corry@gmail.com
34b47563ff Reduce work done in EatsAtLeast to a sane level.
Review URL: http://codereview.chromium.org/18753

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1165 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-26 19:38:26 +00:00
lrn@chromium.org
01198feda3 A field might be incorrectly set, causing registers to be pushed and popped
instead of just cleared on backtrack - or, worse, the other way around!


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1159 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-26 15:26:44 +00:00
lrn@chromium.org
2de5de495f Irregexp: Backtrack past look-aheads works correctly.
Allows backtracking to clear registers instead of pushing and popping
them to restore state.
Redo of 1135 with bug fixed.


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1156 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-26 14:38:17 +00:00
erik.corry@gmail.com
f6c3ef2d2a Reverting r1136 due to crashes
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1138 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-23 14:33:19 +00:00
lrn@chromium.org
18c2d3ef4e Clears captures of look-aheads on backtrack.
Reduces number of pushes when flushing a trace. Some are converted to clears
in the undo-code instead, and some just ignored if they have no value worth restoring.


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1136 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-23 13:34:51 +00:00
erik.corry@gmail.com
585e36b40e Optimization: The quick check should ignore the negative lookahead instead of
insisting that it should match.
Review URL: http://codereview.chromium.org/18360

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1106 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-20 11:36:28 +00:00
erik.corry@gmail.com
2b77e718fa Add support for \b and ^ and $ in multiline mode, completing Irregexp
features.  Switch on Irregexp by default.
Review URL: http://codereview.chromium.org/18193

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1104 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-19 18:56:47 +00:00
deanm@chromium.org
b7c1200462 Fix a bunch of spelling mistakes :\
Review URL: http://codereview.chromium.org/18094


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1088 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-15 19:08:34 +00:00
erik.corry@gmail.com
503c1c249c Lint error.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1081 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-15 13:09:23 +00:00
erik.corry@gmail.com
43e9e343dd Noone really liked the name "GenerationVariant" so here it gets renamed
to "Trace".
Review URL: http://codereview.chromium.org/18091

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1080 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-15 12:45:48 +00:00
christian.plesner.hansen@gmail.com
d6e6508bd7 Added clearing of captures before entering the body of a loop. This
also revealed a bug or two that had to be fixed.


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1070 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-14 11:32:23 +00:00
christian.plesner.hansen@gmail.com
4a16e4928a Added check that bails out of a repetition when the body is empty.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1047 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-01-08 12:40:47 +00:00
erik.corry@gmail.com
16852b987d Some irregexp optimizations around keeping track of when the current character
register contains the next n characters.
Review URL: http://codereview.chromium.org/16410

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1014 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-12-22 12:48:14 +00:00
erik.corry@gmail.com
ab2d4bc9bf * Generate quick checks based on mask and compare for
the alternatives in a choice node.  The quick checks
  are conservative in the sense that they only detect
  failure with certainty.  Checks can do 2 or 4 characters
  at a time.
* Inline the quick checks to allow the alternatives to
  be checked without branching in the common case where
  they fail.
Review URL: http://codereview.chromium.org/14194

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1005 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-12-19 12:02:34 +00:00
christian.plesner.hansen@gmail.com
e5270bd6e4 Removed propagation of information about preceding nodes by expanding
following nodes.  Found a better solution.


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1000 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-12-18 14:30:53 +00:00
christian.plesner.hansen@gmail.com
5d3cc28967 Fixed bug in interest propagation caused by following the loop edge
out of a loop choice node before the continuation edge.


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@990 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-12-17 13:16:38 +00:00
lrn@chromium.org
00122b76d0 Each RegExtTree node can now report the min and max size of strings it can match.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@988 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-12-17 10:59:14 +00:00
lrn@chromium.org
09e3c76137 Quantified look-aheads are sometimes removed entirely, leaving only a
single atom node. A flag was not set in this case, leading the wrapper
code to think the pattern was equal to the atom and use the pattern
in the indexOf operation.


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@971 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-12-12 10:22:56 +00:00
christian.plesner.hansen@gmail.com
ff3e30ae11 - Added lookbehind propagation for the initial node; now, if the
initial node is interested in what precedes it the automaton is
  given an initial all-consuming character class that determines it.
- Added verification of some node information invariants.  We now
  check that if a node expresses interest in what precedes it that
  information is available to it after assertion expansion.


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@964 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-12-11 11:13:13 +00:00
lrn@chromium.org
5178af89fa Irregexp is specialized on subject character type.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@937 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-12-08 12:43:01 +00:00
erik.corry@gmail.com
ba09ec5e89 Irregexp:
* Facility for generating a node several ways.  This allows
  code to be generated for a node knowing where it is trying
  to match relative to the 'current position' and it allows
  code to be generated that knows where to backtrack to.  Both
  allow dramatic reductions in the amount of popping and pushing
  on the stack and the number of indirect jumps.
* Generate special backtracking for greedy quantifiers on
  constant-length atoms.  This allows .* to run in constant
  space relative to input string size.
* When we are checking a long sequence of characters or character
  classes in the input then we do them right to left and only the
  first (rightmost) needs to check for end-of-string.
* Record the pattern in the profile instead of just <CompiledRegExp>
* Nodes no longer contain an on_failure_ node.  This was only used
  for lookaheads and they are now handled with a choice node instead.
Review URL: http://codereview.chromium.org/12900

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@930 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-12-08 09:22:12 +00:00
christian.plesner.hansen@gmail.com
cc3e472843 - Fixed regexp logging issue.
- Removed use of std::set.


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@883 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-12-02 08:16:12 +00:00
christian.plesner.hansen@gmail.com
917e91d1f2 - Added some expansion of assertions.
- Splitting of character classes into word and non-word parts.
- A bunch of refactorings.
- Made dispatch table construction lazy.


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@880 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-12-01 15:42:35 +00:00
erik.corry@gmail.com
4722a886ec Implement $ for non-multiline.
Review URL: http://codereview.chromium.org/10992

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@862 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-11-28 08:53:53 +00:00
christian.plesner.hansen@gmail.com
319fddf6af Fixed build on windows. Msvc is an idiot.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@858 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-11-27 12:10:16 +00:00
christian.plesner.hansen@gmail.com
4213b46b1d Fixed some assertion propagation issues and added non-multiline $
propagation.


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@856 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-11-27 10:35:06 +00:00
erik.corry@gmail.com
75eda4766f * Complete case independent support in Irregexp.
Review URL: http://codereview.chromium.org/12473

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@853 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-11-27 07:27:08 +00:00
christian.plesner.hansen@gmail.com
fe591b0ab5 Merge code review fixes.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@845 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-11-26 08:03:55 +00:00
christian.plesner.hansen@gmail.com
144c8c790a Fixed problem where the two lower-case sigmas would uncanonicalize to
themselves and upper-case sigma, but upper-case sigma would
uncanonicalize to just lower-case final sigma.


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@844 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-11-26 06:05:07 +00:00
christian.plesner.hansen@gmail.com
b57b4a15cd Merge regexp2000 back into bleeding_edge
Review URL: http://codereview.chromium.org/12427

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@832 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-11-25 11:07:48 +00:00
christian.plesner.hansen@gmail.com
9d9f608a38 - Added caching of regexp data in the compilation cache.
- Changed the structure of regexp objects from having two internal
  fields to having a single field containing a fixed array, since it's
  easier to store the whole fixed array in the cache.
- Move printing of the command to after printing std{err,out} in the
  compact progress indicators in the test framework.


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@579 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-10-24 08:40:02 +00:00
christian.plesner.hansen@gmail.com
dc32c82ce9 Reverted the changes to jscre because the arm cross-compiler dies with
an internal error when compiling templateified jscre.  We really need
to update that damn arm compiler.


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@478 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-10-09 12:18:48 +00:00
christian.plesner.hansen@gmail.com
a7230abb92 - Specialized jscre on the type of the string involved.
- Specialized jscre on the type of the string involved.


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@476 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-10-09 10:30:33 +00:00
christian.plesner.hansen@gmail.com
06fa6d1cde - Case-sensitive atomic regular expressions now use the same code as
String.indexOf to do matching.
- The --log option is no longer automatically enabled by the other log
  options.


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@413 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-10-02 15:35:28 +00:00
christian.plesner.hansen@gmail.com
6d47b29765 - Added new object type, RegExp, for regular expressions.
- Renamed some ::kSizes to ::kHeaderSizes to avoid confusion.


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@362 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-09-23 11:45:43 +00:00
christian.plesner.hansen@gmail.com
9bed566bdb Changed copyright header from google inc. to v8 project authors.
Added presubmit step to check copyright.



git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@242 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-09-09 20:08:45 +00:00
christian.plesner.hansen
c42f5829a1 Included mjsunit JavaScript test suite and C++ unit tests.
In the shell sample don't print the result of executing a script, only
evaluating expressions.

Fixed issue when building samples on Windows using a shared V8
library.  Added visibility option on Linux build which makes the
generated library 18% smaller.

Changed build system to accept multiple build modes in one build and
generate seperate objects, libraries and executables for each mode.

Removed deferred negation optimization (a * -b => -(a * b)) since this
visibly changes operand conversion order.

Improved parsing performance by introducing stack guard in preparsing.
Without a stack guard preparsing always bails out with stack overflow.


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-08-22 13:33:59 +00:00
christian.plesner.hansen
43d26ecc35 Initial export.
git-svn-id: http://v8.googlecode.com/svn/trunk@2 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-07-03 15:10:15 +00:00