Commit Graph

31 Commits

Author SHA1 Message Date
lrn@google.com dd31afbeca Added implementation of String.codeUnits.
Based on ListIterable implementation that should be reusable for a lot
of our existing length/indexing-based iterables too.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18506 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-14 09:51:43 +00:00
lrn@google.com 3520e88c04 Bi-directional iterator for runes of a string.
Review URL: https://codereview.chromium.org//12094056

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18382 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-12 15:22:31 +00:00
floitsch@google.com 724029179f Adapt String interface for Utf16.
Committed: https://code.google.com/p/dart/source/detail?r=18069
Reverted: https://code.google.com/p/dart/source/detail?r=18070

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18072 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-04 20:17:38 +00:00
floitsch@google.com 596c245bbb Revert "Adapt String interface for Utf16."
This reverts commit 18069.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18070 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-04 19:57:59 +00:00
floitsch@google.com 659d4adf60 Adapt String interface for Utf16.
Review URL: https://codereview.chromium.org//12088086

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18069 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-04 19:45:33 +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
bak@google.com 6c398a3a25 Fixed Issue 7508: Many StringBuffer methods return StringBuffer, but should be void.
- Methods in StringBuffer have now been changed so they do not return this.
- This forces the programmer to use cascaded calls instead of flaky chaining of calls.
Review URL: https://codereview.chromium.org//11645019

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16358 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-20 11:13:27 +00:00
srdjan@google.com 5f4ad90c85 Added native to split OneByteString with a char code as pattern.
Review URL: https://codereview.chromium.org//11414273

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15615 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-01 00:22:18 +00:00
srdjan@google.com f7913777a4 Improve performance of String split (use unchecked substring).
Review URL: https://codereview.chromium.org//11415234

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15596 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-30 19:39:32 +00:00
srdjan@google.com bf3bac3884 Implement faster splitting with empty string as pattern. Add special native for computing substring of OneByteString (preparation for instrinsic).
Review URL: https://codereview.chromium.org//11416270

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15548 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-29 22:55:09 +00:00
srdjan@google.com 44f4011196 Improve performance of String.split for 1 and 0 character results.
Other cleanups/improvements in Random.
Review URL: https://codereview.chromium.org//11419194

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15429 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-28 01:17:25 +00:00
erikcorry@google.com 84da84c22d Revert "Add some support for the code-point code-unit distinction."
This reverts commit r15150

R=karlklose@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15152 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-20 15:23:41 +00:00
erikcorry@google.com 547cbf9da6 Add some support for the code-point code-unit distinction.
Adds String.fromCodeUnits and String.codeUnitAt, and modifies
String.fromCodePoints and String.codePointAt to actually use code points.
Fixes String.charCodes to use code points and adds String.codeUnits.
Reenables some tests, and adds new ones for non-BMP characters.
Fixes issues 6418, 6501 and 1357.

R=floitsch@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15150 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-20 14:51:25 +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
regis@google.com 40276f8c30 Fix result type checking of factory constructors of generic classes in VM.
Add a language test.
Fix some language tests.
Fix runtime library.
Note: This does not yet fix result checking of redirecting factories.
Review URL: https://codereview.chromium.org//11369168

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14769 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-09 23:51:06 +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
ajohnsen@google.com dbbf15abd8 Move ListImplementation from coreimpl to core, as a private member.
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14274 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-30 13:25:04 +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
floitsch@google.com e7c5e69beb Make String.charCodes a getter.
Review URL: https://codereview.chromium.org//11263040

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14078 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-25 14:25:43 +00:00
floitsch@google.com 09f6d09d88 Make isEmpty a getter.
Review URL: https://codereview.chromium.org//11238035

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14022 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-24 15:04:32 +00:00
floitsch@google.com 0e47b363ae Make hasNext a getter instead of a method.
Review URL: https://codereview.chromium.org//11230011

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14015 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-24 13:05:11 +00:00
lrn@google.com a083c1a108 Removed IllegalAccessException and UnsupportedOperationException.
Both were converted to StateError.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14012 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-24 12:36:10 +00:00
floitsch@google.com 9074fd0178 Make hashCode a getter and not a method.
Review URL: https://codereview.chromium.org//11191078

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@13866 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-22 12:41:04 +00:00
ager@google.com 70216ab4cd Hide internal details of VM string implementation.
R=lrn@google.com,srdjan@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@13352 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-08 13:00:33 +00:00
ager@google.com abee5139e5 Reapply change to hide VM-only List implementation classes.
The performance issue was that I had not updated the method
recognizer.

BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@13003 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-28 11:08:38 +00:00
ager@google.com fe66a0af1a Revert hiding of VM-only coreimpl list implementation types. While I
investigate performance regression (even after fixing constructors
in the intrinsifier).

R=iposva@google.com,srdjan@google.com,fschneider@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12963 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-27 14:07:56 +00:00
ager@google.com 8e6a2c8345 Hide VM-only coreimpl List implementation types. These should not be
exposed as visible parts of coreimpl.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12952 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-27 12:37:30 +00:00
lrn@google.com a1faa6f135 Change IllegalArgumentException to ArgumentError.
Review URL: https://codereview.chromium.org//10989013

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12841 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-25 12:27:52 +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
ajohnsen@google.com 99eac67675 Fix string unifizationf for dartc.
We don't have to expose string.dart anymore so merge it with
string_patch.dart.

BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11381 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-27 13:15:24 +00:00