Commit Graph

11 Commits

Author SHA1 Message Date
Alexander Markov fe2ea6a55f [vm] Add minimal support for mirrors of extension type members
Support extension type members in dart:mirrors similarly to extensions.
Add MethodMirror.isExtensionTypeMember and VariableMirror.isExtensionTypeMember.

TEST=tests/lib/mirrors/method_mirror_extension_test.dart
Fixes https://github.com/dart-lang/sdk/issues/54266

CoreLibraryReviewExempt: VM-only dart:mirrors API change
Change-Id: I9c1c22118ee52e98d5013c881eb6ad5686df656e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/340284
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2023-12-07 21:48:50 +00:00
asiva b12bed36a8 [VM] Implement isExtensionMember in MethodMirror and VariableMirror
Added ability to recognize a MethodMirror to be a mirror of an extension member
Added ability to recognize a VariableMirror to be a mirror of a static
extension field.

Change-Id: I56715a491bba0d8cafb2796ebb755bd339e147c6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/120760
Reviewed-by: Siva Annamalai <asiva@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2019-10-09 00:27:30 +00:00
Liam Appelbe 223eaa6fbb Report noSuchMethod forwarders as synthetic in the mirror api
Fixes http://dartbug.com/34982

Bug: http://dartbug.com/34982
Change-Id: I0302586c5f0e58dd66e238bd32088ebe1c150c0e
Reviewed-on: https://dart-review.googlesource.com/c/93124
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Liam Appelbe <liama@google.com>
2019-02-14 18:42:19 +00:00
Zachary Anderson 2e4dfd3a2d clang-format runtime/lib
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/2468093007 .
2016-11-04 12:14:41 -07:00
Zachary Anderson 103881d01c Make header include guards great again
i.e. #ifndef VM_WHATEVER -> #ifndef RUNTIME_VM_WHATEVER

This lets us remove a hack from the PRESUBMIT.py script that existed
for reasons that are no longer valid, and sets us up to add some
presubmit checks for the GN build.

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

Review URL: https://codereview.chromium.org/2450713004 .
2016-10-26 00:26:03 -07: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
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 2fb0bb020b Reapply "Mark all private functions in dart: libraries as invisible (*sniff*). Previously these functions were only marked invisible if they were also native, a constructor, or on a black list."
Broken assumption in Dartium fixed in blink r188698.

R=hausner@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43053 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-21 20:44:04 +00:00
rmacnak@google.com ed88ac7f0c Revert "Mark all private functions in dart: libraries as invisible (*sniff*). Previously these functions were only marked invisible if they were also native, a constructor, or on a black list."
Broke Dartium.

TBR=hausner@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43026 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-20 20:56:59 +00:00
rmacnak@google.com 045bd762d7 Mark all private functions in dart: libraries as invisible (*sniff*). Previously these functions were only marked invisible if they were also native, a constructor, or on a black list.
An invisible function is hidden from stack traces, will not be enumerated
by mirrors, and cannot be directly invoked by mirrors. Note that private
classes remain accessible.

Fix a few internal dart:io functions that should be private.

Fix bug where mirrors would enumerate top-level invisible functions.

Mark observatory test that was using such private functions through
mirrors as failing.

BUG=http://dartbug.com/15274
R=hausner@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43019 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-20 18:32:19 +00:00
turnidge@google.com 353b66038e Rework mirrors implementation.
(Note that the current mirrors implementation is just a heartbeat
implementation of a single method)

Use native code instead of dart code to do the work.

Use JSON instead of Lists/Maps for commands/responses.

Reenable disabled tests.
Review URL: https://chromiumcodereview.appspot.com//10175011

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6864 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-23 22:26:09 +00:00