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
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
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
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
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
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
sigmund@google.com
29aea3fb64
future: fix future.immediate allocator
...
BUG=http://dartbug.com/2029
Review URL: https://chromiumcodereview.appspot.com//9627002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@5117 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-07 20:33:09 +00:00
ajohnsen@google.com
2eda7f90ee
Update SplayTreeMap with a work-around for frog.
...
Review URL: https://chromiumcodereview.appspot.com//9616012
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@5026 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-06 14:06:12 +00:00
sigmund@google.com
6b4bd7ac4f
futures: handle exceptions immediately if the future already completed.
...
Review URL: https://chromiumcodereview.appspot.com//9533014
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4762 260f80e4-7a28-3924-810f-c04153c831b5
2012-02-29 20:34:03 +00:00
sigmund@google.com
3285544810
futures: add more types to chain/transform, some additional cleanup.
...
Review URL: https://chromiumcodereview.appspot.com//9359050
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4761 260f80e4-7a28-3924-810f-c04153c831b5
2012-02-29 20:30:59 +00:00
ajohnsen@google.com
f598bbf103
Add getMinimum, getMaximum, getPreceding and getSucceeding to SplayTree.
...
Review URL: https://chromiumcodereview.appspot.com//9455051
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4689 260f80e4-7a28-3924-810f-c04153c831b5
2012-02-28 14:29:15 +00:00
ahe@google.com
3fbed82d9d
Stopwatch.elapsed must always increase after start has been called.
...
Review URL: https://chromiumcodereview.appspot.com//9416065
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4479 260f80e4-7a28-3924-810f-c04153c831b5
2012-02-22 18:03:52 +00:00
cshapiro@google.com
e0c764f91c
Added special case code for translating null element to work around a frog bug.
...
Review URL: https://chromiumcodereview.appspot.com//9372094
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4424 260f80e4-7a28-3924-810f-c04153c831b5
2012-02-22 06:07:39 +00:00
jjb@google.com
a2f2769ec3
Wrote functions to convert collections and maps to strings and invoked
...
these functions from the toString methods of all built-in Collection
and Map implementations. Wrote smoke tests and basher tests.
Review URL: https://chromiumcodereview.appspot.com//9431015
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4421 260f80e4-7a28-3924-810f-c04153c831b5
2012-02-22 02:28:01 +00:00
kasperl@google.com
c34ec0121c
Revert "Wrote functions to convert collections and maps to strings and invoked"
...
This reverts r4345.
R=jjb@google.com
BUG=
TEST=
Review URL: https://chromiumcodereview.appspot.com//9416053
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4347 260f80e4-7a28-3924-810f-c04153c831b5
2012-02-17 06:36:06 +00:00
jjb@google.com
b4db1d6cc0
Wrote functions to convert collections and maps to strings and invoked
...
these functions from the toString methods of all built-in Collection
and Map implementations. Wrote smoke tests and basher tests.
BUG=4466785
Review URL: https://chromiumcodereview.appspot.com//9320028
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4345 260f80e4-7a28-3924-810f-c04153c831b5
2012-02-17 01:34:00 +00:00
sigmund@google.com
427d5e5ead
remove promise:
...
- removes promise from corelib (use future instead)
- move tests that depend on promises and proxies into samples/proxy/
- remove dependence on promise from the rest of the system and tests
Review URL: https://chromiumcodereview.appspot.com//9401030
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4328 260f80e4-7a28-3924-810f-c04153c831b5
2012-02-16 18:20:41 +00:00
sigmund@google.com
40fcc40fd3
isolate lib: small refactor to distinguish protocols at the port level
...
Review URL: https://chromiumcodereview.appspot.com//9317068
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4148 260f80e4-7a28-3924-810f-c04153c831b5
2012-02-10 22:09:48 +00:00
sigmund@google.com
b66a9d9360
patch from issue 9360020
...
Adds three methods to Future to codify common patterns:
new Future<T>.immediate(T): a Future is desired, but the object is already
available
Future Future<T>.transform(Function): perform a sync computation once an async
computation is complete
Future Future<T>.chain(Function): perform an async computation once an async
computation is complete
Contributed by sammccall@google.com
BUG=dart:1516
Review URL: https://chromiumcodereview.appspot.com//9372008
Patch from Sam McCall <sammccall@google.com >.
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4056 260f80e4-7a28-3924-810f-c04153c831b5
2012-02-09 01:09:06 +00:00
whesse@google.com
b02ed08af1
Add script attribute to Options class, providing the name of the running script.
...
BUG=dart:409
TEST=standalone/OptionsTest
Review URL: https://chromiumcodereview.appspot.com//9159013
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3485 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-23 12:15:26 +00:00
vsm@google.com
5a2b88e6dc
Revert "Handle defered handling of exceptions (where the exception is thrown before the"
...
This reverts commit 3477 to fix the build.
TBR=dcarlson
Review URL: https://chromiumcodereview.appspot.com//9272005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3479 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-22 05:00:40 +00:00
dcarlson@google.com
35e119bb8e
Handle defered handling of exceptions (where the exception is thrown before the
...
handler is registered). Also, don't throw the exception on calls to then(),
to avoid enforcing an ordering to the then() and handleException() calls.
BUG=1115
TEST=
Review URL: https://chromiumcodereview.appspot.com//9155017
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3477 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-21 18:39:37 +00:00
kasperl@google.com
9df7986723
The deleted sentinel isn't of type K.
...
R=floitsch@google.com
BUG=
TEST=
Review URL: https://chromiumcodereview.appspot.com//9250006
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3391 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-18 12:50:52 +00:00
kasperl@google.com
ac0e22f2bc
Fix dartc in optimized mode (broken in r3358).
...
Add checks that ensure that keys used for array access are integers.
Fix bug in the optimization strategy that ended up generating the wrong
code for "native" classes.
R=floitsch@google.com ,mmendez@google.com
BUG=
TEST=
Review URL: https://chromiumcodereview.appspot.com//9250005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3390 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-18 12:44:47 +00:00
gbracha@google.com
d3bcc88674
Added method map to Collection interface and all its implementations (except classes generated from IDL for the DOM).
...
Review URL: http://codereview.chromium.org//9114021
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3223 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-12 01:25:01 +00:00
sigmund@google.com
d0171bde41
frog await: allow errors after the await within try-catch blocks.
...
Review URL: http://codereview.chromium.org//9006053
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2859 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-28 20:55:09 +00:00
sigmund@google.com
30157e4866
await in frog: partial support for try-catch blocks
...
Review URL: http://codereview.chromium.org//9007053
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2840 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-28 00:22:25 +00:00
scheglov@google.com
63a96477cd
Report errors and warnings for hiding elements, issue 572.
...
http://code.google.com/p/dart/issues/detail?id=572
R=zundel@google.com
BUG=
TEST=
Review URL: http://codereview.chromium.org//8966029
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2636 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-20 14:35:40 +00:00
zundel@google.com
3440d8ffbb
Updates the corelib to the new default specification for interfaces and new factory syntax
...
Patch by: regis
Review by: jmesserly,zundel,srdjan
See original review at: http://codereview.chromium.org/8931011/
BUG=
TEST=
Review URL: http://codereview.chromium.org//8989015
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2629 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-20 12:49:40 +00:00
regis@google.com
5db4de9756
Implement revised factories in the VM.
...
Emit warnings when obsolete syntax is used.
Review URL: http://codereview.chromium.org//8921033
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2394 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-13 19:35:07 +00:00
scheglov@google.com
54c5f79d42
Check that interface constructors and default class constructors are compatible.
...
1. Number of required parameters.
2. Names and order of named parameters.
3. [disabled] type warning for non-identical types.
4. [wait for Eric, not implemented] type parameters check.
R=zundel@google.com
BUG=
TEST=
Review URL: http://codereview.chromium.org//8786002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2124 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-06 14:58:16 +00:00
hausner@google.com
b9cf297c15
Initializing formals can't be optional parameters
...
Add new error message to VM compiler.
Remove all optional initializing formals from library
and tests.
Review URL: http://codereview.chromium.org//8619008
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1755 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-22 19:09:54 +00:00
regis@google.com
314a89e16c
Update comments in core lib showing proper factory syntax.
...
Improve error messages reported from class finalizer.
Fix parser error reporting to be thread safe.
Reformat type error and failed assertion messages to be consistent.
Add one more new factory syntax test.
Review URL: http://codereview.chromium.org//8549033
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1708 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-21 17:06:52 +00:00
sigmund@google.com
bba5ed03e1
Make HashMap's delete key a const expression.
...
Review URL: http://codereview.chromium.org//8591022
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1661 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-18 17:24:01 +00:00
srdjan@google.com
22ea3cf225
Fix String.trim implementation (follow spec).
...
Fix Queue.every, Queue.some, Queue.filter, ..
Adapt co19 status files.
Review URL: http://codereview.chromium.org//8510066
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1521 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-14 22:23:41 +00:00
floitsch@google.com
1bf944156e
Fix dual-pivot sort.
...
BUG=dart:432
TEST=
Review URL: http://codereview.chromium.org//8510047
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1506 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-14 13:57:59 +00:00
floitsch@google.com
e24dec2169
Rename StopWatch to Stopwatch. Add new Stopwatch.start() and Stopwatch.reset().
...
BUG=dart:418
TEST=
Review URL: http://codereview.chromium.org//8537011
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1505 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-14 13:56:18 +00:00
iposva@google.com
1e203b2dc9
- Move the RuntimeOptions implementation into the shared library
...
code. It has no dependency on the VM.
Review URL: http://codereview.chromium.org//8505043
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1381 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-10 01:28:51 +00:00
benl@google.com
57a533314e
Review URL: http://codereview.chromium.org//8403040
...
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1139 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-03 10:14:19 +00:00
floitsch@google.com
161ae6b076
Fix DurationImplementation == operator.
...
BUG=198
Review URL: http://codereview.chromium.org//8429019
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@992 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-01 09:11:35 +00:00
srdjan@google.com
8d69118676
More strict non-equal cleanups in library code
...
Review URL: http://codereview.chromium.org//8413018
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@892 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-28 15:21:42 +00:00
srdjan@google.com
959f4b519d
Use strict equality when comparing with null, especially when null is a default value.
...
Review URL: http://codereview.chromium.org//8400038
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@859 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-27 22:11:16 +00:00
benl@google.com
a64fbe01a8
Rename various Proxy classes. Provide a Proxy interface.
...
Review URL: http://codereview.chromium.org//8383034
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@684 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-25 11:09:54 +00:00
mattsh@google.com
a6150b1048
initial exceptionHandled in FutureImplementation.dart
...
BUG=
TEST=
Review URL: http://codereview.chromium.org//8387015
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@673 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-25 01:13:20 +00:00
ngeoffray@google.com
70c01beb9b
Clean up (most) uses of Array. Still more to come in the VM corelib code base.
...
Review URL: http://codereview.chromium.org//8321024
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@507 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-18 10:02:59 +00:00
mattsh@google.com
adf76c310c
future and completer
...
BUG=
TEST=
Review URL: http://codereview.chromium.org//8271014
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@459 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-14 22:00:13 +00:00