Stream: wasm

Topic: When are bottom operand types used?


view this post on Zulip Julien Cretin (ia0) (Aug 16 2022 at 09:06):

Hi! I tried grepping for \bot in the spec and it only seems to appear where it is defined. Am I missing something? Thanks!

view this post on Zulip bjorn3 (Aug 16 2022 at 12:47):

It is used for example at https://webassembly.github.io/spec/core/exec/instructions.html#host-functions

view this post on Zulip Julien Cretin (ia0) (Aug 16 2022 at 12:56):

To my understanding, this is a different bottom. It represents that the host function does not return during execution. The bottom I'm talking about is the operand type during validation.

view this post on Zulip Notification Bot (Aug 16 2022 at 18:00):

Ivan Font has marked this topic as resolved.

view this post on Zulip Notification Bot (Aug 16 2022 at 18:00):

Ivan Font has marked this topic as unresolved.

view this post on Zulip Julien Cretin (ia0) (Aug 17 2022 at 13:25):

I believe there is a trace of answer in this issue: https://github.com/WebAssembly/spec/pull/1521. Bottom types were intended to be used to model stack-polymorphic operations.

select without argument produces a numeric or vector type while ref.is_null consumes a reference type. Since those types are disjoint, select followed by ref.is_null can never be well-typed. The te...

Last updated: Nov 22 2024 at 17:03 UTC