Open
Conversation
Made-with: Cursor
373fd35 to
9830731
Compare
There was a problem hiding this comment.
Pull request overview
This PR unifies string types in the LLVM IR builder by removing the STRING_TYPE (which was a {i32, i8*} struct) and standardizing all string representations on i8* (ASCII_STRING_TYPE). This resolves issue #130 where two incompatible string models coexisted.
Changes:
- Removed
STRING_TYPEfield fromVariablesLLVMand its initialization as aLiteralStructType - Consolidated
get_data_typeso"string","stringascii", and"utf8string"all resolve toASCII_STRING_TYPE - Updated
UTF8_STRING_TYPEto aliasASCII_STRING_TYPE(both nowi8*) and updated the cast visitor accordingly
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/irx/builders/llvmliteir.py | Removes STRING_TYPE, unifies all string type lookups to ASCII_STRING_TYPE (i8*) |
| tests/test_llvmlite_helpers.py | Updates test assertion to expect ASCII_STRING_TYPE instead of UTF8_STRING_TYPE |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| @@ -134,7 +134,7 @@ def test_get_data_type_aliases_and_invalid() -> None: | |||
| assert llvm_vars.get_data_type("float16") == llvm_vars.FLOAT16_TYPE | |||
| assert llvm_vars.get_data_type("double") == llvm_vars.DOUBLE_TYPE | |||
| assert llvm_vars.get_data_type("char") == llvm_vars.INT8_TYPE | |||
Contributor
Author
|
@yuvimittal please look into it |
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.
Solves #130