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:
@@ -28,7 +28,7 @@
|
||||
//! ```
|
||||
|
||||
use binemit::CodeOffset;
|
||||
use ir::{Function, DataFlowGraph, Cursor, InstructionData, Opcode, InstEncodings};
|
||||
use ir::{Function, DataFlowGraph, Cursor, CursorBase, InstructionData, Opcode, InstEncodings};
|
||||
use isa::{TargetIsa, EncInfo};
|
||||
use iterators::IteratorExtras;
|
||||
use result::CtonError;
|
||||
|
||||
Reference in New Issue
Block a user