Add basic blocks and implementation of flattening thunks -> basic blocks
* Basic are a more linear way of representing code. Thunks beget basic blocks, which beget vectors of instructions. * Basic blocks are also being flattened into a vector of instructions (hopefully, no tests done yet) * OH yeah locals can be collected too (but currently are not being collected in the compiler, that should come soon) Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
use crate::obj::prelude::*;
|
||||
use shredder::{GcSafe, Scan, Scanner};
|
||||
use std::collections::BTreeMap;
|
||||
|
||||
/// A stack call frame.
|
||||
#[derive(Debug, Clone)]
|
||||
@@ -25,8 +24,6 @@ unsafe impl Scan for FrameKind {
|
||||
|
||||
unsafe impl GcSafe for FrameKind {}
|
||||
|
||||
pub type Locals = BTreeMap<usize, ObjRef>;
|
||||
|
||||
#[derive(Scan, Debug, Clone)]
|
||||
pub struct Frame {
|
||||
locals: Locals,
|
||||
|
||||
Reference in New Issue
Block a user