Commit Graph

128 Commits

Author SHA1 Message Date
rmacnak@google.com 5e3a80268a Partially implement LibraryMirror.topLevelMembers.
BUG=http://dartbug.com/14632
R=asiva@google.com, gbracha@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31202 260f80e4-7a28-3924-810f-c04153c831b5
2013-12-17 19:20:03 +00:00
rmacnak@google.com 7809fb4276 Remove dead isLocalPort from the VM mirrors implementation.
Review URL: https://codereview.chromium.org//115153007

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31199 260f80e4-7a28-3924-810f-c04153c831b5
2013-12-17 18:02:14 +00:00
rmacnak@google.com e5d7ada6e9 VM: Support calling through getters in InstanceMirror.delegate.
Implement without accessing private members of dart:core. Fix language test expecting wrong return value.

BUG=http://dartbug.com/15138
R=fschneider@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31140 260f80e4-7a28-3924-810f-c04153c831b5
2013-12-13 18:33:45 +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
rmacnak@google.com 3975640225 Remove implementation of deprecated mirror API from the VM.
(Redo of r30005)

BUG=http://dartbug.com/14931

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30864 260f80e4-7a28-3924-810f-c04153c831b5
2013-12-04 19:01:51 +00:00
rmacnak@google.com ff7c98d758 Revert "Remove implementation of deprecated mirror API from the VM."
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30806 260f80e4-7a28-3924-810f-c04153c831b5
2013-12-03 00:54:02 +00:00
rmacnak@google.com fdeb88dda0 Remove implementation of deprecated mirror API from the VM.
(Redo of r30005)

BUG=http://dartbug.com/14931

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30805 260f80e4-7a28-3924-810f-c04153c831b5
2013-12-03 00:34:09 +00:00
rmacnak@google.com caa3e25e0a Move non-caching fields to the top of mirror classes.
R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30384 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-19 00:46:01 +00:00
rmacnak@google.com 2e89f4f4d6 Drop "Impl" suffix from local mirror class names.
R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30321 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-15 22:44:44 +00:00
rmacnak@google.com bc39a8afe8 When ClassMirrors are created by enumerating members of a LibraryMirror, have the ClassMirror use that LibraryMirror as its owner.
BUG=http://dartbug.com/14449
R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30291 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-14 20:35:59 +00:00
regis@google.com 694401d38e Rename mixin typedef to mixin application alias in VM.
R=hausner@google.com, rmacnak@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30277 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-14 17:42:39 +00:00
rmacnak@google.com 1dcc9ea681 Ensure constructorName symbols include private manglings.
R=asiva@google.com, gbracha@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30178 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-11 23:08:38 +00:00
rmacnak@google.com cc3e05ea99 Implement VariableMirror.isConst in the VM and ParameterMirror.isConst in dart2js.
BUG=http://dartbug.com/14671
R=ahe@google.com, asiva@google.com, gbracha@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30161 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-11 17:54:58 +00:00
rmacnak@google.com 93d342b42e Use the runtime for generic subsitution of variable types, return types, parameter types.
BUG=http://dartbug.com/14613
BUG=http://dartbug.com/14156
R=gbracha@google.com, regis@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30120 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-08 17:54:59 +00:00
iposva@google.com 1cae21b556 - Reverting mirror changes.
Review URL: https://codereview.chromium.org//62373008

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30029 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-07 02:07:37 +00:00
iposva@google.com d27c33b5b2 - Reverting mirror changes.
Review URL: https://codereview.chromium.org//61873007

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30028 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-07 01:57:18 +00:00
rmacnak@google.com 8113397b88 Revert removed mirror API from VM.
Review URL: https://codereview.chromium.org//62373006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30023 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-07 01:15:17 +00:00
rmacnak@google.com 1caa73df59 Remove implementations of mirror methods not in the API from the VM. Update tests.
R=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30005 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-06 22:30:45 +00:00
iposva@google.com adad3bbcb1 - Force errors when using bad types or overrides.
R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29821 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-04 17:26:47 +00:00
rmacnak@google.com 07c3de9310 Mirror implementation removals: async invoke, mirrorSystemOf(port), Mirror.mirrors.
(API was removed in r29492)

R=ahe@google.com, gbracha@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29698 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-31 21:01:59 +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 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
rmacnak@google.com bcb8707fcd Test reflecting on an object that implements Function but has no call method.
BUG=http://dartbug.com/13957
R=asiva@google.com, gbracha@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29374 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-28 17:25:47 +00:00
regis@google.com 20badfb06e Register synthesized mixin application classes in the library and reuse them
when possible (fix issue 14318).

R=asiva@google.com, hausner@google.com, rmacnak@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29276 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-25 19:46:32 +00:00
rmacnak@google.com 8ee11af36f Add LibraryMirror.declarations and ClassMirror.declarations to the API and both implementations.
Fix bug where partially unmangled names were used in constructor names.

Fix bug where type variables were considered static.

