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

[compiler] Add fallthrough to branch terminal #30814

Merged
merged 4 commits into from
Aug 28, 2024

Commits on Aug 26, 2024

  1. [compiler] Add fallthrough to branch terminal

    Branch terminals didn't have a fallthrough because they correspond to an outer terminal (optional, logical, etc) that has the "real" fallthrough. But understanding how branch terminals correspond to these outer terminals requires knowing the branch fallthrough. For example, `foo?.bar?.baz` creates terminals along the lines of:
    
    ```
    bb0:
      optional fallthrough=bb4
    bb1:
      optional fallthrough=bb3
    bb2:
      ...
      branch ... (fallthrough=bb3)
    
    ...
    
    bb3:
      ...
      branch ... (fallthrough=bb4)
    
    ...
    
    bb4:
      ...
    ```
    
    Without a fallthrough on `branch` terminals, it's unclear that the optional from bb0 has its branch node in bb3. With the fallthroughs, we can see look for a branch with the same fallthrough as the outer optional terminal to match them up.
    
    [ghstack-poisoned]
    josephsavona committed Aug 26, 2024
    Configuration menu
    Copy the full SHA
    1846220 View commit details
    Browse the repository at this point in the history

Commits on Aug 27, 2024

  1. Update on "[compiler] Add fallthrough to branch terminal"

    Branch terminals didn't have a fallthrough because they correspond to an outer terminal (optional, logical, etc) that has the "real" fallthrough. But understanding how branch terminals correspond to these outer terminals requires knowing the branch fallthrough. For example, `foo?.bar?.baz` creates terminals along the lines of:
    
    ```
    bb0:
      optional fallthrough=bb4
    bb1:
      optional fallthrough=bb3
    bb2:
      ...
      branch ... (fallthrough=bb3)
    
    ...
    
    bb3:
      ...
      branch ... (fallthrough=bb4)
    
    ...
    
    bb4:
      ...
    ```
    
    Without a fallthrough on `branch` terminals, it's unclear that the optional from bb0 has its branch node in bb3. With the fallthroughs, we can see look for a branch with the same fallthrough as the outer optional terminal to match them up.
    
    [ghstack-poisoned]
    josephsavona committed Aug 27, 2024
    Configuration menu
    Copy the full SHA
    01b9791 View commit details
    Browse the repository at this point in the history

Commits on Aug 28, 2024

  1. Update on "[compiler] Add fallthrough to branch terminal"

    Branch terminals didn't have a fallthrough because they correspond to an outer terminal (optional, logical, etc) that has the "real" fallthrough. But understanding how branch terminals correspond to these outer terminals requires knowing the branch fallthrough. For example, `foo?.bar?.baz` creates terminals along the lines of:
    
    ```
    bb0:
      optional fallthrough=bb4
    bb1:
      optional fallthrough=bb3
    bb2:
      ...
      branch ... (fallthrough=bb3)
    
    ...
    
    bb3:
      ...
      branch ... (fallthrough=bb4)
    
    ...
    
    bb4:
      ...
    ```
    
    Without a fallthrough on `branch` terminals, it's unclear that the optional from bb0 has its branch node in bb3. With the fallthroughs, we can see look for a branch with the same fallthrough as the outer optional terminal to match them up.
    
    [ghstack-poisoned]
    josephsavona committed Aug 28, 2024
    Configuration menu
    Copy the full SHA
    fed48b4 View commit details
    Browse the repository at this point in the history
  2. Update on "[compiler] Add fallthrough to branch terminal"

    Branch terminals didn't have a fallthrough because they correspond to an outer terminal (optional, logical, etc) that has the "real" fallthrough. But understanding how branch terminals correspond to these outer terminals requires knowing the branch fallthrough. For example, `foo?.bar?.baz` creates terminals along the lines of:
    
    ```
    bb0:
      optional fallthrough=bb4
    bb1:
      optional fallthrough=bb3
    bb2:
      ...
      branch ... (fallthrough=bb3)
    
    ...
    
    bb3:
      ...
      branch ... (fallthrough=bb4)
    
    ...
    
    bb4:
      ...
    ```
    
    Without a fallthrough on `branch` terminals, it's unclear that the optional from bb0 has its branch node in bb3. With the fallthroughs, we can see look for a branch with the same fallthrough as the outer optional terminal to match them up.
    
    [ghstack-poisoned]
    josephsavona committed Aug 28, 2024
    Configuration menu
    Copy the full SHA
    00d44be View commit details
    Browse the repository at this point in the history