Commit graph

105 commits

Author SHA1 Message Date
Lasse R.H. Nielsen cdc520f459 Mark MirrorsUsed as deprecated.
Change-Id: I8e28f80581fdb22de5fd63d9a604252c95df14ee
Reviewed-on: https://dart-review.googlesource.com/55360
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Anders Sandholm <sandholm@google.com>
2018-05-16 09:51:18 +00:00
Janice Collins f386b367a5 Update dartdoc to v0.18.0 and tag library categories.
Bug: https://github.com/dart-lang/sdk/issues/32297
Change-Id: Id99c98c1b908c5a4b42594cd7e73cd92e089bbca
Reviewed-on: https://dart-review.googlesource.com/48450
Commit-Queue: Janice Collins <jcollins@google.com>
Reviewed-by: Devon Carew <devoncarew@google.com>
Reviewed-by: William Hesse <whesse@google.com>
2018-03-27 16:19:34 +00:00
Maksim Ryzhikov a218445ead Fix Doc typo in the example
Closes #32287
https://github.com/dart-lang/sdk/pull/32287

GitOrigin-RevId: 6ea54882bd45566454ab44adbfa96ca11aa4ec3d
Change-Id: Ieba69f244e5ddef77e2074f666bec04825e47bc5
Reviewed-on: https://dart-review.googlesource.com/43360
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2018-02-23 10:20:50 +00:00
Kevin Moore 922c0b5664 Fix Doc comment issues with Map and mirrors
Change-Id: I86c8d849c8137854b3a2dfa966cf86c9475f9f72
Reviewed-on: https://dart-review.googlesource.com/43201
Commit-Queue: Kevin Moore <kevmoo@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2018-02-23 01:59:44 +00:00
Kevin Moore 0d785569d1 Fix library dartdoc references
Change-Id: Idf83e7f5dfb95e0097fa73fa0a0ecd68c76d2ac9
Reviewed-on: https://dart-review.googlesource.com/35381
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Kevin Moore <kevmoo@google.com>
2018-01-17 20:01:18 +00:00
Zachary Anderson 734beef062 [infra] Translate _sources.gypi files to _sources.gni files
Also deletes code that becomes dead as a result.

R=rmacnak@google.com

Review-Url: https://codereview.chromium.org/2996903002 .
2017-08-14 21:54:36 -07:00
Jacob Richman ea6991a245 Format all dart: library files
BUG=
R=floitsch@google.com, sra@google.com

Review-Url: https://codereview.chromium.org/2754013002 .
2017-03-16 10:22:19 -07:00
Florian Loitsch 2547caab25 Reapply "reflectType() dynamic type arguments support (#26012)"
This was a pull request: 8a8033a417

MirrorsUsed doesn't transitively include reflective information. However, it must still be able to create TypeMirrors for types that are used as return- or parameter types.

Initially, the patch checked that TypeMirrors had the correct number of arguments for generic types. This is now disabled.

A better approach would be to know if a class has full reflective information, or not. But this would require much bigger changes to the system.

R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2615943004 .
2017-01-10 15:53:21 +01:00
Asger Feldthaus 6bae3151e2 Revert "reflectType() dynamic type arguments support (#26012)"
This reverts commit 8a8033a417.

There are a bunch of dart2js mirror tests that fail.

Issue https://github.com/dart-lang/sdk/pull/26012

BUG=

