diff options
| author | Miquel Sabaté Solà <mssola@mssola.com> | 2026-04-30 10:34:23 +0200 |
|---|---|---|
| committer | Miquel Sabaté Solà <mssola@mssola.com> | 2026-04-30 12:23:12 +0200 |
| commit | 6a9dea943c078876061eda0f6203647b0c5aadd4 (patch) | |
| tree | d14510e6916df92df61b3dbe6af060e0101c6d05 /lib/xixanta/src/object.rs | |
| parent | f7b42b2c26481734a4214aac856b33a942c93c23 (diff) | |
| download | tools.nes-6a9dea943c07.tar.gz tools.nes-6a9dea943c07.zip | |
Add a new 'check' stage in assemble()
This is actually an expansion from asan(), but it also checks for stuff
that goes outside of the realm of address sanitation. In this aspect,
asan() has been integrated inside of the new check() function.
Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>
Diffstat (limited to 'lib/xixanta/src/object.rs')
| -rw-r--r-- | lib/xixanta/src/object.rs | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/lib/xixanta/src/object.rs b/lib/xixanta/src/object.rs index a05c315..8867af3 100644 --- a/lib/xixanta/src/object.rs +++ b/lib/xixanta/src/object.rs @@ -260,14 +260,10 @@ impl Context { var.accessed += 1; Ok(var.clone()) } - // If it's a raw address, then we return the resolved value. - ObjectType::Address => { - let var_to_resolve = var.clone(); - Ok(self.resolve_label(mappings, &var_to_resolve)?) - } - // If it's a .proc, then we account for the number of times - // it was accessed, and we return the resolved value. - ObjectType::Proc => { + // If it's a .proc or a raw address, then we account for the + // number of times it was accessed, and we return the + // resolved value. + ObjectType::Address | ObjectType::Proc => { var.accessed += 1; let var_to_resolve = var.clone(); Ok(self.resolve_label(mappings, &var_to_resolve)?) |
