Repository navigation
fix(frontend): preserve typed expression assembly results in HIR - #1088
Open
hiyouwhatsapp wants to merge 2 commits into
Open
hiyouwhatsapp wants to merge 2 commits into
hiyouwhatsapp wants to merge 2 commits into
Conversation
Infer the result from the validated single output rather than treating inline assembly as unknown, allowing existing ordered numeric conversions for assignments, returns and casts Reject unsupported value contexts and add semantic, HIR and codegen regressions Signed-off-by: hiyouwhatsapp <89997383+hiyouwhatsapp@users.noreply.github.com>
…ame assumptions Exercise return conversions in a non-entry function and check unoptimized casts while validating optimized assembly call emission Signed-off-by: hiyouwhatsapp <89997383+hiyouwhatsapp@users.noreply.github.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1081
Expression-form inline assembly previously validated to Unknown even when its single output had a concrete scalar type, allowing incompatible initializers to pass checking and reach missing-conversion errors in LLVM
I now preserve the validated output type in semantic HIR so the existing ordered conversion planner handles implicit widening, integer-to-float conversions, explicit casts, arithmetic and returns without inventing conversions in the backend
Expression assembly with multiple outputs or a non-scalar result is rejected during semantic analysis, and a value context cannot consume an assembly expression with no output
Added frontend and HIR regression tests for signed widening, float conversion, explicit bool casts, arithmetic, return conversions, and incompatible value contexts
Added target-gated x86_64 check, LLVM IR/object, native O0/O2 execution and source-diagnostic regressions
The existing statement assembly path and its output constraints are unchanged
The Rust test suite has not been run locally, so CI still needs to verify this change