Move most Cursor methods into a CursorBase trait.
The Cursor navigation methods all just depend on the cursor's position and layout reference. Make a CursorBase trait that provides access to this information with methods and implement the navigation methods on top of that. This makes it possible to have multiple types implement the cursor interface.
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
use dbg::DisplayList;
|
||||
use dominator_tree::DominatorTree;
|
||||
use flowgraph::{ControlFlowGraph, BasicBlock};
|
||||
use ir::{DataFlowGraph, Layout, Cursor, InstBuilder, ValueDef};
|
||||
use ir::{DataFlowGraph, Layout, Cursor, CursorBase, InstBuilder, ValueDef};
|
||||
use ir::{Function, Ebb, Inst, Value, ExpandedProgramPoint};
|
||||
use regalloc::affinity::Affinity;
|
||||
use regalloc::liveness::Liveness;
|
||||
|
||||
Reference in New Issue
Block a user