Commit Graph

250 Commits

Author SHA1 Message Date
kasperl@google.com ed27978039 Add #library tag to please the testing setup we use on the build bots.
TBR'ed.

R=lrn@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10628 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-14 10:55:06 +00:00
kasperl@google.com 404955baf6 Fix issue 4456 (BadNumberFormatException -> FormatException).
R=lrn@google.com
BUG=http://dartbug.com/4456

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10625 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-14 10:28:04 +00:00
ajohnsen@google.com a91fc9471b Add reduce to Queue.
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10571 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-13 13:31:27 +00:00
ajohnsen@google.com 8f50fb32fd Reapply 'Add reduce to Collection.'
Implemented JS array's reduce and fix a template error that made snapshotting crash.

BUG=
TEST=

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


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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10557 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-13 09:19:53 +00:00
ajohnsen@google.com db92954d53 Revert "Add reduce to Collection."
This reverts commit 9921e32dd33d6d6482d5fed9e85d68c180f670dd.

BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10551 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-13 06:47:27 +00:00
ajohnsen@google.com ff34c5464e Add reduce to Collection.
BUG=
TEST=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10548 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-13 05:57:55 +00:00
efortuna@google.com 1d14fb856e Un-enable Opera.
Review URL: https://chromiumcodereview.appspot.com//10826255

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10543 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-10 23:36:51 +00:00
scheglov@google.com 929f158657 Issue 3800. Calling an undefined constructor via new is a warning, not an error
http://code.google.com/p/dart/issues/detail?id=3800

R=brianwilkerson@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10531 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-10 21:04:47 +00:00
efortuna@google.com 5072b18d98 Enable Opera testing (!!!).
Review URL: https://chromiumcodereview.appspot.com//10832239

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10513 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-10 16:50:34 +00:00
rnystrom@google.com 0bc9b19740 Rename BadNumberFormatException -> FormatException.
Review URL: https://chromiumcodereview.appspot.com//10850034

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10354 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-07 20:56:59 +00:00
smok@google.com 4412f8653f dart2dart Skip non-language tests, leave yaml too.
Review URL: https://chromiumcodereview.appspot.com//10823079

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10014 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-30 13:50:54 +00:00
smok@google.com ac8d991870 dart2dart
Several fixes for more robust renaming of type annotations and Send-s:
Correct renaming of class interfaces with type arguments, renaming
of global functions, constructor and named constructor calls, static
field accesses.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10003 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-30 05:27:58 +00:00
antonm@google.com 74d17a16f9 dart2dart compiler support.
R=whesse@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9880 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-25 11:20:41 +00:00
floitsch@google.com 6b389aee00 Fix printing of dates with year 0.
Review URL: https://chromiumcodereview.appspot.com//10790099

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9799 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-23 08:35:27 +00:00
antonm@google.com 663662028e Clean sort_helper.dart a bit: remove printing.
R=ngeoffrey@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9580 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-12 07:24:07 +00:00
floitsch@google.com de90cce3e2 Inline compareTo for numbers into min and max.
Review URL: https://chromiumcodereview.appspot.com//10690086

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9564 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-11 19:00:40 +00:00
floitsch@google.com affb3cdf0f capital case OK in status file.
Review URL: https://chromiumcodereview.appspot.com//10693121

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9462 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-09 09:20:32 +00:00
floitsch@google.com 608cf10ba8 Update status file.
Review URL: https://chromiumcodereview.appspot.com//10689127

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9460 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-09 08:15:58 +00:00
floitsch@google.com 4a4532d205 Fix int.compareTo.
In particular we want:
 0.compareTo(-0.0) => 1

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9459 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-09 07:57:29 +00:00
sra@google.com 8d52ae8d46 Update corelib.statis: list_sort_test and sort_test magically started working on IE.
Review URL: https://chromiumcodereview.appspot.com//10696106

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9382 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-04 00:14:34 +00:00
antonm@google.com 5d3e6fd7d3 Print even less.
That helped for Linux and Mac.  Let's see if it'll help on Windows.