R=gbracha@google.com, johnniwinther@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29261 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-25 17:05:49 +00:00
rmacnak@google.com 24254f150c Hoist generics-related functions from ClassMirror to TypeMirror.
R=ahe@google.com, gbracha@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29195 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-24 18:56:49 +00:00
rmacnak@google.com ccfaa29881 Make type variables belong to the original declaration in VM.
BUG=http://dartbug.com/14240
R=gbracha@google.com, zarah@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29106 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-23 18:28:46 +00:00
rmacnak@google.com cfa80041e9 VM: Always return immutable collections from the mirrors.
Fix assert in partial demangling. Fix inappropriate compilation when handling parameters.

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

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29030 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-22 19:53:14 +00:00
rmacnak@google.com a3cd93fa15 Cover an example of equality and hashCode for each type of mirror.
BUG=http://dartbug.com/6680
R=ahe@google.com, gbracha@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29015 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-22 18:16:39 +00:00
rmacnak@google.com bd284f7262 Generic typedefs and their referents.
BUG=http://dartbug.com/12282
R=regis@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28972 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-22 00:00:08 +00:00
rmacnak@google.com 0d23dbc1e2 Make TypedefMirror a direct descendant of TypeMirror.
BUG=http://dartbug.com/11616
R=ahe@google.com, asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28862 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-18 16:59:55 +00:00
rmacnak@google.com 58c1759454 Generic instantiations of mixins and interfaces. Equality of type parameters.
BUG=http://dartbug.com/14113
BUG=http://dartbug.com/14114
R=regis@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28768 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-17 00:16:34 +00:00
rmacnak@google.com 564fbb68dd Add proper API for creating private symbols wrt a library.
BUG=http://dartbug.com/13355
BUG=http://dartbug.com/12358
R=ahe@google.com, asiva@google.com, gbracha@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28551 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-11 20:56:14 +00:00
gbracha@google.com 0ca837410a Modifications to TypeVariableMirror implementation to accommodate expected hoisting of methods from ClassMirror to TypeMirror.
R=rmacnak@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28496 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-11 02:15:38 +00:00
rmacnak@google.com 8a0d62f5f9 Substitution for type variables in mirrors on instantiated generics.
BUG=http://dartbug.com/12282
BUG=http://dartbug.com/13808
R=gbracha@google.com, regis@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28495 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-11 01:51:11 +00:00
srdjan@google.com 1676113897 Fix runtimeType for strings, integers and double: return their interface type.
R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28286 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-04 22:08:55 +00:00
rmacnak@google.com b56528fd99 Make the implementations of InstanceMirror.hashCode use dart:core's identityHashCode.
R=ahe@google.com, lrn@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28229 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-03 16:38:19 +00:00
mlippautz@google.com 19763aae4d Implementation for ClosureMirror.findInContext.
Fixes issue 5897.

BUG=https://code.google.com/p/dart/issues/detail?id=5897
R=asiva@google.com, gbracha@google.com, rmacnak@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27982 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-27 01:28:12 +00:00
rmacnak@google.com 753af9b01b Implement closurization of regular methods in ObjectMirror.getField in the VM.
BUG=http://dartbug.com/13001
BUG=http://dartbug.com/13002
R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27916 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-25 21:42:13 +00:00
zarah@google.com 3766edd713 Change return type of get typeVariables and typeArguments in ClassMirror.
R=ahe@google.com, gbracha@google.com, rmacnak@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27641 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-19 07:01:19 +00:00
mlippautz@google.com b09bbf706b Add metadata to type parameters. Reflective access is provided by TypeVariableMirror.
Addresses issue 10906.

BUG=https://code.google.com/p/dart/issues/detail?id=10906
R=asiva@google.com, rmacnak@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27523 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-16 16:53:24 +00:00
mlippautz@google.com 214d00f536 Mirrors cleanup. No semantic changes.
BUG=
R=rmacnak@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27438 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-12 17:32:13 +00:00
rmacnak@google.com 07c4d9d0c6 Fill in type arguments when creating an object from the mirrors or embedding API.
BUG=http://dartbug.com/13186
BUG=http://dartbug.com/12921
R=regis@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27417 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-12 00:48:16 +00:00
mlippautz@google.com 1cf1806f29 Remove unreachable code in mirrors.
The only case where we do not set the name in the constructor is for anonymous
mixin applications.

BUG=
R=asiva@google.com, rmacnak@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27390 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-11 16:10:43 +00:00
mlippautz@google.com 4df2b2b2f1 Remove leftover from CL 23038010.
BUG=
R=rmacnak@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27271 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-07 00:02:29 +00:00
rmacnak@google.com 232cdaae3e VM: Make ParameterMirror.toString say it is a parameter mirror.
VM: Make FunctionTypeMirror.toString use the form (args) -> retval.
dart2js: Fix FunctionTypeMirror.toString's use of separators.

BUG=http://dartbug.com/13079
R=ahe@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27213 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-05 20:57:22 +00:00
rmacnak@google.com d7d3588a55 Support named and optional positional arguments in reflective invocation.
R=ahe@google.com, regis@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27134 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-04 17:12:28 +00:00
rmacnak@google.com 865ef54309 Implement ParameterMirror.metadata.
BUG=http://dartbug.com/10906
BUG=http://dartbug.com/11418
R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27082 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-03 22:50:15 +00:00
rmacnak@google.com 64fd5a5079 Implement InstanceMirror.== in dart2js and InstanceMirror.hashCode in the VM and dart2js.
BUG=http://dartbug.com/12909
BUG=http://dartbug.com/12919
R=ahe@google.com, asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27075 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-03 20:11:11 +00:00
rmacnak@google.com 919eae46a1 Ensure class mirrors on non-generic classes always have their runtime type set. Add a test for class mirror equality.
BUG=http://dartbug.com/12800
R=ahe@google.com, asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26951 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-30 21:51:31 +00:00