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

cpp: remove this pragma, breaks codegen #398

Merged

Conversation

saem
Copy link
Collaborator

@saem saem commented Aug 6, 2022

Removed the this pragma, but codegen is now broken:

  • codegen no longer renames parameters that happen to be called this
  • can't find a reasonable causal chain that explains why
  • disabled tests that fail on the cpp backend in the meantime

Added benefit:

  • removed the nfExprCall flag
  • remove the sfIsSelf const/flag
  • CI should run faster and less cruft in dispatch

It also became clear that semIndirectOp and call patterns around it
need a complete rewrite. The results should be simplified dispatch.

Removed the this pragma, but codegen is now broken:
- codegen no longer renames parameters that happen to be called `this`
- can't find a reasonable causal chain that explains why
- disabled tests that fail on the cpp backend in the meantime

Added benefit:
- removed the `nfExprCall` flag
- remove the `sfIsSelf` const/flag
- CI should run faster and less cruft in dispatch

It also became clear that `semIndirectOp` and call patterns around it
need a complete rewrite. The results should be simplified dispatch.
@saem
Copy link
Collaborator Author

saem commented Aug 6, 2022

Bots r+

2 similar comments
@saem
Copy link
Collaborator Author

saem commented Aug 6, 2022

Bots r+

@saem
Copy link
Collaborator Author

saem commented Aug 6, 2022

Bots r+

@saem saem closed this Aug 6, 2022
@saem saem reopened this Aug 6, 2022
@saem
Copy link
Collaborator Author

saem commented Aug 6, 2022

bors r+

@bors
Copy link
Contributor

bors bot commented Aug 6, 2022

Build succeeded:

@bors bors bot merged commit ecc5673 into nim-works:devel Aug 6, 2022
@haxscramper haxscramper added this to the C backend refactoring milestone Nov 21, 2022
@saem saem deleted the saem-qw-04-cpp-remove-this-pragma-breaks-codegen branch January 22, 2023 18:41
@haxscramper haxscramper added the simplification Removal of the old, unused, unnecessary or un/under-specified language features. label Feb 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
simplification Removal of the old, unused, unnecessary or un/under-specified language features.
Development

Successfully merging this pull request may close these issues.

2 participants