Skip to content

Weaver: Fixes broken catch leaving to final ret operation #295

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

Merged
merged 5 commits into from
Jan 10, 2023

Conversation

alex-kulakov
Copy link
Contributor

@alex-kulakov alex-kulakov commented Dec 25, 2022

There are broken leave.s operations in entity constructors with bodies like below

  public SomeEntity(Session session) : base(session)
  {
    try
    {
      this.DoThis();
    }
    catch (Exception ex)
    {
      this.DoSomethingElse();
      return;
    }
    this.DoAFinalThing();
  }

This PR gets last ret operation (if it exists) and changes leave.s operation's target instruction (if it exists) in catch part to correct instruction that added by Weaver

@alex-kulakov alex-kulakov merged commit bf7811d into 6.0 Jan 10, 2023
@alex-kulakov alex-kulakov deleted the 6.0-weaver-ctor-processing-bug branch January 10, 2023 14:57
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.

1 participant