Skip to content

fix:needs_relocation#107

Merged
clairechingching merged 1 commit intoblueshift-gg:masterfrom
bidhan-a:fix/relocation
Mar 2, 2026
Merged

fix:needs_relocation#107
clairechingching merged 1 commit intoblueshift-gg:masterfrom
bidhan-a:fix/relocation

Conversation

@bidhan-a
Copy link
Copy Markdown
Contributor

@bidhan-a bidhan-a commented Mar 2, 2026

No description provided.

let program_is_static = arch.is_v3()
|| !self.nodes.iter().any(|node| {
matches!(node, ASTNode::Instruction { instruction: inst, .. }
if inst.needs_relocation())
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

given that needs_relocation is only used here and almost only usable in such an early phase. let's remove it and inline the logic here

then let's add a comment to is_syscall - this should be used only when the call label hasn't got resolved to -1

if the workflow gets more complex in the future, we can use an enum variable to keep track of the phases and add an assert to those query method to make sure it's called at a valid phase

@clairechingching clairechingching merged commit 6a21540 into blueshift-gg:master Mar 2, 2026
3 checks passed
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