R=ricow@google.com
BUG=3834

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9335 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-03 09:45:39 +00:00
ricow@google.com d112a4a5cc Mark corelib/list_sort_test as flaky on dartium. Reoppening dartbug.com/3834
This test has been flaky on dartium-win-inc, e.g., 
http://build.chromium.org/p/client.dart/builders/dartium-win-inc/builds/2345/steps/annotated_steps/logs/stdio
Review URL: https://chromiumcodereview.appspot.com//10689085

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9329 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-03 07:09:42 +00:00
antonm@google.com 90c58141ad Suppress printing while testing.
I suspect that's the reason why test sometimes times out under DRT.

R=podivilov@chromium.org
BUG=2667,3834

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9245 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-29 12:01:21 +00:00
floitsch@google.com a51dc25968 Make isUtc a getter, change some method names in Date. Weekday is now 1 based.
isUtc is now a getter.
Date.hours -> Date.hour
Date.minutes -> Date.minute
Date.seconds -> Date.second
Date.milliseconds -> Date.millisecond
Date.fromEpoch -> Date.fromMillisecondsSinceEpoch
Date.value -> Date.millisecondsSinceEpoch
Date.MON == 1 (up to Date.SUN == 7).

Fixes issue 3444, 1985.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8899 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-20 11:43:46 +00:00
kasperl@google.com feb05c33c3 Stop mapping indexOf/lastIndexOf directly to the JavaScript native on indexable primitives.
Fixes http://dartbug.com/3689.

R=ahe@google.com
BUG=
TEST=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8790 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-18 13:17:17 +00:00
floitsch@google.com dd61a23829 Reapply "Refactor Date implementation in VM."
This reapplies fixed versions of commit 7542 and commit 8544.
Original review URLs:
https://chromiumcodereview.appspot.com//10533068
https://chromiumcodereview.appspot.com//10544109

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8655 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-14 13:05:22 +00:00
rnystrom@google.com 4d0a44ad2c Update Future tests to match new "stackTrace" property.
Review URL: https://chromiumcodereview.appspot.com//10546131

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8571 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-12 20:15:13 +00:00
rnystrom@google.com 491a5b6263 Allow optional callStack argument to Future.completeException().
A corresponding getter returns the value provided. transform() and chain()
are both updated to provide this when an exception is thrown from
their callbacks.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8569 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-12 19:44:56 +00:00
floitsch@google.com eb92af4080 Revert "Refactor Date implementation in VM."
Also revert "Round days-computation to get rid of daylight-savings differences."

This reverts commit 7542 and commit 8544.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8547 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-12 13:44:45 +00:00
floitsch@google.com 17de58fbaf Reapply "Refactor Date implementation in VM."
This reapplies a fixed version of commit 8533.
https://chromiumcodereview.appspot.com//10533068

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8542 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-12 12:04:36 +00:00
floitsch@google.com 02f39238ae Revert "Refactor Date implementation in VM."
This reverts commit 8533.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8535 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-12 10:33:36 +00:00
floitsch@google.com 0e297362a2 Refactor Date implementation in VM.
Less (and simpler) native functions. More precise semantics (for both the
native functions as well as for the Date class itself).

Fixes issue 3201.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8533 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-12 10:24:58 +00:00
kasperl@google.com 9df12e2a76 Add experimental expando support.
R=iposva@google.com
BUG=
TEST=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8522 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-12 05:22:16 +00:00
sigmund@google.com 2bb9af7322 Revert changes to Future.chain() and Future.transform() from http://codereview.chromium.org/10517006
Since onComplete swallows exceptions, the new implementation doesn't propagate exceptions thrown by the transforming function, where there's a then() handler but no handleException() handler.

The right fix is to invoke handlers (including the default 'throw the exception' error handler) on the event loop rather than synchronously, but there's no API for that in corelib yet.

BUG=3489

