Skip to content

Blocks with multiple possible output types should not be boxed immediately #31

@pufferfish101007

Description

@pufferfish101007

If a block has an output type which is comprised of multiple base types, the output is boxed immediately, but will then be unboxed immediately after to be passed into the next block. This simplifies code generation but produces suboptimal code - wasm-opt can probably reduce it, but I am not certain. More importantly, this means that if a block can produce a string alongside other types, a table element has to be allocated for that string. If output types were not boxed immediately, we could get rid of the strings table entirely because the only non-stack-located strings would be for variables, which could be stored in a single global (or local) for each variable.

Metadata

Metadata

Labels

No labels
No labels

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions