Commit Graph

31 Commits

Author SHA1 Message Date
cbracken@google.com d520000fe9 Throw FormatException when Int32/Int64.parseRadix() encounters bad digit
BUG=
R=sra@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29109 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-23 19:04:43 +00:00
cbracken@google.com 8e3a216f33 Added bitLength, clamp(), toDouble(), toSigned(), toUnsigned().
BUG=
R=sra@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27862 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-25 00:02:28 +00:00
cbracken@google.com 0b68c45e9c Int32, Int64 default constructor now takes an optional int parameter.
Deprecated.fromInt().

BUG=
R=sra@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27777 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-23 16:52:36 +00:00
sra@google.com 7b8bb93212 New divide uses local variables rather than many temporary objects.
Removing mutators allows Int64 to have final fields and an (internal) const constructor.

R=cbracken@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27588 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-18 01:02:20 +00:00
sra@google.com 15fc29db41 Fix assert in int64 and add test
Review URL: https://codereview.chromium.org//23490010

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26816 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-28 20:52:07 +00:00
sra@google.com bed52fac0d More efficient Int64 parsing and printing.
This replaces code that generates lots of temporary Int64 objects with
code that works almost entirely usings SMI values in local variables.
Printing generates numbers several digits at a time.

Speedup is 10x for parsing and 100x for printing on dart2js and a little over 5x each on the VM.

Printing produces hex digits in the same case as int.toString.

R=cbracken@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26760 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-28 01:34:06 +00:00
cbracken@google.com 6a728556d1 Rename int{x,32,64} to Int{X,32,64} in line with naming guidelines.
BUG=
R=justinfagnani@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25584 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-29 21:19:59 +00:00
cbracken@google.com 79bd97594e Don't throw exception for non-integer args to fixnum int32,int64 op ==
Original bug
https://code.google.com/p/dart/issues/detail?id=12073

BUG=
R=justinfagnani@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25577 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-29 17:56:29 +00:00
cbracken@google.com 85462a9c08 Migrate fixnum tests to unittest. Fix int32 rollover bug.
- Migrated tests to unittest
- Reorganized tests by operator
- Test coverage for +/- overflow/rollover
- Test coverage for null args
- Test coverage for unary -
- Test coverage for comparison operators

BUG=
R=justinfagnani@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25176 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-18 20:44:47 +00:00
floitsch@google.com 8fd6d0aafd Remove Expect from core library.
Committed: https://code.google.com/p/dart/source/detail?r=19755
Reverted: http://code.google.com/p/dart/source/detail?r=19756

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20996 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-05 19:43:16 +00:00
nweiz@google.com c590e8ae0c Switch pkg packages, pub, and dartdoc to use package: imports.
This also changes the SDK layout by replacing the "pkg" directory, which
contained the full source of all the packages needed by pub and dartdoc, with a
"packages" directory that contains only their lib directories. This directory is
used as the package root for pub and dartdoc when run from the SDK.

BUG=6745

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20640 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-28 20:27:28 +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
floitsch@google.com 5dc8107c53 Revert "Remove Expect from core library."
This reverts commit 19755.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19756 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-09 03:19:07 +00:00
floitsch@google.com 12dbd2fd70 Remove Expect from core library.
Review URL: https://codereview.chromium.org//12212016

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19755 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-09 02:40:37 +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
rnystrom@google.com cef256ecf1 Convert the small packages in pkg to use "package:".
Review URL: https://codereview.chromium.org//11575043

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16189 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-15 01:05:35 +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
rnystrom@google.com 016676683a Update fixnum to new package guidelines.
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14760 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-09 21:28:21 +00:00
gram@google.com 981c4b11df Restructure pkg/unittest and pkg/webdriver to follow the pub conventions.
This means all imports of unittest in our test code had to change to include 'lib' in the path.
While doing that change I changed the library/imports to the new syntax in the affected files.
Review URL: https://codereview.chromium.org//11301046

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14443 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-01 23:09:47 +00:00
floitsch@google.com 27cadf2b66 isEven, isOdd, isNegative, isMaxValue, isMinValue, isInfinite, isPositive, isSingleValue.
Review URL: https://codereview.chromium.org//11227042

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@13974 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-23 16:15:36 +00:00
ahe@google.com 6254729761 Revert "Parts must start with 'part of'" and "Attempt to fix VM build"
This reverts r13961 and r13963.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@13967 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-23 14:24:04 +00:00
scheglov@google.com 50b5b6e1a8 Parts must start with 'part of'
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@13961 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-23 13:20:50 +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
floitsch@google.com 1011c58bf9 Use JavaScript runtime semantics when constant folding.
Fixes issue 4551.
Fixes issue 2887.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11883 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-05 16:13:58 +00:00
iposva@google.com 0dd77bf634 - Change "static final" to "static const" in the
pkg/, language/, utils/ and lib/core/ directories.
Review URL: https://chromiumcodereview.appspot.com//10919024

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11703 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-31 17:47:17 +00:00
kasperl@google.com 0af11bc9c4 More uses of the new try-catch syntax.
With this change, the VM can run all tests (except co19) without
allowing the use of the old try-catch syntax.

R=ngeoffray@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11600 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-30 11:14:39 +00:00
ager@google.com 722c1a3ce6 Deprecate Math object in corelib in favor of dart:math library.
Review URL: https://chromiumcodereview.appspot.com//10829459

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11155 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-22 14:33:01 +00:00
alanknight@google.com 6fc8369fb6 Rename "tests" directories under /pkg to the singular "test"
Review URL: https://chromiumcodereview.appspot.com//10837268

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10771 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-15 21:38:41 +00:00