-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
438 additions
and
319 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
use smallvec::smallvec; | ||
use crate::ast::SmallVec8; | ||
use crate::parser::StString; | ||
|
||
/// Unresolved offset placeholder | ||
#[derive(Default, Debug, Clone)] | ||
pub struct InstLabel { | ||
/// The instruction position of label | ||
pub inst_index: Option<usize>, | ||
/// The name of this label | ||
pub name: StString, | ||
/// Record all patch needed instructions | ||
pub fixup_instructions: SmallVec8<usize>, | ||
} | ||
|
||
impl InstLabel { | ||
pub fn new(name: StString) -> Self { | ||
Self { | ||
inst_index: None, | ||
name, | ||
fixup_instructions: smallvec![], | ||
} | ||
} | ||
} | ||
|
This file contains 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
Oops, something went wrong.