Commit Graph
161 Commits
Author SHA1 Message Date
Zoltan Varga 34df9a2168 2009-03-04 Zoltan Varga <[email protected]>
* RxInterpreter.cs (ResetGroups): Avoid allocating larger than needed
	arrays.

svn path=/trunk/mcs/; revision=128509
2009-03-04 00:49:06 +00:00
Jonathan Pryor 247cfd34f0 * System.Text.RegularExpressions/Regex.cs (Replace): Check that input &
evaluator are not null, as documented in MSDN (and the variance found 
	  while testing DbLinq).
	* Test/System.Text.RegularExpressions/RegexReplace.cs: Add null 
	  argument checks for Regex.Replace().

svn path=/trunk/mcs/; revision=128241
2009-02-27 21:40:17 +00:00
Zoltan Varga 09047c897a 2009-02-27 Zoltan Varga <[email protected]>
* BaseMachine.cs (LTRReplace): Initialize the StringBuilder with an
	appropriate initial length.

svn path=/trunk/mcs/; revision=128158
2009-02-26 23:24:42 +00:00
Zoltan Varga dabd23ce6e 2009-02-24 Zoltan Varga <[email protected]>
* CILCompiler.cs: Partially inline calls to Char.ToLower () to speed
	up ignorecase matching.

svn path=/trunk/mcs/; revision=127898
2009-02-24 20:34:33 +00:00
Jb Evain 85e8848db2 2009-02-16 Jb Evain <[email protected]>
* Regex.cs: on the NET_2_1 profile, always use the old engine for now.


svn path=/trunk/mcs/; revision=127039
2009-02-16 15:28:14 +00:00
Zoltan Varga 69d48eba16 2009-02-14 Zoltan Varga <[email protected]>
* Regex.cs: Add a MONO_NEW_RX variable to enable the new regex
	engine.

svn path=/trunk/mcs/; revision=126923
2009-02-14 14:36:27 +00:00
Zoltan Varga f908a8a6c3 2009-02-04 Zoltan Varga <[email protected]>
* Regex.cs: Disable the new regex engine for now.

svn path=/trunk/mcs/; revision=125637
2009-02-04 02:18:48 +00:00
Zoltan Varga 824710f744 2009-01-14 Zoltan Varga <[email protected]>
* CILCompiler.cs: Avoid throwing exceptions for a few more unhandled opcodes.
	Implement the reverse/ignorecase versions of Reference. Fix the reverse
	version of Bitmap. Error out if a Jump opcode jumps outside the current
	pc range. This works around #466151.

svn path=/trunk/mcs/; revision=123417
2009-01-14 21:33:40 +00:00
Jb Evain dccb5600df 2009-01-12 Jb Evain <[email protected]>
* RxInterpreter.cs: set trace_rx to false for NET_2_1.
	* Regex.cs: set old_rx to false for NET_2_1.


svn path=/trunk/mcs/; revision=123110
2009-01-12 19:14:55 +00:00
Zoltan Varga 5c44702768 2009-01-07 Zoltan Varga <[email protected]>
* RxInterpreter.cs: Add support for constant strings in anchors. Fixes
	#464135.

svn path=/trunk/mcs/; revision=122700
2009-01-07 19:48:15 +00:00
Gonzalo Paniagua Javier 295e584514 2008-11-18 Gonzalo Paniagua Javier <[email protected]>
* cache.cs: avoid infinite loop.


svn path=/trunk/mcs/; revision=119193
2008-11-18 17:46:59 +00:00
Gonzalo Paniagua Javier e75ce1dcee 2008-11-14 Gonzalo Paniagua Javier <[email protected]>
* cache.cs:
	* Regex.cs: honor CacheSize value.


svn path=/trunk/mcs/; revision=118878
2008-11-14 18:51:42 +00:00
Zoltan Varga b9e2040044 2008-11-13 Zoltan Varga <[email protected]>
* RxInterpreter.cs: Fix pc computation in various opcodes. Fixes #443841.

