Peter von der Ahé
ae7319727a
Fix more lint style issues in runtime patches.
...
R=vegorov@google.com
Review-Url: https://codereview.chromium.org/2708663002 .
2017-02-20 14:17:14 +01:00
Peter von der Ahé
00bed94e0c
Fix various nits in VM patch files.
...
R=vegorov@google.com
Review-Url: https://codereview.chromium.org/2705593002 .
2017-02-17 16:28:57 +01: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
Vyacheslav Egorov
eb8c24e133
Reland "Merge more Kernel infrastructure from kernel_sdk SDK fork."
...
R=zra@google.com
BUG=
Review URL: https://codereview.chromium.org/2451623006 .
2016-10-27 10:09:22 +02:00
Vyacheslav Egorov
12968edb9c
Revert "Reland "Merge more Kernel infrastructure from kernel_sdk SDK fork.""
...
This reverts commit 4e7a31262e .
Windows bots are broken now.
R=zra@google.com
BUG=
Review URL: https://codereview.chromium.org/2451893004 .
2016-10-26 17:07:18 +02:00
Vyacheslav Egorov
4e7a31262e
Reland "Merge more Kernel infrastructure from kernel_sdk SDK fork."
...
This relands commit 2fed1c3905 with fixes to ensure that analyzer summaries are correctly created and XARM build does not try to use target binaries on the host.
R=zra@google.com
BUG=
Review URL: https://codereview.chromium.org/2453773002 .
2016-10-26 16:48:28 +02:00
Vyacheslav Egorov
cf7ff42e60
Revert "Merge more Kernel infrastructure from kernel_sdk SDK fork."
...
This reverts commit 2fed1c3905 .
SDK builds are failing
TBR=zra@google.com
Review URL: https://codereview.chromium.org/2455593002 .
2016-10-26 13:06:27 +02:00
Vyacheslav Egorov
2fed1c3905
Merge more Kernel infrastructure from kernel_sdk SDK fork.
...
- bring patched SDK generation scripts and VM patch tweaks that allow VM patch files to be parsed by analyzer front-end;
Patched SDK is an SDK with all VM patches spliced into it. Kernel compiler is based on the analyzer front-end which does
not have any patch files support/model so for it to produce Kernel files that match VM we need to generate a such patched SDKs.
- bring test script modifications that allow to test Kernel pipeline
BUG=
R=asiva@google.com , kmillikin@google.com , whesse@google.com , zra@google.com
Review URL: https://codereview.chromium.org/2434123003 .
2016-10-26 13:02:54 +02:00
Siva Annamalai
964a659470
- reset 'dirty' flag to false after the libraries mirrors is computed, this ensures that we compute the libraries only when new library modules are loaded and the 'dirty' flag is set to true.
...
- Use passed in 'zone' argument in the native string functions
- Use passed in 'thread' argument in the library mirror creation functions
R=rmacnak@google.com
Review URL: https://codereview.chromium.org/1935703002 .
2016-04-29 15:15:19 -07:00
Regis Crelier
7f57ebcfa1
Remove signature classes from the VM.
...
They were used as the class of closure instances and as the type class of
function types.
All closure instances now have class _Closure and function types are represented
by a new class FunctionType extending AbstractType.
Fix issue 24567 and add regression test.
R=asiva@google.com , rmacnak@google.com
Review URL: https://codereview.chromium.org/1584223006 .
2016-01-19 16:32:59 -08:00
Jacob Richman
27686cf808
Missed adding the isExternal property to all VM MethodMirror subclasses.
...
BUG=
R=asiva@google.com
Review URL: https://codereview.chromium.org/1407333007 .
2015-11-06 10:51:45 -08:00
Jacob Richman
688b69fb65
Support isExternal method on MethodMirror in the Dart VM. Not really intended for public consumption. switch to using isExternal and using anonymous.
...
BUG=
R=alanknight@google.com , asiva@google.com
Review URL: https://codereview.chromium.org/1421133003 .
2015-10-29 19:17:08 -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
bc90a5e1f0
Fix getField optimization when the selector is an operator.
...
BUG=http://dartbug.com/23880
R=asiva@google.com
Review URL: https://codereview.chromium.org//1247733005 .
2015-07-22 13:39:07 -07:00
Ryan Macnak
6545e8539e
Fix isAssignableTo in VM mirrors to use subtype (<:) rather than moreSpecificThan (<<).
...
BUG=http://dartbug.com/22852
R=gbracha@google.com
Review URL: https://codereview.chromium.org//1156583005
2015-06-04 12:25:59 -07:00
Ryan Macnak
eca0d72abe
Provide a logical view of VM-internal maps in Observatory.
...
BUG=http://dartbug.com/20551
BUG=http://dartbug.com/21185
R=koda@google.com
Review URL: https://codereview.chromium.org//1150103005
2015-06-02 11:38:39 -07: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
327b85d956
Move symbol demangling to dart:_internal to remove dart:core dependency on dart:mirrors.
...
BUG=
R=srdjan@google.com
Review URL: https://codereview.chromium.org//1107613002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45405 260f80e4-7a28-3924-810f-c04153c831b5
2015-04-24 17:49:58 +00:00
rmacnak@google.com
e2c41789ee
Mirrors memory usage tweaks.
...
- Don't build and cache vestigial members/constructors maps.
- Avoid creating multiple LibraryMirrors for the same library.
- Store infrequently used method flags as a bitfield.
- Don't cache MethodMirror source.
mirrors_reader_test final heap size: 10.8 -> 8.9 MB (-17.5%)
mirrors_reader_test time: 1.55 -> 1.33 seconds (-14.2%)
R=asiva@google.com
Review URL: https://codereview.chromium.org//1080393006
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45352 260f80e4-7a28-3924-810f-c04153c831b5
2015-04-22 17:51:49 +00:00
rmacnak@google.com
369c119539
Remove dead ClassMirror._methods. Remove FunctionTypeMirror.members|constructors that should have been removed along with ClassMirror.members|constructors.
...
R=regis@google.com
Review URL: https://codereview.chromium.org//1070563007
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44986 260f80e4-7a28-3924-810f-c04153c831b5
2015-04-08 22:17:23 +00:00
rmacnak@google.com
b3f4ce9bd8
Deal with type arguments of generic local functions in VM mirrors.
...
BUG=http://dartbug.com/14913
R=regis@google.com
Review URL: https://codereview.chromium.org//1072443005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44983 260f80e4-7a28-3924-810f-c04153c831b5
2015-04-08 21:40:51 +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
regis@google.com
30dce6a5d1
Fix issue 21474 in mirrors.
...
R=rmacnak@google.com
Review URL: https://codereview.chromium.org//690413002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41453 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-31 23:16:11 +00:00
rmacnak@google.com
3a40319ed2
Remove hard limit from mirrors accessor caches.
...
Avoids treadmilling the cache when the working set is larger than the cache size, such as the observe loop of a very large Angular app.
BUG=http://dartbug.com/20196
R=iposva@google.com
Review URL: https://codereview.chromium.org//420713008
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39057 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-08 22:20:36 +00:00
rmacnak@google.com
9c2b650c15
Increase the size of the getter/setter closure caches.
...
TBR=asiva@google.com
BUG=http://dartbug.com/20196
Review URL: https://codereview.chromium.org//416283002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38568 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-25 00:55:52 +00:00
rmacnak@google.com
81d0f25293
Reapply "Implement an LRU cache in dart:_internal and use it for the getter/setter caches in the VM's mirrors." Reapply "Use mirror-free LRU test for dart2js"
...
BUG=http://dartbug.com/18445
R=asiva@google.com
Review URL: https://codereview.chromium.org//383903005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38167 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-11 18:59:06 +00:00
rmacnak@google.com
f346a00c0f
Revert r37059 and dependent r37589. This effectively reduced the size of the getter and setter caches, exposing http://dartbug.com/18284 in a C1 application.
...
Revert "Implement an LRU cache in dart:_internal and use it for the getter/setter caches in the VM's mirrors."
Revert "Use mirror-free LRU test for dart2js"
BUG=http://dartbug.com/19909
BUG=http://dartbug.com/18284
BUG=http://dartbug.com/18445
R=asiva@google.com
Review URL: https://codereview.chromium.org//375043003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38076 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-09 00:18:15 +00:00
rmacnak@google.com
7f84fb2b7f
Implement an LRU cache in dart:_internal and use it for the getter/setter caches in the VM's mirrors.
...
BUG=http://dartbug.com/18445
R=iposva@google.com
Review URL: https://codereview.chromium.org//268783006
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37059 260f80e4-7a28-3924-810f-c04153c831b5
2014-06-06 00:45:01 +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
f0d289599c
VM: Fix TypedefMirror.isPrivate and TypeVariableMirror.isPrivate.
...
BUG=http://dartbug.com/18271
R=asiva@google.com , gbracha@google.com
Review URL: https://codereview.chromium.org//240443007
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35758 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-05 19:45:58 +00:00
rmacnak@google.com
f848586f7f
Prevent unbounded growth of the getField/setField closure caches.
...
BUG=http://dartbug.com/16539
R=iposva@google.com
Review URL: https://codereview.chromium.org//241703002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35433 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-25 17:47:15 +00:00
lrn@google.com
2a93b93c1c
Remove unmodifiable map wrappers that could instead use UnmodifiableMapView.
...
R=sgjesse@google.com
Committed: https://code.google.com/p/dart/source/detail?r=35244
Review URL: https://codereview.chromium.org//214723002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35361 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-24 08:51:41 +00:00
kevmoo@google.com
696e05cfef
VM mirrors: Use UnmodifiableMapView from dart:collection
...
R=rmacnak@google.com
Review URL: https://codereview.chromium.org//246133003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35274 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-22 18:39:51 +00:00
lrn@google.com
0e24a1701c
Revert "Remove unmodifiable map wrappers that could instead use UnmodifiableMapView."
...
Some tests fail.
Review URL: https://codereview.chromium.org//246833003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35245 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-22 06:21:24 +00:00
lrn@google.com
04b55abe64
Remove unmodifiable map wrappers that could instead use UnmodifiableMapView.
...
R=sgjesse@google.com
Review URL: https://codereview.chromium.org//214723002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35244 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-22 05:53:33 +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
e88d2a11cd
Also remove Dart native method.
...
Review URL: https://codereview.chromium.org//199863005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33793 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-18 00:11:44 +00:00
rmacnak@google.com
f8c59de4d6
Clean up ClosureMirror.invoke(#call, ...).
...
R=asiva@google.com , gbracha@google.com
Review URL: https://codereview.chromium.org//196513004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33790 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-17 23:43:32 +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
42e8c08b3c
Match existing expectation that delegate returns unwrapped values.
...
TBR
Review URL: https://codereview.chromium.org//181063025
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33306 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-04 21:56:57 +00:00
rmacnak@google.com
d515f61a35
Work around bug where closures are missing #call to support delegation of #call to closures.
...
BUG=http://dartbug.com/16995
R=iposva@google.com
Review URL: https://codereview.chromium.org//183923018
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33303 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-04 21:10:04 +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