Skip to content

Conversation

@kripken
Copy link
Member

@kripken kripken commented Feb 22, 2019

Checks if a value is being dropped higher up, like

(drop
  (block i32
    (block i32
      (i32.const 1)
    )
  )
)

Handling this forces us to be careful in that pass about whether a value is used, and whether the type matters (for example, we can't replace a unary with its child in all cases, if the return value matters).

// An unreachable node must not be changed.
if (type == unreachable) return curr;
// We iterate on possible replacements. If a replacement changes the type, stop and go back.
auto* last = curr;
Copy link
Member

Choose a reason for hiding this comment

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

Can we call this previous or prev instead of last?

Copy link
Member Author

@kripken kripken Feb 25, 2019

Choose a reason for hiding this comment

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

Changed to prev.

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.

3 participants