Commit Graph

2159 Commits

Author SHA1 Message Date
kasperl@google.com 57a82e9d05 Implement JS version of LinkedHashSet and move the various HashTable implementations to the VM collection library patch.
R=erikcorry@google.com,lrn@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21180 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-10 07:12:50 +00:00
iposva@google.com 0d0fcbe7e1 Changelist to land https://codereview.chromium.org/13452007/ for Siva.
Review URL: https://codereview.chromium.org//13813018

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21160 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-09 17:51:24 +00:00
lrn@google.com 6160e59850 Moving ListBase, FixedLengthListMixin and UmodifiableListMixin to collection.
Users can now create lists easily by extending these classes, just
as they can create iterables by extending Iterable.

Reduce the dependency of IterableMixinWorkaround outside of core/collection
implementations. I plan to move IterableMixinWorkaround to _collection-dev
before M4.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21147 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-09 12:11:05 +00:00
vegorov@google.com a273179ac8 Use locale insensitive method to parse double literals.
Using strtod does not work because Dart grammar does not necessary match grammar used by strtod. Some locales (e.g. Russian and Danish) use comma instead of dot for radix point.

R=iposva@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21074 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-08 14:32:46 +00:00
kasperl@google.com 06ce0c3ec3 Add JS implementation of LinkedHashMap.
R=erikcorry@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21072 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-08 13:51:07 +00:00
floitsch@google.com bef8ebb5f6 Add Iterable.fold (and Stream.fold) which replace reduce.
For now this is just a copy. In a next step we will change the behavior of
`reduce`.

BUG= http://dartbug.com/9536

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20978 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-05 16:12:40 +00:00
kasperl@google.com caa4456595 Add a dart2js specific HashSet implementation that follows the HashMap implementation fairly closely.
I'd like to wait a bit with refactoring this more aggressively until
the linked variants have landed.

R=erikcorry@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20958 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-05 10:23:37 +00:00
asiva@google.com 2f21a5b390 Fix the setters in _ByteDataView to behave the same as '[]=' and '[]' operators
in regular TypedData classes.
Review URL: https://codereview.chromium.org//13516003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20882 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-03 18:52:03 +00:00
ager@google.com 6003fdfe6e Fix view creation for byte-size types.
We had forgotten to subtract the start byte offset from the length
when not passing in an explicit length.

Additionally, fix a couple of checked mode issues.

R=asiva@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20867 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-03 15:29:11 +00:00
lrn@google.com 3b13f62170 Remove addLast from List.
The List.addLast method has been deprecated for quite a while.
A recent change removed it from the interface, but left the
implementation in place (which caused some errors from the analyzer).
This removes it completely.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20857 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-03 12:52:19 +00:00
srdjan@google.com 60e57ecfe1 Optimizes 'as' operation in similar way as 'instanceof': collect type feedback in unoptimized mode and try to convert it to a simple classcheck in optimized code.
Review URL: https://codereview.chromium.org//13190014

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20783 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-02 15:30:14 +00:00
kasperl@google.com f15b6960c0 Add a new implementation of HashMap that uses JS objects for its (multiple) hash tables.
I'll start refactoring the implementation to make it a bit more
maintainable, but I wanted to get your first impressions.

