Lasse Reichstein Holst Nielsen
0c18b643c6
Add RegExp.escape methods.
...
Fixes 4706
Bug: http://dartbug.com/4706
Change-Id: If635cb0eb7c20405ab0127a443fe51176191b5ad
Reviewed-on: https://dart-review.googlesource.com/35641
Reviewed-by: Stephen Adams <sra@google.com >
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com >
2018-02-01 09:56:47 +00:00
Vyacheslav Egorov
49eb9ed58e
[VM] Cleanup typing issues in regexp_patch.
...
RegExp implementation expects to see:
- _groupCount on all RegExp objects;
- _substringUnchecked on all String objects;
Bug: https://github.com/dart-lang/sdk/issues/31052
Change-Id: I81f705d85a4b1325941562a0287870c7a8edad9c
Reviewed-on: https://dart-review.googlesource.com/15123
Reviewed-by: Erik Corry <erikcorry@google.com >
Commit-Queue: Vyacheslav Egorov <vegorov@google.com >
2017-10-19 14:00:57 +00:00
Peter von der Ahé
e8aef37eac
Clean up patches so they can be compiled by Fasta.
...
Change-Id: Ie436375c78496366accf0ba82938e54cbe30b143
Reviewed-on: https://dart-review.googlesource.com/3001
Commit-Queue: Peter von der Ahé <ahe@google.com >
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com >
Reviewed-by: Vyacheslav Egorov <vegorov@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2017-10-05 14:05:50 +00:00
Florian Loitsch
ee46026671
Don't use LinkedList in the core libraries anymore.
...
R=lrn@google.com
Committed: https://github.com/dart-lang/sdk/commit/fe17b5b2bc24454dd2f596d8ce6e2e7661e87f10
Reverted: https://github.com/dart-lang/sdk/commit/5d4a786f4466ebcb06c36ed44f262c9e120a7273
Review-Url: https://codereview.chromium.org/2975443002 .
2017-07-28 21:14:11 +02:00
Florian Loitsch
5d4a786f44
Revert "Don't use LinkedList in the core libraries anymore."
...
This reverts commit fe17b5b2bc .
Review-Url: https://codereview.chromium.org/2974073002 .
2017-07-10 14:58:04 +02:00
Florian Loitsch
fe17b5b2bc
Don't use LinkedList in the core libraries anymore.
...
R=lrn@google.com
Review-Url: https://codereview.chromium.org/2975443002 .
2017-07-10 14:09:24 +02:00
Jacob Richman
4360e99d18
Revert "Fix observatory tests broken by running dartfmt."
...
This reverts commit b1f7e6d94673b098c93c187fe3efc45c15f27edc.
BUG=
Committed: https://github.com/dart-lang/sdk/commit/62be0eacfbb36bdc92a05c7c35bb4506621b6a3a
Review-Url: https://codereview.chromium.org/2767533002 .
2017-03-21 10:07:26 -07:00
Jacob Richman
62be0eacfb
Revert "Fix observatory tests broken by running dartfmt."
...
This reverts commit b1f7e6d94673b098c93c187fe3efc45c15f27edc.
BUG=
Review-Url: https://codereview.chromium.org/2767533002 .
2017-03-20 22:19:22 -07:00
Jacob Richman
88f8aacd5f
Re-apply rolled back CL to apply dartfmt to runtime.
...
Fix observatory tests broken by running dartfmt due to line and column changes.
Temporarily reverted formatting for evaluate_activation_test.dart as dartfmt doesn't yet handle multitests.
BUG=
R=johnmccutchan@google.com
Review-Url: https://codereview.chromium.org/2759973004 .
2017-03-20 21:44:59 -07:00
Ryan Macnak
ea4744a06f
Revert "Run dartfmt on all files under runtime."
...
This reverts commit 15f393f189 .
The change caused many service test failures due to changed line numbers.
TBR=jacobr@google.com
Review-Url: https://codereview.chromium.org/2762583003 .
2017-03-20 13:42:55 -07:00
Jacob Richman
15f393f189
Run dartfmt on all files under runtime.
...
I've omitted files where the formatter output is significantly uglier
than the original code and I'll send those files in a separate CL
with options for how to make the code look reasonable while still
taking advantage of the formatter.
BUG=
R=johnmccutchan@google.com
Review-Url: https://codereview.chromium.org/2751423005 .
2017-03-20 13:13:50 -07:00
Vyacheslav Egorov
2403444eba
VM: Optimize RegExp.matchAsPrefix(...) by generating a sticky RegExp specialization.
...
This is the same as a sticky RegExp flag in ES2015.
Overlay some RegExp fields on top of each other - given that they should never be used simultaneously.
BUG=http://dartbug.com/27810
R=rmacnak@google.com
Review URL: https://codereview.chromium.org/2510783002 .
2016-11-17 17:46:21 +01:00
Vyacheslav Egorov
eb8c24e133
Reland "Merge more Kernel infrastructure from kernel_sdk SDK fork."
...
R=zra@google.com
BUG=
Review URL: https://codereview.chromium.org/2451623006 .
2016-10-27 10:09:22 +02:00
Vyacheslav Egorov
12968edb9c
Revert "Reland "Merge more Kernel infrastructure from kernel_sdk SDK fork.""
...
This reverts commit 4e7a31262e .
Windows bots are broken now.
R=zra@google.com
BUG=
Review URL: https://codereview.chromium.org/2451893004 .
2016-10-26 17:07:18 +02:00
Vyacheslav Egorov
4e7a31262e
Reland "Merge more Kernel infrastructure from kernel_sdk SDK fork."
...
This relands commit 2fed1c3905 with fixes to ensure that analyzer summaries are correctly created and XARM build does not try to use target binaries on the host.
R=zra@google.com
BUG=
Review URL: https://codereview.chromium.org/2453773002 .
2016-10-26 16:48:28 +02:00
Vyacheslav Egorov
cf7ff42e60
Revert "Merge more Kernel infrastructure from kernel_sdk SDK fork."
...
This reverts commit 2fed1c3905 .
SDK builds are failing
TBR=zra@google.com
Review URL: https://codereview.chromium.org/2455593002 .
2016-10-26 13:06:27 +02:00
Vyacheslav Egorov
2fed1c3905
Merge more Kernel infrastructure from kernel_sdk SDK fork.
...
- bring patched SDK generation scripts and VM patch tweaks that allow VM patch files to be parsed by analyzer front-end;
Patched SDK is an SDK with all VM patches spliced into it. Kernel compiler is based on the analyzer front-end which does
not have any patch files support/model so for it to produce Kernel files that match VM we need to generate a such patched SDKs.
- bring test script modifications that allow to test Kernel pipeline
BUG=
R=asiva@google.com , kmillikin@google.com , whesse@google.com , zra@google.com
Review URL: https://codereview.chromium.org/2434123003 .
2016-10-26 13:02:54 +02:00
Matthias Hausner
1a6d1eca32
Implement @patch annotation for patch class members
...
Allow members of patch classes to be annotated with @patch. The VM
ignores the annotation. I simply replaces the original method
if the name matches, or reports an error if field names match.
Adding a bit is_patched to members to do more checking remains a
TODO. There are currently no unused bits available, and I don’t want
to increase the size of Function objects for this.
BUG=
R=asiva@google.com
Review URL: https://codereview.chromium.org/2230383003 .
2016-08-10 12:54:57 -07:00
Matthias Hausner
e11ca24053
Use metadata annotation @patch for patch classes
...
Annotate patch classes and top-level patch functions with @patch
instead of the pseudo-keyword patch. This allows the analyzer
to read patch files, and matches the syntax that dart2js uses.
The deprecated syntax is still supported, but a warning is printed when detected.
BUG=
Review URL: https://codereview.chromium.org/2220883004 .
2016-08-09 09:48:03 -07:00
Ryan Macnak
b070d98f6e
Simpler regex names:
...
C++ JSRegExp -> RegExp
Dart _JSSyntaxRegExp -> _RegExp
Function RegExp.:irregexp: pattern -> RegExp.:matcher: pattern
R=johnmccutchan@google.com
Review URL: https://codereview.chromium.org/1815333002 .
2016-03-21 17:21:05 -07:00
zerny@google.com
fc7306ce38
Another type error in regexp patch file.
...
TBR=fschneider@google.com
BUG=
Review URL: https://codereview.chromium.org//762683004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41987 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-26 10:44:40 +00:00
zerny@google.com
7fb66c920c
Fix type typo in regexp patch file.
...
TBR=fschneider@google.com
BUG=
Review URL: https://codereview.chromium.org//759913003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41985 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-26 10:23:38 +00:00
zerny@google.com
8e807c8550
Integrate the Irregexp Regular Expression Engine.
...
BUG=http://dartbug.com/19090
R=fschneider@google.com
Committed: https://code.google.com/p/dart/source/detail?r=41949
Review URL: https://codereview.chromium.org//744853003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41983 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-26 09:32:43 +00:00
zerny@google.com
84a4135901
Revert "Integrate the Irregexp Regular Expression Engine."
...
This reverts commit https://code.google.com/p/dart/source/detail?r=41949
TBR=fschneider@google.com
BUG=
Review URL: https://codereview.chromium.org//754383002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41950 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-25 13:36:40 +00:00
zerny@google.com
43ac0c6f33
Integrate the Irregexp Regular Expression Engine.
...
BUG=http://dartbug.com/19090
R=fschneider@google.com
Review URL: https://codereview.chromium.org//744853003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41949 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-25 13:10:21 +00:00
lrn@google.com
7b516974b2
Add optional start index to Pattern.allMatches.
...
This is a non-breaking change.
Very few classes implement Pattern, so it's also a mostly non-intrusive change.
If we add startIndex to other methods, like replaceFirstMatch, we can use the extra parameter only for non-zero start indices without breaking existing code.
R=ajohnsen@google.com
Review URL: https://codereview.chromium.org//460613002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39119 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-12 07:13:01 +00:00
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