Commit Graph

25 Commits

Author SHA1 Message Date
lrn@google.com ff1d105a0f Remove deprecated 'str' getter on Match.
BUG= http://dartbug.com/12843
R=floitsch@google.com

Review URL: https://codereview.chromium.org//36073010

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29167 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-24 12:06:41 +00:00
lrn@google.com 3f23ba6d14 Fix implementations of Match too, to use "input", not "str".
Fix accidental rename of str to src.

R=sgjesse@google.com

Review URL: https://codereview.chromium.org//23490008

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26781 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-28 11:33:56 +00:00
lrn@google.com 85772691a1 Rename Match.str to input.
Cleanup of Match and RegExp documentation.

BUG= http://dartbug.com/8333
R=floitsch@google.com

Review URL: https://codereview.chromium.org//23566008

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26776 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-28 10:46:42 +00:00
lrn@google.com 9614a603bb Proof-of-concept matchPrefix on Pattern.
Can be used to implement startsWith (and endsWith with a loop).

R=floitsch@google.com

Review URL: https://codereview.chromium.org//15709018

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23897 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-12 08:37:36 +00:00
lrn@google.com 9ed56a1a56 Make VM's RegExp.allMatches lazy.
R=floitsch@google.com

Review URL: https://codereview.chromium.org//16147003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23731 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-07 08:08:46 +00:00
lrn@google.com 450e0f64d9 Fix-up RegExp implementations.
VM _JSRegExpMatch didn't have correct "pattern" getter and exposed
too many members. Also didn't allow matching an empty match at the
end of the string with .allMatches.

JS RegExp didn't advance the position correctly after an empty match.

BUG=http://dartbug.com/1301, http://dartbug.com/6554
R=floitsch@google.com, ngeoffray@google.com

Review URL: https://codereview.chromium.org//16206008

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23675 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-06 11:44:04 +00:00
lrn@google.com 6b4f4b1bab Change new List(n) to return fixed length list.
Deprecate List.fixedLength, add List.filled.

Make Iterable.toList and List.from take "growable" argument,
defaulting to false.

Review URL: https://codereview.chromium.org//12328104

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19112 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-27 08:45:04 +00:00
floitsch@google.com 4a7dfd2da3 Big merge from experimental to bleeding edge.
Review URL: https://codereview.chromium.org//11783009

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16687 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-07 11:23:16 +00:00
lrn@google.com 22309b260c Remove NullPointerException.
Accessing non-existing members on null now throws NoSuchMethodError.
Throwing a null value fails by throwing a NullThrownError.
Methods checking for null now generally throw new ArgumentError(null).

Committed: https://code.google.com/p/dart/source/detail?r=15061

Review URL: https://codereview.chromium.org//11415028

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15136 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-20 09:21:52 +00:00
lrn@google.com 0c8dce77f1 Revert "Remove NullPointerException."
Crashes in the x64 VM.

Review URL: https://codereview.chromium.org//11417058

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15065 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-19 09:59:59 +00:00
lrn@google.com e211c2f0ee Remove NullPointerException.
Accessing non-existing members on null now throws NoSuchMethodError.
Throwing a null value fails by throwing a NullThrownError.
Methods checking for null now generally throw new ArgumentError(null).

Review URL: https://codereview.chromium.org//11415028

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15061 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-19 08:51:49 +00:00
ajohnsen@google.com 970cc5ba68 Move JSSyntaxRegExp to core as a private member. This removes the last refrences to dart:coreimpl.
After this cleanup, RegExp no longer have a const constructor. Use 'new
RegExp(...)' from now on.

BUG=

Review URL: https://codereview.chromium.org//11365196

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14838 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-13 10:41:37 +00:00
ajohnsen@google.com ab69873a42 Make RegExp constructor non-const.
Another take of https://codereview.chromium.org/11410033/ with status changes applied for co19 tests.

BUG=

Review URL: https://codereview.chromium.org//11369210

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14837 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-13 10:18:06 +00:00
ajohnsen@google.com ec9fee9858 "Reverting 14829-14832"
BUG=

Review URL: https://codereview.chromium.org//11312203

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14833 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-13 07:28:13 +00:00
ajohnsen@google.com 8dc3edd7ce Make RegExp's constructor non-const.
BUG=

Review URL: https://codereview.chromium.org//11410033

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14829 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-13 06:48:43 +00:00
floitsch@google.com 8e6f238f86 a === b -> identical(a, b)
Replace === null with == null.

BUG=http://dartbug.com/6380

Review URL: https://codereview.chromium.org//11361190

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14794 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-12 17:19:58 +00:00
lrn@google.com 7e6ae8ea09 Renaming IndexOutOfRangeException to RangeError.
It now extends ArgumentError.

Review URL: https://codereview.chromium.org//11275042

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14405 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-01 13:46:30 +00:00
ajohnsen@google.com 806fa6fab1 Move StringImplementation from coreimpl to core as _StringImpl.
BUG=

Review URL: https://codereview.chromium.org//11348035

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14281 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-30 14:19:57 +00:00
floitsch@google.com 9cc9214b58 Rename regexp methods to getters.
Review URL: https://codereview.chromium.org//11266050

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14094 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-25 19:31:56 +00:00
kasperl@google.com 1b994e881f Change RegExp constructor to insist on proper named optional parameters.
R=bak@google.com,lrn@google.com
BUG=

Review URL: https://codereview.chromium.org//10910253

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12329 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-13 14:00:32 +00:00
kasperl@google.com 023546faf8 Remove more () from getters.
This makes it possible to run all standard tests except co19
without ever using a getter that's defined with ().

R=iposva@google.com,hausner@google.com
BUG=

Review URL: https://chromiumcodereview.appspot.com//10928051

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12028 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-07 12:56:21 +00:00
kasperl@google.com 9beb871852 Get rid of a lot of () for getters.
R=bak@google.com
BUG=

Review URL: https://chromiumcodereview.appspot.com//10919146

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12017 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-07 11:50:07 +00:00
iposva@google.com 327ff5d70e - Change "static final" to "static const" in the runtime/ directory.
- Fixed parsing of top-level static const.
Review URL: https://chromiumcodereview.appspot.com//10883071

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11425 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-27 23:51:37 +00:00
turnidge@google.com be1824962e Make StringBase._substringUnchecked a native function.
This avoids making a throw-away list on every substring operation.
Fixed the underscore on the function name while I was at it.
Review URL: https://chromiumcodereview.appspot.com//10874038

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11262 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-23 21:48:40 +00:00
ager@google.com 7d86630418 Use patching for regexp implementation.
BUG=

Review URL: https://chromiumcodereview.appspot.com//10880020

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11218 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-23 09:24:40 +00:00