floitsch@google.com
4ea98500ac
Fix typo.
...
Review URL: https://chromiumcodereview.appspot.com//10696175
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9565 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-11 19:14:12 +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
lrn@google.com
42f353fad1
Patch methods in classes.
...
Add math library in corelib/unified. Location subject to change.
Made _Random's implementation external and patched it to use JS random.
Made "external" marking acually work.
Review URL: https://chromiumcodereview.appspot.com//10696147
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9544 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-11 08:47:24 +00:00
nweiz@google.com
449fe6ba53
Pipe the stack traces of errors through Future operations.
...
This is similar to r9378, but omits the (broken) changes to catch statements and
adds some additional piping.
Review URL: https://chromiumcodereview.appspot.com//10704090
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9381 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-04 00:07:38 +00:00
nweiz@google.com
17bafa08ab
Reverting 9378
...
Review URL: https://chromiumcodereview.appspot.com//10699080
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9379 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-03 21:52:20 +00:00
nweiz@google.com
448fc589b2
Properly capture and pass the stack trace in Future exceptions.
...
Review URL: https://chromiumcodereview.appspot.com//10701084
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9378 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-03 21:39:38 +00:00
lrn@google.com
cadba87302
Implement 'as' operator.
...
This is a quick implementation with room for improvement.
It might work.
Review URL: https://chromiumcodereview.appspot.com//10540048
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9109 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-26 14:23:50 +00:00
cshapiro@google.com
00b6963338
Fix some warnings in the core library identified by the static analyzer.
...
This foray uncovered a latent bug in the byte array view constructor and
its use of default arguments. That bug has been corrected and new tests
have been added to the test suite.
BUG=2136
Review URL: https://chromiumcodereview.appspot.com//10653002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9013 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-22 04:27:57 +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
hausner@google.com
a7f542becb
Remove obsolete String + code
...
Review URL: https://chromiumcodereview.appspot.com//10562038
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8810 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-18 18:00:25 +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
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
zundel@google.com
491b05eb54
Removes constructor initializer in named parameter of private member
...
See spec section 6.2.2, this is a compile time error.
Review URL: https://chromiumcodereview.appspot.com//10545114
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8536 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-12 10:47:29 +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
floitsch@google.com
a1e41b060b
Reapply "Remove deprecated classes and functions in Date."
...
This reapplies a fixed version of commit 8445.
Original CL: https://chromiumcodereview.appspot.com//10541050
Review URL: https://chromiumcodereview.appspot.com//10538061
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8455 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-08 17:32:18 +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
floitsch@google.com
c046c899a0
Revert "Remove deprecated classes and functions in Date."
...
This reverts commit 8445.
Review URL: https://chromiumcodereview.appspot.com//10532068
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8446 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-08 16:31:55 +00:00
floitsch@google.com
2c2ee2000f
Remove deprecated classes and functions in Date.
...
Review URL: https://chromiumcodereview.appspot.com//10541050
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8445 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-08 16:01:00 +00:00
sethladd@google.com
067210a361
add a note about completer to future
...
BUG=
TEST=
Review URL: https://chromiumcodereview.appspot.com//10540036
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8366 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-06 22:41:24 +00:00
gram@google.com
33ceaa3772
Mark Expect as deprecated.
...
Review URL: https://chromiumcodereview.appspot.com//10543035
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8365 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-06 22:14:21 +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
turnidge@google.com
ec36e02c28
Remove the partially completed code for remote IsolateMirrors and
...
replace it with the beginnings of a local (same isolate) IsolateMirror
implementation.
Removed old mirror tests and added two new mirror tests.
Even though mirrors.cc is part of the vm, I chose to implement most of
it using the dart embedding interface instead of our internal
interfaces because the embedding interface was more convenient.
mirrors.cc is basically all new in this CL -- don't pay any attention
to diffs for that file.
Added dart embedding functions required for the functionality in this
CL: Dart_DebugName, Dart_GetNativeInstanceFieldCount,
Dart_RootLibrary, Dart_RegisteredLibraryUrls, and Dart_LibraryName.
Extended or modified some existing dart api functions, primarily to
make them propagate error handles properly.
Added tests for new dart embedding api functionality.
Added the ability to determine if a port is local to the current isolate.
Extended NotImplementedException to accept an optional string
argument. I wanted to give more descriptive error messages.
Review URL: https://chromiumcodereview.appspot.com//10416050
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8117 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-30 17:07:19 +00:00
kasperl@google.com
d1b41b5949
Update unwrapException to give better exceptions on Firefox.
...
R=ngeoffray@google.com
BUG=
TEST=
Review URL: https://chromiumcodereview.appspot.com//10443081
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8096 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-30 11:14:31 +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
floitsch@google.com
cc15d26cf7
Reapply "Add support for timezone offset and timezone name."
...
This reapplies commit 7800.
Review URL: https://chromiumcodereview.appspot.com//10417009
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7805 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-21 16:11:20 +00:00
floitsch@google.com
77ade89e4a
Revert "Add support for timezone offset and timezone name."
...
This reverts commit 7803.
Review URL: https://chromiumcodereview.appspot.com//10416008
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7804 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-21 15:13:46 +00:00
floitsch@google.com
618c649c33
Reapply "Add support for timezone offset and timezone name."
...
This reapplies commit 7800.
Original CL: https://chromiumcodereview.appspot.com/10383218/
Don't write *foo += x.
Review URL: https://chromiumcodereview.appspot.com//10413031
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7803 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-21 15:07:11 +00:00
floitsch@google.com
5b99866ecd
Revert "Add support for timezone offset and timezone name."
...
This reverts commit 7801..
Review URL: https://chromiumcodereview.appspot.com//10399106
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7802 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-21 14:40:27 +00:00
floitsch@google.com
36d9c69461
Add support for timezone offset and timezone name.
...
Review URL: https://chromiumcodereview.appspot.com//10383218
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7801 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-21 14:36:43 +00:00
whesse@google.com
1656086ecd
Fix incorrect range check comments in List.*Range methods' documentation.
...
BUG=
TEST=
Review URL: https://chromiumcodereview.appspot.com//10398052
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7784 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-21 08:25:41 +00:00
floitsch@google.com
7f06db21d2
Add comparison operators to Date class.
...
Review URL: https://chromiumcodereview.appspot.com//10399027
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7653 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-15 13:15:03 +00:00
floitsch@google.com
d89f228708
Make most arguments to Date constructor optional.
...
Fixes issue 2582.
Review URL: https://chromiumcodereview.appspot.com//10382171
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7652 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-15 12:50:15 +00:00
floitsch@google.com
3ccf471f94
Add Hashable to Date interface.
...
Fixes issue 2400
Review URL: https://chromiumcodereview.appspot.com//10391109
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7646 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-15 10:52:51 +00:00
ager@google.com
8a677917d5
Address review comments on Options.executable change.
...
R=iposva@google.com
BUG=
TEST=
Review URL: https://chromiumcodereview.appspot.com//10388024
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7401 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-08 06:41:00 +00:00
ager@google.com
16ee3e9bb3
Add executable to Options interface to get the name of the executable used to execute the script.
...
This is useful when you want to spawn separate dart processes. We do this from tests and we keep getting bitten by a broken search for the executable. Let's make it available instead.
R=sgjesse@google.com ,iposva@google.com
BUG=
TEST=
Review URL: https://chromiumcodereview.appspot.com//10380026
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7382 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-07 14:27:05 +00:00
rnystrom@google.com
15bee22d0e
Handle an exception handler returning null more gracefully.
...
Review URL: https://chromiumcodereview.appspot.com//10255015
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7109 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-27 22:53:50 +00:00
kasperl@google.com
015a97003b
Add addCharCode to StringBuffer interface. Already implemented by all implementations.
...
R=floitsch@google.com
BUG=
TEST=
Review URL: https://chromiumcodereview.appspot.com//10092009
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6577 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-16 14:05:42 +00:00
sra@google.com
52bba57c6d
Pass optional arguments to NullPointerException constructor.
...
Review URL: https://chromiumcodereview.appspot.com//10054031
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6468 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-12 18:24:20 +00:00
srdjan@google.com
1079e355ab
Frog has hardwired access to NullPointerException: default argument can only be null.
...
Review URL: https://chromiumcodereview.appspot.com//10053022
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6437 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-11 20:54:30 +00:00
srdjan@google.com
037cfcf849
Add optional arguments to NullPointerException so that it can report more information (make it similar to what is reported by NoSuchMethodException):
...
NullPointerException : method: 'foo'
Receiver: null
Arguments: [1, 2]
Review URL: https://chromiumcodereview.appspot.com//10034026
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6429 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-11 19:58:45 +00:00
kasperl@google.com
32f32aa45a
If any of the futures passed to Futures.wait leads to
...
an exception, we complete the resulting future with an
exception too.
Review URL: https://chromiumcodereview.appspot.com//9860010
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@5861 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-27 03:40:35 +00:00
iposva@google.com
edd59475c3
- Fix use of String operator + in core libraries.
...
Previously reviewed as part of https://chromiumcodereview.appspot.com/9690003
Review URL: https://chromiumcodereview.appspot.com//9728008
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@5786 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-23 17:33:14 +00:00
iposva@google.com
19d89ad1a7
- Fix use of String operator + in core libraries.
...
Previously reviewed as part of https://chromiumcodereview.appspot.com/9690003
Review URL: https://chromiumcodereview.appspot.com//9726008
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@5785 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-23 17:28:59 +00:00
iposva@google.com
d402068134
- Fix use of String operator + in core libraries.
...
Previously reviewed as part of https://chromiumcodereview.appspot.com/9690003
Review URL: https://chromiumcodereview.appspot.com//9730009
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@5656 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-19 19:42:29 +00:00
srdjan@google.com
920257b909
Add isOdd/isEven to "int" interface.
...
- Srdjan
Review URL: https://chromiumcodereview.appspot.com//9727001
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@5650 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-19 17:22:16 +00:00