svn path=/trunk/mcs/; revision=118729
2008-11-13 17:13:43 +00:00
Zoltan Varga c935db2360 2008-11-11 Zoltan Varga <[email protected]>
* CILCompiler.cs: Implement Reference opcode.

svn path=/trunk/mcs/; revision=118484
2008-11-11 11:16:33 +00:00
Zoltan Varga f02d458b56 2008-10-30 Zoltan Varga <[email protected]>
* CILCompiler.cs: Implement SubExpression opcode.

svn path=/trunk/mcs/; revision=117485
2008-10-30 15:59:21 +00:00
Zoltan Varga e917f14f6f 2008-10-30 Zoltan Varga <[email protected]>
* CILCompiler.cs: Save and restore strpos in the Test opcode. Fixes
	#439947.

svn path=/trunk/mcs/; revision=117484
2008-10-30 15:41:03 +00:00
Zoltan Varga 02a61b0826 2008-10-25 Zoltan Varga <[email protected]>
* CILCompiler.cs: Implement Test opcode.

svn path=/trunk/mcs/; revision=117064
2008-10-25 17:58:51 +00:00
Gonzalo Paniagua Javier 942296071d 2008-10-25 Gonzalo Paniagua Javier <[email protected]>
* RxInterpreter.cs: implement missing Unicode* opcodes and
	StringReverseIgnoreCase.


svn path=/trunk/mcs/; revision=117048
2008-10-25 14:49:46 +00:00
Zoltan Varga 6941113b7a 2008-10-25 Zoltan Varga <[email protected]>
* RxOp.cs: Remove unused Generic opcodes.

	* RxCompiler.cs: Emit opcodes with flags using methods which can be 
	overriden by CILCompiler.cs, so we only have to override a few methods.

	* CILCompiler.cs: Simplify based on the RxCompiler changes. Implement
	UnicodeString opcode. Throw a NotImplementedException when an unsupported
	opcode is encountered, since the IL compiler is now believed to be feature 
	complete.

svn path=/trunk/mcs/; revision=117047
2008-10-25 14:00:58 +00:00
Zoltan Varga bd2d887d95 2008-10-24 Zoltan Varga <[email protected]>
* RxInterpreter.cs CILCompiler.cs gen-interp.cs: Fix the reading of short 
	values from the instruction stream.

svn path=/trunk/mcs/; revision=116964
2008-10-24 17:23:52 +00:00
Zoltan Varga e3892be8ab 2008-10-24 Zoltan Varga <[email protected]>
* RxOp.cs: Add some missing unicode opcodes.

	* gen-interp.cs RxInterpreter.cs: Generate Bitmap/UnicodeBitmap opcodes too.

	* CILCompiler.cs (EmitEvalMethodBody): Add an 'end_pc' argument to mark the
	end of the bytecode range which needs to be compiled. Use it to avoid
	compiling the same bytecode multiple times in various opcodes. Fix
	RxOp.Jump implementation. Add implementation for unicode opcodes.

svn path=/trunk/mcs/; revision=116926
2008-10-24 12:21:55 +00:00
Zoltan Varga 51f5de6c95 2008-10-09 Zoltan Varga <[email protected]>
* CILCompiler.cs: Implement NoBitmap/NoBitmapIgnoreCase. Fixes #432172.

svn path=/trunk/mcs/; revision=115310
2008-10-09 07:48:52 +00:00
Zoltan Varga 1b29e7e9c2 2008-09-14 Zoltan Varga <[email protected]>
* gen-interp.cs: New file to generate the all variants of the character 
	checking opcodes in RxInterpreter.cs.

	* RxInterpreter.cs: Replace hand written code with code generated by
	gen-interp.cs.

