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

Separate FloatOps.Generated from IntOps.Generated #1368

Merged
merged 1 commit into from
Mar 21, 2022

Conversation

BCSharp
Copy link
Member

@BCSharp BCSharp commented Mar 21, 2022

Follow-up on #1329 (issue #52).

@@ -164,7 +168,7 @@ def gen_unaryops(cw, ty):
cw.write(identity_method, method_name="Abs")
cw.write(unsigned_negate_or_invert, method_name="OnesComplement")

if (ty.type is not complex) and (ty.type is not bigint):
if ty.name not in ['BigInteger', 'Complex']:
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need this check?

Copy link
Member Author

Choose a reason for hiding this comment

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

No, and such checks are done in more places than here. I assume at some time this script was used to generate code for BigInteger and Complex too. I was hesitating removing those checks in case code generation for those types comes back (?), but am ready to remove them if you green-light it.

In any case, I plan another pass though this script to modernize the code it generates (separate PR).

Copy link
Contributor

Choose a reason for hiding this comment

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

Feel free to yank any dead code. If I had more time on my hands I'd probably look into trying to use C# Source Generators instead of this. 😃

@slozier slozier merged commit 7b565d5 into IronLanguages:master Mar 21, 2022
@BCSharp BCSharp deleted the floatops_generated branch March 21, 2022 22: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.

2 participants