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

Fix E2E tests for IR. #734

Merged
merged 7 commits into from
Feb 3, 2022
Merged

Fix E2E tests for IR. #734

merged 7 commits into from
Feb 3, 2022

Conversation

otrho
Copy link
Contributor

@otrho otrho commented Feb 2, 2022

These are some relatively minor fixes for bugs which accrued while I was away. The E2E tests were failing sometimes when using IR, these changes fix that.

The ec_recover_test still fails with IR but will be resolved when the new B512 code in sway-lib-std is released.

Closes #709

otrho added 7 commits January 29, 2022 11:19
It previously didn't bother to special-case `B256` literals, and
initialised only the first word, using `SW`.  We now use `MCPI` and
produce identical code as the original codegen.
They can be `TypedVariableDeclaration`s as well as
`TypedConstantDeclaration`s now, but to distinguish between var decls
which were originally const decls or not a new marker
`const_decl_origin` has been added to `TypedVariableDeclaration`.
We don't have an efficient way to check if a value has zero uses and is
safe to remove, so until then, unless we're very careful, removing
values should be avoided.
After 8fe74e0 we let `TypeInfo::Numeric` stay in the AST
post-typecheck, so we need to support them in IR generation.
…roneous recursive calls.

This edge case will go away when we stop inlining calls in the AST.
@otrho otrho self-assigned this Feb 2, 2022
@adlerjohn adlerjohn added the compiler General compiler. Should eventually become more specific as the issue is triaged label Feb 2, 2022
("aliased_imports", ProgramState::Return(42)),
("empty_method_initializer", ProgramState::Return(1)), // true
("b512_struct_alignment", ProgramState::Return(1)), // true
("generic_structs", ProgramState::Return(1)), // true
("generic_functions", ProgramState::Return(1)), // true
("generic_enum", ProgramState::Return(1)), // true
("import_method_from_other_file", ProgramState::Return(10)), // true
("b512_test", ProgramState::Return(1)), // true
Copy link
Contributor

Choose a reason for hiding this comment

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

would you rather comment these out instead of deleting them so they aren't forgotten?

Copy link
Contributor Author

@otrho otrho Feb 3, 2022

Choose a reason for hiding this comment

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

They were all duplicates. This is what prompted me to create #723

@nfurfaro
Copy link
Contributor

nfurfaro commented Feb 3, 2022

A new version of sway-lib-std was released so that should help with failing tests here.

@otrho otrho linked an issue Feb 3, 2022 that may be closed by this pull request
@otrho otrho merged commit 8d07eaa into master Feb 3, 2022
@otrho otrho deleted the otrho/fix-misc-ir-bugs branch February 3, 2022 03:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler General compiler. Should eventually become more specific as the issue is triaged
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

retd_struct E2E test is currently failing with IR pipeline.
4 participants