svn path=/trunk/mcs/; revision=112947
2008-09-14 01:46:53 +00:00
Zoltan Varga 20bceca776 2008-09-14 Zoltan Varga <[email protected]>
* RxInterpreter.cs: Fix the failure case of the No<XXX> opcodes. Fixes
	#426142.

svn path=/trunk/mcs/; revision=112945
2008-09-13 23:57:25 +00:00
Zoltan Varga 4b5c388a7b 2008-09-13 Zoltan Varga <[email protected]>
* RxInterpreter.cs RxCompiler.cs: Implement some missing Category opcodes.

svn path=/trunk/mcs/; revision=112914
2008-09-12 22:28:39 +00:00
Zoltan Varga 10cbc30b04 2008-09-07 Zoltan Varga <[email protected]>
* CILCompiler.cs: Override ICompiler.EmitSet too so we set op_flags for 
	Bitmap opcodes too. Fixes #424073.

svn path=/trunk/mcs/; revision=112458
2008-09-07 14:28:19 +00:00
Zoltan Varga 891eaef143 2008-09-06 Zoltan Varga <[email protected]>
* Regex.cs: Make the new regex interpreter+compiler the default.

svn path=/trunk/mcs/; revision=112437
2008-09-06 17:42:37 +00:00
Zoltan Varga 01fe2ef4e7 2008-08-31 Zoltan Varga <[email protected]>
* RxInterpreter.cs: Port the Anchor+StartOfString optimization from the old
	interpreter. Add credits.

	* RxCompiler.cs (EmitString): Lowercase the string if ignore is true.

svn path=/trunk/mcs/; revision=111989
2008-08-31 15:21:36 +00:00
Zoltan Varga 5723d06581 2008-08-31 Zoltan Varga <[email protected]>
* CILCompiler.cs: Fix the setting of the match position in the
	anchor+char optimization.

svn path=/trunk/mcs/; revision=111979
2008-08-30 23:08:02 +00:00
Zoltan Varga 5b21443a91 2008-08-31 Zoltan Varga <[email protected]>
* CILCompiler.cs: Implement FastRepeatLazy.

svn path=/trunk/mcs/; revision=111978
2008-08-30 22:38:57 +00:00
Zoltan Varga 37a5586691 2008-08-31 Zoltan Varga <[email protected]>
* CILCompiler.cs: Get rid of commented out code. Also get rid of
	frame.local_strpos_res, since the generated code already set Arg1 to
	the same value.

svn path=/trunk/mcs/; revision=111977
2008-08-30 22:14:03 +00:00
Zoltan Varga 929eec6210 2008-08-30 Zoltan Varga <[email protected]>
* CILCompiler.cs: Initialize all mi_ variables lazily.

svn path=/trunk/mcs/; revision=111971
2008-08-30 14:15:07 +00:00
Zoltan Varga 78fe9c179f 2008-08-30 Zoltan Varga <[email protected]>
* CILCompiler.cs: Implement FastRepeat.

svn path=/trunk/mcs/; revision=111970
2008-08-30 14:05:17 +00:00
Zoltan Varga b59989cd3a 2008-08-30 Zoltan Varga <[email protected]>
* RxInterpreter.cs: Add back SetStartOfMatch, make it protected so as to
	avoid a warning.

svn path=/trunk/mcs/; revision=111959
2008-08-29 23:29:35 +00:00
Zoltan Varga dc2b6bbb1f 2008-08-30 Zoltan Varga <[email protected]>
* CILCompiler.cs RxOp.cs: Merge lots of changes from RxInterpreter.cs,
	refactor the code.

svn path=/trunk/mcs/; revision=111958
2008-08-29 23:28:39 +00:00
Zoltan Varga 01bc43a4e2 2008-08-29 Zoltan Varga <[email protected]>
* RxInterpreter.cs RxCompiler.cs RxOp.cs: Implement/fix this so all the
	regex tests now run. The Repeat code is taken from the old interpreter.

svn path=/trunk/mcs/; revision=111925
2008-08-29 14:44:15 +00:00
Zoltan Varga 2b49ce098a 2008-08-28 Zoltan Varga <[email protected]>
* RxInterpreter.cs RxCompiler.cs RxOp.cs: Add support for 
	Category.AnySingleline.

svn path=/trunk/mcs/; revision=111747
2008-08-27 22:32:26 +00:00
Zoltan Varga 8d926d9b6c 2008-08-27 Zoltan Varga <[email protected]>
* RxCompiler.cs: Use Array.Copy since Buffer.BlockCopy operates on bytes.

svn path=/trunk/mcs/; revision=111679
2008-08-26 23:31:56 +00:00
Jb Evain e0e4361e63 cleanup System.ComponentModel for SL2
svn path=/trunk/mcs/; revision=109344
2008-07-31 13:49:49 +00:00
Roei Erez ccca1e1079 Fix a bug only in TARGET_JVM that happens when a match contains empty group at the end.
svn path=/trunk/mcs/; revision=104994
2008-06-05 12:06:06 +00:00
Jb Evain 963ccb4ef8 merge back ml2 into trunk
svn path=/trunk/mcs/; revision=100557
2008-04-13 13:47:01 +00:00
Zoltan Varga 308c2ba79a 2008-02-26 Zoltan Varga <[email protected]>
* CILCompiler.cs: Implement StringIgnoreCase.

svn path=/trunk/mcs/; revision=96631
2008-02-26 13:01:39 +00:00
Zoltan Varga 00a94a8ca9 2008-02-26 Zoltan Varga <[email protected]>
* CILCompiler.cs: Implement grouping support.

svn path=/trunk/mcs/; revision=96602
2008-02-25 23:21:43 +00:00
Zoltan Varga 12925fc252 2008-02-26 Zoltan Varga <[email protected]>
* CILCompiler.cs: Implement character groups.

svn path=/trunk/mcs/; revision=96600
2008-02-25 22:35:58 +00:00
Zoltan Varga 6f3a840382 2008-02-25 Zoltan Varga <[email protected]>
* CILCompiler.cs: Implement lots of missing opcodes.

svn path=/trunk/mcs/; revision=96566
2008-02-25 16:07:35 +00:00
Zoltan Varga d0eee10b4e 2008-02-18 Zoltan Varga <[email protected]>
* CILCompiler.cs (EmitEvalMethodBody): Check for the not-yet supported
	groups.Count > 1.

svn path=/trunk/mcs/; revision=96073
2008-02-18 16:44:37 +00:00
Paolo Molaro f065264798 Thu Feb 14 19:03:00 CET 2008 Paolo Molaro <[email protected]>
* RxCompiler.cs, RxInterpreter.cs, RxOp.cs, CILCompiler.cs : support for word
	boundary position opcodes, ignorecase backreference and more capture
	work.


svn path=/trunk/mcs/; revision=95660
2008-02-14 17:21:54 +00:00
Paolo Molaro e13ae1763b Thu Feb 14 17:11:10 CET 2008 Paolo Molaro <[email protected]>
* RxCompiler.cs, RxInterpreter.cs, RxOp.cs: replace EcmaDigit with
	Range, fixed matching of "" =~ /$/, implementedt TestCharGroup.
	Fixes and other misc opcodes implemented.


svn path=/trunk/mcs/; revision=95641
2008-02-14 15:31:24 +00:00
Zoltan Varga deeb27a70d 2008-02-13 Zoltan Varga <[email protected]>
* CILCompiler.cs: Restructure some code to avoid a branch inside a loop.

svn path=/trunk/mcs/; revision=95600
2008-02-13 21:39:25 +00:00
Zoltan Varga b306455215 2008-02-13 Zoltan Varga <[email protected]>
* CILCompiler.cs: Fix the unsafe string matching code.

svn path=/trunk/mcs/; revision=95599
2008-02-13 21:21:39 +00:00