Skip to content

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