File tree Expand file tree Collapse file tree 2 files changed +3
-7
lines changed Expand file tree Collapse file tree 2 files changed +3
-7
lines changed Original file line number Diff line number Diff line change 1
1
use super :: { assert_is_word_aligned, PAGE_SIZE , unchecked_unwrap} ;
2
2
use const_init:: ConstInit ;
3
3
use core:: alloc:: AllocErr ;
4
+ use core:: arch:: wasm32;
4
5
use core:: cell:: UnsafeCell ;
5
6
use core:: ptr:: NonNull ;
6
7
use memory_units:: Pages ;
7
8
8
- extern "C" {
9
- #[ link_name = "llvm.wasm.grow.memory.i32" ]
10
- fn grow_memory ( pages : usize ) -> i32 ;
11
- }
12
-
13
9
pub ( crate ) unsafe fn alloc_pages ( n : Pages ) -> Result < NonNull < u8 > , AllocErr > {
14
- let ptr = grow_memory ( n. 0 ) ;
10
+ let ptr = wasm32 :: grow_memory ( n. 0 as i32 ) ;
15
11
if -1 != ptr {
16
12
let ptr = ( ptr as usize * PAGE_SIZE . 0 ) as * mut u8 ;
17
13
assert_is_word_aligned ( ptr as * mut u8 ) ;
Original file line number Diff line number Diff line change @@ -226,7 +226,7 @@ for hacking!
226
226
#![ deny( missing_docs) ]
227
227
#![ cfg_attr( not( feature = "use_std_for_test_debugging" ) , no_std) ]
228
228
#![ feature( alloc, allocator_api, core_intrinsics) ]
229
- #![ cfg_attr( target_arch = "wasm32" , feature( link_llvm_intrinsics ) ) ]
229
+ #![ cfg_attr( target_arch = "wasm32" , feature( stdsimd ) ) ]
230
230
231
231
#[ macro_use]
232
232
extern crate cfg_if;
You can’t perform that action at this time.
0 commit comments