R=erikcorry@google.com,lrn@google.com,srdjan@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20770 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-02 11:51:36 +00:00
asiva@google.com 7b72985c3e First step for fixing Issue 9416.
Review URL: https://codereview.chromium.org//13351002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20760 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-02 00:01:15 +00:00
asiva@google.com 2f7ca6843f Remove support for 'dart:scalarlist' in the Dart VM.
Review URL: https://codereview.chromium.org//13139002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20680 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-29 18:33:54 +00:00
asiva@google.com 417659c2dd Adapt remaining dart:scalarlist tests to use dart:typeddata
Review URL: https://codereview.chromium.org//13137002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20643 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-28 20:52:38 +00:00
iposva@google.com 3a858ca8a9 - Consolidate String sources in the runtime libraries.
Review URL: https://codereview.chromium.org//13097009

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20578 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-27 20:57:25 +00:00
johnmccutchan@google.com d516a7acde Review changes
Review URL: https://codereview.chromium.org//12982010

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20559 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-27 14:44:15 +00:00
johnmccutchan@google.com e07063f389 Revert 12534006
Review URL: https://codereview.chromium.org//13093005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20526 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-26 17:40:25 +00:00
johnmccutchan@google.com 7b1d3b9134 Port SIMD types from dart:scalarlist to dart:typeddata.
Review URL: https://codereview.chromium.org//12534006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20522 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-26 16:50:26 +00:00
asiva@google.com 5642025044 Handle TypedDataView objects in Dart_TypedDataAcquireData and
Dart_TypedDataReleaseData
Review URL: https://codereview.chromium.org//12937010

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20482 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-25 20:18:44 +00:00
asiva@google.com 3261c500d8 Implement creation of ByteData objects using the Dart API.
Review URL: https://codereview.chromium.org//12938010

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20396 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-22 18:14:37 +00:00
johnmccutchan@google.com 3d4778e2c2 SIMD plumbing
Review URL: https://codereview.chromium.org//12871015

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20287 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-20 20:29:00 +00:00
floitsch@google.com 6c40cac7a9 Remove streamSpawnUri and mangler.
Add more tests.
Make dart2js send sinks.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20213 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-19 16:12:13 +00:00
fschneider@google.com 86da5111ad Replace scalarlist optimizations and split external array loads into two IL instructions.
This CL removes optimized access for scalarlist, and only the new TypedData classes
are optimized. I changed the runtime libraries core and math to use typedData
instead of scalarlist (Uint16List is used in StringBuffer, Uint32List by Math.random).

Instead of using LoadIndexed for internal and external arrays,
split external loads into a load of the backing store and a load
of the element.

v3 <- LoadIndexed(v1, index)

becomes

v2 <- LoadUntagged(v1, ExternalTypedData::data_offset)
v3 <- LoadIndexed(v2, index);

For this I introduce two new representations in the IL:

 kUntagged (for values that hold a untagged pointer) and
 
 kNoRepresentation (for instructions accept any input
 representation)

Deoptimization does not need to know about kUntagged
since these values can never occur in the environment.

Also with this change:
* fix COMPILE_ASSERT and use it in one place.
* Cleanup IL printer output of deopt ids.
Review URL: https://codereview.chromium.org//12871010

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20198 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-19 12:06:23 +00:00
floitsch@google.com 7055e7b96a Add unhandledExceptionCallback to streamSpawnFunction.
Also throw error in dart2js version.

BUG= http://dartbug.com/9208

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20172 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-18 19:09:19 +00:00
asiva@google.com 453e8fe924 Add the native intrinsic TypedData_setRange to optimize the setRange call when the destination and source of setRange are of the same typeddata type.
Review URL: https://codereview.chromium.org//12881006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20078 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-15 13:33:11 +00:00
lrn@google.com 844cd39fad Change getRange to sublist. Make getRange deprecated.
This changes the exception behavior of getRange. It used to accept
a length of zero, no matter what start value. Now the start value
must be a valid list index.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20064 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-15 09:15:39 +00:00
lrn@google.com bab488a4fc Allow String.fromCharCodes to work directly on a GrowableObjectArray.
Avoids copying the data from the internal ObjectArray into a new
ObjectArray before creating the string.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20060 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-15 07:22:12 +00:00
floitsch@google.com 76d507cb6f Add List.insert.
BUG= http://dartbug.com/5375

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20037 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-14 17:38:14 +00:00
asiva@google.com 3316092e2d Fix typo in method calls for [] and []= operators in views.
Review URL: https://codereview.chromium.org//12531009

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20033 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-14 16:47:51 +00:00
asiva@google.com 5b0ee63836 Use offsetInBytes and not index in the get/set accessors of views.
Review URL: https://codereview.chromium.org//12608006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20003 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-14 11:38:17 +00:00
floitsch@google.com c8f2a81f07 Rename Timer.repeating to Timer.periodic.
Review URL: https://codereview.chromium.org//12793003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19925 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-13 13:02:13 +00:00
ajohnsen@google.com 3eab4cea7f Fix typo in typeddate.dart.
Also adds test for setting/getting directly on ByteData.

BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19909 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-13 07:45:38 +00:00
floitsch@google.com 65718c56df Rename XMatching to XWhere.
For example firstMatching -> firstWhere.

BUG= http://dartbug.com/8664
BUG= http://dartbug.com/8337

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19880 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-12 17:34:49 +00:00
asiva@google.com 69d0484d2a - Use dart:typedata types in the Dart API calls.
- Change the dart/io code to not use dart:scalarlist
Review URL: https://codereview.chromium.org//12730013

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19848 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-12 10:57:48 +00:00
floitsch@google.com cead1d41f1 ceil/floor/truncate/round return integers.
This CL supercedes https://codereview.chromium.org/11748016/

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19810 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-11 18:54:37 +00:00
lrn@google.com 53f877edb7 Rename String.concat to operator+.
Review URL: https://codereview.chromium.org//12441003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19788 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-11 12:59:17 +00:00
floitsch@google.com cf605283e2 Add first version of runAsync.
Review URL: https://codereview.chromium.org//12380060

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19768 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-11 10:08:28 +00:00
asiva@google.com 3b5c3e69dd Add the allocator intrinsics for dart:typeddata implementation.
Review URL: https://codereview.chromium.org//12547018

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19752 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-09 00:05:57 +00:00
floitsch@google.com dd48256fe5 Remove deprecated StringBuffer.add, addAll and addCharCode.
Review URL: https://codereview.chromium.org//12473003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19690 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-08 13:07:18 +00:00
lrn@google.com cd9bcfe956 Remove references to capital-D-Dynamic.
Review URL: https://codereview.chromium.org//12615002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19687 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-08 11:57:28 +00:00
lrn@google.com a5a93492d9 Change VM's string-buffer patch to use a Uin16Array as backing buffer.
Review URL: https://codereview.chromium.org//12421002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19679 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-08 10:21:52 +00:00
asiva@google.com 3f14a14ee7 Implement 'dart:typeddata' directly in the VM instead of using 'dart:scalarlist'
Review URL: https://codereview.chromium.org//12544015

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19656 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-07 21:50:33 +00:00
iposva@google.com b25d694633 - Avoid wrapping into Mints when generating random numbers.
- Update Random number tests.
- Fix String.fromCharCodes signature.
Review URL: https://codereview.chromium.org//12622002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19642 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-07 17:19:47 +00:00
lrn@google.com f79786d726 Fix String.fromCharCodes to work with iterables.
BUG=http://dartbug.com/8922

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19602 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-07 09:14:43 +00:00
floitsch@google.com 54ffaab251 Fix typeddata. Was still using Arrays.
Review URL: https://codereview.chromium.org//12443004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19480 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-05 13:55:14 +00:00
floitsch@google.com fd28ec5b2e Move Arrays class to private library.
Committed: https://code.google.com/p/dart/source/detail?r=19375
Reverted: http://code.google.com/p/dart/source/detail?r=19420

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19476 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-05 13:24:55 +00:00
asiva@google.com 97f6dee777 First step towards implementing dart:typeddata library.
Review URL: https://codereview.chromium.org//12313088

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19427 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-04 22:11:45 +00:00
floitsch@google.com 5505496990 Revert "Move Arrays class to private library."
This reverts commit 19375.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19420 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-04 21:27:38 +00:00
floitsch@google.com d91bca2813 Add List.asMap().
Review URL: https://codereview.chromium.org//12391046

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19399 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-04 16:57:52 +00:00