Skip to content
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

We should share BoundedClosures #3046

Closed
floitschG opened this issue May 14, 2012 · 2 comments
Closed

We should share BoundedClosures #3046

floitschG opened this issue May 14, 2012 · 2 comments

Comments

@floitschG
Copy link
Contributor

Currently every implicitly bound closure (by getting a method) has its own class. This is not necessary if the methods have the same name.
We could furthermore store the method name as string in a generic BoundClosureClass.
Example:
class BoundClosure0 {
  var self, methodName; // methodName would not be accessible outside the class.
  BoundClosure0(this.self, this.methodName);

  call$0 = function() { return this.selfthis.methodName; }
}

Each arity (more precisely selector) would need its own BoundClosure class.

@rakudrama
Copy link
Member

It would be great for debugging if the name of the closure was such that the name of the method appeared in the JasvaScript stack trace, e.g. Widget.item$bound_closure

I'm skeptical about the call this.selfthis.methodName being fast, but the entire closure class could be generated from relatively little metadata.

@floitschG
Copy link
Contributor Author

This has been implemented a long time ago.


Added Fixed label.

copybara-service bot pushed a commit that referenced this issue Jun 6, 2022
…5 revisions)

https://dart.googlesource.com/dartdoc/+log/8549817bb1b5..f5bcc4bd46f4

2022-06-06 49699333+dependabot[bot]@users.noreply.github.com Bump actions/cache from 3.0.2 to 3.0.3 (#3058)
2022-06-02 106621169+klr981@users.noreply.github.com Issue #3052: up/down arrox bug fix (#3054)
2022-06-01 49699333+dependabot[bot]@users.noreply.github.com Bump ossf/scorecard-action from 1.0.4 to 1.1.0 (#3053)
2022-05-25 kevmoo@users.noreply.github.com Require Dart 2.17, enable and fix latest lints (#3051)
2022-05-25 6655696+guidezpl@users.noreply.github.com Update styles.css (#3046)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/dart-doc-dart-sdk
Please CC dart-ecosystem-gardener@grotations.appspotmail.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Dart Documentation Generator: https://github.com/dart-lang/dartdoc/issues
To file a bug in Dart SDK: https://github.com/dart-lang/sdk/issues

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Tbr: dart-ecosystem-gardener@grotations.appspotmail.com
Change-Id: I6c49e95569b83b08c53158079febaeb8a9ab2f64
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/247301
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Devon Carew <devoncarew@google.com>
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants