Skip to content

Conversation

@alexeagle
Copy link
Contributor

Using toString results in 'function (_arg1, arg2) {' when using closure compiler for 6-to-5.

@alexeagle alexeagle force-pushed the stringify branch 2 times, most recently from 4f35086 to dfc6c33 Compare March 30, 2016 04:44
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This gets slower over time and contains a memory leak.
Better: Create a facade around a WeakMap in JS and Expando in Dart (see https://api.dartlang.org/stable/1.15.0/dart-core/Expando-class.html)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, I don't think this is the right place to do this. Rather, we should change our codegen to check for this and keep a local map of the produced symbols. My current PR is already doing this....

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you paste the code that breaks? I.e. so that we can find and fix the place where we generate the code, and don't have to do this in this global helper, which might be used for other things than codegen?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moved this logic into runtime_metadata.ts and switched to Map to store the anonymous function objects.

@alexeagle alexeagle force-pushed the stringify branch 2 times, most recently from 10c0e31 to d60e838 Compare March 30, 2016 16:00
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move up to the other field declarations, before the constructor.
Use _ prefix (so the field is private also in Dart)

@tbosch tbosch added pr_state: LGTM action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews labels Mar 30, 2016
…ens.

Using toString results in 'function (_arg1, arg2) {' when using closure compiler for 6-to-5.
@alexeagle alexeagle added action: merge The PR is ready for merge by the caretaker and removed action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews labels Mar 30, 2016
@mary-poppins
Copy link

Merging PR #7825 on behalf of @kara to branch presubmit-kara-pr-7825.

@Tragetaschen
Copy link
Contributor

That's the same fix that's necessary for #6501

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 8, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

action: merge The PR is ready for merge by the caretaker cla: yes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants