Srdjan Mitrovic
b3405d5ebc
Add --no-background-compilation to tests that expect to run code in optimized form
...
BUG=
R=asiva@google.com
Review URL: https://codereview.chromium.org/1759973002 .
2016-03-02 16:30:58 -08:00
Lasse R.H. Nielsen
b70109683b
Implement cryptographically secure random numbers by using crypto.getRandomValues.
...
Closes https://github.com/dart-lang/sdk/issues/24687
R=floitsch@google.com , sigmund@google.com
Review URL: https://codereview.chromium.org/1413923004 .
2015-10-23 11:14:37 +02:00
Regis Crelier
09954546fb
Add a 'secure' constructor to Random in dart:math returning a cryptographically
...
secure random generator which reads from the entropy source provided by the
embedder for every generated random value.
Add a test.
Fixes #1746 .
R=lrn@google.com
Review URL: https://codereview.chromium.org/1398453004 .
2015-10-15 10:16:03 -07:00
iposva@google.com
365be3a302
Fix Dartium tests:
...
- Make arguments to main optional.
Review URL: https://codereview.chromium.org//581263003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40461 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-18 20:45:06 +00:00
iposva@google.com
2dc9179ece
- Prevent flakes in pi_test.dart.
...
R=zra@google.com
Review URL: https://codereview.chromium.org//583583004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40443 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-18 16:53:24 +00:00
kevmoo@google.com
a68595f903
add isNaN and isNotNaN to matchers
...
BUG= https://code.google.com/p/dart/issues/detail?id=19302
R=kevmoo@google.com
Review URL: https://codereview.chromium.org//332663002
Patch from Sam Rawlins <srawlins@google.com >.
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38745 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-30 19:12:16 +00:00
zra@google.com
eb11b8a7a0
Adds far-branches to arm64.
...
Also fixes bugs and enables tests.
R=regis@google.com
Review URL: https://codereview.chromium.org//283513002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@36051 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-12 18:43:08 +00:00
lrn@google.com
1ffd31fcde
Fix assert in dart:math/Rectangle.
...
Didn't pass NaN down the correct path, and failed an assertion.
Added tests.
BUG= http://dartbug.com/17734
R=sgjesse@google.com
Review URL: https://codereview.chromium.org//228533002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34822 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-08 13:12:21 +00:00
srdjan@google.com
6d56854a9a
Add optimization for pow(base, 0.5) to the other architectures as well.
...
R=zra@google.com
Review URL: https://codereview.chromium.org//220723017
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34717 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-03 19:44:18 +00:00
lrn@google.com
e314fc2671
Make Rectangle and MutableRectangle constructors handle negative lengths.
...
Now handles negative width/height so that it's equivalent to
new Rectangle.fromPoints(new Point(left, top),
new Point(left + width, top + height))
BUG= http://dartbug.com/16167
R=efortuna@google.com
Review URL: https://codereview.chromium.org//135273009
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32736 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-18 10:12:23 +00:00
lrn@google.com
d63af4cdc8
Add more complex mixing of random seed.
...
This changes the sequences generated by Random for a given seed,
since the internal state will not be the same as for the unmixed
seed.
It is consistent between VM and dart2js.
The provided integer seed is hashed as follows:
uint64 hash = 0;
while (seed > 0) {
hash = hash * 1037 + mix64((int64)seed);
seed >>= 64;
}
where mix64 mixes the bits of a 64-bit value.
The hash is used to initialize the random generator's internal state.
R=floitsch@google.com , iposva@google.com
Review URL: https://codereview.chromium.org//156533002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32412 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-07 08:42:43 +00:00
lrn@google.com
1c27022d7c
Change Rectangle.operator== to compare right/bottom instead of width/height.
...
BUG= http://dartbug.com/16245
R=efortuna@google.com
Review URL: https://codereview.chromium.org//145973005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32155 260f80e4-7a28-3924-810f-c04153c831b5
2014-01-30 09:54:44 +00:00
iposva@google.com
8db30180b4
Fix http://dartbug.com/16111
...
- Use all bits from the seed value even if passed a Bigint.
- Fix out of bounds access in BigintOperations.
- Remove obsolete implementation note.
R=srdjan@google.com
Review URL: https://codereview.chromium.org//136453012
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31859 260f80e4-7a28-3924-810f-c04153c831b5
2014-01-16 00:01:55 +00:00
lrn@google.com
f0bc9ff077
Change dart2js' Random to honor the seed.
...
Simulate the same RNG as the VM when a seed is passed.
BUG= http://dartbug.com/15426
R=floitsch@google.com
Review URL: https://codereview.chromium.org//104083003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30893 260f80e4-7a28-3924-810f-c04153c831b5
2013-12-05 13:06:47 +00:00
lrn@google.com
ef66be8610
Change Expect.identical(NaN, x) to not assume NaNs are identical.
...
R=floitsch@google.com
Review URL: https://codereview.chromium.org//87953002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30667 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-26 10:32:51 +00:00
efortuna@google.com
b447e86bd8
Remove default values for point.
...
BUG=
R=floitsch@google.com
Review URL: https://codereview.chromium.org//64373004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30061 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-07 18:29:52 +00:00
floitsch@google.com
35e9ae50d9
Fix warnings in library-tests.
...
R=lrn@google.com
Review URL: https://codereview.chromium.org//54723007
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29756 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-01 17:01:11 +00:00
efortuna@google.com
4a8d13f0f6
Fix Rectangle test with method name.
...
BUG=
Review URL: https://codereview.chromium.org//41073004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29205 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-24 20:48:44 +00:00
efortuna@google.com
eaa854b258
Move Rectangle and Point into dart:math.
...
BUG=
R=floitsch@google.com
Review URL: https://codereview.chromium.org//25808002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28272 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-04 17:47:39 +00:00
efortuna@google.com
0b53b15b7d
"Reverting 28184"
...
TBR=blois
BUG=
Review URL: https://codereview.chromium.org//25785003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28186 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-02 22:13:16 +00:00
efortuna@google.com
837c6b6ee3
Move Point and Rect over to dart:math, to be re-exported by dart:html.
...
BUG=
R=floitsch@google.com
Review URL: https://codereview.chromium.org//25623002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28184 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-02 21:54:02 +00:00
sra@google.com
c068a949fe
Revert "Revert "Reinstate type checks in Math.min and Math.max""
...
Review URL: https://codereview.chromium.org//24918003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27983 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-27 02:01:43 +00:00
sra@google.com
053eaeb868
Revert "Reinstate type checks in Math.min and Math.max"
...
Review URL: https://codereview.chromium.org//24911003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27981 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-27 01:15:58 +00:00
sra@google.com
b1e55c556c
Reinstate type checks in Math.min and Math.max
...
See Issue 11906 for discussion.
R=srdjan@google.com
Review URL: https://codereview.chromium.org//23658055
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27980 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-27 00:45:08 +00:00
lrn@google.com
5343ef8d32
Add documentation to dart:math pow function.
...
Also add test, and modify implementation to match on the single case where it didn't.
BUG= http://dartdog.com/1952
R=floitsch@google.com
Review URL: https://codereview.chromium.org//22943005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26347 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-20 12:23:00 +00:00
srdjan@google.com
c891612920
Adapt Random class to be able to run in javascript integer compatibility mode.
...
R=asiva@google.com , zra@google.com
Review URL: https://codereview.chromium.org//21966003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25753 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-02 23:07:55 +00:00
srdjan@google.com
71cada8f75
Partitioned min_max_test for checked mode as well.
...
Review URL: https://codereview.chromium.org//20011002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25319 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-22 23:19:18 +00:00
srdjan@google.com
aba435de6a
FIx a typo in SIMMIPS min/max and enable min_max_test for SIMMIPS by splitting the main functions into two parts.
...
R=regis@google.com
Review URL: https://codereview.chromium.org//19653008
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25314 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-22 22:43:51 +00:00
srdjan@google.com
17bc0e19c4
Fix math min/max for -0.0 case. Enable min_max_test to run in optimizing compiler as well.
...
R=regis@google.com , zra@google.com
Review URL: https://codereview.chromium.org//19482023
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25306 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-22 21:37:43 +00:00
hausner@google.com
457bb1bdcb
Remove support for + prefix in number literals
...
Also fix some tests that expected + prefix in hex numbers to be illegal. According to our documentation, int.parse() accepts + for numbers in all formats/radixes.
R=srdjan@google.com
Review URL: https://codereview.chromium.org//17103002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24051 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-14 21:16:46 +00:00
iposva@google.com
4271b30c89
- Extend the coin test for slightly different scenarios.
...
- Crank the generator a couple of times before returning
a newly allocated one.
Review URL: https://codereview.chromium.org//15356003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23309 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-28 22:15:07 +00:00
floitsch@google.com
09d7da9250
Rewrite double.parse.
...
BUG= http://dartbug.com/5654
R=lrn@google.com , srdjan@google.com
Committed: https://code.google.com/p/dart/source/detail?r=23062
Reverted: https://code.google.com/p/dart/source/detail?r=23065
Committed: https://code.google.com/p/dart/source/detail?r=23066
Reverted: https://code.google.com/p/dart/source/detail?r=23068
Review URL: https://codereview.chromium.org//15333006
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23071 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-23 14:30:16 +00:00
floitsch@google.com
9849fb8900
Revert "Rewrite double.parse."
...
This reverts commit r23066.
Review URL: https://codereview.chromium.org//15814003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23068 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-23 13:28:37 +00:00
floitsch@google.com
75cafec89d
Rewrite double.parse.
...
BUG= http://dartbug.com/5654
R=lrn@google.com , srdjan@google.com
Committed: https://code.google.com/p/dart/source/detail?r=23062
Reverted: https://code.google.com/p/dart/source/detail?r=23065
Review URL: https://codereview.chromium.org//15333006
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23066 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-23 13:09:05 +00:00
floitsch@google.com
724fb6b4aa
Revert "Rewrite double.parse."
...
This reverts commit r23062.
Review URL: https://codereview.chromium.org//15868003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23065 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-23 13:00:05 +00:00
floitsch@google.com
d39ef26225
Rewrite double.parse.
...
BUG= http://dartbug.com/5654
R=lrn@google.com , srdjan@google.com
Review URL: https://codereview.chromium.org//15333006
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23062 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-23 12:00:45 +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
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
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
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
gram@google.com
cdb7da543b
Library syntax updates. Covers all remaining files in ~/tests aprt from ~/tests/language and ~/tests/standalone.
...
Review URL: https://codereview.chromium.org//11358203
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14815 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-12 22:45:18 +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
regis@google.com
adb534674c
Change core lib, dart2js, and more for new optional parameters syntax and semantics (new semantics is not enforced yet).
...
Review URL: https://codereview.chromium.org//11090016
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@13684 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-16 16:03:47 +00:00
iposva@google.com
e045db6454
- Fix comment describing new test.
...
Review URL: https://codereview.chromium.org//10948008
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12495 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-18 12:52:43 +00:00
iposva@google.com
820d2b33d5
- Fix the implementation of Random.nextBool() and add test.
...
Review URL: https://codereview.chromium.org//10919323
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12458 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-17 21:33:39 +00:00
kasperl@google.com
8bd4bf096b
Update almost all tests (except co19) to use the new try-catch syntax.
...
R=ngeoffray@google.com
BUG=
Review URL: https://chromiumcodereview.appspot.com//10891020
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11492 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-29 08:11:41 +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