forked from FuelLabs/sway
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow inclusion of multiple source files as dependencies for a single…
… contract/script/etc. (FuelLabs#62) * begin register allocator * begin reg alloc * mutable virtual registers; basic allocation algorithm skeleton * mutable registers in allocation * pull in fuel-asm official ops * switching laptops * begin work on virtual registers and ops * daily checkpoint * add AllocatedOp abstraction * template for parsing ops * allocation algorithm progress * change op parsing logic * WIP parsing inline asm to new ops * more op parsing * finish parsing virtual ops from asm * start registers method * register allocation method * convert virtual registers to allocated ones * switch back to organizational labels for jumps * realized ops * fully allocate registers and resolve labels * print allocated registers * fill in todo!() errors in asm parsing * resolve all todosudo apt-get install vlc in core_lang * switch to ssh for fuel-asm * resolve warnings * fix git url * rustfmt * small self-code-review * resolve module * map the virtual opcodes to fuel_asm ops * code review feedback * factor finalized asm out into its own file * realize data section and instructions to bits * data section offset label * initial bytecode generation * add forc --asm command * print out the loading of the data section op * resolve warnings * fix register allocater bug * cleanup * fix bad error message * code review feedback * fix doctest * fix typo * reference fuel_core for register constants * add stdlib stuff * allow use of interface surface functions in the methods section of trait declarations * comment * basic math stdlib * begin work on include statements * checkpoint while i get breakfast * parse include statements * tiny expect fixes * introduce BuildConfig * build_config module * do plumbing for new files * render warnings and errors on the right text * use interior library name for module name; support aliasing * sketch out include compilation and dead code analysis * perform dead code analysis on imported files * TDD: broken test cases * nested dep example * remove todo * importing absolutely from the root of the project * tests of multi-level dependencies * fix namespace catastrophic short-circuiting when hitting import errors * use constants for message contents; update error message wording Co-authored-by: Alexander Hansen <[email protected]>
- Loading branch information
Showing
32 changed files
with
760 additions
and
133 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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,17 @@ | ||
use std::path::PathBuf; | ||
|
||
/// Configuration for the overall build and compilation process. | ||
#[derive(Clone)] | ||
pub struct BuildConfig { | ||
pub(crate) dir_of_code: PathBuf, | ||
} | ||
|
||
impl BuildConfig { | ||
// note this is intentionally not the trait Default | ||
// since we need at least a manifest path to work with | ||
pub fn root_from_manifest_path(canonicalized_manifest_path: PathBuf) -> Self { | ||
let mut path = canonicalized_manifest_path.clone(); | ||
path.push("src"); | ||
Self { dir_of_code: path } | ||
} | ||
} |
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,2 @@ | ||
pub const DEFAULT_FILE_EXTENSION: &str = "sw"; | ||
pub const LANGUAGE_NAME: &str = "Sway"; |
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.