Commit Graph

480 Commits

Author SHA1 Message Date
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 3a3329c1ac Fix tests that broke in r27633.
Make analyzer happy.

BUG=
R=rmacnak@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27634 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-18 20:13:49 +00:00
mlippautz@google.com 9f41ce82ae Merge tests for dart2js and VM using multi-tests.
BUG=
R=rmacnak@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27633 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-18 19:50:13 +00:00
ngeoffray@google.com f922667e80 Fix warnings spotted by analyzer.
Review URL: https://codereview.chromium.org//24202002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27564 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-17 12:17:52 +00:00
ngeoffray@google.com 8b0ff9c615 Implement redirecting factories in mirrors.
R=ahe@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27561 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-17 12:05:40 +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
ngeoffray@google.com e546e2676d Change how we generate bound closures to handler bound closures due to super getters: we need to pass the exact function to call instead of fetching it from the receiver.
R=ahe@google.com, kasperl@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27519 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-16 13:09:09 +00:00
rmacnak@google.com aa8d63aeea Properly handle exceptions that arise when reflectively invoking a constructor/factory.
R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27439 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-12 17:42:08 +00:00
mlippautz@google.com cd958c8ca4 Fix reparsing of function parameters that include type parameters.
The parser is now properly initializing parsed_function/current_function to make
internal lookups work (instead of crashing).

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

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27418 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-12 01:06:43 +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
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
ahe@google.com a567deab60 Implement reflection on function type aliases (typedef).
BUG=http://dartbug.com/11612
R=johnniwinther@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27204 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-05 17:55:43 +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
ahe@google.com 6d798daaba Change simpleName of anonymous mixin applications.
BUG=http://dartbug.com/12464
R=ngeoffray@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27132 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-04 14:38:07 +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
ahe@google.com 1a95fe0799 Fix problem that caused anonymous mixin applications to be named "null".
BUG=http://dartbug.com/12464
R=ngeoffray@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27073 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-03 18:35:00 +00:00
ngeoffray@google.com e2d27aeec6 Checked mode throws a TypeError.
Review URL: https://codereview.chromium.org//23532032

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27029 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-03 08:10:57 +00:00
ngeoffray@google.com 3d04f309e5 Do not do global optimizations on fields and parameters when invokeOn is enabled.
R=ahe@google.com, johnniwinther@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27026 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-03 07:50:35 +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
floitsch@google.com 1866e87ddd Switch to async_helper package.
R=kustermann@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26918 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-30 14:19:57 +00:00
ahe@google.com fc33814344 Mirror printer test.
BUG=http://dartbug.com/12134
R=karlklose@google.com, ngeoffray@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26916 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-30 13:51:54 +00:00
rmacnak@google.com ac705b02a7 More reflection of mixin applications in the VM.
*Provide ClassMirror.mixin
*Hide extra class on the inheritance chain introduced in mixin typedefs
*Give mixin applications a simpleName that matches the source language syntax
*Update mixin_test to distinguish between members and constructors
*Update mixin_test for the mixin application naming scheme

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

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26824 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-28 22:55:53 +00:00
mlippautz@google.com 817a6fff3a Implement ParameterMirror.{isFinal,hasDefaultValue,defaultValue}.
Fixes issue 12196 and partially addresses issue 12430.

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

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26730 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-27 17:31:09 +00:00
rmacnak@google.com 92f8786e99 Remember metadata positions for mixin and function typedefs.
BUG=http://dartbug.com/10906
R=asiva@google.com, hausner@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26680 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-27 00:47:42 +00:00
mlippautz@google.com f937465cd6 Fix method_mirror_source test for analyzer.
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26663 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-26 17:40:09 +00:00
mlippautz@google.com b708a455d1 Fix Function.end_token_pos() and implement MethodMirror.source getter.
Move .source getter from ClosureMirror to MethodMirror (as the TODO already suggested) and provide an implementation.

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

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26659 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-26 17:14:07 +00:00
rmacnak@google.com 7ed3644358 Make reflectClass(dynamic) throw an illegal argument exception.
BUG=
R=gbracha@google.com, iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26550 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-22 20:05:51 +00:00
rmacnak@google.com 2f192be945 Provide a way to get a Type back from a ClassMirror.
BUG= http://dartbug.com/6433
R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26407 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-20 23:05:31 +00:00
rmacnak@google.com 8bdc9b5696 Cleanup making Null a public class of dart:core in the VM. Remove special cases for Null in lookup and compile-time type tests.
BUG=http://dartbug.com/12364
R=asiva@google.com, regis@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26205 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-15 18:34:23 +00:00
sgjesse@google.com ff7a0b95bd Fix Windows bugs in r26181
TBR=ahe@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26191 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-15 12:10:03 +00:00
ahe@google.com 0974b6d56c Improve type literals in minified mode.
R=ngeoffray@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26187 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-15 11:32:33 +00:00
ahe@google.com ca850cec7b Implement ClassMirror.superinterfaces.
BUG=http://dartbug.com/11863
R=ngeoffray@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26185 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-15 11:05:56 +00:00
sgjesse@google.com 353428a918 Remove the Path class from dart:io
The Path class in dart:io has been deprecated for some time
now. It was scheduled to be removed on August 11th, so here it
goes.

