-
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.
Performance improvements, various fixes
* Fix issues with graph simplification pass * Improve performance of passes and algorithm implementations * Trait refactoring
- Loading branch information
Showing
40 changed files
with
671 additions
and
238 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
use libeir_intern::Symbol; | ||
|
||
use crate::vm::VMState; | ||
use crate::module::{NativeModule, NativeReturn}; | ||
use crate::process::ProcessContext; | ||
|
||
use crate::term::{Term, MapTerm}; | ||
|
||
use std::rc::Rc; | ||
|
||
fn new_0(_vm: &VMState, _proc: &mut ProcessContext, args: &[Rc<Term>]) -> NativeReturn { | ||
assert!(args.len() == 0); | ||
NativeReturn::Return { | ||
term: Term::Map(MapTerm::new()).into(), | ||
} | ||
} | ||
|
||
pub fn make_maps() -> NativeModule { | ||
let mut module = NativeModule::new(Symbol::intern("maps")); | ||
module.add_fun(Symbol::intern("new"), 0, Box::new(new_0)); | ||
module | ||
} |
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
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.