Commit 1ce5a52 1 parent 09df19c commit 1ce5a52 Copy full SHA for 1ce5a52
File tree 2 files changed +9
-3
lines changed
crates/interpreter/src/interpreter
2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -296,7 +296,7 @@ impl SharedMemory {
296
296
297
297
/// Returns a mutable reference to the memory of the current context.
298
298
#[ inline]
299
- fn context_memory_mut ( & mut self ) -> & mut [ u8 ] {
299
+ pub fn context_memory_mut ( & mut self ) -> & mut [ u8 ] {
300
300
let buf_len = self . buffer . len ( ) ;
301
301
// SAFETY: access bounded by buffer length
302
302
unsafe { self . buffer . get_unchecked_mut ( self . last_checkpoint ..buf_len) }
Original file line number Diff line number Diff line change @@ -58,13 +58,19 @@ impl Stack {
58
58
self . data . is_empty ( )
59
59
}
60
60
61
- /// Returns the underlying data of the stack .
61
+ /// Returns a reference to the underlying data buffer .
62
62
#[ inline]
63
63
pub fn data ( & self ) -> & Vec < U256 > {
64
64
& self . data
65
65
}
66
66
67
- /// Consumes the stack and returns the underlying data.
67
+ /// Returns a mutable reference to the underlying data buffer.
68
+ #[ inline]
69
+ pub fn data_mut ( & mut self ) -> & mut Vec < U256 > {
70
+ & mut self . data
71
+ }
72
+
73
+ /// Consumes the stack and returns the underlying data buffer.
68
74
#[ inline]
69
75
pub fn into_data ( self ) -> Vec < U256 > {
70
76
self . data
You can’t perform that action at this time.
0 commit comments