Review-Url: https://codereview.chromium.org/2617163002 .
2017-01-06 19:12:27 +01:00
Anatoly Pulyaevskiy 8a8033a417 reflectType() dynamic type arguments support (#26012)
* Basic implementation of reflecting generic types using dynamic list of type arguments

* Removed redundant expectation in test

* Added basic support for dynamic type arguments in reflectType of js_mirrors

* Fixes according to code review comments: major cleanup, added more test cases and updated docs

* Updated JS mirrors reflectType() to match behavior of VM implementation

* Terminate exception messages with a dot; Improved error handling for empty argument list and type checks;

* Use NumTypeParameters when checking provided argument list size

* Check if type arguments are malbounded; added test cases for typedefs and mixins

* Uncommented a test case

* Updated lib.status to mark some tests as failing in dart2js due to limitations in JS mirrors

* Fixed mixin test mock definition; updated configuration for tests requiring checked mode

* Handle nested generic types in type argument parsing (JS)
2017-01-06 06:05:14 -08:00
Kevin Millikin 9ab1f22b41 Make some VM libraries patch cleanly using the analyzer.
Modify the following VM dart: library patches: collection, convert,
developer, _internal, isolate, math, mirrors, profiler, vmservice_io,
_vmservice, _builtin, nativewrappers, and io.

The modifications are mostly because:

    - Patches should not be able to introduce new public members to a
      library's API.  In cases where the VM's patches introduce public
      members, the patches are rewritten to introduce private members
      instead.

    - Patches should not be able to replace arbitrary members, only
      ones declared external.  In cases where the VM's patches replace
      arbitrary members, those members are declared external in the
      SDK sources and dart2js's patch files are rewritten to use the
      original SDK implementation.

BUG=
R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2564383002 .
2016-12-15 11:30:20 +01:00
Jan-Hendrik Dolling 89560c68a0 change "the the" to the 2016-10-28 21:47:50 +02:00
Harry Terkelsen 1745ba77f5 fix all instances of "the the"
BUG=
R=sigmund@google.com

Review URL: https://codereview.chromium.org/1980573003 .
2016-05-13 12:38:25 -07:00
Sam Rawlins fb7d871428 Formatting comments for mirrors (MirrorSystem, IsolateMirror, DeclarationMirror, and ObjectMirror)
BUG=https://github.com/dart-lang/sdk/issues/24505
R=lrn@google.com

Review URL: https://codereview.chromium.org/1383403002 .
2015-10-07 16:48:48 -07:00
Sam Rawlins e928812e27 Format doc comments in mirrors, lines 480 through 1160
BUG=https://github.com/dart-lang/sdk/issues/24505

Review URL: https://codereview.chromium.org/1390813002 .
2015-10-07 16:41:58 -07:00
Ryan Macnak b6c979f20b Hoist InstanceMirror.delegate to ObjectMirror.
BUG=http://dartbug.com/14827
R=gbracha@google.com

Review URL: https://codereview.chromium.org//1273983002 .
2015-08-05 17:09:59 -07:00
Ryan Macnak fd1531b4d8 Fix some markup in the mirrors docs.
BUG=http://dartbug.com/21714
R=gbracha@google.com

Review URL: https://codereview.chromium.org//1184623003.
2015-06-12 14:43:38 -07:00
Ryan Macnak cef08e5674 Fix dartdoc for InstanceMirror.delegate and ClosureMirror. Avoid misleading use of the term 'evaluation'.
BUG=http://dartbug.com/15889
BUG=http://dartbug.com/20139
BUG=http://dartbug.com/21992
R=gbracha@google.com

Review URL: https://codereview.chromium.org//1144923012.
2015-06-08 17:41:34 -07:00
herhut@google.com 38af8ac50a Improve documentation for MirrorsUsed.
BUG= http://dartbug.com/15656
R=floitsch@google.com, kathyw@google.com, lrn@google.com

Review URL: https://codereview.chromium.org//1122983002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45585 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-07 09:08:11 +00:00
rmacnak@google.com a6e42c48b5 Deal with deferred loading in the VM mirrors.
- Invalidate MirrorSystem.libraries when a load completes.
- Recheck if a deferred import's target has been loaded before failing.
- Allow loading libraries from a LibraryDepedencyMirror.
- Propogate compile-time error when attempting to reflect a deferred type.

BUG=http://dartbug.com/22592
R=asiva@google.com, gbracha@google.com

Review URL: https://codereview.chromium.org//1095903002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45444 260f80e4-7a28-3924-810f-c04153c831b5
2015-04-28 23:47:45 +00:00
rmacnak@google.com 8b6a6a1e4f Add ClassMirror.isEnum.
BUG=http://dartbug.com/21718
R=asiva@google.com, gbracha@google.com

Review URL: https://codereview.chromium.org//938513002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44035 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-26 01:13:50 +00:00
rmacnak@google.com 4abf50c04d Add LibraryDependencyMirror.isDeferred.
R=asiva@google.com, gbracha@google.com

Review URL: https://codereview.chromium.org//921163004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43829 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-17 23:49:40 +00:00
rmacnak@google.com 511c997316 Implement DeclarationMirror.location for all but ParameterMirrors.
- Mark NativeFieldWrapper classes as synthetic.
- Mark ClassID fields as synthetic.

BUG=http://dartbug.com/22378
R=gbracha@google.com, hausner@google.com

Review URL: https://codereview.chromium.org//922023002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43784 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-13 23:32:20 +00:00
rmacnak@google.com 3ed68e9409 Improve doc for ClosureMirror.function.
R=gbracha@google.com

Review URL: https://codereview.chromium.org//266923009

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40160 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-11 16:48:43 +00:00
rmacnak@google.com 7ff03558b2 Specifiy MethodMirror.isStatic is terms of whether 'this' is permitted.
BUG=http://dartbug.com/19059
R=gbracha@google.com

Review URL: https://codereview.chromium.org//392983006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38318 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-16 23:10:34 +00:00
rmacnak@google.com 3b5ff25469 Lay waste to ClosureMirror.findInContext.
BUG=http://dartbug.com/18741
R=gbracha@google.com, iposva@google.com

Review URL: https://codereview.chromium.org//276043003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@36704 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-27 19:35:58 +00:00
rmacnak@google.com d1402873c3 Revert "Improve error messages in MirrorSystem.findLibrary."
Review URL: https://codereview.chromium.org//283593002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@36056 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-12 19:41:11 +00:00
rmacnak@google.com 0c696f26ed Improve error messages in MirrorSystem.findLibrary.
BUG=http://dartbug.com/18532
R=gbracha@google.com

Review URL: https://codereview.chromium.org//278983004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@36048 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-12 17:52:31 +00:00
karlklose@google.com f9356c37a5 Remove warnings from dart2js test-suite.
BUG=
R=johnniwinther@google.com

Review URL: https://codereview.chromium.org//263103003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35738 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-05 11:47:25 +00:00
rmacnak@google.com 78ab60a0de Implement MethodMirror.location in the VM.
R=gbracha@google.com, hausner@google.com

Review URL: https://codereview.chromium.org//211243009

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34400 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-26 00:44:54 +00:00
rmacnak@google.com 10ecef7968 Remove ObjectMirror.[].
R=ahe@google.com, gbracha@google.com

Review URL: https://codereview.chromium.org//165773002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33543 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-11 18:21:13 +00:00
rmacnak@google.com 57dd1321d1 Reapply "Access to imports in the VM's runtime mirrors. Extend test coverage of the source mirrors."
Regenerate snapshot test due to change in the size of Namespace. Relate the types source mirror libraries dependencies to the runtime library dependencies.

BUG=http://dartbug.com/10360

Review URL: https://codereview.chromium.org//189843003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33441 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-07 19:00:20 +00:00
rmacnak@google.com 62ad4b82ce Revert "Access to imports in the VM's runtime mirrors. Extend test coverage of the source mirrors."
Review URL: https://codereview.chromium.org//189293002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33402 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-06 22:45:29 +00:00
rmacnak@google.com 2d0e54a94d Access to imports in the VM's runtime mirrors. Extend test coverage of the source mirrors.
BUG=http://dartbug.com/10360
R=gbracha@google.com, hausner@google.com

Review URL: https://codereview.chromium.org//154733003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33397 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-06 22:02:29 +00:00
rmacnak@google.com d3a92a0f3d Hoist hasReflectedType and reflectedType from ClassMirror to TypeMirror.
R=gbracha@google.com, regis@google.com

Review URL: https://codereview.chromium.org//183853022

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33291 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-04 19:01:26 +00:00
rmacnak@google.com c4f989c768 Add TypeVariableMirror.isStatic to the API.
BUG=http://dartbug.com/16819
R=gbracha@google.com, regis@google.com

Review URL: https://codereview.chromium.org//182603003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33283 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-04 18:13:22 +00:00
rmacnak@google.com 7c4a84d130 Remove LibraryMirror.topLevelMembers.
R=gbracha@google.com

Review URL: https://codereview.chromium.org//164823006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33256 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-04 01:35:07 +00:00
rmacnak@google.com 1c7fecac7e Add TypeMirror.isSubtypeOf, TypeMirror.isAssignableTo, ClassMirror.isSubclassOf to the API, the VM runtime mirrors and the source mirrors.
BUG=http://dartbug.com/12439
BUG=http://dartbug.com/13856
R=gbracha@google.com, johnniwinther@google.com, regis@google.com

Review URL: https://codereview.chromium.org//126823004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32577 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-11 20:41:32 +00:00
rmacnak@google.com 7dfcd0f4a1 Add ClassMirror.isAbstract to the API and VM implementation.
BUG=http://dartbug.com/12826
R=gbracha@google.com

Review URL: https://codereview.chromium.org//129883002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31643 260f80e4-7a28-3924-810f-c04153c831b5
2014-01-09 01:27:51 +00:00
rmacnak@google.com d8c4c637bf Revert "Add ClassMirror.isAbstract to the API and VM implementation."
BUG=

Review URL: https://codereview.chromium.org//128673003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31633 260f80e4-7a28-3924-810f-c04153c831b5
2014-01-08 22:51:45 +00:00
rmacnak@google.com a5e3c91936 Add ClassMirror.isAbstract to the API and VM implementation.
BUG=http://dartbug.com/12826
R=asiva@google.com, gbracha@google.com

Review URL: https://codereview.chromium.org//128933003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31630 260f80e4-7a28-3924-810f-c04153c831b5
2014-01-08 22:21:43 +00:00
rmacnak@google.com 068f6286ca Implement topLevelMembers, staticMembers, instanceMembers in the VM.
BUG=http://dartbug.com/14632
R=asiva@google.com, gbracha@google.com

Review URL: https://codereview.chromium.org//67203002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31056 260f80e4-7a28-3924-810f-c04153c831b5
2013-12-11 02:08:16 +00:00
ahe@google.com d3eec1b13d Diagnose missing @MirrorsUsed.
BUG=http://dartbug.com/14839
R=kathyw@google.com, sigurdm@google.com

Review URL: https://codereview.chromium.org//78223004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30812 260f80e4-7a28-3924-810f-c04153c831b5
2013-12-03 15:40:23 +00:00
rmacnak@google.com 36865e79e1 Fix documentation drift between ClosureMirror.apply and the other reflective invocations.
BUG=http://dartbug.com/12049
R=gbracha@google.com

Review URL: https://codereview.chromium.org//92713002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30734 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-27 21:51:47 +00:00
gbracha@google.com 964ed5f9a1 Rfine spec for TypedefMirror.value and for ClosureMirror.findInContext.
R=ahe@google.com, rmacnak@google.com

Review URL: https://codereview.chromium.org//27953002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30386 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-19 01:42:47 +00:00
kasperl@google.com fab4683f19 Mark dart:mirrors as having a (slightly) unstable API in the documentation.
R=ahe@google.com, bak@google.com
BUG=

Review URL: https://codereview.chromium.org//61793006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30106 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-08 11:38:38 +00:00
rmacnak@google.com f3384bf0eb Hide ClosureMirror.findInContext behind a flag for 1.0.
Test findInContext does not wildcard privates. Fix confused test and implementation that expected inheritance of static members.

BUG=http://dartbug.com/13656
R=ahe@google.com, asiva@google.com, gbracha@google.com

Review URL: https://codereview.chromium.org//52953002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29697 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-31 20:50:17 +00:00
rmacnak@google.com 4f580969d8 Tests and docs for instanceMembers, staticMembers, toplevelMembers.
BUG=http://dartbug.com/14632
BUG=http://dartbug.com/14633
R=ahe@google.com, gbracha@google.com

Review URL: https://codereview.chromium.org//44813004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29593 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-30 22:09:54 +00:00
rmacnak@google.com de5ab09605 Implement ObjectMirror.[] the VM.
R=ahe@google.com

Review URL: https://codereview.chromium.org//25741005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29578 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-30 19:02:46 +00:00
ahe@google.com 36e2df1a1d Mirrors overhaul.
R=johnniwinther@google.com

Review URL: https://codereview.chromium.org//23455028

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29551 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-30 14:58:58 +00:00