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

Update GC-05-16.md #1279

Merged
merged 3 commits into from
Jun 12, 2023
Merged

Update GC-05-16.md #1279

merged 3 commits into from
Jun 12, 2023

Conversation

tlively
Copy link
Member

@tlively tlively commented May 17, 2023

No description provided.

gc/2023/GC-05-16.md Outdated Show resolved Hide resolved
gc/2023/GC-05-16.md Outdated Show resolved Hide resolved
gc/2023/GC-05-16.md Outdated Show resolved Hide resolved
gc/2023/GC-05-16.md Outdated Show resolved Hide resolved
Co-authored-by: Andreas Rossberg <rossberg@dfinity.org>
@tlively
Copy link
Member Author

tlively commented May 17, 2023

Thanks for the edits, @rossberg!


CW: Who do you imagine will use this as this first choice?

JX: Developers for LT(???). In the browser, WebAssembly can be some part of the project, if not the whole project. This is more flexible than the current solution.
Copy link
Contributor

@penzn penzn May 18, 2023

Choose a reason for hiding this comment

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

I think 'LT' was actually IoT, but I don't remember how that lead to the next sentence. @xujuntwt95329 if you remember, fell free to suggest edits.

Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks @penzn , yes the 'LT' was IoT (Internet of Things), I have submitted a comment

gc/2023/GC-05-16.md Outdated Show resolved Hide resolved
Co-authored-by: Xu Jun <jun1.xu@intel.com>

RH: I would guess it would be in that case. but I’m sure we could put the type information in that shape so it would be really fast. Right now it’s not, so we’d need a reason to do the work like that. There might be extra metadata costs too.

AR: This is a form of reflection right? It’s about putting reflection into core wasm. As you might guess, I’m not a big fan of that idea, it seems to be something that should be handled at a higher level than the basic asm instruction set.
Copy link
Contributor

Choose a reason for hiding this comment

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

@rossberg Sorry for missing this question in the meeting, a quick reply here:

  • I think the proposed opcode struct.get/set_indirect is not related to reflection, it's all about getting field index from operand rather than immediate
  • The idea of interface description table may be something like reflection, but that's not what we want to bring to the core wasm spec, it's just a feasible usage of the proposed opcode

I'll prepare an issue in WebAssembly/gc repo and list some benefits as well as impacts of this opcode for further discussion.

BTW, thanks for your professional questions and suggestions in the meeting, which let me realize there are more things to be considered for the type system

Copy link
Member

Choose a reason for hiding this comment

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

@xujuntwt95329, since these operations have to inspect and dispatch on (the structure of) the runtime type of the object, they represent a form of type reflection. They would be the Wasm equivalent to struct.getClass().getField(x).get/set(struct), the only difference being that x is numeric, not a string, because fields are accessed by number in Wasm. This idea further assumes that every heap object carries sufficient runtime information to perform such reflection, which is not an assumption I'd like to build into Wasm itself.

Copy link
Contributor

Choose a reason for hiding this comment

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

@rossberg Sorry for the late reply because I didn't notice the update on this thread. Since this PR has been merged, I've created an issue WebAssembly/gc#397 for further discussion

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.

4 participants