ajohnsen@google.com
5b563a82dd
Revert 'Port the remaining of dart:core to the unified corelib.'
...
BUG=
Review URL: https://chromiumcodereview.appspot.com//10831125
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10159 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-02 11:07:49 +00:00
ajohnsen@google.com
e029198035
Port the remaining of dart:core to the unified corelib.
...
This also adds support for injecting private fields and functions from
class patches.
BUG=
Review URL: https://chromiumcodereview.appspot.com//10830117
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10156 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-02 10:18:25 +00:00
ajohnsen@google.com
fe4570dcc5
Create 'unified' version of Date, with a dart2js implementation.
...
VM implementation is pending.
This also fixes dart2js, so it correctly handles getters and setters in
patches.
BUG=
Review URL: https://chromiumcodereview.appspot.com//10829102
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10116 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-01 13:35:28 +00:00
sethladd@google.com
72ada03ccb
deprecate the dart:core Math class
...
BUG=
TEST=
Review URL: https://chromiumcodereview.appspot.com//10823048
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10000 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-27 23:33:29 +00:00
johnniwinther@google.com
c6d70857e4
Several new features and improvements for dartdoc.
...
* Dartdoc now works on multiple libraries and entrypoints.
* A dartdoc/dartdoc.bat script is generated into dart-sdk/bin
* The API libraries recognized by dart2js using the 'dart:' prefix
have been updated to use the 'dart:*' name in their library tags.
This makes the libraries show up with the correct prefix in the API docs.
* The processed libraries can be selected or limited, API
libraries are not processed by default, and links to api.dartlang.org
can be generated for API libraries.
Because of the changed library tags on API libraries, the generated
links don't current match the addresses on api.dartlang.org.
For instance, the docs for Object is currently located in
api.dartlang.org/core/Object.html, but with the new library
tag 'dart:core', the address will be api.dartlang.org/dart_core/Object.html.
The links will thus not work until api.dartlang.org have been updated with
this patch.
* Code and pre blocks use overflow-x:auto to support wide lines.
BUG=2656,2686,3533,4029,4145,3555
Review URL: https://chromiumcodereview.appspot.com//10809035
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9843 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-24 09:16:33 +00:00
cshapiro@google.com
9c0c15ea7c
Improve the error messages for IndexOutOfRangeException.
...
Review URL: https://chromiumcodereview.appspot.com//10786045
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9729 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-18 00:33:23 +00:00
floitsch@google.com
bc391f223b
Fix typo in date description.
...
Review URL: https://chromiumcodereview.appspot.com//10792034
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9704 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-17 15:04:58 +00:00
lrn@google.com
2d58755073
Revert "Allow patch files to add top-level declarations to the patched library."
...
This reverts r9629.
TBR: floitsch
Review URL: https://chromiumcodereview.appspot.com//10702204
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9630 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-13 13:59:54 +00:00
lrn@google.com
7621533549
Allow patch files to add top-level declarations to the patched library.
...
The patch library is loaded normally, and then non-patch methods and classes
are cloned and added to the patched library. To support methods from other
compilation units, all elements now has a scriptOverride field that lets
them report a different script than the one of their enclosing element.
(For top-level elements that's already possible, as that's what #source does,
but for fields inside a class, we can't easily wrap a compilation unit element
around them.)
TBR: floitsch
(to get in before vacation, with reversion rights).
Review URL: https://chromiumcodereview.appspot.com//10703188
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9629 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-13 13:46:21 +00:00
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