New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Would be nice if Dart_Invoke behaved consistently for Class, Library and Instance objects. #11870
Comments
Jacob by "For classes" do you mean Instance objects? |
The Library object version should also accept names with a prefix. This should probably be allowed consistently in all functions that provided a lookup |
Correct, I mean instances objects not Class or Type objects. |
Added Dartium-Debugger label. |
Added this to the Later milestone. |
The same thing happens to the mirrors. This is because the implicit closurization for instance methods is handled by Resolver::ResolveDynamic* but for static/top-level methods it is handled in the parser and flow graph compiler. This is implemented in the mirrors in a pending CL, and we could do the same thing for the embedding API. https://chromiumcodereview.appspot.com/23441073/ |
Removed this from the Later milestone. |
Removed Oldschool-Milestone-Later label. |
Refactor the implementation of 'invoke' for sharing between the embedding API, mirrors, and the VM service. The fixes various issues in the embedding API: - Dart_Invoke, Dart_GetField and Dart_SetField now generate the same NoSuchMethodErrors as dart:mirrors and ordinary Dart code. - Dart_GetField and Dart_SetField now accept a null receiver. - Dart_GetField now handles closurization. - Dart_Invoke now handles calls through function-typed getters. In mirrors, it also changes: - LibraryMirror.invoke/getField/setField now see members in the export namespace, not just local declarations. I.e., invocation with a LibraryMirror behaves the same ways as invocation against a library prefix in ordinary Dart code. Bug: #11870 Bug: #13643 Bug: #29893 Bug: #33417 Bug: #34006 Change-Id: I913e8eef16943a3e86eda55c8d122819e41ad7cc Reviewed-on: https://dart-review.googlesource.com/67302 Reviewed-by: Siva Annamalai <asiva@google.com>
Comment snippet from Jacob:
For classes, I can just call
Dart_Invoke with the prefix "get:" added to get a closure to a member, invoke a
getter, or get a field.
This is very convenient and it would be nice if I could do the same with
Libraries but currently I cannot.
The text was updated successfully, but these errors were encountered: