Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

compiler/natives/src/reflect: compatible go reflect #1160

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

Merged
merged 2 commits into from
Oct 12, 2022

Conversation

visualfc
Copy link
Contributor

@visualfc visualfc commented Oct 7, 2022

compiler/natives/src/reflect for compatible go reflect

  • newName => resolveReflectName
  • uncommonType can be set

@nevkontakte nevkontakte self-requested a review October 9, 2022 15:52
@nevkontakte
Copy link
Member

This change looks reasonable to me, but could you explain what problem does it address? In particular, the change to the uncommonType handling.

@visualfc
Copy link
Contributor Author

visualfc commented Oct 9, 2022

This change looks reasonable to me, but could you explain what problem does it address? In particular, the change to the uncommonType handling.

  • resolveReflectName: compatible go upstream
  • uncommonType : this change for add new type with method by reflect.
    in go upstream , uncommType embed rtype and can pre allocate uncommType space. but in gopherjs uncommType allocate cannot pre allocate only check from $methodSet, so use js.InternalObject(rt).Set("uncommonType", js.InternalObject(ut)) to dynamic set enable.

see https://github.com/goplusjs/reflectx provide dynamic add new type with method by reflect.

@nevkontakte nevkontakte enabled auto-merge October 10, 2022 22:05
auto-merge was automatically disabled October 12, 2022 00:13

Head branch was pushed to by a user without write access

@nevkontakte nevkontakte enabled auto-merge October 12, 2022 08:39
@nevkontakte nevkontakte disabled auto-merge October 12, 2022 08:39
@nevkontakte nevkontakte merged commit beff8ba into gopherjs:master Oct 12, 2022
@visualfc visualfc deleted the reflect branch October 12, 2022 12:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.