File tree Expand file tree Collapse file tree 5 files changed +9
-1
lines changed Expand file tree Collapse file tree 5 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -509,6 +509,7 @@ impl CompiledModule {
509
509
/// Returns the text section of the ELF image for this compiled module.
510
510
///
511
511
/// This memory should have the read/execute permissions.
512
+ #[ inline]
512
513
pub fn text ( & self ) -> & [ u8 ] {
513
514
self . code_memory . text ( )
514
515
}
@@ -575,6 +576,7 @@ impl CompiledModule {
575
576
///
576
577
/// These trampolines are used for native callers (e.g. `Func::wrap`)
577
578
/// calling Wasm callees.
579
+ #[ inline]
578
580
pub fn native_to_wasm_trampoline ( & self , index : DefinedFuncIndex ) -> Option < & [ u8 ] > {
579
581
let loc = self . funcs [ index] . native_to_wasm_trampoline ?;
580
582
Some ( & self . text ( ) [ loc. start as usize ..] [ ..loc. length as usize ] )
Original file line number Diff line number Diff line change @@ -122,6 +122,7 @@ impl Mmap {
122
122
/// # Panics
123
123
///
124
124
/// Panics of the `range` provided is outside of the limits of this mmap.
125
+ #[ inline]
125
126
pub unsafe fn slice ( & self , range : Range < usize > ) -> & [ u8 ] {
126
127
assert ! ( range. start <= range. end) ;
127
128
assert ! ( range. end <= self . len( ) ) ;
Original file line number Diff line number Diff line change @@ -127,6 +127,7 @@ impl MmapVec {
127
127
impl Deref for MmapVec {
128
128
type Target = [ u8 ] ;
129
129
130
+ #[ inline]
130
131
fn deref ( & self ) -> & [ u8 ] {
131
132
// SAFETY: this mmap owns its own range of the underlying mmap so it
132
133
// should be all good-to-read.
Original file line number Diff line number Diff line change @@ -54,7 +54,10 @@ impl WasiCtxBuilder {
54
54
pub fn new ( ) -> Self {
55
55
// For the insecure random API, use `SmallRng`, which is fast. It's
56
56
// also insecure, but that's the deal here.
57
- let insecure_random = Box :: new ( cap_rand:: rngs:: SmallRng :: from_entropy ( ) ) ;
57
+ let insecure_random = Box :: new (
58
+ cap_rand:: rngs:: SmallRng :: from_rng ( cap_rand:: thread_rng ( cap_rand:: ambient_authority ( ) ) )
59
+ . unwrap ( ) ,
60
+ ) ;
58
61
59
62
// For the insecure random seed, use a `u128` generated from
60
63
// `thread_rng()`, so that it's not guessable from the insecure_random
Original file line number Diff line number Diff line change @@ -45,6 +45,7 @@ impl SignatureCollection {
45
45
}
46
46
47
47
/// Gets the shared signature index given a module signature index.
48
+ #[ inline]
48
49
pub fn shared_signature ( & self , index : SignatureIndex ) -> Option < VMSharedSignatureIndex > {
49
50
self . signatures . get ( index) . copied ( )
50
51
}
You can’t perform that action at this time.
0 commit comments