-
Notifications
You must be signed in to change notification settings - Fork 187
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #467 from sbillig/yul-context
Move static string and created-contracts collection from the analyzer the yulgen stage
- Loading branch information
Showing
114 changed files
with
165 additions
and
416 deletions.
There are no files selected for viewing
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
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,23 @@ | ||
use crate::yul::AnalyzerContext; | ||
use indexmap::IndexSet; | ||
|
||
// This is contract context, but it's used all over so it has a short name. | ||
pub struct Context<'a> { | ||
pub analysis: &'a AnalyzerContext, | ||
|
||
/// String literals used in the contract | ||
pub string_literals: IndexSet<String>, | ||
|
||
/// Names of contracts that have been created inside of this contract. | ||
pub created_contracts: IndexSet<String>, | ||
} | ||
|
||
impl<'a> Context<'a> { | ||
pub fn new(analysis: &'a AnalyzerContext) -> Self { | ||
Self { | ||
analysis, | ||
string_literals: IndexSet::new(), | ||
created_contracts: IndexSet::new(), | ||
} | ||
} | ||
} |
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
Oops, something went wrong.