Review URL: https://chromiumcodereview.appspot.com//10537096
Patch from Sam McCall <sammccall@google.com>.

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8501 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-11 16:07:27 +00:00
kasperl@google.com b21cfb024e Unskip the last tests covered by http://dartbug/3304.
TBR'ed.

R=ngeoffray@google.com
BUG=
TEST=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8484 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-11 08:49:10 +00:00
floitsch@google.com cde1a8e09a new Date.now() should be in local timezone.
This error probably slipped in during the refactoring.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8483 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-11 08:35:31 +00:00
kasperl@google.com 2f7b4b9185 Stop skipping for Safari and Firefox and allow even more stuff pass on IE.
TBR'ed.

R=ngeoffray@google.com
BUG=
TEST=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8481 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-11 08:24:51 +00:00
sigmund@google.com c51d81231b More tests and doc for futures (followup to http://codereview.chromium.org/10517006/)
Review URL: https://chromiumcodereview.appspot.com//10544063

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8448 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-08 16:57:12 +00:00
kasperl@google.com 20d1b84d15 Mark another test as failing on IE.
R=ngeoffray@google.com
BUG=
TEST=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8419 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-08 07:08:28 +00:00
kasperl@google.com 0a2dab9423 Mark test as failing on Safari.
R=ngeoffray@google.com
BUG=
TEST=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8418 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-08 05:42:39 +00:00
jmesserly@google.com 3f81d4f899 Adds a callback to Future that is invoked upon completion, whether success or failure.
I'm not totally happy with the method name (in an ideal world, I'd like to call this
method then(), and have onSuccess and onFailure). But this should be backwards-compatible.

Review URL: https://chromiumcodereview.appspot.com//10517006
Patch from Sam McCall <sam.mccall@gmail.com>.

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8303 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-05 18:41:13 +00:00
hausner@google.com f6c776dcbe Eliminate unary plus with hex literals
The spec says unary + is only allowed with integer and floating point literals, not with hex literals. Somebody noticed that the VM accepted
+0x10 as well.

Consequently, the Math.parseInt(str) library function should fail with
a BadNumberFormatException if it is called with a hex number that is preceded by a +.

Fixes issue 1540.

This change exposed that the dart2js core library implementation is
falsely accepting +0xNNN hex numbers. I filed issue 3333.
Review URL: https://chromiumcodereview.appspot.com//10456060

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8177 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-31 22:35:29 +00:00
ngeoffray@google.com 78f19042ff Do not wrap the exception if we could not translate it to one of our internal exceptions.
Review URL: https://chromiumcodereview.appspot.com//10444086

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8099 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-30 11:46:50 +00:00
ngeoffray@google.com 80194ed0e1 Fix check in exception unwrapping and update status files.
Review URL: https://chromiumcodereview.appspot.com//10448074

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8097 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-30 11:38:12 +00:00
kasperl@google.com d9d1eb2a75 Update status files to make IE build bots green.
R=ngeoffray@google.com
BUG=
TEST=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8086 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-30 07:30:26 +00:00
ngeoffray@google.com e2c7c6eaee Update status files for dart2js/mac/safari.
Review URL: https://chromiumcodereview.appspot.com//10442081

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8085 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-30 07:26:01 +00:00
kasperl@google.com 5d23a99d71 Skip tests that time out on IE.
R=ngeoffray@google.com
BUG=http://dartbug.com/3304
TEST=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8084 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-30 05:59:16 +00:00
ngeoffray@google.com 2cb4416340 Use the typedef arity to know how to invoke a closure given by the dom.
Review URL: https://chromiumcodereview.appspot.com//10441071

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8067 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-29 15:53:54 +00:00
ngeoffray@google.com 5ca4106a51 Skip dart2js/firefox until we fix issue 2615.
Review URL: https://chromiumcodereview.appspot.com//10449049

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8045 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-29 09:41:29 +00:00
floitsch@google.com a88e304d29 Deprecate use of timezones.
Review URL: https://chromiumcodereview.appspot.com//10411057

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7911 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-23 16:07:35 +00:00