dart:io still uses the Path class internally, but now it is
private. I will trim it down to what is actually used in a
follow-up change.

R=ahe@google.com, devoncarew@google.com, whesse@google.com
BUG=http://dartbug.com/11666

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26181 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-15 10:10:53 +00:00
ahe@google.com d23f1a5b90 Implement reflecting on mixin applications.
BUG=http://dartbug.com/12055
R=johnniwinther@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26162 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-14 22:10:24 +00:00
ahe@google.com e8a94904c6 Don't cache non-Interceptor interceptors.
R=ngeoffray@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26138 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-14 19:16:35 +00:00
mlippautz@google.com 187ec3d4fc Fix ClassMirror.typeArguments handling for dynamic only type arguments.
Addresses an issue where we did not return the appropriate type arguments for instances with all dynamic type arguments.

Example:
Class <E> {}

main() {
  var cm = reflectClass(new C()).type;
  print(cm.typeArguments);
  // now prints: {Symbol("E"): TypeMirror on 'dynamic'}
  // previously: crashed
}

BUG=
R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26135 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-14 18:41:30 +00:00
mlippautz@google.com c79874a413 ParameterMirror: Implement some missing getters.
Fixes issue 11334 and issue 11684 and issue 11567.

R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26086 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-13 21:38:36 +00:00
rmacnak@google.com 303a29b5ba Move Null class out of the VM isolate.
BUG=http://dartbug.com/12071
BUG=http://dartbug.com/12128
BUG=http://dartbug.com/12319
BUG=http://dartbug.com/12337
R=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25982 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-09 21:54:30 +00:00
rmacnak@google.com 0abc24d494 Fix name of libraries without a library declaration to be the empty string.
BUG=10580
R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25981 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-09 21:27:28 +00:00
rmacnak@google.com 5c63370d25 Make ClosureMirror handle instances of user-defined classes that implement call.
R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25944 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-08 20:25:46 +00:00
rmacnak@google.com fe85bf84bb Reflection on generics.
BUG=
R=ahe@google.com, regis@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25942 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-08 20:06:56 +00:00
rmacnak@google.com 3fdec161e8 Fix attempt to find metadata of a library with no metadata.
BUG=12206
R=hausner@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25930 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-08 16:50:11 +00:00
mlippautz@google.com c19527f1f4 Improve test coverage for reflection on mixins.
BUG=
R=ahe@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25834 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-06 21:48:49 +00:00
rmacnak@google.com 7ac237e7e1 R=ahe@google.com
Review URL: https://codereview.chromium.org//19839002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25826 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-06 19:02:57 +00:00
mlippautz@google.com f1dcf02f75 Inline CreateClassMirror and remove dead code.
(Almost) no more embedding API, yay!

Fixes issue 12135.

R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25717 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-01 18:27:32 +00:00
rmacnak@google.com 12c00d74c6 Add tests for reflecting on null and Null.
R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25701 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-01 01:31:38 +00:00
rmacnak@google.com 8ee3299833 Allow InstanceMirror.invoke to find private members. Resolves issue 11771.
R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25690 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-31 23:45:12 +00:00
mlippautz@google.com 9f602cfa83 Also fixes issue 11897.
R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25689 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-31 23:31:14 +00:00
mlippautz@google.com c5c6df3548 BUG=
R=asiva@google.com, rmacnak@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25651 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-30 22:57:59 +00:00