Stream: git-wasmtime

Topic: wasmtime / PR #2468 Improve usability of constants


view this post on Zulip Wasmtime GitHub notifications bot (Dec 02 2020 at 22:48):

abrown requested cfallin and bnjbvr for a review on PR #2468.

view this post on Zulip Wasmtime GitHub notifications bot (Dec 02 2020 at 22:48):

abrown opened PR #2468 from improve-constants to main:

This adds a higher-level method, LowerCtx::emit_constant for lowering a constant in one of two ways:

<!--

Please ensure that the following steps are all taken care of before submitting
the PR.

Please ensure all communication adheres to the code of conduct.
-->

view this post on Zulip Wasmtime GitHub notifications bot (Dec 02 2020 at 22:48):

abrown requested cfallin and bnjbvr for a review on PR #2468.

view this post on Zulip Wasmtime GitHub notifications bot (Dec 02 2020 at 23:01):

abrown updated PR #2468 from improve-constants to main:

This adds a higher-level method, LowerCtx::emit_constant for lowering a constant in one of two ways:

<!--

Please ensure that the following steps are all taken care of before submitting
the PR.

Please ensure all communication adheres to the code of conduct.
-->

view this post on Zulip Wasmtime GitHub notifications bot (Dec 02 2020 at 23:41):

cfallin submitted PR Review.

view this post on Zulip Wasmtime GitHub notifications bot (Dec 02 2020 at 23:41):

cfallin submitted PR Review.

view this post on Zulip Wasmtime GitHub notifications bot (Dec 02 2020 at 23:41):

cfallin created PR Review Comment:

s/in place/into a constant pool/, no? (Or perhaps "should be generated into a constant pool and loaded (if true); otherwise, it should be generated in place by an instruction or instruction sequence."

We should also clarify that if this function returns false, then gen_constant must be able to handle this value, and if true, then gen_constant_in_pool should.

view this post on Zulip Wasmtime GitHub notifications bot (Dec 02 2020 at 23:41):

cfallin created PR Review Comment:

Perhaps we can call this gen_constant_in_place now (analogous to ..._in_pool below)?

view this post on Zulip Wasmtime GitHub notifications bot (Dec 08 2020 at 15:02):

bnjbvr submitted PR Review.

view this post on Zulip Wasmtime GitHub notifications bot (Dec 08 2020 at 15:02):

bnjbvr created PR Review Comment:

Looks like there's a solution involving more traits that could avoid the assertions and the dummy unimplemented:

Then backends have to implement ConstantGenerator either directly, or via an opt-in choice to use the pooled variant. It's a bit more involved though...

view this post on Zulip Wasmtime GitHub notifications bot (Dec 08 2020 at 15:02):

bnjbvr edited PR Review Comment.

view this post on Zulip Wasmtime GitHub notifications bot (Dec 08 2020 at 15:16):

bnjbvr submitted PR Review.

view this post on Zulip Wasmtime GitHub notifications bot (Dec 08 2020 at 18:20):

cfallin submitted PR Review.

view this post on Zulip Wasmtime GitHub notifications bot (Dec 08 2020 at 18:20):

cfallin created PR Review Comment:

I like this scheme -- @abrown, does this seem reasonable to incorporate in your PR? I'd be happy to review it as a refactoring followup otherwise.

view this post on Zulip Wasmtime GitHub notifications bot (Dec 08 2020 at 18:41):

abrown submitted PR Review.

view this post on Zulip Wasmtime GitHub notifications bot (Dec 08 2020 at 18:41):

abrown created PR Review Comment:

I like it in principle! Let me dive back in and see how it comes out in practice.

view this post on Zulip Wasmtime GitHub notifications bot (Feb 10 2023 at 18:56):

abrown closed without merge PR #2468.


Last updated: Nov 22 2024 at 16:03 UTC